* [PATCH] image-postproc-extension: empty mechine-id @ 2019-07-08 3:37 Su, Bao Cheng 2019-07-08 6:47 ` Claudius Heine 0 siblings, 1 reply; 10+ messages in thread From: Su, Bao Cheng @ 2019-07-08 3:37 UTC (permalink / raw) To: isar-users; +Cc: Kiszka, Jan, ch From: Su Bao Cheng <baocheng.su@siemens.com> 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. 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 <baocheng.su@siemens.com> --- 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' } -- 2.17.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-08 3:37 [PATCH] image-postproc-extension: empty mechine-id Su, Bao Cheng @ 2019-07-08 6:47 ` Claudius Heine 2019-07-08 10:57 ` Su, Bao Cheng 0 siblings, 1 reply; 10+ messages in thread From: Claudius Heine @ 2019-07-08 6:47 UTC (permalink / raw) To: [ext] Su, Bao Cheng, isar-users; +Cc: Kiszka, Jan, ch Hi, On 08/07/2019 05.37, [ext] Su, Bao Cheng wrote: > > From: Su Bao Cheng <baocheng.su@siemens.com> > 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 <baocheng.su@siemens.com> > --- > 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] image-postproc-extension: empty mechine-id 2019-07-08 6:47 ` Claudius Heine @ 2019-07-08 10:57 ` Su, Bao Cheng 2019-07-10 8:48 ` Baurzhan Ismagulov 0 siblings, 1 reply; 10+ messages in thread From: Su, Bao Cheng @ 2019-07-08 10:57 UTC (permalink / raw) To: Heine, Claudius, isar-users; +Cc: Kiszka, Jan, ch > -----Original Message----- > From: Heine, Claudius (ext) (CT RDA IOT SES-DE) > Sent: Monday, July 08, 2019 2:48 PM > To: Su, Bao Cheng (RC-CN DI FA R&D SW); isar-users@googlegroups.com > Cc: Kiszka, Jan (CT RDA IOT SES-DE); ch@denx.de > Subject: Re: [PATCH] image-postproc-extension: empty mechine-id > > Hi, > > On 08/07/2019 05.37, [ext] Su, Bao Cheng wrote: > > > > From: Su Bao Cheng <baocheng.su@siemens.com> > > 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 <baocheng.su@siemens.com> > > --- > > 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 Please see the revision: From: Su Bao Cheng <baocheng.su@siemens.com> 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. 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 <baocheng.su@siemens.com> --- meta/classes/image-postproc-extension.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes/image-postproc-extension.bbclass b/meta/classes/image-postproc-extension.bbclass index 495eae6..3f7b73b 100644 --- a/meta/classes/image-postproc-extension.bbclass +++ b/meta/classes/image-postproc-extension.bbclass @@ -49,5 +49,6 @@ 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}/etc/machine-id' + sudo rm -f '${IMAGE_ROOTFS}/var/lib/dbus/machine-id' + sudo install -m 644 '/dev/null' '${IMAGE_ROOTFS}/etc/machine-id' } -- 2.17.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-08 10:57 ` Su, Bao Cheng @ 2019-07-10 8:48 ` Baurzhan Ismagulov 2019-07-10 9:19 ` Su, Bao Cheng 2019-07-10 11:44 ` Henning Schild 0 siblings, 2 replies; 10+ messages in thread From: Baurzhan Ismagulov @ 2019-07-10 8:48 UTC (permalink / raw) To: isar-users Hello Bao Cheng, On Mon, Jul 08, 2019 at 10:57:36AM +0000, Su, Bao Cheng wrote: > 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. > > 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. Thanks, applied to next. I couldn't observe your original "sys-subsystem-net-devices-multi-user.device timeouts" problem. Is it reproducible with stock Isar? Which architecture? Also, at least for amd64, the machine id is only generated temporarily. The file is not replaced since /etc is read-only at that moment. So we have to revisit Claudius's rw patch. This works for arm since it is already rw. With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-10 8:48 ` Baurzhan Ismagulov @ 2019-07-10 9:19 ` Su, Bao Cheng 2019-07-10 11:44 ` Henning Schild 1 sibling, 0 replies; 10+ messages in thread From: Su, Bao Cheng @ 2019-07-10 9:19 UTC (permalink / raw) To: Baurzhan Ismagulov, isar-users Hello Baurzhan, On 7/10/2019 4:48 PM, Baurzhan Ismagulov wrote: > Hello Bao Cheng, > > On Mon, Jul 08, 2019 at 10:57:36AM +0000, Su, Bao Cheng wrote: >> 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. >> >> 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. > > Thanks, applied to next. > > I couldn't observe your original "sys-subsystem-net-devices-multi-user.device > timeouts" problem. Is it reproducible with stock Isar? Which architecture? > It is reproducible on the commit 6f4314237c228c303d8e85459974008b18996e0d, with an arm64 board. > Also, at least for amd64, the machine id is only generated temporarily. The > file is not replaced since /etc is read-only at that moment. So we have to > revisit Claudius's rw patch. This works for arm since it is already rw. > > With kind regards, > Baurzhan. > BRs, SBC ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-10 8:48 ` Baurzhan Ismagulov 2019-07-10 9:19 ` Su, Bao Cheng @ 2019-07-10 11:44 ` Henning Schild 2019-07-11 4:06 ` Su, Bao Cheng 1 sibling, 1 reply; 10+ messages in thread From: Henning Schild @ 2019-07-10 11:44 UTC (permalink / raw) To: Baurzhan Ismagulov; +Cc: isar-users Am Wed, 10 Jul 2019 10:48:31 +0200 schrieb Baurzhan Ismagulov <ibr@radix50.net>: > Hello Bao Cheng, > > On Mon, Jul 08, 2019 at 10:57:36AM +0000, Su, Bao Cheng wrote: > > 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. > > > > 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. > > Thanks, applied to next. Mhh the commit message looks pretty ugly. Probably because v2 was not actually done with git format-patch. I would suggest to clean that up and force-push next. Henning > I couldn't observe your original > "sys-subsystem-net-devices-multi-user.device timeouts" problem. Is it > reproducible with stock Isar? Which architecture? > > Also, at least for amd64, the machine id is only generated > temporarily. The file is not replaced since /etc is read-only at that > moment. So we have to revisit Claudius's rw patch. This works for arm > since it is already rw. > > With kind regards, > Baurzhan. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-10 11:44 ` Henning Schild @ 2019-07-11 4:06 ` Su, Bao Cheng 2019-07-11 5:34 ` Jan Kiszka 0 siblings, 1 reply; 10+ messages in thread From: Su, Bao Cheng @ 2019-07-11 4:06 UTC (permalink / raw) To: Schild, Henning, Baurzhan Ismagulov; +Cc: isar-users On 7/10/2019 7:44 PM, Schild, Henning (CT RDA IOT SES-DE) wrote: > Am Wed, 10 Jul 2019 10:48:31 +0200 > schrieb Baurzhan Ismagulov <ibr@radix50.net>: > >> Hello Bao Cheng, >> >> On Mon, Jul 08, 2019 at 10:57:36AM +0000, Su, Bao Cheng wrote: >>> 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. >>> >>> 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. >> >> Thanks, applied to next. > > Mhh the commit message looks pretty ugly. Probably because v2 was not > actually done with git format-patch. > > I would suggest to clean that up and force-push next. > yeah I saw the ugly message from the github.com. Do I have the permissions to force-push the next branch? or do I need re-send the patch to mailing list? > Henning > >> I couldn't observe your original >> "sys-subsystem-net-devices-multi-user.device timeouts" problem. Is it >> reproducible with stock Isar? Which architecture? >> >> Also, at least for amd64, the machine id is only generated >> temporarily. The file is not replaced since /etc is read-only at that >> moment. So we have to revisit Claudius's rw patch. This works for arm >> since it is already rw. >> >> With kind regards, >> Baurzhan. >> > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-11 4:06 ` Su, Bao Cheng @ 2019-07-11 5:34 ` Jan Kiszka 2019-07-11 10:25 ` Baurzhan Ismagulov 2019-07-11 16:37 ` Henning Schild 0 siblings, 2 replies; 10+ messages in thread From: Jan Kiszka @ 2019-07-11 5:34 UTC (permalink / raw) To: [ext] Su, Bao Cheng, Schild, Henning, Baurzhan Ismagulov; +Cc: isar-users On 11.07.19 06:06, [ext] Su, Bao Cheng wrote: > On 7/10/2019 7:44 PM, Schild, Henning (CT RDA IOT SES-DE) wrote: >> Am Wed, 10 Jul 2019 10:48:31 +0200 >> schrieb Baurzhan Ismagulov <ibr@radix50.net>: >> >>> Hello Bao Cheng, >>> >>> On Mon, Jul 08, 2019 at 10:57:36AM +0000, Su, Bao Cheng wrote: >>>> 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. >>>> >>>> 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. >>> >>> Thanks, applied to next. >> >> Mhh the commit message looks pretty ugly. Probably because v2 was not >> actually done with git format-patch. >> >> I would suggest to clean that up and force-push next. >> > yeah I saw the ugly message from the github.com. Do I have the > permissions to force-push the next branch? or do I need re-send the > patch to mailing list? > Baurzhan, please re-commit this one. Rewriting next is now less critical as it used to be. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-11 5:34 ` Jan Kiszka @ 2019-07-11 10:25 ` Baurzhan Ismagulov 2019-07-11 16:37 ` Henning Schild 1 sibling, 0 replies; 10+ messages in thread From: Baurzhan Ismagulov @ 2019-07-11 10:25 UTC (permalink / raw) To: isar-users On Thu, Jul 11, 2019 at 07:34:22AM +0200, Jan Kiszka wrote: > Baurzhan, please re-commit this one. Rewriting next is now less critical as it > used to be. Done. With kind regards, Baurzhan. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] image-postproc-extension: empty mechine-id 2019-07-11 5:34 ` Jan Kiszka 2019-07-11 10:25 ` Baurzhan Ismagulov @ 2019-07-11 16:37 ` Henning Schild 1 sibling, 0 replies; 10+ messages in thread From: Henning Schild @ 2019-07-11 16:37 UTC (permalink / raw) To: Jan Kiszka; +Cc: [ext] Su, Bao Cheng, Baurzhan Ismagulov, isar-users Am Thu, 11 Jul 2019 07:34:22 +0200 schrieb Jan Kiszka <jan.kiszka@siemens.com>: > On 11.07.19 06:06, [ext] Su, Bao Cheng wrote: > > On 7/10/2019 7:44 PM, Schild, Henning (CT RDA IOT SES-DE) wrote: > >> Am Wed, 10 Jul 2019 10:48:31 +0200 > >> schrieb Baurzhan Ismagulov <ibr@radix50.net>: > >> > >>> Hello Bao Cheng, > >>> > >>> On Mon, Jul 08, 2019 at 10:57:36AM +0000, Su, Bao Cheng wrote: > >>>> 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. > >>>> > >>>> 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. > >>> > >>> Thanks, applied to next. > >> > >> Mhh the commit message looks pretty ugly. Probably because v2 was > >> not actually done with git format-patch. > >> > >> I would suggest to clean that up and force-push next. > >> > > yeah I saw the ugly message from the github.com. Do I have the > > permissions to force-push the next branch? or do I need re-send the > > patch to mailing list? > > > > Baurzhan, please re-commit this one. Rewriting next is now less > critical as it used to be. Just re-read CONTRIBUTING.md and indeed there is no work about "next" being rebasing ... There even is "please base your patches on next". In this case rebasing (force-pushing) in indeed a no-go. Is that a bug in the description or does Isar not have a rebasing staging branch? I still remember the days when master was months behind next, forcing everyone on next. In these days it was a no-go because master was too slow, but i always assumed it would be possible. Henning > Jan > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-07-11 16:37 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-08 3:37 [PATCH] image-postproc-extension: empty mechine-id Su, Bao Cheng 2019-07-08 6:47 ` Claudius Heine 2019-07-08 10:57 ` Su, Bao Cheng 2019-07-10 8:48 ` Baurzhan Ismagulov 2019-07-10 9:19 ` Su, Bao Cheng 2019-07-10 11:44 ` Henning Schild 2019-07-11 4:06 ` Su, Bao Cheng 2019-07-11 5:34 ` Jan Kiszka 2019-07-11 10:25 ` Baurzhan Ismagulov 2019-07-11 16:37 ` Henning Schild
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox