# Netatalk AFP server and Spotlight

## tova

Hello,

is it my wrong configuration, or gentoo package net-fs/netatalk has no support of spotlight? If it has, how to enable it?

afpd -V:

Spotlight support: No

net-fs/netatalk-3.1.6::gentoo  USE="(acl) cracklib dbus debug kerberos pam quota samba shadow ssl tcpd tracker utils  -avahi -ldap -pgp -static-libs"

Thanks.

T.

----------

## bbgermany

Hi,

for spotlight support, you need at least (according to the documentation at http://netatalk.sourceforge.net/3.1/htmldocs/installation.html#idm140014504895744 ) app-misc/tracker. Make sure you have this installed and recompile the netatalk package and try again.

greets, bb

----------

## tova

Hi,

thank you for your response. Tracker is installed (and many and many other dependencies). Spotlight is enabled in GLOBAL part of afpd.conf.

T.

----------

## bbgermany

So you got it working or not? If yes, add a solved to the thread-topic.

greets, bb

----------

## pilla

Moved from Gentoo Chat to Networking & Security.

----------

## tova

No, spotlight is not working  :Smile: 

I don't believe, that gentoo package netatalk include support for spotlight  :Sad: 

[ebuild   R    ] net-fs/netatalk-3.1.6::gentoo  USE="(acl) cracklib dbus debug kerberos pam quota samba shadow ssl tcpd tracker utils -avahi -ldap -pgp -static-libs" PYTHON_TARGETS="python2_7"

[ebuild   R    ] app-misc/tracker-1.6.1:0/100::gentoo  USE="cue exif gif gsf gstreamer iptc iso jpeg miner-fs pdf tiff vorbis xml xmp xps (-eds) -ffmpeg -firefox-bookmarks -flac -gtk -libav -mp3 -nautilus -networkmanager -playlist -rss -stemmer {-test} -thunderbird -upnp-av -upower"

I had a problem with tracker, because trackehr has a problem with dbus.

Now, tracker is working:

MacShare ~ # tracker-control --list-miners-available

WARNING: The 'tracker-control' command is no longer available.

WARNING: Use 'tracker <command> [<args>]' instead...\n

Found 4 miners installed:

  org.freedesktop.Tracker1.Miner.Files

  org.freedesktop.Tracker1.Miner.Extract

  org.freedesktop.Tracker1.Miner.Userguides

  org.freedesktop.Tracker1.Miner.Applications

But Spotlight no:

MacShare ~ # afpd -V

afpd 3.1.6 - 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

      Zeroconf support: No

  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: No

         D-Bus support: Yes

Spotlight support: No

         DTrace probes: No

              afp.conf: /etc/afp.conf

           extmap.conf: /etc/extmap.conf

       state directory: /var/lib/netatalk/

    afp_signature.conf: /var/lib/netatalk/afp_signature.conf

      afp_voluuid.conf: /var/lib/netatalk/afp_voluuid.conf

       UAM search path: /usr/lib64/netatalk//

  Server messages path: /var/lib/netatalk/msg/

----------

## bbgermany

Hi,

according to your use-flags, tracker seems to be enabled. You could try the following:

```

mkdir -p /usr/portage/env.d/net-fs

echo "EXTRA_CONF=\"--with-tracker-pkgconfig-version=1.6.1" > /usr/portage/env.d/net-fs/netatalk

ebuild /usr/portage/net-fs/netatalk/netatalk-3.1.6.ebuild configure

```

You should check the build.log in /var/tmp/portage/net-fs/netatalk-3.1.6/temp/build.log for the following:

```

    AFP:

         Extended Attributes: ad | sys

         ACL support: yes

         Spotlight: yes|no

```

greets, bb

----------

## tova

Hi BB,

many thanks for your response...

the result of ebuild is still "spotlight NO"  :Smile: 

Maybe it is necessary set something in kernel? Or filesystem? (I am using ReiserFS)

Thanks

T.

Compilation summary:

    CPPFLAGS       = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)

    CFLAGS         = -D_U_="__attribute__((unused))" -O2 -pipe -fno-strict-aliasing

    LIBS           =  -lcrack

    PTHREADS:

        LIBS   =

        CFLAGS = -pthread

    SSL:

        LIBS   =  -L/usr/lib64 -lcrypto

        CFLAGS =  -I/usr/include/openssl

    LIBGCRYPT:

        LIBS   = -lgcrypt -lgpg-error

        CFLAGS =

    PAM:

        LIBS   =  -lpam

        CFLAGS =

    WRAP:

        LIBS   = -lwrap

        CFLAGS =

    BDB:

        LIBS   =  -L/usr/lib64 -ldb-4.8

        CFLAGS =

    GSSAPI:

        LIBS   = -L/usr/lib64 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err

        CFLAGS =

    LIBEVENT:

        LIBS   = -I/usr/include

        CFLAGS = -L/usr/lib64

    TDB:

        LIBS   = -Wl,-rpath,/usr/lib64 -ltdb

        CFLAGS =

