[systemd-devel] [HEADSUP] libsystemd-bus + kdbus plans

Lennart Poettering lennart at poettering.net
Wed Mar 20 15:35:02 PDT 2013


A few minutes ago I pushed a new module into the systemd tree,
libsystemd-bus. It's a minimalist but complete D-Bus client library,
that doesn't try to be portable, doesn't try to be abstract, doesn't try
too hard to be bindable, but actually tries to be nice to use from
C. Due to that, it is *much*, *much* less code than libdbus
upstream. Right now this code is only built as internal library, which
is not used except by test tools and is not installed. Its tests are
however run during "make check". This is a first attempt to get the code
out of the door and tested a bit.

libsystemd-bus is the first step towards the userspace for kdbus. I
guess it's time to explain what we have in mind with kdbus.

kdbus is a new kernel implementation of D-Bus that Kay and Greg have
been working on. The userspace component of it will live in systemd, and
libsystemd-bus is the first step towards it.

This library will speak both kdbus and traditional dbus (we need this,
in order to allow tools like systemctl -H to work, across hosts via a
stream connection). Currently, the code I just pushed only does the

Moving things onto kdbus/libsystemd-bus is going to be a step-by-step
process, happening over the coming year or so. We will try hard to make
this transition smooth for distributions. Our rough plan is:

a) stabilize what we have now

b) port over systemctl and the other client side tools to
   libsystemd-bus, to see if it all works, and give the API a bit of a
   real-life check-up. When finished we will drop the dependency on
   classic libdbus.so, but will still use dbus-daemon.

c) Finish up kdbus and port libsystemd-bus over to it. Get kdbus merged.

d) Port gdbus + classic libdbus.so to become clients for kdbus, too.

e) Flag day, switch over the system bus to kdbus, leave session bus as
   dbus-daemon. At the same time we will no longer support
   dbus-daemon for the system. This will add a hard dependency of
   systemd on a very new kernel version. However, to make this palatable
   we will try hard to keep kdbus.ko compilable out-of-tree and easily

f) Flag day, switch over the session/user bus to kdbus too. dbus-daemon
   is not used anymore now.

All three client libraries will be able to talk to either the new or the
old server, so that apps don't really have to care. At least in the
ideal case. We try hard to keep breakage minimal, but we might not be
able to avoid it entirely.

The userspace part for setting up the busses will live in systemd. kdbus
is not going to be available for non-systemd systems unless somebody
sits down and writes an entirely independent bus userspace.

kdbus is entirely different from AF_BUS.


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list