• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

Yet Another Netatalk 2.2 Fork

shirsch

New member
Hi @slipperygrey ,
Sorry this one fails again at build. Here is how I try to be sure I'm not goofing :
git clone https://github.com/rdmark/Netatalk-2.x. <-- is it the correct one to get ?
cd Netatalk-2.x/
./bootstrap
./configure --enable-systemd --enable-zeroconf
make all

fails here :
... Makefile:868: ../../etc/afpd/.deps/test-volume.Po: Aucun fichier ou dossier de ce type make[3]: *** Aucune règle pour fabriquer la cible « ../../etc/afpd/.deps/test-volume.Po ». Arrêt. make[3] : on quitte le répertoire « /home/galgot/Documents/Netatalk-2.x/test/afpd » Makefile:424 : la recette pour la cible « all-recursive » a échouée make[2]: *** [all-recursive] Erreur 1 make[2] : on quitte le répertoire « /home/galgot/Documents/Netatalk-2.x/test » Makefile:477 : la recette pour la cible « all-recursive » a échouée make[1]: *** [all-recursive] Erreur 1 make[1] : on quitte le répertoire « /home/galgot/Documents/Netatalk-2.x » Makefile:407 : la recette pour la cible « all » a échouée make: *** [all] Erreur 2

(Translation : "Aucun fichier ou dossier de ce type" means "No file or folder of this type"
"Aucune règle pour fabriquer la cible" ---> "no rules to build target"
"Arrêt" ---> "stop"
"on quitte le répertoire" ---> "we leave directory..."
"la recette pour la cible « all-recursive » a échouée" ---> "the recipe for target « all-recursive » failed"
...)

Also tried removing
CFLAGS="-Wall -Werror $CFLAGS"
from ./configure.ac earlier. But it failed build too.
@slipperygrey Did you ever get to the bottom of this error? I'm seeing the same thing when building on Ubuntu 18.04.
 

slipperygrey

Well-known member
@shirsch No, we did some high level troubleshooting but couldn't figure out at what stage in the bootstrap and configuration process that incompatible makefiles gets generated. There's some change deep in the Autotools toolchain over the last few years that broke backwards compatibility.

If you have a moment to help troubleshooting, can you please try the upstream HEAD of branch-netatalk-2-2? In the upstream code, we've only done the bare minimum of fixes to get it compiling and running on modern systems, whereas in my fork we've been more proactive about resolving autoconf deprecation warnings and bringing the codebase up to date. This may very well have broken compatibility with very old environments.

And in the long run, would you consider upgrading to a more recent OS version? Your Ubuntu release there is over 4 years old, which is an eon in the Linux world. ;)
 

shirsch

New member
Fair enough. The GNU build system is dark, deep and impenetrable. The four or five folks who really understand it deeply aren't going to help with debugging. I suspect it's time to put a gun to my head and upgrade.

As I wrote in the Github issue the same problem exists on the upstream HEAD.
 

slipperygrey

Well-known member
Dark and deep, indeed! In addition, the Netatalk codebase is at least 25 years old, with many sedimentary layers of tech debt.
 

Yoshihide

Member
A new release has been tagged, that contains the above workaround, plus three more bug fixes. Recommended to upgrade for all users: https://github.com/rdmark/Netatalk-2.x/releases/tag/netatalk-2-220801
I stumbled upon this thread since I've been struggling to find a way to create an AppleShare server after Netatalk 3 has stopped functioning with the older protocols.

The latest release seemed like it went OK, but it still won't appear on my old 68k Macs, and though it does appear on the sidebar in the latest macOS, it simply fails to login with an error. I've been scrambling on the internet for weeks, but to find no answers or solutions.

I do see some error that I have no clue what it's about - any help appreciated getting Netatalk 2.x up and running

Nov 19 18:10:58 raspberrypi afpd[1103]: Failed to commit entry group: Is empty
Code:
Nov 19 18:10:52 raspberrypi systemd[1]: Started Netatalk AFP fileserver for Macintosh clients.
Nov 19 18:10:58 raspberrypi afpd[1103]: Raspberry Pi:AFPServer@* started on 65280.5:131 (2.221101)
Nov 19 18:10:58 raspberrypi afpd[1103]: "Raspberry Pi"'s signature is 397509BD4D6B41A2B6045F8A28DA9C28
Nov 19 18:10:58 raspberrypi afpd[1103]: uam: "DHX2" available
Nov 19 18:10:58 raspberrypi afpd[1103]: uam: "Cleartxt Passwrd" available
Nov 19 18:10:58 raspberrypi afpd[1103]: uam: "No User Authent" available
Nov 19 18:10:58 raspberrypi afpd[1103]: Failed to commit entry group: Is empty
Nov 19 18:10:58 raspberrypi afpd[1103]: Successfully started avahi loop.
Nov 19 18:10:58 raspberrypi afpd[1103]: Registering CNID module [last]
Nov 19 18:10:58 raspberrypi afpd[1103]: Registering CNID module [dbd]

