I had to fiddle around with this a bit and thought it might be useful to others. I’m using a Joyent SmartOS zone as a file server for my Macs at home, and Netatalk is really the best way to share files to a Mac from a UNIX system.
Real quick, here’s how it was done:
- download netatalk source, untar the source, cd into the source directory
./configure --with-bdb=/opt/local --with-init-style=solaris --without-pam --prefix=/opt/localvim distrib/initscripts/Makefile- find the line that begins with “
servicedir” and change it to: servicedir = /var/svc/manifest/network/- save & exit the makefile
make && sudo make installvim /opt/local/etc/afp.confand add your sharessudo svcadm enable netatalk- verify that it’s running with:
svcs netatalk
Special thanks to rmustacc in Freenode/#illumos for helping me get the SMF manifest installing to the correct path. I hope some of you find this helpful.
Probably worth noting that in order to get the DHX2 UAM, you’ll need at least the “libgcrypt” and “openssl” pkgsrc packages installed, and the additional configure arguments:
“–with-ssl-dir=/opt/local –with-libgcrypt”
Without this you’ll likely have trouble with recent OS X clients.
Joshua, thanks for the tips. I’ve incorporated this into the original post. My dataset already had both packages but I wasn’t using the minimalist SmartOS dataset. I haven’t had any problems with my Lion client but I know this can vary from version to version of OS X.
OK I had to back the changes out. When I actually tried it, it wouldn’t compile.
CC afppasswd.o
CCLD afppasswd
ld: fatal: library -lcrypto: not found
ld: fatal: file processing errors. No output written to .libs/afppasswd
collect2: error: ld returned 1 exit status
libcrypto doesn’t get linked properly because the -L path points to /opt/local/lib/64 which dowsn exist. You can either fix the Makefile(s) of create a symlink.
Nice. Any tips on getting afpd to save filenames in UTF-8 normalization form C (“precomposed”) instead of the Mac default? I would think volcharset=UTF-8 (the default) would do this, but no…
Thanks, I got it to work fine with OpenIndiana, even with gcrypt support.
Which Templated dataset did you use to install the netatalk on SmartOS?
Thanks,
d
a0f8cf30-f2ea-11e1-8a51-5793736be67c smartos 2012-08-30 sdc:sdc:standard64:1.0.7
[...] Machine backup for my macs (my laptop and my wife’s iMac). I found this excellent post about building netatalk 3.0.1 in SmartOS, but it skipped a few of the dependencies, and did the patch after configure, which means if you [...]
new configure option “–with-init-dir” for SmartOS and Fedora
http://sourceforge.net/p/netatalk/feature-requests/77/
http://sourceforge.net/p/netatalk/code/ci/cc7d5d2543c91fe2461a7bd482bf8969638e89b9/