Your message dated Mon, 28 Apr 2014 17:51:58 +0200 (CEST) with message-id <[email protected]> and subject line Re: Bug#745876: Please create /etc/machine-id if it does not exist has caused the Debian Bug report #745876, regarding Please create /etc/machine-id if it does not exist to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 745876: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745876 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: base-files Version: 7.2 Severity: normal Tags: patch D-Bus, systemd and other programs use /etc/machine-id. Given that this file is per-machine and very central, it should live in base-files. The attached patch creates the file unless it already exists. The patch works on Linux and should work (untested) on kFreeBSD (since linprocfs emulates the uuid file). The uuid file should be present in all Linux kernels since it lives in the same source code file that provides /dev/{u,}random :). On platforms where the uuid file does not exist we just do nothing for now. -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: armel i386 Kernel: Linux 3.13-1-amd64 (SMP w/8 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages base-files depends on: ii gawk [awk] 1:4.0.1+dfsg-2.1 ii mawk [awk] 1.3.3-17 base-files recommends no packages. base-files suggests no packages. -- no debconf information>From aaea1b768923ef7453207590fd250cc0e7f739b9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg <[email protected]> Date: Sat, 26 Apr 2014 11:20:52 +0200 Subject: [PATCH] Generate /etc/machine-id if it does not yet exist. --- debian/postinst.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/postinst.in b/debian/postinst.in index 778a698..c82f941 100644 --- a/debian/postinst.in +++ b/debian/postinst.in @@ -122,3 +122,9 @@ if dpkg --compare-versions "$2" lt-nl "6.10"; then install_from_default /usr/share/base-files/staff-group-for-usr-local \ /etc/staff-group-for-usr-local fi + +# D-Bus, systemd and other programs want a static machine identifier in +# /etc/machine-id, so create one if it does not exist. +if [ ! -e /etc/machine-id ] && [ -e /proc/sys/kernel/random/uuid ]; then + sed 's/-//g' /proc/sys/kernel/random/uuid > /etc/machine-id +fi -- 1.9.0
--- End Message ---
--- Begin Message ---On Sat, 26 Apr 2014, Martin Pitt wrote: > Santiago Vila [2014-04-26 12:16 +0200]: > > IMHO, such bug is ridiculous: On systems where systemd is the init > > manager, systemd becomes essential and you simply *don't* remove it! > > On Debian we support multiple init systems, so in theory a user could > install sysvinit or upstart or openrc etc., and afterwards purge > systemd. In that case I think it would be wrong to remove > /etc/machine-id, as on the next installation you would get a new one > and change the machine's ID. Well, it could be argued that if you wanted to keep the machine ID, you would just remove (not purge) systemd the first time. For now, /etc/machine-id is a configuration (or state) file for the systemd package. Documentation about machine-id even says that removing the file on reboots is mostly harmless (you could have a different machine-id every time the machine boots and nothing bad would happen). So, my recommendation (if you don't just ignore piuparts report) is that you actually remove it at purge. The base-files package is Essential: yes, and it is currently Architecture: any, but that's mainly a way to make /etc/issue to be pretty looking (it says "Linux" only on Linux architectures). For all other purposes I would like to keep the base-files package as much "Architecture: all" as we can (both regarding .deb contents and also behaviour), and this file is not needed on every architecture yet. (Moreover, there are people who dislike systemd with a passion. Forcing systemd files on machines not needing it is not going to be good publicity for systemd). On the other hand, if you can show me another init system (which is not systemd) also using /etc/machine-id, we can reconsider about this. Thanks.
--- End Message ---

