On 14/04/14 22:12, Michael Biebl wrote: > That said, I don't know if any other package relies on > /etc/machine-id. I do know that dbus makes use of it but I dunno > all the details regarding the /var/lib/dbus/machine-id fallback
libdbus, and other D-Bus implementations, read /var/lib/dbus/machine-id or /etc/machine-id (in that order), taking the contents of the first one that looks sane; except that systemd-bus might do it the other way round, because Lennart. > Say we first install systemd, which generates /etc/machine-id, > then later dbus. Will in this case a /var/lib/dbus/machine-id file > be created or will dbus use /etc/machine-id? dbus.postinst runs dbus-uuidgen, which creates /var/lib/dbus/machine-id, unless it already exists and has suitable contents; if /var/lib/dbus/machine-id does not exist but /etc/machine-id does, it does *not* copy /etc/machine-id to /var/lib/dbus/machine-id, but instead creates an entirely new machine ID in /var/lib/dbus/machine-id (which libdbus and GDBus will use in preference to /etc/machine-id). I consider that to be a bug, tbh - it should prefer to take the ID from /etc/machine-id and copy it into /var/lib/dbus. I'd be happy to review patches upstream. When it happens the other way round, I think systemd-machine-id-setup *does* copy /var/lib/dbus/machine-id to /etc/machine-id rather than creating its own. > In this case we can't remove /etc/machine-id again, as it would > break dbus, unless dbus would on-the-fly generate a > /var/lib/dbus/machine-id if no /etc/machine-id is available. /var/lib/dbus/machine-id is used by both root and unprivileged users, but can only be set up by root, so creating it on-demand is not possible. Ideally, I would like this to be done in base-files, but if that isn't feasible, the next best thing would be for each of systemd and dbus to copy the other's idea of the machine ID in preference to creating its own. S -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org