* [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable
@ 2026-08-25 18:08 Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 2/5] useradd_base.bbclass: Remove perform_groupmems() Peter Kjellerstedt
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2026-08-25 18:08 UTC (permalink / raw)
To: openembedded-core
Support for the groupmems command was removed from shadow 4.20. While
the suport for GROUPMEMS_PARAM was changed to use usermod instead in
commit cec67e24ac94554e092f8ab18b42e09b4feba77e, it makes sense to
remove it completely now that it has been removed from shadow. Instead
rely on using USERMOD_PARAM for adding users to groups, e.g.:
USERMOD_PARAM:${PN} = "--append --groups group1,group2 user1"
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/useradd.bbclass | 52 +++++-------------------------------
1 file changed, 7 insertions(+), 45 deletions(-)
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 4a07394a56..ca6462edd0 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -49,7 +49,6 @@ if test "x$UA_SYSROOT" = "x"; then
GROUPADD_PARAM="${GROUPADD_PARAM}"
USERADD_PARAM="${USERADD_PARAM}"
USERMOD_PARAM="${USERMOD_PARAM}"
- GROUPMEMS_PARAM="${GROUPMEMS_PARAM}"
fi
# Perform group additions first, since user additions may depend
@@ -101,22 +100,6 @@ if test "x`echo $USERMOD_PARAM | tr -d '[:space:]'`" != "x"; then
remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
-
-if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then
- echo "Running groupmems commands..."
- # Invoke multiple instances of groupmems for parameter lists
- # separated by ';'
- opts=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
- while test "x$opts" != "x"; do
- perform_groupmems "$SYSROOT" "$OPT $opts"
- if test "x$opts" = "x$remaining"; then
- break
- fi
- opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
- done
-fi
}
groupadd_sysroot() {
@@ -131,10 +114,6 @@ usermod_sysroot() {
common_useradd_sysroot usermod
}
-groupmems_sysroot() {
- common_useradd_sysroot groupmems
-}
-
common_useradd_sysroot() {
# Pseudo may (do_prepare_recipe_sysroot) or may not (do_populate_sysroot_setscene) be running
# at this point so we're explicit about the environment so pseudo can load if
@@ -155,25 +134,18 @@ common_useradd_sysroot() {
exit 0
fi
- cmd=$1
-
# Add groups and users defined for all recipe packages
case "$1" in
groupadd) GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}";;
useradd) USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}";;
usermod) USERMOD_PARAM="${@get_all_cmd_params(d, 'usermod')}";;
- groupmems)
- GROUPMEMS_PARAM="${@get_all_cmd_params(d, 'groupmems')}"
- # groupmems is emulated using usermod
- cmd=usermod
- ;;
esac
# It is also possible we may be in a recipe which doesn't have useradd dependencies and hence the
# useradd/groupadd tools are unavailable. If there is no dependency, we assume we don't want to
# create users in the sysroot
- if ! command -v "$cmd"; then
- bbwarn "The $cmd command could not be found!"
+ if ! command -v "$1"; then
+ bbwarn "The $1 command could not be found!"
exit 0
fi
@@ -190,7 +162,7 @@ common_useradd_sysroot() {
EXTRA_STAGING_FIXMES += "PSEUDO_SYSROOT PSEUDO_LOCALSTATEDIR LOGFIFO"
python useradd_sysroot_sstate() {
- for cmd, sort_prefix in [("groupadd", "01"), ("useradd", "02"), ("usermod", "03"), ("groupmems", "04")]:
+ for cmd, sort_prefix in [("groupadd", "01"), ("useradd", "02"), ("usermod", "03")]:
scriptfile = None
task = d.getVar("BB_CURRENTTASK")
if task == "package_setscene":
@@ -244,9 +216,9 @@ def update_useradd_after_parse(d):
bb.fatal("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
for pkg in useradd_packages.split():
- d.appendVarFlag("do_populate_sysroot", "vardeps", f" USERADD_PARAM:{pkg} GROUPADD_PARAM:{pkg} USERMOD_PARAM:{pkg} GROUPMEMS_PARAM:{pkg}")
- if not any(d.getVar(f"{name}_PARAM:{pkg}") for name in ["USERADD", "GROUPADD", "USERMOD", "GROUPMEMS"]):
- bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM, USERMOD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg))
+ d.appendVarFlag("do_populate_sysroot", "vardeps", f" USERADD_PARAM:{pkg} GROUPADD_PARAM:{pkg} USERMOD_PARAM:{pkg}")
+ if not any(d.getVar(f"{name}_PARAM:{pkg}") for name in ["USERADD", "GROUPADD", "USERMOD"]):
+ bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or USERMOD_PARAM for package %s" % (d.getVar('FILE', False), pkg))
python __anonymous() {
if not bb.data.inherits_class('nativesdk', d) \
@@ -289,10 +261,9 @@ fakeroot python populate_packages:prepend() {
preinst += 'perform_groupadd () {\n%s}\n' % d.getVar('perform_groupadd')
preinst += 'perform_useradd () {\n%s}\n' % d.getVar('perform_useradd')
preinst += 'perform_usermod () {\n%s}\n' % d.getVar('perform_usermod')
- preinst += 'perform_groupmems () {\n%s}\n' % d.getVar('perform_groupmems')
preinst += d.getVar('useradd_preinst')
# Expand out the *_PARAM variables to the package specific versions
- for rep in ["GROUPADD_PARAM", "USERADD_PARAM", "USERMOD_PARAM", "GROUPMEMS_PARAM"]:
+ for rep in ["GROUPADD_PARAM", "USERADD_PARAM", "USERMOD_PARAM"]:
val = d.getVar(rep + ":" + pkg) or ""
preinst = preinst.replace("${" + rep + "}", val)
d.setVar('pkg_preinst:%s' % pkg, preinst)
@@ -314,15 +285,6 @@ fakeroot python populate_packages:prepend() {
update_useradd_package(pkg)
}
-do_recipe_qa[postfuncs] += "recipe_qa_deprecate_groupmems_param"
-python recipe_qa_deprecate_groupmems_param() {
- useradd_packages = d.getVar('USERADD_PACKAGES') or ""
- for pkg in useradd_packages.split():
- if d.getVar(f"GROUPMEMS_PARAM:{pkg}"):
- bb.warn("The GROUPMEMS_PARAM variable is deprecated. Please use USERMOD_PARAM instead.")
- return
-}
-
# Use the following to extend the useradd with custom functions
USERADDEXTENSION ?= ""
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] useradd_base.bbclass: Remove perform_groupmems()
2026-08-25 18:08 [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable Peter Kjellerstedt
@ 2026-08-25 18:08 ` Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 3/5] useradd-staticids.bbclass: Remove references to GROUPMEMS_PARAM Peter Kjellerstedt
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2026-08-25 18:08 UTC (permalink / raw)
To: openembedded-core
It is no longer used after support for GROUPMEMS_PARAM was removed from
useradd.bbclass.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/useradd_base.bbclass | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
index 5e12880b64..efc9d0a096 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -50,32 +50,6 @@ perform_useradd () {
fi
}
-perform_groupmems () {
- local rootdir="$1"
- local opts="$2"
- bbnote "${PN}: Performing groupmems with [$opts]"
- local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
- local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
- local prefix=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-P" || $i == "--prefix") print $(i+1) }'`
- if test "x$groupname" = "x"; then
- bbfatal "${PN}: groupmems: No user specified using --add."
-
- elif test "x$username" = "x"; then
- bbfatal "${PN}: groupmems: No group specified using --group."
- fi
- bbnote "${PN}: Emulating groupmems command using usermod with group $groupname and user $username"
- local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
- if test "x$mem_exists" = "x"; then
- eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO usermod \${prefix:+--prefix \$prefix} --append --groups \$groupname \$username\" || true
- mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
- if test "x$mem_exists" = "x"; then
- bbfatal "${PN}: groupmems command (emulated using usermod) did not succeed."
- fi
- else
- bbnote "${PN}: group $groupname already contains $username, not re-adding it"
- fi
-}
-
perform_groupdel () {
local rootdir="$1"
local opts="$2"
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] useradd-staticids.bbclass: Remove references to GROUPMEMS_PARAM
2026-08-25 18:08 [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 2/5] useradd_base.bbclass: Remove perform_groupmems() Peter Kjellerstedt
@ 2026-08-25 18:08 ` Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 4/5] package.bbclass: Remove GROUPMEMS_PARAM from PACKAGEVARS Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM Peter Kjellerstedt
3 siblings, 0 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2026-08-25 18:08 UTC (permalink / raw)
To: openembedded-core
The GROUPMEMS_PARAM variable has been removed.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/useradd-staticids.bbclass | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index 1dbcba2bf1..f6bfe1bfb1 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -211,8 +211,8 @@ def update_useradd_static_config(d):
# If a field is left blank, the original value will be used. The 'groupname' field
# is required.
#
- # Note: similar to the passwd file, the 'password' filed is ignored
- # Note: group_members is ignored, group members must be configured with the GROUPMEMS_PARAM
+ # Note: similar to the passwd file, the 'password' field is ignored
+ # Note: the group_members field is ignored, group members must be configured with USERMOD_PARAM
if not groups:
files, table_var, table_value = get_table_list(d, 'USERADD_GID_TABLES', 'files/group')
groups = merge_files(files, 4)
@@ -265,8 +265,7 @@ def update_useradd_static_config(d):
useradd_packages = d.getVar('USERADD_PACKAGES') or ""
for pkg in useradd_packages.split():
- # Groupmems doesn't have anything we might want to change, so simply validating
- # is a bit of a waste -- only process useradd/groupadd
+ # Only process useradd/groupadd parameters.
useradd_param = d.getVar('USERADD_PARAM:%s' % pkg)
if useradd_param:
#bb.warn("Before: 'USERADD_PARAM:%s' - '%s'" % (pkg, useradd_param))
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] package.bbclass: Remove GROUPMEMS_PARAM from PACKAGEVARS
2026-08-25 18:08 [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 2/5] useradd_base.bbclass: Remove perform_groupmems() Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 3/5] useradd-staticids.bbclass: Remove references to GROUPMEMS_PARAM Peter Kjellerstedt
@ 2026-08-25 18:08 ` Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM Peter Kjellerstedt
3 siblings, 0 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2026-08-25 18:08 UTC (permalink / raw)
To: openembedded-core
The GROUPMEMS_PARAM variable has been removed.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes-global/package.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass
index 3d293dead7..1dd30fe8b8 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -438,7 +438,7 @@ python package_depchains() {
# Since bitbake can't determine which variables are accessed during package
# iteration, we need to list them here:
-PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm pkg_postinst_ontarget INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE PKGE PKGV PKGR USERADD_PARAM GROUPADD_PARAM USERMOD_PARAM CONFFILES SYSTEMD_SERVICE LICENSE SECTION pkg_preinst pkg_prerm RREPLACES GROUPMEMS_PARAM SYSTEMD_AUTO_ENABLE SKIP_FILEDEPS PRIVATE_LIBS PACKAGE_ADD_METADATA"
+PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm pkg_postinst_ontarget INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME ALTERNATIVE PKGE PKGV PKGR USERADD_PARAM GROUPADD_PARAM USERMOD_PARAM CONFFILES SYSTEMD_SERVICE LICENSE SECTION pkg_preinst pkg_prerm RREPLACES SYSTEMD_AUTO_ENABLE SKIP_FILEDEPS PRIVATE_LIBS PACKAGE_ADD_METADATA"
def gen_packagevar(d, pkgvars="PACKAGEVARS"):
ret = []
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM
2026-08-25 18:08 [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable Peter Kjellerstedt
` (2 preceding siblings ...)
2026-08-25 18:08 ` [PATCH 4/5] package.bbclass: Remove GROUPMEMS_PARAM from PACKAGEVARS Peter Kjellerstedt
@ 2026-08-25 18:08 ` Peter Kjellerstedt
2026-08-27 9:23 ` [OE-core] " Yoann Congal
3 siblings, 1 reply; 7+ messages in thread
From: Peter Kjellerstedt @ 2026-08-25 18:08 UTC (permalink / raw)
To: openembedded-core
The GROUPMEMS_PARAM variable has been removed.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/conf/documentation.conf | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 72513296e2..7b6df903bc 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -178,7 +178,6 @@ FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when c
#G
GROUPADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the groupadd command if you wish to add a group to the system when the package is installed."
-GROUPMEMS_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the groupmems command if you wish to modify the members of a group when the package is installed."
GRUB_GFXSERIAL[doc] = "Configures the GNU GRand Unified Bootloader (GRUB) to have graphics and serial in the boot menu."
GRUB_OPTS[doc] = "Additional options to add to the GNU GRand Unified Bootloader (GRUB) configuration."
GRUB_TIMEOUT[doc] = "Specifies the timeout before executing the default LABEL in the GNU GRand Unified Bootloader (GRUB)."
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [OE-core] [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM
2026-08-25 18:08 ` [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM Peter Kjellerstedt
@ 2026-08-27 9:23 ` Yoann Congal
2026-08-28 9:56 ` Peter Kjellerstedt
0 siblings, 1 reply; 7+ messages in thread
From: Yoann Congal @ 2026-08-27 9:23 UTC (permalink / raw)
To: peter.kjellerstedt, openembedded-core
On Tue Aug 25, 2026 at 8:08 PM CEST, Peter Kjellerstedt via lists.openembedded.org wrote:
> The GROUPMEMS_PARAM variable has been removed.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
> meta/conf/documentation.conf | 1 -
> 1 file changed, 1 deletion(-)
Hello,
I think there is one last reference to GROUPMEMS_PARAM:
❯ git grep GROUPMEMS_PARAM origin/master-next
origin/master-next:scripts/contrib/convert-overrides.py: "pkg_prerm", "RREPLACES", "GROUPMEMS_PARAM", "SYSTEMD_AUTO_ENABLE", "SKIP_FILEDEPS", "PRIVATE_LIBS", "PACKAGE_ADD_METADATA",
This won't hold the series but maybe consider a followup patch?
Thanks!
--
Yoann Congal
Smile ECS
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [OE-core] [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM
2026-08-27 9:23 ` [OE-core] " Yoann Congal
@ 2026-08-28 9:56 ` Peter Kjellerstedt
0 siblings, 0 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2026-08-28 9:56 UTC (permalink / raw)
To: Yoann Congal, openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: Yoann Congal <yoann.congal@smile.fr>
> Sent: den 27 augusti 2026 11:24
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; openembedded-
> core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 5/5] documentation.conf: Remove the
> documentation of GROUPMEMS_PARAM
>
> On Tue Aug 25, 2026 at 8:08 PM CEST, Peter Kjellerstedt via lists.openembedded.org wrote:
> > The GROUPMEMS_PARAM variable has been removed.
> >
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> > meta/conf/documentation.conf | 1 -
> > 1 file changed, 1 deletion(-)
>
> Hello,
>
> I think there is one last reference to GROUPMEMS_PARAM:
> ❯ git grep GROUPMEMS_PARAM origin/master-next
> origin/master-next:scripts/contrib/convert-overrides.py:
> "pkg_prerm", "RREPLACES", "GROUPMEMS_PARAM", "SYSTEMD_AUTO_ENABLE",
> "SKIP_FILEDEPS", "PRIVATE_LIBS", "PACKAGE_ADD_METADATA",
>
> This won't hold the series but maybe consider a followup patch?
>
> Thanks!
> --
> Yoann Congal
> Smile ECS
Yes, I know. I considered it and figured it makes no sense to modify
that script. I think it would make more sense to remove it altogether
as I expect everyone to be updated to the new override syntax since
years ago. And if you aren't, then I doubt you upgrade directly to
Blacksail anyway...
//Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-08-28 9:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 18:08 [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 2/5] useradd_base.bbclass: Remove perform_groupmems() Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 3/5] useradd-staticids.bbclass: Remove references to GROUPMEMS_PARAM Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 4/5] package.bbclass: Remove GROUPMEMS_PARAM from PACKAGEVARS Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM Peter Kjellerstedt
2026-08-27 9:23 ` [OE-core] " Yoann Congal
2026-08-28 9:56 ` Peter Kjellerstedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.