[Buildroot] dbus missing /var/lib/dbus directory

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu May 17 08:21:06 UTC 2012


Le Wed, 16 May 2012 21:23:57 -0600,
"Michael J. Hammel" <buildroot at graphics-muse.org> a écrit :

> I enabled NetworkManager, which got me dbus, but then disabled
> NetworkManager, but dbus remained (that part is okay).

That's the normal kconfig behavior. The NetworkManager package
"selects" the D-Bus package, so when you enable the NetworkManager
package, it automatically enables D-Bus. But when you disable
NetworkManager, it doesn't automatically disable D-Bus.

> I noticed today that the init script for dbus tries to run dbus-uuidgen but fails with a
> message about not being able to open /etc/machine-id.  I dug around and
> then strace'd dbus-uuidgen and found that if /var/lib/dbus is present
> this message goes away.
> 
> Should the init script also try to create /var/lib/dbus with "mkdir -p"?
> Of is that something the specific rootfs needs to address on its own?

Well, it should rather be done at build time, when the D-Bus package is
built. And, reading the code, it actually is created:

define DBUS_INSTALL_TARGET_FIXUP
        rm -rf $(TARGET_DIR)/var/lib/dbus
        ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus
        $(INSTALL) -m 0755 -D package/dbus/S30dbus $(TARGET_DIR)/etc/init.d/S30dbus
endef

DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_INSTALL_TARGET_FIXUP

It doesn't exist in your filesystem?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list