← Back to team overview

touch-packages team mailing list archive

[Bug 1508697] Re: dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-id

 

> systemd doesn't inself create /etc/machine-id when missing, which it
should.

I think the solution to "my system-imaging setup isn't working" is to
get that bug (presumably a systemd bug?) fixed - this one is rather
minor by comparison. Do you have a correct bug# for it?

> I've put a lot of effort into making sure things that should be unique
between machines, things that are unique when you do a manual Ubuntu
install, are actually unique when we image a system.

Yeah, the list of things that should be unique has changed over time,
unfortunately. I hope that future software needing a unique machine ID
will just use /etc/machine-id, but D-Bus is older than systemd, so we
didn't have that option at the time. Now /var/lib/dbus/machine-id needs
to continue to exist, because some third party software depends on it,
but libdbus doesn't actually rely on it any more - it will try reading
both locations.

> After all, tools must already get along with a symlink due to the
tmpfiles.d

Be a bit careful here... things must cope with /var/lib/dbus/machine-id
being a symlink to /etc/machine-id *if we are booting with systemd*. If
the init system is sysvinit or Upstart (still supported in Debian) then
nothing guarantees there will ever be a /etc/machine-id.

However, systemd doesn't delete /etc/machine-id on purge, so after one
has been created, I think it's guaranteed to stay.

I'd be happy to review a patch upstream that made
_dbus_read_local_machine_uuid() with create_if_not_found=TRUE (i.e. the
implementation of dbus-uuidgen --ensure) symlink the machine ID rather
than copying it.

Alternatively, the postinst could create the symlink if /etc/machine-id
exists and has syntactically valid contents, or run dbus-uuidgen
--ensure if not.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1508697

Title:
  dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-
  id

Status in dbus package in Ubuntu:
  Triaged

Bug description:
  If you do a Wily desktop install, /var/lib/dbus/machine-id is a
  symlink to /etc/machine-id.

  If you do a Wily server install, /var/lib/dbus/machine-id is a file
  containing the same value as /etc/machine-id.

  Minor issue, but still a weird inconsistency between Ubuntu desktop
  and server.

  Thanks!

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/1508697/+subscriptions


Follow ups

References