* [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id @ 2025-09-17 9:28 alexander.heinisch via isar-users 2025-10-21 11:22 ` 'Heinisch, Alexander' via isar-users 2025-10-24 15:56 ` Zhihang Wei 0 siblings, 2 replies; 7+ messages in thread From: alexander.heinisch via isar-users @ 2025-09-17 9:28 UTC (permalink / raw) To: isar-users; +Cc: felix.moessbauer, Alexander Heinisch From: Alexander Heinisch <alexander.heinisch@siemens.com> If /etc/machine-id happens to be a link to e.g. /var/... the postprocessing overrides build-hosts /var/... instead of the desired file on the rootfs. Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com> --- 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 991bac4c..b332e826 100644 --- a/meta/classes/image-postproc-extension.bbclass +++ b/meta/classes/image-postproc-extension.bbclass @@ -63,7 +63,7 @@ image_postprocess_machine_id() { if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; then MACHINE_ID="" fi - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine-id' + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee /etc/machine-id sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' } -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250917092841.144528-1-alexander.heinisch%40siemens.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id 2025-09-17 9:28 [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id alexander.heinisch via isar-users @ 2025-10-21 11:22 ` 'Heinisch, Alexander' via isar-users 2025-10-21 15:58 ` 'cedric.hombourger@siemens.com' via isar-users 2025-10-23 16:02 ` Zhihang Wei 2025-10-24 15:56 ` Zhihang Wei 1 sibling, 2 replies; 7+ messages in thread From: 'Heinisch, Alexander' via isar-users @ 2025-10-21 11:22 UTC (permalink / raw) To: isar-users; +Cc: MOESSBAUER, Felix Any updates on this patch? Seems it got lost. On Wed, 2025-09-17 at 11:28 +0200, alexander.heinisch@siemens.com wrote: > From: Alexander Heinisch <alexander.heinisch@siemens.com> > > If /etc/machine-id happens to be a link to e.g. /var/... > the postprocessing overrides build-hosts /var/... instead of > the desired file on the rootfs. > > Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com> > --- > 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 991bac4c..b332e826 100644 > --- a/meta/classes/image-postproc-extension.bbclass > +++ b/meta/classes/image-postproc-extension.bbclass > @@ -63,7 +63,7 @@ image_postprocess_machine_id() { > if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; then > MACHINE_ID="" > fi > - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine-id' > + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee > /etc/machine-id > sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' > } > -- Alexander Heinisch Siemens AG www.siemens.com -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/5e6209ddc7e24e4859eca0c3bda12a8bf8d82972.camel%40siemens.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id 2025-10-21 11:22 ` 'Heinisch, Alexander' via isar-users @ 2025-10-21 15:58 ` 'cedric.hombourger@siemens.com' via isar-users 2025-10-22 9:09 ` 'cedric.hombourger@siemens.com' via isar-users 2025-10-23 16:02 ` Zhihang Wei 1 sibling, 1 reply; 7+ messages in thread From: 'cedric.hombourger@siemens.com' via isar-users @ 2025-10-21 15:58 UTC (permalink / raw) To: Heinisch, Alexander, isar-users; +Cc: MOESSBAUER, Felix On Tue, 2025-10-21 at 11:22 +0000, 'Heinisch, Alexander' via isar-users wrote: > Any updates on this patch? Seems it got lost. > > On Wed, 2025-09-17 at 11:28 +0200, alexander.heinisch@siemens.com > wrote: > > From: Alexander Heinisch <alexander.heinisch@siemens.com> > > > > If /etc/machine-id happens to be a link to e.g. /var/... > > the postprocessing overrides build-hosts /var/... instead of > > the desired file on the rootfs. > > > > Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com> > > --- > > 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 991bac4c..b332e826 100644 > > --- a/meta/classes/image-postproc-extension.bbclass > > +++ b/meta/classes/image-postproc-extension.bbclass > > @@ -63,7 +63,7 @@ image_postprocess_machine_id() { > > if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; then > > MACHINE_ID="" > > fi > > - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine-id' > > + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee > > /etc/machine-id we could use the newly introduced rootfs_cmd to avoid a sudo call here. reach out if you need some clarification on how to use rootfs_cmd > > sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' > > } > > > > -- > Alexander Heinisch > Siemens AG > www.siemens.com > -- Cedric Hombourger Siemens AG www.siemens.com -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/e23c2bc74bc10177e8bfbfbf975100106d880efe.camel%40siemens.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id 2025-10-21 15:58 ` 'cedric.hombourger@siemens.com' via isar-users @ 2025-10-22 9:09 ` 'cedric.hombourger@siemens.com' via isar-users 0 siblings, 0 replies; 7+ messages in thread From: 'cedric.hombourger@siemens.com' via isar-users @ 2025-10-22 9:09 UTC (permalink / raw) To: Heinisch, Alexander, isar-users; +Cc: MOESSBAUER, Felix On Tue, 2025-10-21 at 17:58 +0200, Cedric Hombourger wrote: > On Tue, 2025-10-21 at 11:22 +0000, 'Heinisch, Alexander' via isar- > users > wrote: > > Any updates on this patch? Seems it got lost. > > > > On Wed, 2025-09-17 at 11:28 +0200, alexander.heinisch@siemens.com > > wrote: > > > From: Alexander Heinisch <alexander.heinisch@siemens.com> > > > > > > If /etc/machine-id happens to be a link to e.g. /var/... > > > the postprocessing overrides build-hosts /var/... instead of > > > the desired file on the rootfs. > > > > > > Signed-off-by: Alexander Heinisch > > > <alexander.heinisch@siemens.com> > > > --- > > > 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 991bac4c..b332e826 100644 > > > --- a/meta/classes/image-postproc-extension.bbclass > > > +++ b/meta/classes/image-postproc-extension.bbclass > > > @@ -63,7 +63,7 @@ image_postprocess_machine_id() { > > > if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; > > > then > > > MACHINE_ID="" > > > fi > > > - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine- > > > id' > > > + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee > > > /etc/machine-id > > we could use the newly introduced rootfs_cmd to avoid a sudo call > here. > reach out if you need some clarification on how to use rootfs_cmd Just to update everyone. Alexander and I discussed and concluded that rootfs_cmd may not be used here since we require write access to a root-owned file (rootfs_cmd is only an alternative to sudo chroot for commands where we do not require elevated privileges) > > > > sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' > > > } > > > > > > > -- > > Alexander Heinisch > > Siemens AG > > www.siemens.com > > > -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/015be7d274ac0be11e3e25248989c49673e6a551.camel%40siemens.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id 2025-10-21 11:22 ` 'Heinisch, Alexander' via isar-users 2025-10-21 15:58 ` 'cedric.hombourger@siemens.com' via isar-users @ 2025-10-23 16:02 ` Zhihang Wei 2025-10-23 19:26 ` 'Heinisch, Alexander' via isar-users 1 sibling, 1 reply; 7+ messages in thread From: Zhihang Wei @ 2025-10-23 16:02 UTC (permalink / raw) To: Heinisch, Alexander, isar-users; +Cc: MOESSBAUER, Felix, Cedric Hombourger Hi, The patch previously encountered an error during the full CI run. However, this error cannot be reproduced after multiple runs on the CI server or on my local machine. We believe the issue is related to the CI itself rather than the patch. Since it seems that the next version (v3) is on the way, we’ll wait for it before running CI again. If that’s not the case, please let me know. Best regards, Zhihang On 10/21/25 13:22, 'Heinisch, Alexander' via isar-users wrote: > Any updates on this patch? Seems it got lost. > > On Wed, 2025-09-17 at 11:28 +0200, alexander.heinisch@siemens.com > wrote: >> From: Alexander Heinisch <alexander.heinisch@siemens.com> >> >> If /etc/machine-id happens to be a link to e.g. /var/... >> the postprocessing overrides build-hosts /var/... instead of >> the desired file on the rootfs. >> >> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com> >> --- >> 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 991bac4c..b332e826 100644 >> --- a/meta/classes/image-postproc-extension.bbclass >> +++ b/meta/classes/image-postproc-extension.bbclass >> @@ -63,7 +63,7 @@ image_postprocess_machine_id() { >> if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; then >> MACHINE_ID="" >> fi >> - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine-id' >> + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee >> /etc/machine-id >> sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' >> } >> -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/136612f8-933b-43b1-aea1-f18473fcae33%40ilbers.de. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id 2025-10-23 16:02 ` Zhihang Wei @ 2025-10-23 19:26 ` 'Heinisch, Alexander' via isar-users 0 siblings, 0 replies; 7+ messages in thread From: 'Heinisch, Alexander' via isar-users @ 2025-10-23 19:26 UTC (permalink / raw) To: isar-users, wzh; +Cc: cedric.hombourger, MOESSBAUER, Felix On Thu, 2025-10-23 at 18:02 +0200, Zhihang Wei wrote: > Hi, > > The patch previously encountered an error during the full CI run. > However, > this error cannot be reproduced after multiple runs on the CI server > or > on my > local machine. We believe the issue is related to the CI itself > rather than > the patch. > > Since it seems that the next version (v3) is on the way, we’ll wait > for it > before running CI again. If that’s not the case, please let me know. > All remarks of Cedric got resolved, without changes required. Thus, as of now, no v3 is planned. BR Alexander > Best regards, > Zhihang > > On 10/21/25 13:22, 'Heinisch, Alexander' via isar-users wrote: > > Any updates on this patch? Seems it got lost. > > > > On Wed, 2025-09-17 at 11:28 +0200, alexander.heinisch@siemens.com > > wrote: > > > From: Alexander Heinisch <alexander.heinisch@siemens.com> > > > > > > If /etc/machine-id happens to be a link to e.g. /var/... > > > the postprocessing overrides build-hosts /var/... instead of > > > the desired file on the rootfs. > > > > > > Signed-off-by: Alexander Heinisch > > > <alexander.heinisch@siemens.com> > > > --- > > > 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 991bac4c..b332e826 100644 > > > --- a/meta/classes/image-postproc-extension.bbclass > > > +++ b/meta/classes/image-postproc-extension.bbclass > > > @@ -63,7 +63,7 @@ image_postprocess_machine_id() { > > > if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; > > > then > > > MACHINE_ID="" > > > fi > > > - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine- > > > id' > > > + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee > > > /etc/machine-id > > > sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' > > > } > > > -- Alexander Heinisch Siemens AG www.siemens.com -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/19350e55d4dc4e6e35c6d2091f9b96b4c9c5788a.camel%40siemens.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id 2025-09-17 9:28 [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id alexander.heinisch via isar-users 2025-10-21 11:22 ` 'Heinisch, Alexander' via isar-users @ 2025-10-24 15:56 ` Zhihang Wei 1 sibling, 0 replies; 7+ messages in thread From: Zhihang Wei @ 2025-10-24 15:56 UTC (permalink / raw) To: alexander.heinisch, isar-users; +Cc: felix.moessbauer Applied to next, thanks. Best regards, Zhihang On 9/17/25 11:28, alexander.heinisch via isar-users wrote: > From: Alexander Heinisch <alexander.heinisch@siemens.com> > > If /etc/machine-id happens to be a link to e.g. /var/... > the postprocessing overrides build-hosts /var/... instead of > the desired file on the rootfs. > > Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com> > --- > 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 991bac4c..b332e826 100644 > --- a/meta/classes/image-postproc-extension.bbclass > +++ b/meta/classes/image-postproc-extension.bbclass > @@ -63,7 +63,7 @@ image_postprocess_machine_id() { > if dpkg --compare-versions "$SYSTEMD_VERSION" "lt" "247"; then > MACHINE_ID="" > fi > - echo "$MACHINE_ID" | sudo tee '${IMAGE_ROOTFS}/etc/machine-id' > + echo "$MACHINE_ID" | sudo chroot ${IMAGE_ROOTFS} tee /etc/machine-id > sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' > } > -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/dc87cfad-c2f7-4783-8c9c-97943ccb4e76%40ilbers.de. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-24 15:56 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-09-17 9:28 [PATCH v2] classes/image-postproc: chroot before postprocessing /etc/machine-id alexander.heinisch via isar-users 2025-10-21 11:22 ` 'Heinisch, Alexander' via isar-users 2025-10-21 15:58 ` 'cedric.hombourger@siemens.com' via isar-users 2025-10-22 9:09 ` 'cedric.hombourger@siemens.com' via isar-users 2025-10-23 16:02 ` Zhihang Wei 2025-10-23 19:26 ` 'Heinisch, Alexander' via isar-users 2025-10-24 15:56 ` Zhihang Wei
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox