From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6695999620571463680 X-Received: by 2002:a05:6000:120a:: with SMTP id e10mr3238885wrx.171.1559065495555; Tue, 28 May 2019 10:44:55 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:4d43:: with SMTP id a3ls1564750wru.2.gmail; Tue, 28 May 2019 10:44:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeloYBroo7J+Y2pHbdYNgrPCg1Go/HXgAnUMoslnt1mc/deIKf2fbJaoXNS60EqAeWBr9g X-Received: by 2002:a5d:40cc:: with SMTP id b12mr6357649wrq.292.1559065495143; Tue, 28 May 2019 10:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559065495; cv=none; d=google.com; s=arc-20160816; b=L0G/7XzUZYzdxAU+UtD8IsLvf1SgBXLXTgcNFQeVP61qWUNGDCgpe8yF3hE9udyoy5 SnVWnFEqEIhziZIn7s/GBxOaqgL38OkyB1dvs3EUlXzklCRbH2YNf/yAYwh26h/1wuFN p1E3goWrn3KTl9S6ZKOTsp30nEsSODUE0I7zqDVfEhZvSYud42lSf8Qtnc2642ZLxGp0 Gw8aZIV5os3wGt1jkhayQhtmr3sXDIrPtFfmc63G1RMlUogixB3Mto7WIza7n9XplKM2 G8PSuhuWaDFj9YatjHEYBmYhHLyZXjHxs2ZFLzQ+B9CN5cx8YQH3ADqYnO1TPhIuuOzC 1fhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=LBX+4siVqzHIp72mBgH4gW6TIvz/tmAS8pt7sV1XXas=; b=NBv3A4NVYYpf9qpF9pmXPD9JKvsEbnzDCtMdD3r/8YmCauRZi3Bn3moOt2SHZ+ido/ /6qfdJrfzBgziGmwlsM+BHmNgEPUxn8UPWjyBEniD1dPyA04AMs9Ok517K/kKQ7kY70z W6ytV0zLR9nN065tN5XCE2ZJkd8Z2BbFoWRGsFMhcOKZmTr3nYkZlMosEbmM2W7Nq6Zc oMiQhFTrjsD1nx5ikJWvQCOu4UVIvWHMQUu57npZVCTPftjsT5W6oVtOJbb3Pmtx+u1a /ILksunPQ1ett95lKCgEjoYRpFkIzwXO1pHZ/Fsl09h84nxGrAzrfbaQt8DJQduKqJ8Z ADMg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id m8si165117wmc.3.2019.05.28.10.44.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 10:44:55 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x4SHisYR007170 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 May 2019 19:44:54 +0200 Received: from md1za8fc.ad001.siemens.net ([139.25.69.101]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x4SHis9l003762; Tue, 28 May 2019 19:44:54 +0200 Date: Tue, 28 May 2019 19:44:52 +0200 From: Henning Schild To: "[ext] claudius.heine.ext@siemens.com" Cc: , Claudius Heine Subject: Re: [PATCH 3/3] image-postproc-extension: add removal of machine-id Message-ID: <20190528194452.46def4c8@md1za8fc.ad001.siemens.net> In-Reply-To: <20190528085814.12967-4-claudius.heine.ext@siemens.com> References: <20190528085814.12967-1-claudius.heine.ext@siemens.com> <20190528085814.12967-4-claudius.heine.ext@siemens.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: 3uUW6/Tg+KfK Am Tue, 28 May 2019 10:58:14 +0200 schrieb "[ext] claudius.heine.ext@siemens.com" : > From: Claudius Heine > > The machine-id(5) should contain a unique id of the machine, but since > this file is created by the systemd postinst script, every machine > using the same image would have the same id. > > The file is removed in a postprocessing step and will be regenerated > by systemd on the first boot. Systemd is not the only officially supported init system on Debian. And i disagree with anyone claiming that it is OK to assume that in Isar ;). I just did a little test and the outcome means we need more research. In stretch with sysvinit-core in IMAGE_PREINSTALL there will be no machine-id. So it is OK to rm -f, where the f is important. In buster there is one, no clue where it comes from ... But that is not magically recreated at first boot. Meaning we might have deleted an important file without a plan to bring it back. Question is, is it important at all for !systemd. If not at all, who created and and why? Btw ... my gentoo laptop also has one, and i would never install systemd. Maybe udev ... Henning > Signed-off-by: Claudius Heine > --- > meta/classes/image-postproc-extension.bbclass | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/image-postproc-extension.bbclass > b/meta/classes/image-postproc-extension.bbclass index > 625ba7d..495eae6 100644 --- > a/meta/classes/image-postproc-extension.bbclass +++ > b/meta/classes/image-postproc-extension.bbclass @@ -26,8 +26,7 @@ > update_etc_os_release() { fi > } > > -ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_configure > image_postprocess_mark" - > +ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_configure" > image_postprocess_configure() { > # Configure root filesystem > if [ -n "${DISTRO_CONFIG_SCRIPT}" ]; then > @@ -39,8 +38,16 @@ image_postprocess_configure() { > fi > } > > +ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_mark" > + > image_postprocess_mark() { > BUILD_ID=$(get_build_id) > update_etc_os_release \ > --build-id "${BUILD_ID}" --variant "${DESCRIPTION}" > } > + > +ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_machine_id" > +image_postprocess_machine_id() { > + # systemd(1) takes care of recreating the machine-id on first > boot > + sudo rm -f '${IMAGE_ROOTFS}/etc/machine-id' > +}