* [PATCH] image-account-extension: Also rebuild roots on GROUP_* changes
@ 2025-06-18 6:57 'Jan Kiszka' via isar-users
2025-07-16 19:51 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-06-18 6:57 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, Quirin Gylstorff
From: Jan Kiszka <jan.kiszka@siemens.com>
Unlike what 3330e1ca2bca what assumed, also certain changes to groups
can invalidate previous runs of the account extensions against the
cached rootfs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/image-account-extension.bbclass | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/meta/classes/image-account-extension.bbclass b/meta/classes/image-account-extension.bbclass
index 3c461b1a..5039adab 100644
--- a/meta/classes/image-account-extension.bbclass
+++ b/meta/classes/image-account-extension.bbclass
@@ -8,21 +8,20 @@
USERS ??= ""
GROUPS ??= ""
-# rebuild rootfs on change of USERS as homes might be moved / created
-# no need to depend on GROUPS as they don't create directories
-# groups need to be created before users, hence do not move the user creation into
-# the do_rootfs_install task but only add a dependency
+# rebuild rootfs on change of USERS or GROUPS as homes might be created, moved
+# or given different IDs.
python() {
for entry in (d.getVar("GROUPS") or "").split():
group_entry = "GROUP_{}".format(entry)
d.appendVarFlag("image_postprocess_accounts", "vardeps", " {}".format(group_entry))
+ d.appendVarFlag("do_rootfs_install", "vardeps", " {}".format(group_entry))
for entry in (d.getVar("USERS") or "").split():
user_entry = "USER_{}".format(entry)
d.appendVarFlag("image_postprocess_accounts", "vardeps", " {}".format(user_entry))
d.appendVarFlag("do_rootfs_install", "vardeps", " {}".format(user_entry))
}
-do_rootfs_install[vardeps] += "USERS"
+do_rootfs_install[vardeps] += "GROUPS USERS"
def image_create_groups(d: "DataSmart") -> None:
"""Creates the groups defined in the ``GROUPS`` bitbake variable.
--
2.43.0
--
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/9e54c21f-63df-4a0c-bdca-711dc8079380%40siemens.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] image-account-extension: Also rebuild roots on GROUP_* changes
2025-06-18 6:57 [PATCH] image-account-extension: Also rebuild roots on GROUP_* changes 'Jan Kiszka' via isar-users
@ 2025-07-16 19:51 ` 'Jan Kiszka' via isar-users
2025-07-17 8:44 ` 'MOESSBAUER, Felix' via isar-users
2025-07-17 10:30 ` Baurzhan Ismagulov
0 siblings, 2 replies; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-07-16 19:51 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, Quirin Gylstorff
On 18.06.25 08:57, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Unlike what 3330e1ca2bca what assumed, also certain changes to groups
> can invalidate previous runs of the account extensions against the
> cached rootfs.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/image-account-extension.bbclass | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/image-account-extension.bbclass b/meta/classes/image-account-extension.bbclass
> index 3c461b1a..5039adab 100644
> --- a/meta/classes/image-account-extension.bbclass
> +++ b/meta/classes/image-account-extension.bbclass
> @@ -8,21 +8,20 @@
> USERS ??= ""
> GROUPS ??= ""
>
> -# rebuild rootfs on change of USERS as homes might be moved / created
> -# no need to depend on GROUPS as they don't create directories
> -# groups need to be created before users, hence do not move the user creation into
> -# the do_rootfs_install task but only add a dependency
> +# rebuild rootfs on change of USERS or GROUPS as homes might be created, moved
> +# or given different IDs.
> python() {
> for entry in (d.getVar("GROUPS") or "").split():
> group_entry = "GROUP_{}".format(entry)
> d.appendVarFlag("image_postprocess_accounts", "vardeps", " {}".format(group_entry))
> + d.appendVarFlag("do_rootfs_install", "vardeps", " {}".format(group_entry))
>
> for entry in (d.getVar("USERS") or "").split():
> user_entry = "USER_{}".format(entry)
> d.appendVarFlag("image_postprocess_accounts", "vardeps", " {}".format(user_entry))
> d.appendVarFlag("do_rootfs_install", "vardeps", " {}".format(user_entry))
> }
> -do_rootfs_install[vardeps] += "USERS"
> +do_rootfs_install[vardeps] += "GROUPS USERS"
>
> def image_create_groups(d: "DataSmart") -> None:
> """Creates the groups defined in the ``GROUPS`` bitbake variable.
This seems to have been forgotten.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/76ea2330-5b4b-46ab-9d35-3bc9c64ea6a5%40siemens.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] image-account-extension: Also rebuild roots on GROUP_* changes
2025-07-16 19:51 ` 'Jan Kiszka' via isar-users
@ 2025-07-17 8:44 ` 'MOESSBAUER, Felix' via isar-users
2025-07-17 10:30 ` Baurzhan Ismagulov
1 sibling, 0 replies; 4+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2025-07-17 8:44 UTC (permalink / raw)
To: isar-users, Kiszka, Jan; +Cc: quirin.gylstorff
On Wed, 2025-07-16 at 21:51 +0200, Jan Kiszka wrote:
> On 18.06.25 08:57, 'Jan Kiszka' via isar-users wrote:
> > From: Jan Kiszka <jan.kiszka@siemens.com>
> >
> > Unlike what 3330e1ca2bca what assumed, also certain changes to
> > groups
> > can invalidate previous runs of the account extensions against the
> > cached rootfs.
> >
> > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > ---
> > meta/classes/image-account-extension.bbclass | 9 ++++-----
> > 1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/meta/classes/image-account-extension.bbclass
> > b/meta/classes/image-account-extension.bbclass
> > index 3c461b1a..5039adab 100644
> > --- a/meta/classes/image-account-extension.bbclass
> > +++ b/meta/classes/image-account-extension.bbclass
> > @@ -8,21 +8,20 @@
> > USERS ??= ""
> > GROUPS ??= ""
> >
> > -# rebuild rootfs on change of USERS as homes might be moved /
> > created
> > -# no need to depend on GROUPS as they don't create directories
> > -# groups need to be created before users, hence do not move the
> > user creation into
> > -# the do_rootfs_install task but only add a dependency
> > +# rebuild rootfs on change of USERS or GROUPS as homes might be
> > created, moved
> > +# or given different IDs.
> > python() {
> > for entry in (d.getVar("GROUPS") or "").split():
> > group_entry = "GROUP_{}".format(entry)
> > d.appendVarFlag("image_postprocess_accounts", "vardeps", "
> > {}".format(group_entry))
> > + d.appendVarFlag("do_rootfs_install", "vardeps", "
> > {}".format(group_entry))
> >
> > for entry in (d.getVar("USERS") or "").split():
> > user_entry = "USER_{}".format(entry)
> > d.appendVarFlag("image_postprocess_accounts", "vardeps", "
> > {}".format(user_entry))
> > d.appendVarFlag("do_rootfs_install", "vardeps", "
> > {}".format(user_entry))
> > }
> > -do_rootfs_install[vardeps] += "USERS"
> > +do_rootfs_install[vardeps] += "GROUPS USERS"
> >
> > def image_create_groups(d: "DataSmart") -> None:
> > """Creates the groups defined in the ``GROUPS`` bitbake
> > variable.
>
> This seems to have been forgotten.
Agree, we need it.
Tested-by: Felix Moessbauer <felix.moessbauer@siemens.com>
>
> 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/542c6393b6add8e0f9e6383186f325a1abdde903.camel%40siemens.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] image-account-extension: Also rebuild roots on GROUP_* changes
2025-07-16 19:51 ` 'Jan Kiszka' via isar-users
2025-07-17 8:44 ` 'MOESSBAUER, Felix' via isar-users
@ 2025-07-17 10:30 ` Baurzhan Ismagulov
1 sibling, 0 replies; 4+ messages in thread
From: Baurzhan Ismagulov @ 2025-07-17 10:30 UTC (permalink / raw)
To: isar-users; +Cc: Jan Kiszka
On 2025-07-16 21:51, 'Jan Kiszka' via isar-users wrote:
> > Unlike what 3330e1ca2bca what assumed, also certain changes to groups
> > can invalidate previous runs of the account extensions against the
> > cached rootfs.
>
> This seems to have been forgotten.
Not forgotten, we just have a bit of backlog at the moment.
Applied to next, thanks.
With kind regards,
Baurzhan
--
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/aHjQqBlEFEgdnXl2%40abai.de.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-17 10:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-18 6:57 [PATCH] image-account-extension: Also rebuild roots on GROUP_* changes 'Jan Kiszka' via isar-users
2025-07-16 19:51 ` 'Jan Kiszka' via isar-users
2025-07-17 8:44 ` 'MOESSBAUER, Felix' via isar-users
2025-07-17 10:30 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox