From patchwork Wed Apr 20 05:00:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 1699 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Wed, 20 Apr 2022 15:00:53 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ej1-f60.google.com (mail-ej1-f60.google.com [209.85.218.60]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 23KD0rE9002835 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Apr 2022 15:00:53 +0200 Received: by mail-ej1-f60.google.com with SMTP id dp12-20020a170906c14c00b006e7e8234ae2sf951131ejc.2 for ; Wed, 20 Apr 2022 06:00:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650459648; cv=pass; d=google.com; s=arc-20160816; b=jVJEcYHe0+fgcrbvrW6jP0SW+k8fdpa++ywxpKCKdf1ELiaoOyrVZvGakEuoE+MSxA Y9yhb3G8aKGccwfKndIiSwjjGtnafCyvawU0wd8J8ciKP0SoZvclQZU4fgmO3kE6cEIz KzjZecKfew2Rw0lBF+RvMHb0AfgQn1BGbE7TLLDijIcBS1Ga3wLRJ7493zneiaCNwhI/ e/cbiXRK8xBCpq/XiyaoUuYP9AhJhb+2nX7ZGd8HHSoBoR117hFPaM4h85arp0kPqjDm QZOqJbeoc+P7QUIIB7cqaZEFr+4nbvvZ5dfv2fXPzhd2pKKMCi/zaNeznHWiq38c/xGJ NJwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:feedback-id:mime-version:references :in-reply-to:message-id:date:subject:to:from:sender:dkim-signature; bh=b3cwWNplrvY0eZUtfAjRLm44mSp/wFz7DCVljBx1TKI=; b=ctPWnCkT3D60b5kZuOeyMOT/bsK4ETsI/qMjqSYw4X6Zw5BUM28A63NoSnemL62Pji ESo6X3CD7AofDtDt/t27kg3MIBSlBousx6LAKurv8jVhMo4yEuMJVq6WeXUWO4JmDoFW 9Zuk0WXeN9LgsV3HJyLono7du8HnTsisL50Mh/qf7SSkpK7HFj6vNJ0gTtN97nuIKQMy R2o02e9ObLu43kmDIX89f0KZyuEInwbMAZgVG7WcQRcZgGIM07cmGbuEHKY82HlSx/Li mZdP8efxaZuZ7lii+7BtqaHQcqYJjhGFbQrjWHUaJG6RVsl7y1jF+QDWMDWXmnonuLBe UEmg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=T7BokHUy; spf=pass (google.com: domain of fm-51332-202204201300461b8327f96d8e82a592-8ixbfq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-51332-202204201300461b8327f96d8e82a592-8IxBfq@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:feedback-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=b3cwWNplrvY0eZUtfAjRLm44mSp/wFz7DCVljBx1TKI=; b=X06ZTs4+0DCCnNHOXDG0WlzTyFhqx5qUJfWAlA7vVHrADGMU5RQBJpq5RdUdFqw4jr bVMMAMzZc9HxKahLFWxWRAXf5c17+778TYgJmXPvbD8PKOvsbgcaQ9cdnIG0nUdmSlu7 aQP/JD5KhGrlLJbResaGMxF1PZk9HzaIlm+wcKFTfxoa96s+bqPhbF2cEj82r9/gOXPD a/Kex5iAm7xhgD2Wwv3eWTYkev4iQi6FzIqcaWL5rSrq9hCzf/huAb+VUfyimuzBEHK5 b3NKbFS/EQlgrbXN4lw8No8C7TCNYvJ8WttJJ7II0o68WtIIF8WR65B8yRjWi4nYRab/ UvaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:date:message-id :in-reply-to:references:mime-version:feedback-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=b3cwWNplrvY0eZUtfAjRLm44mSp/wFz7DCVljBx1TKI=; b=UJK5IEU7s5ii2qIMSkXMvfyUoW5Kkw3z29bthOiJm+KWzPNaK69V2Rkz0k/MemrosF XTTclnuSGcHiJLbJlAS1mECBKBoP4xvtKMs+dyZzP+yEMuAqOAEap2HDw3LMWkMhy1r9 gEkUAyKc3VbNCHgCd1+tj7vqOnHj0W4J77eoGNq00FYGo1vTGkGJWZWr2N4DGwpUXxbI GX5yOledgRhABxJ76/skhzboUBcBnHeryR0F2hlYfMoqt22+hqJ3pg+qzsd/1RwPRfx+ dD3/qpAKDBPk6YQN+M2PtPor/l808upLL7Qn7uhC30FxkidUqZsV9GqO2PLQ3azPRcic zXnQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533+q6r+yV2RsW//RtXmpx01uoO3OF4QvRcBtUXU7PIzgCEY8rFQ WdC+h9UHE5lD+yL4VrYNz/U= X-Google-Smtp-Source: ABdhPJw+f792dR3QEAu+Edv1/B7si2kUPEWAZV1QPzk6RhilLMMOhfVNPrIwF6ZTsiPWKSr3/TVobw== X-Received: by 2002:a17:906:7a51:b0:6e8:8e6c:f182 with SMTP id i17-20020a1709067a5100b006e88e6cf182mr18062769ejo.506.1650459648040; Wed, 20 Apr 2022 06:00:48 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:9702:b0:6e8:c0b2:edfc with SMTP id jg2-20020a170907970200b006e8c0b2edfcls1117403ejc.11.gmail; Wed, 20 Apr 2022 06:00:47 -0700 (PDT) X-Received: by 2002:a17:907:6e04:b0:6e0:736b:d786 with SMTP id sd4-20020a1709076e0400b006e0736bd786mr17989725ejc.667.1650459647048; Wed, 20 Apr 2022 06:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650459647; cv=none; d=google.com; s=arc-20160816; b=cGPfVxebOA6RBYHedvFM1HPMDDZb6xzzqL9bEtbS0NirDtNnEhuoMIX0j3JsEKPLqe nhMVltQbIDrajbHBG7KU5wjTrHGqKkQBPwcWnVRPvGpbOr2kX6gQE3zjso7eyIt1krf2 fa4X2uz9xoW9mxxvZyxrYDnTloUdnaeY/W0peHC/t1RXDEG4czST2/g3B3wIarvBICfK 5MKVazPgGI3bbyfyXLYfOJHG4gC0Nm7TmgmdAlHwnA48zSQRit3I+kJRyKMvvGzBbizO P0co/ejFkvVhyVeMF+hnpVscG0lJb0jiaLkhKOKlC/q4RdCkDTBEQNZFtTsGgqvRG+uk grlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:to:from:dkim-signature; bh=RzuUV6MvUH/eG2nOeTm5W9WigJBOq3zlL+B1U4uZGUs=; b=jpm22PixMjQ3DzodMm7rh22IJZma+GQtrLPAedYqdqJob/XzvUkLhZsQbtk6/0h6NG sd3LQQR+LKJ/ug5DNY70FzoPRKZ4LqFaCp0AH/8wS4W4hSgE9TjG0bsW7THKtoId3VaU 1AZjxBsWA0wAP2E1q1Fv39jPh4u4RU/ZgIZRhcycp0g5bYgPb+B8B9CfutuFT6ltZuQ6 EuNIG42GO+oDRTpO4/gKESQv6FG0eGkT2yMJySQlzgeq62/8Ebj9E5xYCsxijf+2onnP y/PKcxOXI9FMqwopfh7RFIMnOE69OdoPYFfUcIeKRfWcouMKM+ZH76aPcprPhKH4ac/E AXrA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=T7BokHUy; spf=pass (google.com: domain of fm-51332-202204201300461b8327f96d8e82a592-8ixbfq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-51332-202204201300461b8327f96d8e82a592-8IxBfq@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id h23-20020a170906829700b006e89250c574si87074ejx.2.2022.04.20.06.00.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Apr 2022 06:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-51332-202204201300461b8327f96d8e82a592-8ixbfq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 202204201300461b8327f96d8e82a592 for ; Wed, 20 Apr 2022 15:00:46 +0200 From: Quirin Gylstorff To: jan.kiszka@siemens.com, isar-users@googlegroups.com Subject: [PATCH v3] classes/image-postproc-extension: Remove /etc/machine-id Date: Wed, 20 Apr 2022 15:00:44 +0200 Message-Id: <20220420130044.668017-1-Quirin.Gylstorff@siemens.com> In-Reply-To: <20220420072836.324028-1-Quirin.Gylstorff@siemens.com> References: <20220420072836.324028-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer X-Original-Sender: quirin.gylstorff@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=T7BokHUy; spf=pass (google.com: domain of fm-51332-202204201300461b8327f96d8e82a592-8ixbfq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-51332-202204201300461b8327f96d8e82a592-8IxBfq@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: INBOX From: Quirin Gylstorff In a read-only system the machine id should be deleted or set to `unitialized\n`[1]. Systemd will generate a new machine-id during the first boot. In the case of a read-only root file system Systemd generates a mount point with the machine id. If an overlay for /etc is used this creates a mount conflict. To avoid the conflict between the overlay filesystem and systemd /etc/machine-id mount point deleted the file /etc/machine-id. This partly reverts 98d6a72d3064. The man page[2] was updated for Debian Bullseye to allow a missing machine id. For Debian Bullseye it reads: ``` For operating system images which are created once and used on multiple machines, for example for containers or in the cloud, /etc/machine-id should be either missing or an empty file in the generic file system image ``` [1]: https://systemd.io/BUILDING_IMAGES/ [2]: https://manpages.debian.org/bullseye/systemd/machine-id.5.en.html Signed-off-by: Quirin Gylstorff --- Changes V2: - add information about revert of 98d6a72d3064 Changes V3: - Fix From: meta/classes/image-postproc-extension.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/image-postproc-extension.bbclass b/meta/classes/image-postproc-extension.bbclass index ca520273..0c412c0d 100644 --- a/meta/classes/image-postproc-extension.bbclass +++ b/meta/classes/image-postproc-extension.bbclass @@ -57,7 +57,7 @@ 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}/var/lib/dbus/machine-id' - sudo install -m 644 '/dev/null' '${IMAGE_ROOTFS}/etc/machine-id' + sudo rm -f '${IMAGE_ROOTFS}/etc/machine-id' } ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_sshd_key_regen"