[ANNOUNCE] D-Bus 1.0 RC 2 (0.94) released

David Zeuthen david at fubar.dk
Sun Oct 15 07:29:22 PDT 2006

On Sat, 2006-10-14 at 18:22 -0400, Havoc Pennington wrote:
> David Zeuthen wrote:
> > This is broken. It breaks at least livecd, stateless, OLPC and other use
> > cases where you never run things such as %post on the machine that boots
> > the OS. The fix is easy though: the bus needs to run this on start-up
> > and cache it in a file somewhere for future use.
> It's OK to do this at boot time instead of in %post, but I think it's 
> more complicated so I recommended %post instead for the normal case.

Problems with %post: stateless, livecd, OLPC etc.

Problems with boot time: requires reboot (but at this point we do
require a reboot any and we're fine post 1.0), some init-replacement
might want to use libdbus.

> There's already a note in the man page about the cases you mention. What 
> I suggested in the man page is to symlink the expected uuid file in /etc 
> to a file in /var, and run uuidgen on boot to create the file in /var 
> (it can go in the system bus init script, for example). You could also 
> modify libdbus to look in /var directly but there isn't a 
> --with-uuid-file configure option right now.
> The mildly tricky things if it's in an init script are that it has to 
> run early enough, and has to run the first time dbus is installed (e.g. 
> %post has to be sure the uuid file exists).

No, that would break livecd, stateless, OLPC etc. where you only run %
post once for the OS image you redistribute.

> A stateless/OLPC type of setup may not want to generate the uuid from 
> scratch on every boot; instead they might want to store it on the 
> network and fetch it from there on every boot or at network connection 
> time. I'm not sure.
> Anyway, libdbus doesn't really care where the file comes from - "run in 
> %post" is just a suggestion.

Well, it's a bad suggestion I think. And I'd tend to say it's a bug that
libdbus requires the uuid, is it interesting at all for non-bus cases

If it's only interesting for buses then it's worth considering just make
the system bus generate it on system bus start up. Of course that breaks
if you're only using a session bus but those cases are rare and people
doing such weird things can generate it as they see fit.

The whole situation right now smells like that you'd rather want to
provide a plethora of options at the cost of complexity. And that's fine
but only if those options make sense, maybe they do, I'm just not

Another, and IMO better, option is of course to not have the uuid from a
file (insert old rant how software requiring magic configuration files
are bad) but use some tricks to generate an uuid on the fly. If that's
possible at all. You could probably look at the MAC addresses (normally
that doesn't even require root) and create some digest or something

Can we at least, for now, change the Red Hat init script (which we
distribute in the tarball) generate the uuid instead of doing it in
%post and recommend distros to do the same instead of the broken %post
suggestion? That would at least make it work for normal OS'es including
them doing things such as stateless, OLPC and livecd.


More information about the dbus mailing list