Netatalk 4.0 - Future-proofing Apple File Sharing

thecloud

Active member
Leopard was the last version of the Mac OS to support the AppleTalk protocol stack. No version since then has the required support in the kernel, so macOS cannot run atalkd directly. When you fire up atalkd on a macOS host, it will just print an error message and exit. If you want to use a macOS system as a server for System 7 clients (i.e. over AppleTalk instead of TCP/IP), you would need to run a different OS which *does* support AppleTalk in a virtual machine on your Mac.

Your second question is thought-provoking. I'm using Netatalk running in a NetBSD VM on macOS to share a directory on a volume which has over 7GB free. System 7 clients see this share as having less than 2GB free, obviously, but they also see it as using zero K of space, which is clearly not the case. I tried setting legacy volume size = yes in afp.conf and restarting the server, but the results were the same.

ZeroKSharedData.png
 

NJRoadfan

Well-known member
The legacy volume size option is only needed in limited situations. Generally with pre-System 7.5 Finder running later (and unsupported) versions of AppleShare Client.
 

JAG

Well-known member
The legacy volume size option is only needed in limited situations. Generally with pre-System 7.5 Finder running later (and unsupported) versions of AppleShare Client.

Ah yes, but pre-System 7.5 is essentially all of my use.
 

thecloud

Active member
Your pre-System 7.5 systems will almost certainly be running the version of AppleShare that was installed with them. You probably didn't install an updated Mac OS 8 or 9 version of the AppleShare client extension onto your pre-7.5 system, which I think is the edge case that this refers to.

It looks like the "0 bytes used" issue is cosmetic only. Doing a "Get Info" on individual files or folders shows their correct size. But the numbers in the share's Finder windows (zero K in disk, 2,047.9 MB available) never change, even after copying several MB of data to the server. This makes me think I have probably missed something in my configuration. I'm using appledouble = v2 and ea = ad. The dbd utility warns that the volume does not support Extended Attributes and says "Unknown Extended Attributes option: 0" but everything else seems ok.
 

NJRoadfan

Well-known member
The zero K on disk is normal. The AppleShare clients in question support AFP2.2, which has extended disk size and free space commands to report over 2GB/4GB of disk space free or used. Older versions of Finder only allocated a 32-bit value for these values (later unsigned), and would overflow on larger shares causing problems.

@thecloud, I was under the impression that NetBSD 10 supported extended attributes out of the box?
 

thecloud

Active member
@thecloud, I was under the impression that NetBSD 10 supported extended attributes out of the box?
That's what I thought too, but apparently I must have deselected it when I installed NetBSD because:
Code:
arm64# dumpfs / | head
file system: /dev/rdk1
format  FFSv2
endian  little-endian
...
which means I didn't get extended attributes. If I had, the format would have been FFSv2ea. It looks like I can turn them back on, but also, "FFSv2ea file systems are not compatible with any other operating system" so maybe that's why I decided against it.
 

slipperygrey

Well-known member
A quick tally on the Netatalk v4 adoption in downstream distribution channels:
The OSes and 3rd party repos that now distribute a version of Netatalk 4 are...
  1. Arch Linux
  2. Debian GNU/Linux
  3. Devuan GNU+Linux
  4. Fedora
  5. Homebrew
  6. Kali Linux
  7. Mageia Linux
  8. NetBSD
  9. OpenBSD
  10. OpenWrt
  11. PureOS
  12. Raspberry Pi OS
  13. Slackware
  14. Ubuntu
In the works, that I know of, are...
  1. NixOS
  2. MacPorts
Anyways, I'm very pleased with the adoption so far, only 4 months after release. The notable laggards are Alpine Linux and Gentoo, which still distribute the older 3.1, as well as FreeBSD which upgraded their port to 3.2 a few months ago.
 

slipperygrey

Well-known member
This is more of a niche project update than usual, but I'm proud to share that as of today I've put in place structures that allow anyone to translate the Netatalk manual to other languages, and have them published on the netatalk.io website in the future. (Or be packaged by distros that package localized docs, and then read locally.)

To summarize the technical details: Before, the manual was kept in XML format, and then transformed with DocBook XSL to roff man pages or html pages. DocBook is a fine and capable technology, but it's very old school, rigid, and slow. So I worked a few late night to convert the whole manual, all readmes, and the entire website to modern Markdown (using pandoc to automate the process) and then polished it until it shone.

A preview version of the html manual is online at https://netatalk.io/manual/en/

Additionally, since the early 2010s there's been a Japanese localization of the Netatalk manual that's been effectively operated as a separate project by two diligent community members. They abandoned the project a few years ago, after which I pulled it into Netatalk proper. However, their approach was to take a copy of the 10k+ lines of XML code and hard code the translations, so to speak. Needless to say, keeping the translation up to date has been extremely cumbersome.

So as part of the Markdown transition, I introduced po4a, a gettext based tool, to break translations out of the source code. Now it's as easy as editing three files, running po4a, and then go crazy with translation in the resulting po files.

If someone feels up for translating just under 1200 strings of technical documentation, here's a guide for getting started. 💪
 

Joopmac

Well-known member
Extremely interested in this. Is there a compiled version for n00bs like me? A simple .pkg installer that installs the Appletalk daemon with the AFP server would be sooo sweet!!
 

slipperygrey

Well-known member
Extremely interested in this. Is there a compiled version for n00bs like me? A simple .pkg installer that installs the Appletalk daemon with the AFP server would be sooo sweet!!
You're talking about an installer for macOS, right?

You can use Homebrew to get a compiled version of netatalk ready to run.

Please note that we don't have an AppleTalk stack on macOS. Apple did away with it in 2009. Linux and NetBSD are your options for AppleTalk goodness right now.
 

Joopmac

Well-known member
Right=) ah, i misread and thought the AppleTalk protocol was back for arm64 architecture….
 
Top