Upgrading your Netatalk Install on Ubuntu 12.04 LTS Precise Pangolin
Monday, June 16, 2014 at 3:34PM
Ben M.

Required Packages

Install the following packages by "sudo apt-get install".

If tracker's version is unknown, you can know using command "dpkg-query -l tracker" or "aptitude search tracker".

Note that 12.04 only has libtracker 0.14 availabile at this writing. 0.16 has not been backported.

If libavahi-compat-libdnssd-dev package is installed, remove it, in order to avoid conflict between Avahi and mDNSResponder.

You can type it as one command:

sudo apt-get install build-essential libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev tracker libtracker-sparql-0.14-dev libtracker-miner-0.14-dev zlib1g-dev

Build

Extract a tarball.

tar xvf netatalk-3.x.x.tar.bz2
cd netatalk-3.x.x

 

You should read the help message, in order to know configure options.

If the applicable libraries are installed, many options will be detected automatically.

$ ./configure --help

 

Do configure! The following options are not auto-detected.

./configure \
        --with-init-style=debian \
        --with-cracklib \
        --enable-krbV-uam \
        --with-pam-confdir=/etc/pam.d \
        --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
        --with-tracker-pkgconfig-version=0.14

 

The version 0.14 --with-tracker-pkgconfig-version=0.14 must match the pkg-config version of the installed Tracker libraries. Use the following commands for finding the version info:

pkg-config --list-all | grep tracker
...

 

On successful completion, you will see a report similar to the following:

Compilation summary:
    CPPFLAGS       = -I$(top_srcdir)/include -I$(top_builddir)/include 
    CFLAGS         = -D_U_="__attribute__((unused))" -g -O2
    LIBS           = -ldl  -lcrack
    PTHREADS:
        LIBS   = 
        CFLAGS = -pthread
    TRACKER:
        LIBS   = -Wl,--export-dynamic -pthread -ltracker-sparql-0.16 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0  
        CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/tracker-0.16 -I/usr/include/tracker-0.16/libtracker-sparql  
    SSL:
        LIBS   =  -L/usr/lib64 -lcrypto
        CFLAGS =  -I/usr/include/openssl
    LIBGCRYPT:
        LIBS   = -lgcrypt
        CFLAGS = 
    PAM:
        LIBS   =  -lpam
        CFLAGS = 
    WRAP:
        LIBS   = -lwrap
        CFLAGS = 
    BDB:
        LIBS   =  -L/usr/lib64 -ldb-5.3
        CFLAGS = 
    GSSAPI:
        LIBS   = -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
        CFLAGS = 
    ZEROCONF:
        LIBS   =  -lavahi-common -lavahi-client
        CFLAGS =  -D_REENTRANT
    LDAP:
        LIBS   =  -lldap
        CFLAGS = 
    LIBEVENT:
        bundled
    TDB:
        bundled
    MySQL:
        LIBS   = -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl
        CFLAGS = -I/usr/include/mysql -DBIG_JOINS=1  -fno-strict-aliasing   -g -DNDEBUG
Configure summary:
    INIT STYLE:
         debian
    AFP:
         Extended Attributes: ad | sys
         ACL support: yes
         Spotlight: yes
    CNID:
         backends:  dbd last tdb mysql
    UAMS:
         DHX     (PAM SHADOW)
         DHX2    (PAM SHADOW)
         RANDNUM (afppasswd)
         Kerberos V
         clrtxt  (PAM SHADOW)
         guest
    Options:
         Zeroconf support:        yes
         tcp wrapper support:     yes
         quota support:           yes
         admin group support:     yes
         valid shell check:       yes
         cracklib support:        yes
         ACL support:             auto
         Kerberos support:        yes
         LDAP support:            yes
         AFP stats via dbus:      yes
         dtrace probes:           yes
    Paths:
         Netatalk lockfile:       /var/lock/netatalk
         init directory:          /etc/init.d
         dbus system directory:   /etc/dbus-1/system.d
         pam config directory:    /etc/pam.d
    Documentation:
         Docbook:                 no

 

Docbook is not needed because it is for developers only.

Make and watch for errors.

make

 

Uninstall

Begin with stopping the Netatalk service:

sudo service avahi-daemon stop
sudo service netatalk stop

Then

sudo make install

 

Check

Check features and paths, using "afpd -V".

$ /usr/local/sbin/afpd -V
afpd 3.1.2 - Apple Filing Protocol (AFP) daemon of Netatalk

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version. Please see the file COPYING for further information and details.

afpd has been compiled with support for these features:

          AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4 
         CNID backends: dbd last tdb mysql 
      Zeroconf support: Avahi
  TCP wrappers support: Yes
         Quota support: Yes
   Admin group support: Yes
    Valid shell checks: Yes
      cracklib support: Yes
            EA support: ad | sys
           ACL support: Yes
          LDAP support: Yes
         D-Bus support: Yes
     Spotlight support: Yes
         DTrace probes: Yes

              afp.conf: /usr/local/etc/afp.conf
           extmap.conf: /usr/local/etc/extmap.conf
       state directory: /usr/local/var/netatalk/
    afp_signature.conf: /usr/local/var/netatalk/afp_signature.conf
      afp_voluuid.conf: /usr/local/var/netatalk/afp_voluuid.conf
       UAM search path: /usr/local/lib/netatalk//
  Server messages path: /usr/local/var/netatalk/msg/

 

Finally, restart the Netatalk service:

sudo service avahi-daemon start
sudo service netatalk start

 

Article originally appeared on Bits and Pieces (http://bitspieces.net/).
See website for complete article licensing information.