[Touch-packages] [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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
Re: [Touch-packages] [Bug 1508697] Re: dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-id
Simon McVittie [2015-10-29 11:55 -]: > > 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? Indeed, that would interest me as well. > 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. Either approach sounds fine to me. Changing dbus-uuidgen seems a bit more universal as then distros don't need to all do the same postinst change and /etc/machine-id validity check (which dbus-uuidgen already does), but either way it should be simple enough. Thanks! -- 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1508697] Re: dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-id
Oops, sorry for the confusion, haven't been sleeping enough lately :P I meant to refer to lp:1508766 which I filed about systemd not creating /etc/machine-id if it's missing: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1508766 Now that /var/lib/dbus/machine-id is a symlink to /etc/machine-id (on Wily desktop), lp:1508766 has consequences for dbus in that it can no longer itself create the machine-id if "missing". Or at least dbus wont (and arguably it shouldn't... seems to me systemd should be doing this). -- 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1508697] Re: dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-id
> Or at least dbus wont (and arguably it shouldn't... seems to me systemd should be doing this) I agree with that reasoning. It's fine for D-Bus to be responsible for creating its own older machine ID file if necessary, but it shouldn't be responsible for creating the one that belongs to systemd - that's systemd's job. -- 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1508697] Re: dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-id
That situation should never arise, because if the symlink exists, then it was created by a successful boot with systemd sometime in the past; systemd's API is that it guarantees to create /etc/machine-id before running third-party code; and systemd never deletes the machine ID after it has created one. The ideal behaviour would be for dbus-uuidgen to replace the symlink with a newly generated plain file, I think. I'd be happy to review a patch (on freedesktop.org Bugzilla please) if that isn't already what it does. -- 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1508697] Re: dbus-uuidgen --ensure: Symlink instead of copy existing /etc/machine-id
Which I guess raises another question... when booting with sysvinit or Upstart, what should dbus do when /var/lib/dbus/machine-id is a symlink to /etc/machine-id and the latter doesn't exist? -- 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp