In the Debian package, we try to enable useful features.
However, adding libtracker-miner-2.0-dev and libtracker-sparql-2.0-dev, while enabling spotlight support, will also make libsmbd-base.so.0 depends on libglib-2.0.so.0 and libjson-glib-1.0.so.0. This pulls a lot of dependencies not needed in the common usage.
$ aptitude why libglib2.0-0
i samba Depends samba-libs (= 2:4.11.0+dfsg-8)
i A samba-libs Depends libglib2.0-0 (>= 2.16.0)
$ ldd /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0 | grep glib
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
$ git grep ifdef.HAVE_GLIB
$ cat source3/wscript
Could this dependency be moved to be optional?
Initially reported as: https://bugs.debian.org/941654
Spotlight support is built on libtracker which is built in glib. If you don't want glib you have to remove Spotlight support.
You can however build Spotlight into a loadable module by using configure option
Fwiw, the next major Samba release 4.12 will ship with a new Spotlight backend based on talking to Elasticsearch over HTTP/REST.
So the glib dependency will be removed in all cases in 4.12?
Closing bug report.
(In reply to Mathieu Parent from comment #2)
> So the glib dependency will be removed in all cases in 4.12?
No. 4.12 will optionally support Spotlight (as 4.11 and a few earlier versions), what's new is that you can choose between two "backends": Gnome Tracker or Elasticsearch. The latter has minimal external dependencies: libjansson.