Yet Another Netatalk 2.2 Fork

NJRoadfan

New Tinkerer
Feb 6, 2022
10
1
3
Most of the patches on my end were to get Netatalk 2.2.6 to actually compile and run properly on current distros.

The papd server was broken for many years. It's clear whoever wrote it only tested it against the LaserWriter 8.x drivers. Anything older was broken simply because the server didn't support all the proper printer queries. Despite pleas from Apple IIgs users over the years, nobody bothered to figure out why printing was broken from the GS/OS LaserWriter driver. Part of it was poor coding on Apple's part, but nothing that any other printer spooler couldn't overcome.
 

Byte Knight

Tinkerer
Oct 21, 2021
90
72
18
The papd server was broken for many years. It's clear whoever wrote it only tested it against the LaserWriter 8.x drivers. Anything older was broken simply because the server didn't support all the proper printer queries. Despite pleas from Apple IIgs users over the years, nobody bothered to figure out why printing was broken from the GS/OS LaserWriter driver. Part of it was poor coding on Apple's part, but nothing that any other printer spooler couldn't overcome.
So we can print from the IIgs to a modern printer now over AppleTalk? And if so, do we need Direct Connect PostScript Printer Driver or TreeHugger?
 

NJRoadfan

New Tinkerer
Feb 6, 2022
10
1
3
If you have the IIgs connected via a LocalTalk-to-Ethernet bridge and AppleTalk setup, Just use the stock LaserWriter driver.
 

rdmark

Moderator
Staff member
Oct 3, 2021
108
172
43
Bug Alert: Netatalk 2 will fail to create icon resources for classic Mac OS files copied onto the AFPShare when running on 64-bit Linux. On Mac OS 7.5 and earlier, files will still be copied but when you access them from another Mac, you will notice that they have lost their icons, reverting to the stock app or document icon. On Mac OS 8.6 and 9, the Finder will throw error -50 and refuse to copy the file. Mac OS X / macOS clients are not affected.

This affects all versions of Netatalk based on the 2.x codebase, including upstream Netatalk 2.2, the Netatalk 2.x fork, and the Netatalk-Classic fork.

For now, it is recommended to run Netatalk 2 on 32-bit Linux. I will notify here again once we find a fix for the bug.


Update: The 64 bit lead was a red herring. It turns out to have been a permissions issue all along.
If you're seeing missing icons or Error -50, you need to make sure write permissions are set correctly for the .AppleDesktop dir inside the shared directory.
Basically, the user that you authenticate with needs to have write permissions.

If permissions are indeed an issue for you, as the authenticating user do a recursive chmod in this fashion:

sudo chmod -R 2775 path/to/shared/dir
 
Last edited:
  • Wow
Reactions: fehervaria

fehervaria

Tinkerer
Sep 23, 2021
153
158
43
47
North Germany
Bug Alert: Netatalk 2 will fail to create icon resources for classic Mac OS files copied onto the AFPShare when running on 64-bit Linux. On Mac OS 7.5 and earlier, files will still be copied but when you access them from another Mac, you will notice that they have lost their icons, reverting to the stock app or document icon. On Mac OS 8.6 and 9, the Finder will throw error -50 and refuse to copy the file. Mac OS X / macOS clients are not affected.

This affects all versions of Netatalk based on the 2.x codebase, including upstream Netatalk 2.2, the Netatalk 2.x fork, and the Netatalk-Classic fork.

For now, it is recommended to run Netatalk 2 on 32-bit Linux. I will notify here again once we find a fix for the bug.
Thanks for sharing. Just wanted to create a new, freshly installed Pi with Bullseye, with all of the bells and whistles to finally have this also available for my vintage guys.
 
  • Love
Reactions: rdmark

rdmark

Moderator
Staff member
Oct 3, 2021
108
172
43
I'm proud to present a new release from the Netatalk 2.x fork: https://github.com/rdmark/Netatalk-2.x/releases/tag/netatalk-2-220401b

This version constitutes a massive refactoring, code cleanup, plus security and stability improvements.

The primary functional change is that the configure script now enables everything AppleTalk related by default, without having to pass half a dozen parameters. The only recommended parameter is for choosing the install type, e.g. --enable-systemd. See the README.md for more examples.

