Compile and configure Netatalk 3.1 for the Raspberry PI without Spotlight support

I’m switching to the project’s Git repository. In order to compile, I’ll need some tools first:

$ sudo apt-get install autoconf libtool automake

I’m now ready to generate the ./configure file:

$ ./bootstrap

It will take a long while, so better grap a cup of coffee…

I think my previous config lacks support for libiconv character translation capabilities. If so

$ ./configure --with-init-style=debian --with-cracklib --enable-krbV-uam --without-libevent --with-pam-confdir=/etc/pam.d --with-dbus-sysconf-dir=/etc/dbus-1/system.d

And this is my result:

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
    SSL:
        LIBS   =  -lcrypto
        CFLAGS =  -I/usr/include/openssl
    LIBGCRYPT:
        LIBS   = -L/lib/arm-linux-gnueabihf -lgcrypt
        CFLAGS = 
    PAM:
        LIBS   =  -lpam
        CFLAGS = 
    WRAP:
        LIBS   = -lwrap
        CFLAGS = 
    BDB:
        LIBS   =  -ldb-5.1
        CFLAGS = 
    GSSAPI:
        LIBS   = -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
        CFLAGS = 
    ZEROCONF:
        LIBS   =  -lavahi-common -lavahi-client
        CFLAGS =  -D_REENTRANT
    LDAP:
        LIBS   =  -lldap
        CFLAGS = 
    LIBEVENT:
        LIBS   = 
        CFLAGS = 
    TDB:
        bundled
Configure summary:
    INIT STYLE:
         debian
    AFP:
         Extended Attributes: ad | sys
         ACL support: yes
         Spotlight: no
    CNID:
         backends:  dbd last tdb
    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

So now I’m ready to compile the binaries:

$ make && sudo make install

Note: Netatalk 3.1 features new Spotlight support, so I also have to add the tracker and tracker-devel packages, but they require dbus  and a whole lot of gnome packages. I think I’ll pass for the moment and I’ll test it on some of my Ubuntu boxes.

Log on to your machine through SSH without a password

This post talks about using public keys in a Unix machine to avoid entering your password everytime you connect via SSH.

Once you’ve implemented it, you would probably want to add further security using a common passphrase, and soon would become bored of typing it. So here it comes ssh-agent to help you with your long passphrases.

 

And this is how you store your passphrases in your Keychain if using Mac OSX.

Compile and configure Netatalk 3.0.4 for Raspberry PI

By the time I’m writing this, Netatalk 3.0.4 has been recently released.

We need to install the basic linux compiling tools

$ sudo apt-get install build-essential

Then we’re ready to add several Debian packages that provide extra functions needed to work with up-to-date OSX Mountain Lion.

$ sudo apt-get install  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 libevent-dev

And now we’re ready to compile.

 $ ./configure --with-init-style=debian --with-cracklib --enable-krbV-uam --without-libevent --with-pam-confdir=/etc/pam.d --with-dbus-sysconf-dir=/etc/dbus-1/system.d

This step wll take a while (go stretch and make a good cup of cofee).

$ make && make install
Options:
 Zeroconf support:        yes
 tcp wrapper support:     no
 quota support:           yes
 admin group support:     yes
 valid shell check:       yes
 cracklib support:        no
 ACL support:             no
 Kerberos support:        yes
 LDAP support:            no
 dbus support:            no
 dtrace probes:           no

Trouble with my desktop client

I’ve been using Owncloud for a while now, and I keep struggling with my own inexperience using servers with clients both inside my own intranet and the internet.

One of the main common problems is the creation of SSL Certificates. I used a temporary solution using a self signed one, but I know I’ll have to deal with a Third Party instead of constantly adding exceptions.

Recently my OSX client refused to sync, although I used it from the intranet without any hassle. Following some threads here and here I found one of my basic problems: I had to declare my Server Name, otherwise the initial SSL handshake will fail.

Here’s my working /etc/apache2/sites-enabled/default-ssl sample:

<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
ServerName outsideworld.mydomainname.com

Update: Since I explicitly declared my server name, clients from my home intranet were no longer allowed to connect, so I needed to declare a ServerAlias, that is, my server’s name within he local network.

<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
ServerName outsideworld.mydomainname.com
ServerAlias myintranetname

P.S: Maybe in a while I should check out this piece about multiple wirtual hosts under a same Apache instance.

Raspberry Pi as a music server

My Raspberry Pi is already serving music files both as a Samba share and as a MiniDLNA server (compatible with both Xbox 360 and PS3, for those of you interested).

I’ve just discovered Pi MusicBox, a very straight forward Raspberry Pi distro which comes already prepared with an AirTunes emulator (ready to stream music wirelessly to your iOS devices), Spotify and Soundcloud stream capability via the open source Mopidy server, and much more.

My own Raspberry setup is headless, so I’m more interested in the individual MusicBox components than in the distribution itself, but I think it could be a great start for any begginner eager to discover the possibilities of Linux.