I have gotten spotlight search mostly working over AFP using tracker using these steps. AFP should be running before starting this.
Run the following as root:
yum -y install dconf dbus-x11 tracker<br>echo 'export XDG_DATA_HOME="/var/netatalk/";export XDG_CACHE_HOME="/var/netatalk/";export DBUS_SESSION_BUS_ADDRESS="unix:path=/var/netatalk/spotlight.ipc";' > ~/.tracker_profile<br>echo '[ -f ~/.tracker_profile ]&&. ~/.tracker_profile' >> ~/.bash_profile<br>. ~/.tracker_profile<br>gsettings set org.freedesktop.Tracker.Miner.Files index-recursive-directories "['/mnt2']"<br>dbus-daemon --session --fork --address="unix:path=$PREFIX/var/netatalk/spotlight.ipc"<br>tracker-control -s<br>sed -i '/\\[Global\\]/ aspotlight = yes' /etc/afp.conf<br>killall -HUP afpd
Tracker will start crawling and indexing your files and they should soon show up in spotlight searches. You can check the indexing status with ‘
tracker-control -S’ or do a search of the index with '
However, on reboot the index is empty and tracker does not try and reindex any of the files. If restarted with ‘
tracker-control -ts’ tracker will start indexing the files from scratch and then all will work until next reboot. I am still investigation this, but think it might be that tracker is started before the shares are mounted so it just sees an empty directory and removes the files from its index.