[RFC] Making D-Bus suitable for being run early during boot

Thiago Macieira thiago at kde.org
Thu Jul 8 23:39:12 PDT 2010


On Friday 9. July 2010 03.09.53 Lennart Poettering wrote:
> Heya!
> 
> I'd like to make it possible to run dbus earlier during boot, as one
> of the first daemons that are run (i.e. in parallel with udev and
> systemd, and other code as early as that).
> 
> For that to happen a few things need to be fixed, and I'd like to hear
> your comments about this.
> 
> a) /usr/share/dbus-1/system-services must be moved to
>    /lib/dbus/system-services. Probably uncontroversial, since many
>    distributions already install D-Bus in /bin, but this dir was simply
>    forgotten. People should install their service files to
>    `pkg-config dbus-1 --variable=system_bus_services_dir`, and for those
>    which don't we could provide a compat symlink for a while.
> 
> b) The system bus should become an abstract namespace socket by
>    default. This would require changing of the spec. This would allow us
>    to run dbus without writable /var/run. We could provide compat for a
>    while, so that we fallback to the old socket name in the client if we
>    cannot find the abstract socket. The socket path is already
>    configurable at compile time, even though it's value actually mandated
> in the spec.
> 
> c) And now, the one I am a bit more puzzled about: what to do with the
>    machine-id file. /var is not necessarily available during boot. /etc
>    however is. Due to that I'd vote for moving that file to /etc and
>    replacing /var/lib/dbus/machine-id by a symlink to it. This has some
>    drawbacks, for example, the admin might think that the file is
>    something to configure or so. However, I cannot think of a better
>    place for this. Ideas? Opinions?

I agree with you: a and b are uncontroversial and c isn't :-)

The reason why the machine ID file is in /var is because it isn't a config file. 
It's a generated file. But if /var isn't mounted, we have a problem.

Are there systems where /var isn't a local filesystem? I guess just about any 
configuration possible exists...

I guess the only other possibility is /lib itself. I think that's a better fit 
actually.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100709/61cccc36/attachment.pgp>


More information about the dbus mailing list