public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@isar-build.org>
To: claudius.heine.ext@siemens.com, isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: Re: [PATCH 3/3] image-postproc-extension: add removal of machine-id
Date: Thu, 6 Jun 2019 19:18:26 +0200	[thread overview]
Message-ID: <73b80822-5adb-7696-2f2b-7ed6b64a88be@isar-build.org> (raw)
In-Reply-To: <20190528085814.12967-4-claudius.heine.ext@siemens.com>

On 5/28/19 10:58 AM, claudius.heine.ext@siemens.com wrote:
> From: Claudius Heine <ch@denx.de>
> 
> 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.

Applied to the 'next'.

Regards,
Maxim.

> Signed-off-by: Claudius Heine <ch@denx.de>
> ---
>   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'
> +}
> 


  parent reply	other threads:[~2019-06-06 17:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28  8:58 [PATCH 0/3] Filesystem mounting and machine-id fix claudius.heine.ext
2019-05-28  8:58 ` [PATCH 1/3] wks: added 'rw' to kernel arguments claudius.heine.ext
2019-05-28 17:29   ` Henning Schild
2019-05-29  6:38     ` Claudius Heine
2019-05-28  8:58 ` [PATCH 2/3] image.bbclass: remove fstab generation claudius.heine.ext
2019-05-28 17:34   ` Henning Schild
2019-05-29  6:47     ` Claudius Heine
2019-05-29 11:11       ` Henning Schild
2019-05-28  8:58 ` [PATCH 3/3] image-postproc-extension: add removal of machine-id claudius.heine.ext
2019-05-28 17:44   ` Henning Schild
2019-05-29  7:00     ` Claudius Heine
2019-05-29 11:06       ` Henning Schild
2019-05-28 19:51   ` Henning Schild
2019-05-29  7:00     ` Matthias Luescher
2019-05-29  7:06       ` Claudius Heine
2019-06-06 17:18   ` Maxim Yu. Osipov [this message]
2019-06-04 20:09 ` [PATCH 0/3] Filesystem mounting and machine-id fix Maxim Yu. Osipov
2019-06-05  6:45   ` Claudius Heine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73b80822-5adb-7696-2f2b-7ed6b64a88be@isar-build.org \
    --to=mosipov@isar-build.org \
    --cc=ch@denx.de \
    --cc=claudius.heine.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox