


If you want to serve AFP (Apple Filing Protocol) shares from an OpenSolaris box you need to install netatalk. However, it doesn't seem to get maintained any more (I'm writing this in June 2008) and the code doesn't compile cleanly on OpenSolaris. These instructions talk about getting netatalk 2.0.3 to compile on OpenSolaris 2008.5.
We need to do install two packages: the Berkeley DB and netatalk. I decided to use BDB 4.2.x because netatalk talks about supporting only 4.1.x and 4.2.x and because I wanted to reuse existing data from my former Linux server.
These instructions assume you are a user that can call pfexec to get root access. I use a directory $HOME/src in which I will compile everything. So, let's first create that directory:
mkdir -p $HOME/src
We will install our stuff into the /usr/local tree because that's exactly what this directory tree is for: stuff compiled and installed by the admin. If not already done you need to add /usr/local/lib to the dynamic linker search path:
pfexec crle -u -l /usr/local/lib
Of course you need to download the BDB first. Grab version 4.2.52 with AES support.
These are the steps to compile and install the BDB:
While compiling, it can happen that you see the following error message:
cc -o .libs/db_archive .libs/db_archive.o .libs/util_sig.o ./.libs/libdb-4.2.so@ -R/usr/local/lib
ld: fatal: file ./.libs/libdb-4.2.so@: open failed: No such file or directory
ld: fatal: File processing errors. No output written to .libs/db_archive
If so, you need to fix libtool: edit the file libtool and search for the comment "test EBCDIC or ASCII". Replace the line "A) # EBCDIC based system" with "foo)" and save. Then run "make" again.
Now it's time for netatalk. Download it from SourceForge.
That's it ! Note that while everything got installed into /usr/local and the configuration files are thus in /usr/local/etc/netatalk the boot (rc) script got installed correctly in /etc/init.d. So to start the daemon you need to call "/etc/init.d/atalk start" and to stop it "/etc/init.d/atalk stop". For instruction on how to configure netatalk, see netatalk's online documentation.
If you have additional comments/corrections, please tell me.