Nov 19 18:10:09 raspberrypi afpd[499]: dsi_tcp: couldn't find network interface with IP address to advertice, check to make sure "raspberrypi" is in /etc/hosts or can be resolved with DNS, or add a netinterface that is not a loopback or point-2-point type
Code:
Nov 19 18:10:07 raspberrypi systemd[1]: Starting Netatalk AFP fileserver for Macintosh clients...
Nov 19 18:10:08 raspberrypi systemd[1]: netatalk.service: Can't open PID file /var/lock/netatalk (yet?) after start: No such file or directory
Nov 19 18:10:08 raspberrypi systemd[1]: Started Netatalk AFP fileserver for Macintosh clients.
Nov 19 18:10:08 raspberrypi netatalk[495]: Netatalk AFP server starting
Nov 19 18:10:08 raspberrypi netatalk[495]: Registered with Zeroconf
Nov 19 18:10:09 raspberrypi cnid_metad[501]: CNID Server listening on localhost:4700
Nov 19 18:10:09 raspberrypi afpd[499]: dsi_tcp: couldn't find network interface with IP address to advertice, check to make sure "raspberrypi" is in /etc/hosts or can be resolved with DNS, or add a netinterface that is not a loopback or point-2-point type
Nov 19 18:10:09 raspberrypi afpd[499]: Netatalk AFP/TCP listening on :::548
 

slipperygrey

Well-known member
@Yoshihide At least part of the problem here is that Netatalk 3.x is still running. You need to properly uninstall Netatalk 3.x, or at the very least disable the `netatalk` systemd service, before attempting to run Netatalk 2.x on your system.
 

Yoshihide

Member
@Yoshihide At least part of the problem here is that Netatalk 3.x is still running. You need to properly uninstall Netatalk 3.x, or at the very least disable the `netatalk` systemd service, before attempting to run Netatalk 2.x on your system.
Thanks, uninstalling Netatalk 3.x did the trick... partly.

There are no errors, everything looks OK, and I can access it from a modern macOS. But, not from a 68k Mac with System 7.1.

It simply won't appear in the Chooser "AppleShare" servers like it did on older versions of the original Netatalk.
bummed. what else could be wrong here?

Code:
pi@raspberrypi:~ $ nbplkup
                    raspberrypi:ProDOS16 Image                     65280.151:3
                    raspberrypi:Apple //e Boot                     65280.151:3
                    HP ENVY 110:LaserWriter                        65280.151:133
                    raspberrypi:AFPServer                          65280.151:131
                    raspberrypi:TimeLord                           65280.151:129
                    raspberrypi:Apple //gs                         65280.151:3
                    