Another fun tidbit is that I went through and tested all the remaining configuration time features, making small fixes here and there to make them compile cleanly. A few examples that you can enable and play around with:
  • SLP, Server Location Protocol. This was the stopgap measure for service discovery in Mac OS X 10.0 and 10.1, before Zeroconf / Bonjour was introduced in 10.2. It doesn't play well with the Zeroconf implementation with Avahi in Netatalk, so you have to choose one or the other.
  • Quota. If you want to limit the amount of files or storage space that one user can utilize on the server, enable and configure Linux quota! Somewhat useless in this day and age, but kind of a fun thing to mess with.
  • Cracklib. Something you can use with the Random Number UAM. Leverages a database of known weak passwords to warn you when using the afppasswd tool. Again, fairly useless, but entertaining!
Anyways, please try out the release, and report back if you run into any bugs!

PS: the Error -50 issue that I described above was caused by a regression bug that I fixed before tagging the release. You should not have to set any special permissions to the shared dir in most cases.
 

fehervaria

Tinkerer
Sep 23, 2021
153
158
43
47
North Germany
I'm proud to present a new release from the Netatalk 2.x fork: https://github.com/rdmark/Netatalk-2.x/releases/tag/netatalk-2-220401b

This version constitutes a massive refactoring, code cleanup, plus security and stability improvements.

The primary functional change is that the configure script now enables everything AppleTalk related by default, without having to pass half a dozen parameters. The only recommended parameter is for choosing the install type, e.g. --enable-systemd. See the README.md for more examples.

Another fun tidbit is that I went through and tested all the remaining configuration time features, making small fixes here and there to make them compile cleanly. A few examples that you can enable and play around with:
  • SLP, Server Location Protocol. This was the stopgap measure for service discovery in Mac OS X 10.0 and 10.1, before Zeroconf / Bonjour was introduced in 10.2. It doesn't play well with the Zeroconf implementation with Avahi in Netatalk, so you have to choose one or the other.
  • Quota. If you want to limit the amount of files or storage space that one user can utilize on the server, enable and configure Linux quota! Somewhat useless in this day and age, but kind of a fun thing to mess with.
  • Cracklib. Something you can use with the Random Number UAM. Leverages a database of known weak passwords to warn you when using the afppasswd tool. Again, fairly useless, but entertaining!
Anyways, please try out the release, and report back if you run into any bugs!

PS: the Error -50 issue that I described above was caused by a regression bug that I fixed before tagging the release. You should not have to set any special permissions to the shared dir in most cases.
Thank you very much.
Is the icon-resource creation bug fixed in this version?
 

rdmark

Moderator
Staff member
Oct 3, 2021
108
172
43
Thank you very much.
Is the icon-resource creation bug fixed in this version?
You are welcome! Yes, this commit fixed the bug (which is what I referred to above as the Error -50 issue).

BTW, one changed behavior that I've noticed after using this release for a while, is that copying certain files over DSI leads to afpd erroring out with dsi_stream_read: len:-1, No such file or directory which I believe is due to file system corruption on the host. We've added validations to afpd when parsing entries to it's expected that operations that previously quietly led to corrupted files, now causes afpd to error out, which is the preferred behavior. Anyhow, if you do see examples of copying seemingly valid files leading to this error please let me know!
 
  • Love
Reactions: fehervaria

rdmark

Moderator
Staff member
Oct 3, 2021
108
172
43
A new stable release of Netatalk 2.x is now available: https://github.com/rdmark/Netatalk-2.x/releases/tag/netatalk-2-220701

The aforementioned dsi_stream_read error should have been fixed now. It seems to have been caused by a refactoring of the logging routines. Reverting those changes leaves us with slightly lower quality logs, until I can figure out how to apply those changes without messing with DSI.

I'm also introducing an easy install shell script, tested on Debian Linux and derivatives. Find it in ./contrib/shell_utils/debian_install.sh

The project's README.md is now much fleshed out, borrowing contents I wrote for the RaSCSI wiki, to make it a one stop shop for getting started with Netatalk.

Beyond this, there are a few improvements to Makefiles and header imports to make the codebase more compatible with modern Linux distros and toolchains. (As reported by users of Arch and Alpine Linux.)