cheesestraws
Well-known member
NetBSD AppleTalk certainly works fine on amd64, but I've never tried it on ARM - if you do get around to trying it out let me/us know!
Great sleuthing work! Hopefully the commented out code was because no one had bothered to test it on aarch64…Just to confirm, I pulled down cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/source/sets/syssrc.tgz and had a look at /usr/src/sys/arch/evbarm/conf/GENERIC.common. Sure enough, the option for NETATALK is commented out. If I compare with /usr/src/sys/arch/amd64/conf/GENERIC, the NETATALK option is *not* commented out there. I suppose I can try building my own kernel to see if it works.
Edit: built the new GENERIC64 kernel with NETATALK support. It was simple and took about 5 minutes on Apple Silicon. atalkd seems to start up and work now. Not sure why it was commented out from that port.
arm64# /usr/local/sbin/atalkd -V
atalkd 4.0.9dev - AppleTalk Network Manager Daemon
arm64# ifconfig -a
vioif0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ec_capabilities=0x1<VLAN_MTU>
ec_enabled=0
address: 52:54:00:12:34:56
status: active
atalk 65280.234 phase 2 range 1 - 65534 broadcast 65280.255
inet6 fe80::5054:ff:fe12:3456%vioif0/64 flags 0 scopeid 0x1
inet6 fec0::ddce:8bb2:7350:5d16/64 flags 0x40<AUTOCONF>
inet 10.0.2.15/24 broadcast 10.0.2.255 flags 0
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
status: active
atalk 0.0 phase 2
inet6 ::1/128 flags 0x20<NODAD>
inet6 fe80::1%lo0/64 flags 0 scopeid 0x2
inet 127.0.0.1/8 flags 0
;
; Netatalk 4.x configuration file
;
[Global]
; Global server settings
appletalk = yes
appledouble = v2
ea = ad
afp listen = 10.0.2.15
hostname = Puppet Head
uam list = uams_guest.so
[Homes]
basedir regex = /home
[Shared Data]
path = /var/netatalk/AFPShare
arm64# netstat -an | grep LIS
tcp 0 0 10.0.2.15.548 *.* LISTEN
tcp 0 0 127.0.0.1.4700 *.* LISTEN
tcp 0 0 10.0.2.15.22 10.0.2.2.49306 ESTABLISHED
tcp 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
arm64# nbplkup
Puppet Head:AFPServer 65280.234:128
arm64:netatalk 65280.234:4
arm64:Workstation 65280.234:4
It has! Qemu supports vmnet on macOS.But one small problem: macOS hosts don't have tap devices!
It has! Qemu supports vmnet on macOS.
qemu-system-aarch64 \
-accel hvf \
-m 2048 \
-cpu cortex-a57 -M virt,highmem=off \
-drive file=edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \
-drive file=netbsd.qcow2,format=qcow2,media=disk \
-nographic \
-netdev vmnet-bridged,id=vmnet0,ifname=en4 \
-device virtio-net,netdev=vmnet0,mac=52:54:00:f0:0d:01 \
-serial tcp::4444,server,telnet,wait \
#-drive file=NetBSD-10.0-evbarm-aarch64.iso,format=raw,media=cdrom \
13:31:50.732261 AT 65280.187.nis > 0.nis: nbp-lkup 1: "=:=@*" [addr=65280.187.129]
com.apple.FinderInfo
. Things like the filetype/creator information will now be synced with the host. In addition, storage of extended attributes for macOS (AFP3.2 and newer) clients should now be working properly.Wow, that’s definitely a game changer. I assume that opens up the possibility to have a single file server for both classic and modern Macs, including using native tools like Time Machine and SuperDuper to back up the file server?The big one is that resource forks are now natively stored in the file system as opposed to using "._" AppleDouble files. This works regardless of the filesystem your drive is formatted in, so you can share from APFS, HFS+, or even exFAT drives (the OS handles the AppleDouble translation here).
xattr
will show them as extended attributes. In addition, Netatalk still stores its private data in its own extended attribute.There is no AppleTalk userland stack available today, to my best knowledge. If you search these forums you will find that it has been attempted, however. I think it's absolutely feasible.First off, I wanted to thank everybody involved in reintegrating AppleTalk into 4.0. What a relief!
The decision to remove it from 3.x ranks as one of the sillier missteps I've run across in the free software arena.
I'm curious if there's any motion towards an AppleTalk implementation for modern macOS. It's great to be able to access my modern machines via AppleShare over IP, but the fact that we have to use a non-Mac to get AppleTalk support working again is vexing.
AppleTalk implementation for modern macOS
I've got one on one of my many back burners, working title TashNode. The architecture is sort of like inetd, except that instead of plain text, a chain of processes communicates up and down using a simple TLV (type, length, value) protocol. I was going to explain this further but I realized I can't remember anything about AppleTalk since it's been ten months since I worked on it, heh. The bird's eye view is that the main 'node' registers NVEs (network-visible entities) and assigns sockets for them, spawning processes for each protocol in turn - an ImageWriter might spawn ATP processes that spawn PAP processes that spawn some process that renders the output to a modern printer, for example. I got as far as that, but ran into some behavior I couldn't explain trying to get it to play nice with the LaserWriter driver and stalled there. Maybe one day.AppleTalk userland stack
brew update
brew install netatalk
sudo brew services start netatalk
sudo cp /opt/homebrew/etc/pam.d/netatalk /usr/local/etc/pam.d
Thanks.... I made some progress ...@mactjaap Do you get any errors when you run "brew doctor"?
Like the error message says, there's a permissions issue on that Cellar subdir. You can try running "sudo chmod -R 775 /usr/local/Cellar/libunistring"
==> Downloading https://github.com/Netatalk/netatalk/releases/download/netatalk-4-0-8/netatalk-4.0.8.tar.xz
Already downloaded: /Users/tjabring/Library/Caches/Homebrew/downloads/521ecb3601bdf04fbe97e79c91318f9f6addf7217af57ce00be4ec24e9a8f0c9--netatalk-4.0.8.tar.xz
==> Installing dependencies for netatalk: mysql and openldap
==> Installing netatalk dependency: mysql
==> Patching
==> cmake -S . -B build -DCOMPILATION_COMMENT=Homebrew -DINSTALL_DOCDIR=share/doc/mysql -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR
==> cmake --build build
==> cmake --install build
==> ./mysql-test-run.pl status --vardir=/private/tmp/mysql-20250110-45578-o8gzfq/mysql-9.1.0/mysql-test-vardir
==> Downloading https://formulae.brew.sh/api/formula.jws.json
################################################################################################################################################################################################### 100.0%
==> /usr/local/Cellar/mysql/9.1.0_1/bin/mysqld --initialize-insecure --user=tjabring --basedir=/usr/local/Cellar/mysql/9.1.0_1 --datadir=/usr/local/var/mysql --tmpdir=/tmp
🍺 /usr/local/Cellar/mysql/9.1.0_1: 326 files, 292.3MB, built in 127 minutes 54 seconds
==> Installing netatalk dependency: openldap
....
==> Installing netatalk
==> Patching
==> Applying 206fb7771862b9b98452c934dac884aaa397c8ca.patch
==> meson setup build -Dwith-afpstats=false -Dwith-appletalk=false -Dwith-bdb-path=/usr/local/opt/berkeley-db@5 -Dwith-docbook-path=/usr/local/opt/docbook-xsl/docbook-xsl -Dwith-init-dir=/usr/local/Cell
==> meson compile -C build --verbose
Warning: You are using macOS 12.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
def install
inreplace "distrib/initscripts/macos.netatalk.in", "@sbindir@", opt_sbin
inreplace "distrib/initscripts/macos.netatalk.plist.in", "@bindir@", opt_bin
inreplace "distrib/initscripts/macos.netatalk.plist.in", "@sbindir@", opt_sbin
inreplace "distrib/initscripts/systemd.netatalk.service.in", "@sbindir@", opt_sbin
bdb5_rpath = rpath(target: Formula["berkeley-db@5"].opt_lib)
ENV.append "LDFLAGS", "-Wl,-rpath,#{bdb5_rpath}" if OS.linux?
args = [
"-Dwith-afpstats=false",
"-Dwith-appletalk=#{OS.linux?}", # macOS doesn't have an AppleTalk stack
"-Dwith-bdb-path=#{Formula["berkeley-db@5"].opt_prefix}",
"-Dwith-docbook-path=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl",
"-Dwith-init-dir=#{prefix}",
"-Dwith-init-hooks=false",
"-Dwith-install-hooks=false",
"-Dwith-statedir-path=#{var}",
"-Dwith-pam-config-path=#{etc}/pam.d",
"-Dwith-rpath=false",
"-Dwith-spotlight=false",
]
"-Dwith-appletalk=#{OS.linux?}", # macOS doesn't have an AppleTalk stack