Bug 14159 - Enabling spotlight make samba-libs depends on glib
Summary: Enabling spotlight make samba-libs depends on glib
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.11.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Ralph Böhme
QA Contact: Samba QA Contact
Depends on:
Reported: 2019-10-14 08:32 UTC by Mathieu Parent
Modified: 2019-10-14 12:39 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Parent 2019-10-14 08:32:28 UTC
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
    libjson-glib-1.0.so.0 =>
/usr/lib/x86_64-linux-gnu/libjson-glib-1.0.so.0 (0x00007f35aff06000)

$ git grep ifdef.HAVE_GLIB
source3/lib/tevent_glib_glue.c:#ifdef HAVE_GLIB

$ cat source3/wscript
# ...
    if conf.CONFIG_SET('HAVE_GLIB'):
        conf.DEFINE('WITH_TEVENT_GLIB_GLUE', '1')
# ...

Could this dependency be moved to be optional?

Initially reported as: https://bugs.debian.org/941654
Comment 1 Ralph Böhme 2019-10-14 08:42:29 UTC
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.
Comment 2 Mathieu Parent 2019-10-14 10:48:19 UTC
OK. Thanks.

So the glib dependency will be removed in all cases in 4.12?

Closing bug report.
Comment 3 Ralph Böhme 2019-10-14 12:39:53 UTC
(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.