From: "'MOESSBAUER, Felix' via isar-users" <isar-users@googlegroups.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Kiszka, Jan" <jan.kiszka@siemens.com>
Cc: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>,
"Kowalsky, Clara" <clara.kowalsky@siemens.com>
Subject: Re: [PATCH 1/1] fix: rebuild rootfs on change of USERS
Date: Fri, 11 Apr 2025 09:52:21 +0000 [thread overview]
Message-ID: <c83ece790529e738eaede34e5fcd0d9ef104ba3a.camel@siemens.com> (raw)
In-Reply-To: <1597c446-d9ad-4b45-b01a-490325a23d9a@siemens.com>
On Fri, 2025-04-11 at 11:48 +0200, Jan Kiszka wrote:
> On 11.04.25 11:44, 'Felix Moessbauer' via isar-users wrote:
> > In case a change to the Isar created users is done, this currently
> > only re-triggers the do_rootfs_postprocess task. This task changes
> > the
> > rootfs (e.g. home dirs are moved) and by that needs to operate on a
> > clean one. Otherwise old homedirs might still remain in the final
> > rootfs
> > or move operations are not possible.
> >
> > We fix this by ensuring that the do_rootfs_install task is executed
> > whenever a change to USERS is done. By that, we enter the
> > do_rootfs_postinstall with a clean rootfs.
> >
> > Reported-by: Clara Kowalsky <clara.kowalsky@siemens.com>
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> > meta/classes/image-account-extension.bbclass | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/meta/classes/image-account-extension.bbclass
> > b/meta/classes/image-account-extension.bbclass
> > index ea956cd5..8289db40 100644
> > --- a/meta/classes/image-account-extension.bbclass
> > +++ b/meta/classes/image-account-extension.bbclass
> > @@ -144,3 +144,7 @@ python image_postprocess_accounts() {
> > image_create_groups(d)
> > image_create_users(d)
> > }
> > +
> > +# rebuild rootfs on change of USERS as homes might be moved /
> > created
> > +# no need to depend on GROUPS as they don't create directories
> > +do_rootfs_install[vardeps] += "USERS"
>
> Means, we are not caching after rootfs_install so far?
Exactly. We cache the do_rootfs_install task (which runs before
do_rootfs_postprocess). A long term solution would be to not pass the
extracted rootfs between do_rootfs_install and do_rootfs_postprocess
but instead pass the clean tarball which is then extracted in the
postprocess task.
This however would break an interface, as currently tasks that run
after do_rootfs_install assume that the rootfs is available as tree.
Felix
>
> Jan
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
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/c83ece790529e738eaede34e5fcd0d9ef104ba3a.camel%40siemens.com.
next prev parent reply other threads:[~2025-04-11 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 9:44 'Felix Moessbauer' via isar-users
2025-04-11 9:48 ` 'Jan Kiszka' via isar-users
2025-04-11 9:52 ` 'MOESSBAUER, Felix' via isar-users [this message]
2025-04-11 10:09 ` 'Clara Kowalsky' via isar-users
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=c83ece790529e738eaede34e5fcd0d9ef104ba3a.camel@siemens.com \
--to=isar-users@googlegroups.com \
--cc=adriaan.schmidt@siemens.com \
--cc=clara.kowalsky@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.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