Configure summary:

    INIT STYLE:

         gentoo

    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:        no

         tcp wrapper support:     yes

         quota support:           yes

         admin group support:     yes

         valid shell check:       yes

         cracklib support:        yes

         ACL support:             yes

         Kerberos support:        yes

         LDAP support:            no

         AFP stats via dbus:      yes

         dtrace probes:           no

    Paths:

         Netatalk lockfile:       /run/lock/netatalk

         init directory:          /etc/init.d

         dbus system directory:   ${sysconfdir}/dbus-1/system.d

         pam config directory:    ${sysconfdir}/pam.d

    Documentation:

         Docbook:                 no

>>> Source configured.

----------

## bbgermany

Hi,

it seems, that the configure task for netatalk does not find the tracker libs. Im not sure how you can tell the process where it should search for the needed stuff. You should open a bugreport at bgo for this or even try a newer version of netatalk (maybe 3.1. :Cool: .

since im not really familiar with portage programing, im out here now. im sorry.

greets, bb

EDIT: one more thing: have you tried the following:

```

pkg-config --list-all | grep tracker

```

According to http://netatalk.sourceforge.net/3.1/htmldocs/installation.html#compiling-netatalk it should at least show up thes three lines or similiar ones

```

tracker-extract-0.16  tracker-extract - Tracker : A library to develop metadata extractors for 3rd party file types.

tracker-sparql-0.16   tracker-sparql - Tracker : A library to perform SPARQL queries and updates in the              Tracker Store

tracker-miner-0.16    tracker-miner - A library to develop tracker data miners

```

Without these, tracker support will noch work at all.

----------

## bbgermany

Ok,

i narrowed down the issue. It is definitly a problem with the ebuild. Since app-misc/tracker-(whatever version) doesnt deliver a tracker-sparql-1.6.pc, configure always failes to enable spotlight support. The app-misc/tracker package comes with tracker-sparql-1.0.pc.

I created a local overlay and copied the ebuild and all files needed for netatalk 3.1.6 to the new overlay and renamed to ebuild to netatalk-3.1.6-r1.ebuild

Then i edited the following line:

```

$(use_with tracker tracker-pkgconfig-version $(get_version_component_range 1-2 $(best_version app-misc/tracker | sed 's:app-misc/tracker-::g')))

```

and replaced with this line

```

pkg-config --list-all | grep tracker

```

Now just digest the ebuild and compile the new package.

As you can see here, spotlight support is enabled:

```

...

checking for TRACKER... yes

...

    AFP:

         Extended Attributes: ad | sys

         ACL support: yes

         Spotlight: yes

```

```

$ ~ # afpd -V

afpd 3.1.6 - 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: No

  TCP wrappers support: Yes

         Quota support: No

   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: /etc/afp.conf

           extmap.conf: /etc/extmap.conf

       state directory: /var/lib/netatalk/

    afp_signature.conf: /var/lib/netatalk/afp_signature.conf

      afp_voluuid.conf: /var/lib/netatalk/afp_voluuid.conf

       UAM search path: /usr/lib64/netatalk//

  Server messages path: /var/lib/netatalk/msg/

$ ~ # 

```

greets, bb

----------

