dbus-daemon statically linked with libdbus-1?

Colin Walters walters at verbum.org
Wed Jun 4 12:23:13 PDT 2014


> 1) make sure that the daemon can start even if you messed up your
> libraries. 
> If the system bus can't start, then your system is pretty much hosed.

If your OS is using systemd there's already a huge amount of dynamic
linking going
on before dbus even starts.

> This 
> also allows for systems to ship just dbus-daemon and no library if they
> have 
> other non-libdus-1 bindings (like gdbus).

Hmm, like if for your OS you want to whitelist the libraries exposed
to applications or something, and so even if dbus-daemon uses
libdbus-1 you'd want to hide it?  I think this type of thing is better
solved by having distinct filesystem trees for apps (hardlinked or so)
than static linking.

> 2) the daemon uses the private API from libdbus-1, which is not exported.
> It's 
> simply not possible to link the daemon to the standard library.

This however is quite a valid reason it's statically linked right now =)

Alternatives though:

1) Split out a the private bits into /usr/lib64/dbus-1/dbus-private.so
2) Have the shared library export a single dbus__private() API which
returns
  a structure of function pointers. Like:
https://git.gnome.org/browse/glib/commit/?id=9bf59d4a14b3fc4bb62f10c3665e99f9d8788bdc



More information about the dbus mailing list