pi@raspberrypi:~ $ systemctl status afpd
● afpd.service - Netatalk AFP fileserver for Macintosh clients
     Loaded: loaded (/lib/systemd/system/afpd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-11-20 12:54:01 JST; 2min 44s ago
    Process: 1251 ExecStart=/usr/local/sbin/afpd -c 20 (code=exited, status=0/SUCCESS)
      Tasks: 3 (limit: 2058)
        CPU: 4.930s
     CGroup: /system.slice/afpd.service
             ├─1257 /usr/local/sbin/afpd -c 20
             └─1528 /usr/local/sbin/afpd -c 20

Nov 20 12:55:03 raspberrypi afpd[1257]: child[1522]: exited 1
Nov 20 12:55:03 raspberrypi afpd[1257]: child[1505]: done
Nov 20 12:55:03 raspberrypi afpd[1527]: AFP/TCP session from 192.168.26.101:64280
Nov 20 12:55:03 raspberrypi afpd[1257]: child[1526]: exited 1
Nov 20 12:55:03 raspberrypi afpd[1257]: child[1527]: done
Nov 20 12:55:03 raspberrypi afpd[1528]: AFP/TCP session from 192.168.26.101:64281
Nov 20 12:55:03 raspberrypi afpd[1528]: DHX2 login: pi
Nov 20 12:55:05 raspberrypi afpd[1528]: AFP3.3 Login by pi
Nov 20 12:55:05 raspberrypi afpd[1528]: Volume /home/pi/afpshare use CNID scheme dbd.
Nov 20 12:55:05 raspberrypi afpd[1528]: CNID server: localhost:4700
pi@raspberrypi:~ $ systemctl status atalkd
● atalkd.service - Netatalk AppleTalk daemon
     Loaded: loaded (/lib/systemd/system/atalkd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-11-20 12:54:01 JST; 2min 52s ago
    Process: 496 ExecStart=/usr/local/sbin/atalkd (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 2058)
        CPU: 55ms
     CGroup: /system.slice/atalkd.service
             └─522 /usr/local/sbin/atalkd

Nov 20 12:53:15 raspberrypi systemd[1]: Starting Netatalk AppleTalk daemon...
Nov 20 12:53:15 raspberrypi atalkd[522]: Set syslog logging to level: LOG_DEBUG
Nov 20 12:53:15 raspberrypi atalkd[522]: restart (2.221101)
Nov 20 12:53:17 raspberrypi atalkd[522]: zip_getnetinfo for eth0
Nov 20 12:53:40 raspberrypi atalkd[522]: zip_getnetinfo for eth0
Nov 20 12:53:50 raspberrypi atalkd[522]: zip_getnetinfo for eth0
Nov 20 12:54:00 raspberrypi atalkd[522]: config for no router
Nov 20 12:54:01 raspberrypi atalkd[522]: ready 0/0/0
Nov 20 12:54:01 raspberrypi systemd[1]: Started Netatalk AppleTalk daemon.
pi@raspberrypi:~ $ systemctl status netatalk
● netatalk.service
     Loaded: loaded (/etc/init.d/netatalk; generated)
     Active: active (exited) since Sun 2022-11-20 12:53:15 JST; 3min 42s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 502 ExecStart=/etc/init.d/netatalk start (code=exited, status=0/SUCCESS)
        CPU: 42ms

Nov 20 12:53:15 raspberrypi systemd[1]: Starting netatalk.service...
Nov 20 12:53:15 raspberrypi systemd[1]: Started netatalk.service.
pi@raspberrypi:~ $
 

slipperygrey

Well-known member
@Yoshihide Did you try out different configurations in /etc/netatalk/atalkd.conf ? I suspect that the AppleTalk routing between your server and your System 7.1 Mac isn't working. I have some configuration examples in my README, and there's more in the official Netatalk 2.x docs on SourceForge.

One thing you can try to see if the routing works, is to turn on file sharing on your System 7.1 Mac. If routing works, the `nbplkup` tool should be able to see the file server that's running on the Mac.
 

Yoshihide

Member
@Yoshihide Did you try out different configurations in /etc/netatalk/atalkd.conf ? I suspect that the AppleTalk routing between your server and your System 7.1 Mac isn't working. I have some configuration examples in my README, and there's more in the official Netatalk 2.x docs on SourceForge.

One thing you can try to see if the routing works, is to turn on file sharing on your System 7.1 Mac. If routing works, the `nbplkup` tool should be able to see the file server that's running on the Mac.
Both don't seem to work either.

I haven't really tried different configurations for atalkd.conf, becuase there's only one interface (eth0), and no other options. There is WiFi, but not connected or used.
So the only option in atalkd.conf is adding "eth0", which after a reboot would be populated with there parameters:
eth0 -phase 2 -net 0-65534 -addr 65280.88
This is pretty much the same as when it did work with the original Netatalk 2.2 with an older version of the OS, so it's unlikely these settings are incorrect.

As with the 'nbplkup', I've tried enabling it on my SE/30 as shown below, but it doesn't seem to catch that on the linux server side. No signs of any Macintosh SE/30 there.
Picture 1.png
Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

pi@raspberrypi:~ $ nbplkup
raspberrypi:proDOS16 Image 65280.88:3
raspberrypi:Apple //e Boot 65280.88:3
HP ENVY 110:LaserWriter 65280.88:133
Raspberry Pi:AFPServer 65280.88:131
raspberrypi:TimeLord 65280.88:129
raspberrypi:Apple //gs 65280.88:3
 

slipperygrey

Well-known member
@Yoshihide What does the network topography look like between the two systems? What kinds of routers sit in between? The AppleTalk packets are seemingly not being routed correctly between the two systems.
 

Yoshihide

Member
@Yoshihide What does the network topography look like between the two systems? What kinds of routers sit in between? The AppleTalk packets are seemingly not being routed correctly between the two systems.
BINGO

I realized that there is a wireless converter between the hub that the SE/30 is connected to and the hub that the RPi is connected to.
Moved the SE/30 and connected it directly to the same hub as the RPi and now they both see each other, including the printer.

But, this is quite strange - This setup with the wireless converter in between has worked flawlessly for years and known to pass AppleTalk packets. Nothing has been altered until today.
I don't see how upgrading the RPi OS and Netatalk would somehow magically change how the wireless converters, that have no physical connection to the RPi, work and stop passing AppleTalk packets.

Are there any differences in the original Netatalk and your version on how it identifies and sends out packets?
 

slipperygrey

Well-known member
@Yoshihide Good to hear that you figured out where it got hung up. I don't know of any deliberate changes that we made to the low level DDP networking layer of Netatalk in my fork. After fixing the obvious low hanging fruit bugs and merging a few dozen community patches, what I did was to pretty much follow along with Chris Kobayashi's netatalk-classic project, which led to a huge amount of refactoring and getting rid of dead/useless features and unused platform code, while strengthening the security here and there. Unlike Chris's project, I did not deprecate DSI (the TCP/IP layer). All that said, the tens of thousands of lines code that were changed could easily have led to the introduction of any number of corner case bugs that we haven't caught yet.

One thing you could try, if you like, is to run the bleeding edge upstream Netatalk 2.2. This is the more conservative branch, where all patches have been vetted by veteran Netatalk (and Samba) maintainer Ralph Boehme. It should functionally be identical to Netatalk 2.x, with the main difference that you have to pass a bunch of option parameters to the configure script in order to enable DDP and other AppleTalk components.
 
Top