Samba, macOS and Spotlight: Possible on FreeBSD?

I hate this Gnome stuff. :eek:

This is practically the resource manager of Gnome. And it apparently for some reason seems not to connect with its database, so storing the stuff in memory in a way that cannot be shared.
But that is probably only my hallucinating. :rolleyes:
Aside of installing Gnome to make sure all the Gnome infrastructure bloat is there, I wonder whether hacking GSETTINGS_BACKEND environment variable could be an alternative for changing gsettings' behavior.
 
Agreed its yucky stuff but the results of having an indexed file server are kinda awesome. Not only names but file contents, music tags etc. I wouldn't dare to try it if not for the isolation of a jail and a previous dataset snapshot.

Installing devel/dconf fixes the issue about not saving the settings. I could run tracker-miner-fs and index my files.

Code:
root@file:/ # dbus-launch --csh-syntax > .dbus_settings
root@file:/ # setenv TRACKER_BUS_TYPE system
root@file:/ # source .dbus_settings
root@file:/ # gsettings set org.freedesktop.Tracker.Miner.Files index-recursive-directories "['/tank/srv', '/tank/pkg', '/Users']"
root@file:/ # /usr/local/libexec/tracker-miner-fs
fstab: /etc/fstab:0: No such file or directory
(tracker-miner-fs:20642): Tracker-CRITICAL **: Could not initialize the HAL context, no error, is hald running?
(tracker-miner-fs:20642): Tracker-WARNING **: Locale '0' is not set, defaulting to C locale
(tracker-miner-fs:20642): Tracker-WARNING **: Monitor backend:'GKqueueFileMonitor' is unknown, we have no limits in place because we don't know what we are dealing with!

It is a daemon so it will run until you press CTRL+C. You can start this daemon along with his many friends with " tracker control -s".

And it works! For some reason not everything I search for is indexed. It doesn't seem to be checking music metadata and other related stuff but I can find most file and foldernames and probably file types. In any case the results in finder do match the same results I get with the tracker search tool.

Code:
root@file:~ # tracker search -d Texhnolyze
(tracker search:33529): Tracker-WARNING **: Locale '0' is not set, defaulting to C locale

Results:

cols:4

  file:///tank/srv/mov/anime/Texhnolyze

    inode/directory

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder

  Texhnolyze


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2001.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 01.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2002.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 02.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2003.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 03.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2004.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 04.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2005.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 05.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2006.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 06.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2007.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 07.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2008.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 08.mkv


cols:4

  file:///tank/srv/mov/anime/Texhnolyze/Season%201/Texhnolyze%20-%2009.mkv

    video/x-matroska

    http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject

  Texhnolyze - 09.mkv



  ...


NOTE: Limit was reached, there are more items in the database not listed here

upxKpsH.png



Still I don't know what to make of this mess. Tomorrow I will probably check how to make a clean install of everything. But the thing is the wiki guide actually works and the only thing missing from there (or as a dependency to net/samba47 with spotlight enabled) is dconf. Its also missing information about how to start the miner processes.
 
Yay! Thanks for the help. I will consider reverting the jail to a previous snapshot and start again making a small howto in the process. I will leave it as it is for a while to check if it won't explode and make holes on the carpet.
 
It would be great if you did that. I use Samba at home to share stuff between my Macs, and while I don'u use spotlight that often this would be a nice addition to make using samba more seamless.
 
Has anyone written a simple how-to on getting Spotlight running on FreeBSD? It looks like you guys did a lot of hard work getting it going, and I was selfishly hoping to take advantage of your hard work as easily as possible ;-)

I, too, support many clients with MacOS clients and am hoping to replace their Mac servers with FreeNAS machines. It's very disappointing to see the lack of server support coming from Apple. I've been using FreeNAS for several years internally as a large file server, but Spotlight search is a necessity for my Mac clients.
 
Back
Top