From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6711131604704559104 X-Received: by 2002:adf:f84a:: with SMTP id d10mr16412453wrq.319.1562568456934; Sun, 07 Jul 2019 23:47:36 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:428f:: with SMTP id k15ls221424wrq.7.gmail; Sun, 07 Jul 2019 23:47:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8DsTuis1+UzNHhFut2gFTwOuKdkTsodlHGu8EFZHjI80v+MRDoOXaKDtYLSKs06wZNtwX X-Received: by 2002:a5d:6508:: with SMTP id x8mr17717426wru.310.1562568456564; Sun, 07 Jul 2019 23:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562568456; cv=none; d=google.com; s=arc-20160816; b=cPYOknkStLKsRXN2znwPrD9Xg1ZD8/Km2pijBAhXJy3n0LkoKEL4h44qWp6TIiTUFl pnPJ9VFrl9UgEjVO6MipvVR9OeIeRygMbuQsWbipWYbcbYwnXrctDYgFbKx3PCgmvDuE EnE+tncw95LeDDky2YZKqDZsB0WT9enuWyLm0mgpsMLncyerfDXU2MEBVtsStnmaWhyz Ma68EH7p7x7eCN1LXoagfU2omIRHKu2S3ob3bShKyyOHxpw4Gyd5VmE1WkTbU82gVIyi m2amFvmgdZBql+moX+IPgJ2rKAPl/NduO2pMAhDEviomE5+5LpwZ4c6X9ZeWR2xh9uPe uZwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=Htc0LzONhE7sAD/kOEoTA1i09Ms8+2S2h5CH8lBZaO8=; b=YP0Vyy/qytvwd8J1zrKJG1pBoAVf0bnclYzG51L/MASBNngCFjEMHSo9kp3gEpP3K+ FfEUKCj3V/jefdfRyzeCm4fi5TOPxbkOAngW7wrKiIQf27G2SoXmXTUP3dSfQ0tIMX2H FinCHyM7S3PfdqhJm0W3Hn5JwFDhuxNvLnGW9CDJExXg6MOGr8ByUTwRckbi0YdiF9dY Y4/Ga0OP9+ARTC3kdTrB+VSYw8ttbfi0nv/sV72JG86b9gPdJ0e1ckGCS27DkJpTnd3I +OqefOSOaoU/DXosLW9X1oAiKPXNHF7Fn55BOEN3aEu4PXr797p/CpL91Cf6FH/ihH5Q m++Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id q14si749446wmc.1.2019.07.07.23.47.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jul 2019 23:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id x686lZWn001705 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Jul 2019 08:47:35 +0200 Received: from [139.25.69.208] (linux-ses-ext02.ppmd.siemens.net [139.25.69.208]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x686lZdE017965; Mon, 8 Jul 2019 08:47:35 +0200 Subject: Re: [PATCH] image-postproc-extension: empty mechine-id To: "[ext] Su, Bao Cheng" , "isar-users@googlegroups.com" Cc: "Kiszka, Jan" , "ch@denx.de" References: <7a6b3fd0f6414612ab93e8a0044b2d96@siemens.com> From: Claudius Heine Message-ID: Date: Mon, 8 Jul 2019 08:47:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <7a6b3fd0f6414612ab93e8a0044b2d96@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: OqxwEeeThzst Hi, On 08/07/2019 05.37, [ext] Su, Bao Cheng wrote: > > From: Su Bao Cheng > Date: Thu, 4 Jul 2019 15:52:17 +0800 > Subject: [PATCH] image-postproc-extension: empty mechine-id > To: isar-users@googlegroups.com > > According to manpage of debian machine-id @ > https://manpages.debian.org/buster/systemd/machine-id.5.en.html, > /etc/machine-id should be empty instead of removing. > > Also according to above manpage, the dbus machine-id is copied to > /etc/machine-id if systemd machine-id is empty. However, the dbus > machine-id is also created during isar building, which stays the same > for every machine using the same image. Good catch! > > So here instead of removing, empty this file, and the mechine id will > be regenerated at the first boot. Also remove the dbus machine-id to > prevent copying. > > Signed-off-by: Su Bao Cheng > --- > meta/classes/image-postproc-extension.bbclass | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meta/classes/image-postproc-extension.bbclass b/meta/classes/image-postproc-extension.bbclass > index 495eae6..96f5ad6 100644 > --- a/meta/classes/image-postproc-extension.bbclass > +++ b/meta/classes/image-postproc-extension.bbclass > @@ -49,5 +49,7 @@ image_postprocess_mark() { > 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 rm -f '${IMAGE_ROOTFS}/etc/machine-id' > + sudo install -m 644 '/dev/null' '${IMAGE_ROOTFS}/etc/machine-id' You could probably just replace the `sudo rm ...machine-id` with that line, since `install` would overwrite the content, so removing it would not be necessary. Otherwise LGTM regards, Claudius > } > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de