[systemd-devel] systemd build dependency on dbus

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Oct 23 04:44:09 PDT 2014

On 23/10/14 12:21, Lennart Poettering wrote:
> The behaviour should really be to:
> 1. take the paths from configure switches
> 2. if they are not specified, try to get them from pkg-config
> 3. if the relevant pkg-config files are not installed, generate an error and refuse build

Actually... with D-Bus maintainer hat on, I think it's better for
non-dbus packages to use their own ${sysconfdir}/dbus-1/system.d,
${datadir}/dbus-1/services and so on, rather than querying dbus'
pkg-config file (analogous to the behaviour prescribed for XDG_DATA_DIRS
in the XDG basedir specification). That's what I recommended in the
D-Bus Specification.

I consider the dbus-1/services and dbus-1/system-services paths to be
part of D-Bus, and they are specifically described in the D-Bus
Specification. The status of ${sysconfdir}/dbus-1/system.d is a bit less
clear-cut, but if we ever changed it, we'd break every system service.

In particular, even if dbus-daemon is installed in /opt or something, it
is hard-coded to look for services in /usr/local and /usr as well as its
own ${prefix} (and the Specification says so). If someone is installing
software in a non-/usr tree, they're doing that because they want to
isolate it for whatever reason, and we probably shouldn't second-guess
that; if they want to search /opt/gnome (or whatever) in addition, it's
easy to configure dbus-daemon to do that, by dropping a file into system.d.

This seems doubly true for systemd, which is the sort of thing that
really ought to be installed to (/etc and) /usr by the distribution
vendor in any case, so the system dbus-daemon is always going to pick it up.

dbus-1.pc is mainly the pkg-config metadata for libdbus, the reference C
implementation of D-Bus. The abstract D-Bus protocol that has been
reimplemented by packages like dbus-sharp, dbus-java, GLib (GDBus) and
systemd (sd-bus) should not require use of libdbus, and libdbus isn't
even the implementation I recommend to most C authors (that would be


More information about the systemd-devel mailing list