From patchwork Tue May 12 19:04:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 87923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB618CD4F39 for ; Tue, 12 May 2026 19:04:38 +0000 (UTC) Received: from DB3PR0202CU003.outbound.protection.outlook.com (DB3PR0202CU003.outbound.protection.outlook.com [52.101.84.59]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.83621.1778612671549457351 for ; Tue, 12 May 2026 12:04:31 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=QnbZ2Hkr; spf=pass (domain: axis.com, ip: 52.101.84.59, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FLFekC3qcslGt+Avl0uYLC8uKwt8Zu+wrEhOuKXcktBnCo2IvwZUOqWWfwaEHyflPJE3hPxsclAsRV7CPQ+zF7UGPLwTU4/veX8XU8Y1QFPlrdnjg3wO+kErt1nZxWhiEi+sh0pYf+pPkZhEKT1M43KSnc3PvWUQkzV+WMnnOsmWaDJhIvDrFJZCL0nIfyHc3mwHYRbkh2djkGIeanyB0TFeq6gWRZ05N37umkXlnsqRwWj2y+KzKE/39dWJNy5wejE1ywHOL6z47FdtJ1qbFdLeq3WCJ1194QRcj06GqA6AxYNchvOxlNFD0HZKrrF2ETZau0/JWpjjeNHYuQeRfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eEEdU224ruOYm5nyGYqICkJYEcnXMMW0yCCOwfx1YoU=; b=bHEmEZ1ZVVIHVAwYEJMM80jbR7rXyqpBkvZOc6scwB+cGL8FqVBugdeq4NjSwjoXuYylWKx/rSTecHQjU+KIeYiwc1HT0StZoTLi7TQNf5Pvl/izAFmfIfYyvk4DAkFrM4nFPgh8NQIvx4OnQIRyM67nv0hvzPtDLgVAsRBNWQvsZ3KkcstbRIq+aL1XKwcpsLtjvVGoPqOqr/0dloEJDT4+zAIsUfi+kz/2jLM2ttQa7VpXf/u4iMElp0hjRSsZw3qRBPqygxCGRq4so7vsR4NUcbGAs+ysPCEpTY/rVnSrMCmE/Jds1/iQNknbs8fTvG4jBZr/9hCNW+7nQr1Ujg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eEEdU224ruOYm5nyGYqICkJYEcnXMMW0yCCOwfx1YoU=; b=QnbZ2HkrjSX4TtA4wtzl+isB+WT8Hynp2xepYrkbcd8QRMci5x672eG4gAw9CE6wLuC8FZAp/himibpVOhf/EnXSo+zcE0VxQK+oWRNRd+uEY7hgaaIQs8NCleN2SoGWRks5ZgFvthEWzJrxoHgUgbwUj56jiLwmaTYjuOCBY0k= Received: from AS4P189CA0004.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5d7::7) by AS5PR02MB11246.eurprd02.prod.outlook.com (2603:10a6:20b:6ca::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9913.11; Tue, 12 May 2026 19:04:26 +0000 Received: from AMS1EPF00000094.eurprd05.prod.outlook.com (2603:10a6:20b:5d7:cafe::ce) by AS4P189CA0004.outlook.office365.com (2603:10a6:20b:5d7::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.25.16 via Frontend Transport; Tue, 12 May 2026 19:04:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS1EPF00000094.mail.protection.outlook.com (10.167.242.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.25.13 via Frontend Transport; Tue, 12 May 2026 19:04:26 +0000 Received: from se-mail10w.axis.com (10.20.40.10) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.39; Tue, 12 May 2026 21:04:24 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Tue, 12 May 2026 21:04:24 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 37D261611 for ; Tue, 12 May 2026 21:04:24 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 342BD1247A5; Tue, 12 May 2026 21:04:24 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 1/5] useradd.bbclass: Some clean-ups and simplifications Date: Tue, 12 May 2026 21:04:11 +0200 Message-ID: <20260512190415.948535-2-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260512190415.948535-1-pkj@axis.com> References: <20260512190415.948535-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF00000094:EE_|AS5PR02MB11246:EE_ X-MS-Office365-Filtering-Correlation-Id: 87fb63a2-6efa-4b79-761b-08deb0594975 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700016|1800799024|82310400026|18002099003|22082099003|11063799003|56012099003; X-Microsoft-Antispam-Message-Info: Cro4rRzbwxXZcjoomtQnHImEFzDWy51ycQXv98y62sJOiqoy+GGAbnzP9a/Tt/qJZ9j3l1gB/TI+XSSWGJzVXyQhMvECz5yLLkuSmRefnbKtzr20u0W75+ZCEgVdhDaB/Da8p+ogMF7xGhrtQ5ZTogIKslSk2FkptqCEGPg0sCYv40vvElXolwfOHQUVe07DrAxAdnd8gpb7jpew1pzxVCfCKht+ZNFbWkR1tNgAZWPfvhPiwwa61tKG5h2j5bwhVK/VriooCX8UEvAiGxCBP/ylLVU/twl7e7h9cWd3L+1IPluTTXbE2cLEk6ztbaS6rrAQL9zRkViT11sBnIz3CBwbaGYYV04yGhXAGjpYdV52Jxqq6d/E9G3CRQJAKbexRj2vK4byO6hpCeK7FgWRshtAv8OeHpzr2sndibteHL4bQr8vtTbaZGKNMzwg0P9KxDhG12PBpDtsxuVKMNdXrXC5vxst0yQbMy3YIgbdH25pN5qmAfVtLe8wGhN6qyvswPgIblJ0EVzy4DU1sryfA+SLaYGegJC7HFS2IEAj6KfsJ+8XgIRqh6XUcJiZHSLK8zJsRKqgfwLGdkpqIMoVE0ypBioEebpo8nz1+5oTYir7wZN4HIAF2w/myq+0LsJDF/pP40PLPOj+XOhis3QUGRRNnwuO1Mc4dJ8b0SwfD+8BPwT6bKhAmlfvMgIIhjZzx2yVwQHSzpJwu9LkB9bSC6bCbfGcnf7NGDTUiX1P/3g= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700016)(1800799024)(82310400026)(18002099003)(22082099003)(11063799003)(56012099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DXI8Jq5VjhnneDY5EH3cBoHQTy//C+Zh9HbV2ep8D5Ck+yItGOSoRZqDSen9bjTHk2sDHOkAIYTLC6XbiaD/E4N9hPcKj6GdJcuBpKjnn47Dsf4xBlHEl33FNTLo8QYwDuGLqDBMvtCoFF0LFeXaddpeGzxFHJ+O7/Wv9xhLBI2fMJ3UVE3HjuXKdmQWJBExKrlhHibERUi/i7UTlm6VSzERMB0vKBwbYk7Gj024AcIUJ0vGRX/Db3EncZ8hwZ2QB9szHh8X/CSUAGsJZi4L+N7UAczFPZ8pRX4KmUuwcoOqHBGUdrP62rx7atxHxAT4vCni5MwHYZbd52L5hZ36bIj/KKk7lUctZieOXIlGqQYXvGVOj7JEq4FM2VD7eNj5nfAfJtc0yYTmisXlnl8HWfrXhTPGi1wwa/bz3xTH5KWHL6tbw5D/NxrSFWr23JWY X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 19:04:26.3824 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87fb63a2-6efa-4b79-761b-08deb0594975 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000094.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR02MB11246 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 12 May 2026 19:04:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236905 * Improve some odd function names, e.g., groupmemsadd_sysroot and user_group_groupmems_add_sysroot. These were introduced in commit 322ef726132a47d977d2c6ee41de5358f1e85994 (useradd.bbclass: Fix order of postinst-useradd-*). * Make common_useradd_sysroot() look for the actually used command instead of always looking for useradd. * Simplification of common_useradd_sysroot() by using case/esac. * A bit of whitespace clean-up. Signed-off-by: Peter Kjellerstedt --- meta/classes/useradd.bbclass | 60 +++++++++++++++++------------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index d7ed6cb931..1080008b3f 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -19,7 +19,7 @@ PACKAGE_WRITE_DEPS += "shadow-native" # c) As the preinst script in the target package at do_rootfs time # d) As the preinst script in the target package on device as a package upgrade # -useradd_preinst () { +useradd_preinst() { OPT="" SYSROOT="" @@ -34,7 +34,7 @@ if test "x$D" != "x"; then # shadow package, then while performing preinsts for packages that depend on # shadow, there might only be /etc/login.def.dpkg-new there in root filesystem. if [ ! -e $D${sysconfdir}/login.defs -a -e $D${sysconfdir}/login.defs.dpkg-new ]; then - cp $D${sysconfdir}/login.defs.dpkg-new $D${sysconfdir}/login.defs + cp $D${sysconfdir}/login.defs.dpkg-new $D${sysconfdir}/login.defs fi # user/group lookups should match useradd/groupadd --prefix @@ -102,19 +102,19 @@ if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then fi } -useradd_sysroot () { - user_group_groupmems_add_sysroot user +groupadd_sysroot() { + common_useradd_sysroot groupadd } -groupadd_sysroot () { - user_group_groupmems_add_sysroot group +useradd_sysroot() { + common_useradd_sysroot useradd } -groupmemsadd_sysroot () { - user_group_groupmems_add_sysroot groupmems +groupmems_sysroot() { + common_useradd_sysroot groupmems } -user_group_groupmems_add_sysroot () { +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 # not already present. @@ -130,28 +130,24 @@ user_group_groupmems_add_sysroot () { # Beware that in some cases we might see the fake pseudo passwd here, in which case we also must # exit. if [ ! -f $D${sysconfdir}/passwd ] || - grep -q this-is-the-pseudo-passwd $D${sysconfdir}/passwd; then + grep -q this-is-the-pseudo-passwd $D${sysconfdir}/passwd; then exit 0 fi # 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 useradd; then - bbwarn "command useradd not found!" + if ! command -v "$1"; then + bbwarn "The $1 command could not be found!" exit 0 fi # Add groups and users defined for all recipe packages - if test "$1" = "group"; then - GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}" - elif test "$1" = "user"; then - USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}" - elif test "$1" = "groupmems"; then - GROUPMEMS_PARAM="${@get_all_cmd_params(d, 'groupmems')}" - elif test "x$1" = "x"; then - bbwarn "missing type of passwd db action" - fi + case "$1" in + groupadd) GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}";; + useradd) USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}";; + groupmems) GROUPMEMS_PARAM="${@get_all_cmd_params(d, 'groupmems')}";; + esac # Tell the system to use the environment vars UA_SYSROOT=1 @@ -159,36 +155,36 @@ user_group_groupmems_add_sysroot () { useradd_preinst } -# The export of PSEUDO in useradd_sysroot() above contains references to +# The export of PSEUDO in common_useradd_sysroot() above contains references to # ${PSEUDO_SYSROOT} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging # shell functions use ${LOGFIFO}. These need to be handled when restoring # postinst-useradd-${PN} from the sstate cache. EXTRA_STAGING_FIXMES += "PSEUDO_SYSROOT PSEUDO_LOCALSTATEDIR LOGFIFO" -python useradd_sysroot_sstate () { - for type, sort_prefix in [("group", "01"), ("user", "02"), ("groupmems", "03")]: +python useradd_sysroot_sstate() { + for cmd, sort_prefix in [("groupadd", "01"), ("useradd", "02"), ("groupmems", "03")]: scriptfile = None task = d.getVar("BB_CURRENTTASK") if task == "package_setscene": - bb.build.exec_func(type + "add_sysroot", d) + bb.build.exec_func(f"{cmd}_sysroot", d) elif task == "prepare_recipe_sysroot": # Used to update this recipe's own sysroot so the user/groups are available to do_install # If do_populate_sysroot is triggered and we write the file here, there would be an overlapping - # files. See usergrouptests.UserGroupTests.test_add_task_between_p_sysroot_and_package - scriptfile = d.expand("${RECIPE_SYSROOT}${bindir}/postinst-useradd-" + sort_prefix + type + "-${PN}-recipedebug") + # file. See usergrouptests.UserGroupTests.test_add_task_between_p_sysroot_and_package + scriptfile = d.expand("${RECIPE_SYSROOT}${bindir}/postinst-useradd-" + sort_prefix + cmd + "-${PN}-recipedebug") - bb.build.exec_func(type + "add_sysroot", d) + bb.build.exec_func(f"{cmd}_sysroot", d) elif task == "populate_sysroot": # Used when installed in dependent task sysroots - scriptfile = d.expand("${SYSROOT_DESTDIR}${bindir}/postinst-useradd-" + sort_prefix + type + "-${PN}") + scriptfile = d.expand("${SYSROOT_DESTDIR}${bindir}/postinst-useradd-" + sort_prefix + cmd + "-${PN}") if scriptfile: bb.utils.mkdirhier(os.path.dirname(scriptfile)) with open(scriptfile, 'w') as script: script.write("#!/bin/sh -e\n") - bb.data.emit_func(type + "add_sysroot", script, d) - script.write(type + "add_sysroot\n") + bb.data.emit_func(f"{cmd}_sysroot", script, d) + script.write(f"{cmd}_sysroot\n") os.chmod(scriptfile, 0o755) } @@ -247,7 +243,7 @@ def get_all_cmd_params(d, cmd_type): return "; ".join(params) # Adds the preinst script into generated packages -fakeroot python populate_packages:prepend () { +fakeroot python populate_packages:prepend() { def update_useradd_package(pkg): bb.debug(1, 'adding user/group calls to preinst for %s' % pkg) From patchwork Tue May 12 19:04:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 87920 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84431CD4F24 for ; Tue, 12 May 2026 19:04:38 +0000 (UTC) Received: from MRWPR03CU001.outbound.protection.outlook.com (MRWPR03CU001.outbound.protection.outlook.com [40.107.130.9]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.83622.1778612672891204735 for ; Tue, 12 May 2026 12:04:33 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=RM13aleE; spf=pass (domain: axis.com, ip: 40.107.130.9, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h71Vju6Vx8GRm2IIbD9A+vW6QAbhtij91WvTXDivx0lA9dJUfkl2GOFaWDFbaT1b88fAWb3/gdZz4ePZIgrIEjytwN+wxVw2KY1abpXjdjSTGe9K3g0nmDPCsprwdtxAHZ/zLy1FO0EJSlSVNdh5iUDdBo4j3ee9xkrue4c3VrB7ejBa9jVv+SdFL4FmwG1PYNszeHTM1cJLpf2LpZEVk2TPOl2ExIK6b/BgAeJLhQ2iI+W1p+o1o0fWQQou9IGn7UG/goeX97+J3s0W8mvILOQN0KSfoou7QvSdSUz55ySQwq7y36byJlbHWfY421IzV2jfFpJLbSaaRWpCzsUJ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z8CzjGHl0nN1n574efw2M5mNjP9UpyeGCbAGoyU1hFw=; b=IupueWckYLHWKriXHVEyHpZbbASdxGraTBLlkhjfUhL/klD4WI5cvTFTMTCJhch0N2bFtt/PkLHWeHES+2EUNFbMrT2wgV6fqCBZr/uCtm9CGLP1VlMRdMoo5H9WlAxnshTsdQzTvqLS5x8EiLLiJIyXrDkM+g9cA2ixjIys38cOzbqntQkBpVMiRueDs0RqYHH80J5ZWUx3s/7Rty8AFynQBvekOxxV9A4Wf9ev4fxfEi1rhwIxW5sZXU27bYFSygUMOm/vTp00jNVBP+Nf8DJJ9zqGtW0zrRvJ32iRz1EKGSLR31QhxfE5sTqyva3B7i9HWy7at9xR5cfY3dUm8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z8CzjGHl0nN1n574efw2M5mNjP9UpyeGCbAGoyU1hFw=; b=RM13aleEW7pdZkp2Xc67PbOHHPbqZyDVy9NxZXf0R4HuCVkJc0Yp+CTG+de5Q+tvHELWdpY1PDZPeZK00BkYu/0UvBwQdTlYaOAPqrjRJjMnKcmo9YiW7bYSCIfBnIFiEFYfW7ItYuvu9zlRNx5kjqSQc6Hb2sTPOP6/GDzEVJo= Received: from AS4P189CA0001.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5d7::6) by VI0PR02MB11966.eurprd02.prod.outlook.com (2603:10a6:800:33a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.19; Tue, 12 May 2026 19:04:26 +0000 Received: from AMS1EPF00000094.eurprd05.prod.outlook.com (2603:10a6:20b:5d7:cafe::d8) by AS4P189CA0001.outlook.office365.com (2603:10a6:20b:5d7::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.25.17 via Frontend Transport; Tue, 12 May 2026 19:04:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS1EPF00000094.mail.protection.outlook.com (10.167.242.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.25.13 via Frontend Transport; Tue, 12 May 2026 19:04:25 +0000 Received: from se-mail11w.axis.com (10.20.40.11) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.39; Tue, 12 May 2026 21:04:24 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Tue, 12 May 2026 21:04:24 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 3B7812801 for ; Tue, 12 May 2026 21:04:24 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 36F04125E2D; Tue, 12 May 2026 21:04:24 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 2/5] useradd.bbclass: Add support for USERMOD_PARAM Date: Tue, 12 May 2026 21:04:12 +0200 Message-ID: <20260512190415.948535-3-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260512190415.948535-1-pkj@axis.com> References: <20260512190415.948535-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF00000094:EE_|VI0PR02MB11966:EE_ X-MS-Office365-Filtering-Correlation-Id: bd346e48-07cf-4246-9eb6-08deb0594935 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|20046099003|22082099003|18002099003|11063799003|3023799003|56012099003; X-Microsoft-Antispam-Message-Info: XLbtCq8+kFFQN/byfa34NQcLCYDBVIKPD/Q+GRdh/nZvE3DByyuS85FLUrsTYekoPXIyns3tuBqkIIkVkpLD+ObjaARmXXIu848ygisozHTpeJhYt0g2+Dy45Sv/lkp49OL59cJCQdlXv6B+8U+K8b2iKX+/wZDGKHeXvY8WeoemJ0/BjLnWpThE93K5SG9nrTAsuLa+jcSWH7qKvGS+QHPelwe9VqUpadVQjKtv/Q7GemNrsDOsOlXgS8KpMxLFtVpHX+siaZN9vPYgtBWCkyQA84eNu94moXXCj1huKz6/1CMAFHrpTuk9k9G0BHhH7S1dbxxXST0ZQmkuBSgxy4AIKiLijmFnDBt3Mu1UbJZMIyBcNoU/j4WdBJfMV+PO3xuXfLB3GsLWLwO1XZHdm/kRjDUjaonsUJkzXrrogr9T6ffqtqheNDiM8x1q11kRDGFS9+6p39ShJybm4L5Ad7EvNu/r5fe0fwM1hsMVGM4tnWVkJrwyKpCOUPHHSkYQPFaL1lUC5GuvG/xCKlHmfJipzEb/YoEkNZVFrT0BayjjJQzVVm26K0YyUJzWVKYd4e7FdXR2OM7R3u0kdrOC/ETVkCR7MQL7UtVx/+m9yhYgdpsaGKhH/DlagKy48VGVOSqrFUAR9sGY0XI9gnd0yp2/uHIaD6SYAQMVE1s4uGW1zpN0hI3G+TvWyAsEl5exC8bWS+FoXVraARRHrMVY3q8/8aKu+tJsUpQgU7BfnM8= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(20046099003)(22082099003)(18002099003)(11063799003)(3023799003)(56012099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m5QAHBTWzjko71C7MCFpDrPLCaCVobGzIeoKsz9Bu5JEvZpHijL1My1U3rswW1wlsiw0914LDtMfqFq6dcnpIyE5SKTsengovkmg63wYezdtBqOr6AN+fWb2X79p9phHL/bu+M4Z4sM53x+Ovh5wKeIBO9NLtBKTPEXqTVhXh8fw+fe3Cw6FN3Ntidu+IDvNC0dke2+F90giguHBaqFp8jr9Z/R20se6ZkOS+geJmjGC/8DWS8dL9cO2TM3ykBIwFK5lfAw+ZgBw9WvVN8iBwFF6PmU0dLKc/Nrkrc0esKdyeHc5A6xV7eZMlcyjXPNr5crB+RcWHjzAS9MvKZ8a0jWsvSi8saPYiU7yhOAmrtcXb7ZXraUhYm1a9PmxEUnqyyYTo6UTGBvizaOH0jksrbtetpHqX5L9UxC1mYIKmv9OhvBIGsKyxfeUW4SsZUPE X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 19:04:25.9647 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd346e48-07cf-4246-9eb6-08deb0594935 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000094.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR02MB11966 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 12 May 2026 19:04:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236908 The groupmems command will be removed in shadow 4.20. The same functionality as provided by groupmems can be achieved with the usermod command. Add support for USERMOD_PARAM variables to specify the options to use. The following GROUPMEMS_PARAM: GROUPMEMS_PARAM:${PN} = "--add user --group group1; \ --add user --group group2" would be directly converted to the following USERMOD_PARAM: USERMOD_PARAM:${PN} = "--append --groups group1 user; \ --append --groups group2 user" It can also be simplified to: USERMOD_PARAM:${PN} = "--append --groups group1,group2 user" [YOCTO#16277] Co-authored-by: Ross Burton Signed-off-by: Peter Kjellerstedt --- meta/classes/useradd.bbclass | 39 ++++++++++++++++++++++++++++-------- meta/conf/documentation.conf | 1 + 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 1080008b3f..55393d38f7 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -48,6 +48,7 @@ if test "x$UA_SYSROOT" = "x"; then # Add groups and users defined only for this package GROUPADD_PARAM="${GROUPADD_PARAM}" USERADD_PARAM="${USERADD_PARAM}" + USERMOD_PARAM="${USERMOD_PARAM}" GROUPMEMS_PARAM="${GROUPMEMS_PARAM}" fi @@ -85,6 +86,22 @@ if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then done fi +if test "x`echo $USERMOD_PARAM | tr -d '[:space:]'`" != "x"; then + echo "Running usermod commands..." + # Invoke multiple instances of usermod for parameter lists + # separated by ';' + opts=`echo "$USERMOD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'` + remaining=`echo "$USERMOD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'` + while test "x$opts" != "x"; do + perform_usermod "$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 + if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then echo "Running groupmems commands..." # Invoke multiple instances of groupmems for parameter lists @@ -103,13 +120,17 @@ fi } groupadd_sysroot() { - common_useradd_sysroot groupadd + common_useradd_sysroot groupadd } useradd_sysroot() { common_useradd_sysroot useradd } +usermod_sysroot() { + common_useradd_sysroot usermod +} + groupmems_sysroot() { common_useradd_sysroot groupmems } @@ -146,6 +167,7 @@ common_useradd_sysroot() { 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')}";; esac @@ -162,7 +184,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"), ("groupmems", "03")]: + for cmd, sort_prefix in [("groupadd", "01"), ("useradd", "02"), ("usermod", "03"), ("groupmems", "04")]: scriptfile = None task = d.getVar("BB_CURRENTTASK") if task == "package_setscene": @@ -216,9 +238,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", " USERADD_PARAM:%s GROUPADD_PARAM:%s GROUPMEMS_PARAM:%s" % (pkg, pkg, pkg)) - if not d.getVar('USERADD_PARAM:%s' % pkg) and not d.getVar('GROUPADD_PARAM:%s' % pkg) and not d.getVar('GROUPMEMS_PARAM:%s' % pkg): - bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_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} 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)) python __anonymous() { if not bb.data.inherits_class('nativesdk', d) \ @@ -226,8 +248,8 @@ python __anonymous() { update_useradd_after_parse(d) } -# Return a single [GROUP|USER]ADD_PARAM formatted string which includes the -# [group|user]add parameters for all USERADD_PACKAGES in this recipe +# Return a single (GROUPADD|USERADD|USERMOD)_PARAM formatted string which includes the +# (groupadd|useradd|usermod) parameters for all USERADD_PACKAGES in this recipe def get_all_cmd_params(d, cmd_type): import string @@ -260,10 +282,11 @@ fakeroot python populate_packages:prepend() { preinst += 'bbfatal () {\n\techo "ERROR: $*"\n\texit 1\n}\n' 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", "GROUPMEMS_PARAM"]: + for rep in ["GROUPADD_PARAM", "USERADD_PARAM", "USERMOD_PARAM", "GROUPMEMS_PARAM"]: val = d.getVar(rep + ":" + pkg) or "" preinst = preinst.replace("${" + rep + "}", val) d.setVar('pkg_preinst:%s' % pkg, preinst) diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index 94368d5c2b..41e67d3365 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf @@ -451,6 +451,7 @@ USERADD_PACKAGES[doc] = "When a recipe inherits the useradd class, this variable USERADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the useradd command if you wish to add a user to the system when the package is installed." USERADD_UID_TABLES[doc] = "Specifies a password file to use for obtaining static user identification (uid) values when the OpenEmbedded build system adds a user to the system during package installation." USERADDEXTENSION[doc] = "When set to 'useradd-staticids', causes the OpenEmbedded build system to base all user and group additions on files listed in USERADD_UID_TABLES and USERADD_GID_TABLES." +USERMOD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the usermod command if you wish to modify a user when the package is installed. Typically used to add the user to one or more groups." #W From patchwork Tue May 12 19:04:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 87922 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95566CD4F21 for ; Tue, 12 May 2026 19:04:38 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.14]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.83624.1778612674844798569 for ; Tue, 12 May 2026 12:04:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=dPBa8d/H; spf=pass (domain: axis.com, ip: 40.107.162.14, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jROh5+qQAfXjYRO9VRx9sn6BDv85bITXlIBpJKDE14KMmmuQSJUYSr2wHMOF6KxX1ZRLdovXQw1gqMsWax1qS2uajuge7ektFQkBLd+GImIX8R5pqmNORzPRo42rYWhEHFXNx8iQxLcVQ2iRKVcp5bgMZphdqQ3Rg4oHZmNM7ci3HRFTKQprmwSZyrSQzYbmdpHzG5dAEUfpSvPbQwNBMJ7dKsGCDm9/hwVN3xAR9c6wVAZkwEEdpVr4QufV7VtGPNmVfUrChv7d5NQhYUyuN3GuFUbOwsvXuYY7iwAKcH8VmxMhojZABwS61uVyphtDFXQz6r4wJEXNbdevYl4TEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E15XuBkVrVRQLCQwVGsD3aEETGzjorrtgcflAnNP5xU=; b=eYfwyS/1eNnBLEAnv6Xd+tr205tLBY2AsC0Lypliww4m5wEoDBZXMA5ELliq0PirdKpa1RuhZX4I3R4zc6kzZSEe2UetQlbG3VExD3NXk7iZN5tKPZ7M243Q/3KMdNapmkEQjEnSWuyx/EKBunuLU9yc+/kbTIwbqisqqSkRVpMZJS5C92XzD7sr86K7vpx++rqR8hq8txlfNvyTDpj4kBGJ36F80RgWnH5K5/aoyAnSqKaeV7VCoEJloXx9jiA6vyRhldZ9gwJB5NgD8Ys6apEtXG1Xw8P8KDP/nZuQp5692+lFvOVHA7dio+KsfHvHbmHMnVhTajfH6WPjfzYRRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E15XuBkVrVRQLCQwVGsD3aEETGzjorrtgcflAnNP5xU=; b=dPBa8d/HpxxE73ilrB3X3++MVFJp3KlQWK+Ugw9Dctd6gpeRGpDqtqiS+Ppc0q4c8BF4WMlcmUpHEpSfnRj7tLkz/2jXxyPBi9mlaiv2CdLCSEH0p0oZ4IHW5CT112c3hl7WAj/i6Gsjh5ie0VZLJTh9uTPNlMh2Dzs9qJ/ouy8= Received: from AS9PR05CA0191.eurprd05.prod.outlook.com (2603:10a6:20b:495::16) by VI1PR02MB6077.eurprd02.prod.outlook.com (2603:10a6:800:18f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.19; Tue, 12 May 2026 19:04:27 +0000 Received: from AMS0EPF0000019B.eurprd05.prod.outlook.com (2603:10a6:20b:495:cafe::d6) by AS9PR05CA0191.outlook.office365.com (2603:10a6:20b:495::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9913.11 via Frontend Transport; Tue, 12 May 2026 19:04:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS0EPF0000019B.mail.protection.outlook.com (10.167.16.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.25.13 via Frontend Transport; Tue, 12 May 2026 19:04:27 +0000 Received: from SE-MAILARCH01W.axis.com (10.20.40.15) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1748.39; Tue, 12 May 2026 21:04:24 +0200 Received: from se-mail10w.axis.com (10.20.40.10) by SE-MAILARCH01W.axis.com (10.20.40.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 12 May 2026 21:04:24 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Tue, 12 May 2026 21:04:24 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 3D6182834 for ; Tue, 12 May 2026 21:04:24 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 39503125D1D; Tue, 12 May 2026 21:04:24 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 3/5] package.bbclass: Add USERMOD_PARAM to PACKAGEVARS Date: Tue, 12 May 2026 21:04:13 +0200 Message-ID: <20260512190415.948535-4-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260512190415.948535-1-pkj@axis.com> References: <20260512190415.948535-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF0000019B:EE_|VI1PR02MB6077:EE_ X-MS-Office365-Filtering-Correlation-Id: bd9b6ce5-3b9f-4ed8-e400-08deb0594a30 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024|18002099003|22082099003|56012099003|11063799003; X-Microsoft-Antispam-Message-Info: R1hiB+3/+EhYaE0rdb7xRNB/BofhLUlAOP2eCn5KN8bo8YeAoRyiIA3UYWliQuunFa82ZuJzTAHZ8075affPAhB7ZpRsiIpQoV0pHf7hOWiWs/T2MiE5nBgR7Gzt7slMgSp+Q/3uj+siYX+a/H9OEAZIeG1p7y9BnVjPPjKAKtFW5upZ2+s2MrjishSI4D26HraA8wLjXTqbDK+Hh46qUggHYeN9vBNDPmvYwZtIg9qhe1YTiQcHuxvnBAI9HWDA5OJYmU3Nvp7K3QQDZZ+nsd3DLBqPzVEdbesHVhup08XkWxi1Ou/UZbRK2muhdpFL0EQ0K0WQVRZTAmEVf5WNmHyTB75T0xQ/lOwZfL2lKyT8WbfsLfJG8a1fv1YouHtHri4G6z8OZzVYq6E0fwbNWeNFg58ZkDWyXgBoyM5gLP3D8KV5T8RIyTygJhvDlKKC3MPwswr3UOI87B63O914r7QXkB76F/i50uLhhpBB8wVomXJs05HXO7RvI6Zg5d02baA9sO5HcKy1K8x0vx5eqQmKgvqM+DjAgyPbOGkcTj9La1L/dLrHdpoj/8Z50QyFvMMUGWyKHRFGPrfWYeZcaVz1Hx3X0AX6zt5gOiVEVawcxnL2hye1foe0Qyaes/5MYp+cCIzpDIafYkC2J/htcSrXuIazERzZIIx4jF9cc+X7Mr2j0IhzIXwWuH15v88UF2oIe0EtohtnYAqet4NAqBSQ2UWLC25yRYOmVpfGVx4= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(18002099003)(22082099003)(56012099003)(11063799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kU3xxl1IjV1QuXLjnazzNv43CI65+s4sXW44kf6yJ9wjIhM2eY8xXGOGmaGg61wxOw8ICUBihkfDMXQicMbZq9RarvepWZmGf9haqLZWvHGFdE2JG5dV4fsf1TQwDTdoP74MsReX5M/+tmt1dGLCiv4UwbD2mWLArViBwzdbb1HtZ/pcM6AomtXwqoZBRlVOELGxmJy044v9H+4ayiGIwbtRRTSqiWV4IQ9YiLN61ENw1d+7FL08Q3q2Zcj7CVAWL1G5ssiaFpnmuVufhRVmquuWBsKpPVAAqePN3b73Vh7lYwFZC2asbHd2rEfFJmwTlmcfJAT+gBQq1OT55TClqzvEEy4RZLDKHImMdxu2BcDT8ZR/j1S8waS3WMcrxghtstr5NQJTRJHw3o6jLgZfRIyRy3ZPqvWrTrO6c31q8ApCunhYVVgHPrv2F77aNDkc X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 19:04:27.6106 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd9b6ce5-3b9f-4ed8-e400-08deb0594a30 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB6077 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 12 May 2026 19:04:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236909 This complements the USERADD_PARAM and GROUPADD_PARAM variables. [YOCTO#16277] Co-authored-by: Ross Burton Signed-off-by: Peter Kjellerstedt --- 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 67148fc1ac..30accaeaa9 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 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 GROUPMEMS_PARAM SYSTEMD_AUTO_ENABLE SKIP_FILEDEPS PRIVATE_LIBS PACKAGE_ADD_METADATA" def gen_packagevar(d, pkgvars="PACKAGEVARS"): ret = [] From patchwork Tue May 12 19:04:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 87921 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC35FCD4F3D for ; Tue, 12 May 2026 19:04:38 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.44]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.83225.1778612672107656047 for ; Tue, 12 May 2026 12:04:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=boHtpbL6; spf=pass (domain: axis.com, ip: 52.101.70.44, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l2I9k6TlAVHTcf8txMWzdj7ukAlLOVdvy3KiDockhqtSgwI8ebN2qaR0CQ7qd0VuGzetlwHA3tjJejCrCFZge0Wj4xTSn2blfx6DL20Y97F8eH11ZqKuJG07SAy3pPCR/Wed5vgZCqMzsx+xHd8VKQWLrdys8JP111n30HPxv5eRhCnwRvbRRRXc2e8lOkCGNkIltRYdNouyTvfzQqizFf/zWIL5SJW1eDW9gA6HmH2kh+AA+Lz3jACdznx95IPpDglgwipctU7sqZHMATHKrYKMYRarSl2lM/MJldAFx7H9bpWuRWYjjCxymNCCDLogrcjsSRLAgVstVRqBJHwDFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ra7mB6hFW6jfBkDDnMBo5ILKinnLMagI+csOqsTAIu0=; b=mWX3kGk57vo++jfbYmAGiEmTlng3X7VSIIQqqYwaY6NwNfQddKAWEVXD86X2u0bLH4E8i9ftGrffhyjnaKjFjapbQc+wUhroIWspPnoavDUTZVasd1FIUgNdrETnzV/h323sXlXZY4rQZ49XhyqcCjGo2WHW4YhD0Ckp4/6QPdobZ3dcB3mgKtr6aLDtspOpgSf0VMrIhj2wDJcqMLjMSbnRMfQWayuBDkuUH5NOahpaygQOV7hQHM4WB3JCgssqStfiYULXLVn/C5ou/P3kMnkJRI+i+46eHzr5RecSzGT0XVU5bbmDqREOvNJkC1xU2CY+mWPCgSnmbJG7EvCdIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ra7mB6hFW6jfBkDDnMBo5ILKinnLMagI+csOqsTAIu0=; b=boHtpbL6JGZPgPdKJiuexwLoFS5+aR/s/48Q0pBP0T2M+1MmgtPev7VUpaD/3YsXCpIfBBhJM9DGs4zuW/iTaSrSDOYQDAxvjmuSEinsxAowTViCdpfmzGXxxYEDlk7W/goqRbPkOuxRpdVQDLKJrTX8FJjr0WIBS6PUWD7hheA= Received: from AS9PR05CA0202.eurprd05.prod.outlook.com (2603:10a6:20b:495::31) by DU0PR02MB8714.eurprd02.prod.outlook.com (2603:10a6:10:3ee::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.23; Tue, 12 May 2026 19:04:24 +0000 Received: from AMS0EPF0000019B.eurprd05.prod.outlook.com (2603:10a6:20b:495:cafe::24) by AS9PR05CA0202.outlook.office365.com (2603:10a6:20b:495::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9913.11 via Frontend Transport; Tue, 12 May 2026 19:04:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS0EPF0000019B.mail.protection.outlook.com (10.167.16.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.25.13 via Frontend Transport; Tue, 12 May 2026 19:04:24 +0000 Received: from SE-MAILARCH01W.axis.com (10.20.40.15) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1748.39; Tue, 12 May 2026 21:04:24 +0200 Received: from se-mail11w.axis.com (10.20.40.11) by SE-MAILARCH01W.axis.com (10.20.40.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Tue, 12 May 2026 21:04:24 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Tue, 12 May 2026 21:04:24 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 3E1B82898 for ; Tue, 12 May 2026 21:04:24 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 3BBD21247A5; Tue, 12 May 2026 21:04:24 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 4/5] useradd_base.bbclass: Emulate the groupmems command using usermod Date: Tue, 12 May 2026 21:04:14 +0200 Message-ID: <20260512190415.948535-5-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260512190415.948535-1-pkj@axis.com> References: <20260512190415.948535-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF0000019B:EE_|DU0PR02MB8714:EE_ X-MS-Office365-Filtering-Correlation-Id: 52999844-8d33-435b-056f-08deb059487a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700016|1800799024|18002099003|22082099003|11063799003|56012099003; X-Microsoft-Antispam-Message-Info: zhGpSf9edz0LaKhu+e7EcLk9HpxPBIDp5PRUKhrvkMD0GkDylL16KX7sMgrPQsH95tXiJq3ZU99qGf5iWvQN+zaqr5NlX1fk1lhmDlBA678ixQTzaG4kdRLHxR27HEsjVVD6/mgqFyGWIQZ2Zl6aXQqRnX0RXsBvw9+hrrTNoafNIdA/OVSnUi2GUGKeRqKmONvRpZoGFY4gVwyaBQFbHpKC71amygXMzE8bEaOjGYAMHM1eeovVWk6ggplI7q5lzqWl+iQ9y1R7S2Y7XjJ7yJ1p5ftjkJQqz5qkf7gN8YfO1u8/hH9ktKwLvV5wSINj1BP4ju1947//ELUR9p0FVlyQWRKypt40TjDne4mdOE1ndvViWs/OJH06MC1AmNrQUkj8XxnowTlFz6ARUjuBNnjFHIM64hnMoSpDTsFK0p7fL/B+8WTlx8QgWF1yZMYUl3YLx+dCk6/CLEMpZAERN8uvmMdc2KkJceLOLfnOvU+UrENY6qF0+64wD7YisFt+9VsBnHdScYKTchqyqNk/jxHYnZT1A8vdwa5STZe0bsFV4VCOwD1L87bqga47wRqlS+hLgZaC8K4FAtDA4/sX2V8N2ye65rOWqtmvZHM3lPbIvobhpM4rUBoId3PZx0L32gXBjXb6WhaYDcF2L/coOfaYx4v4J33wfXpntjoWntabNGC4dmjo7zaYJasX+UtSmuE/QE2+u1Z6ne+xQvz4nFQoWzv2i+72sYrogj4Z/GM= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700016)(1800799024)(18002099003)(22082099003)(11063799003)(56012099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0H3OJCQwIaFUFmWY/q85ZSm9L0598TTgEzwZZL3eVgB6oFE6gPLaidRlY6yJV4qhoYot9uxgg5vnWtY4QuXDxr5dQdM4wXLOwRCqVJD2O0/IwxRhEp0FLbGwP2Kd0BTY+fcBHI7v6c3U0a0pTGJomVJQyAZ+Wetz4k2OH3shFwwto87VYpIts54L8sMUa8SRRAG11umyntBokcA3S8tCTFaihH1xwNcDQHvheRt0VNTf7Y3RlaEzSlIPYAWpH8XdQUfQRpHh5VjCNvT3CTS/TYQI8aOptfb/OpUhx53K7ZK6fybPgtt1+X0fpnQv9wBZnFSZnInewHEjPPUR0TCoMp/96HtQStmQkGWktVXq3gGwQA8sGI6/gMI8TOVe12I4eDMslnoYqMREawwuU6if68U0t+K37GQgam5HAmmp5NnMhm8cp5MIuokYKq/gbqse X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 19:04:24.7337 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52999844-8d33-435b-056f-08deb059487a X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR02MB8714 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 12 May 2026 19:04:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236906 The groupmems command does to support the --prefix option, which is being used since commit a7b846ba7d6d63a5e59939d75d9c5fe3e4cbb0e9. However, the groupmems command can easily be emulated using the usermod command. [YOCTO#16277] Signed-off-by: Peter Kjellerstedt --- meta/classes/useradd_base.bbclass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass index 5e1c699118..93c648f8c4 100644 --- a/meta/classes/useradd_base.bbclass +++ b/meta/classes/useradd_base.bbclass @@ -56,13 +56,14 @@ perform_groupmems () { 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) }'` - bbnote "${PN}: Running groupmems command with group $groupname and user $username" + local prefix=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "--prefix") print $(i+1) }'` + 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 groupmems \$opts\" || true + 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 did not succeed." + bbfatal "${PN}: groupmems command (emulated using usermod) did not succeed." fi else bbnote "${PN}: group $groupname already contains $username, not re-adding it" From patchwork Tue May 12 19:04:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 87919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 725FECD343F for ; Tue, 12 May 2026 19:04:38 +0000 (UTC) Received: from AM0PR02CU008.outbound.protection.outlook.com (AM0PR02CU008.outbound.protection.outlook.com [52.101.72.37]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.83620.1778612669359534215 for ; Tue, 12 May 2026 12:04:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=Nsy2XTVM; spf=pass (domain: axis.com, ip: 52.101.72.37, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LnDkIhelbhKwWDup0P/bGvcx0oFhBMaL7dtxSELA8yBZYZiMgyzntZSA7V/2BGJI8jHK/KaOD9E/kqlS3rmvWDC24i1vrBUXCW0QDYfg69CvPO1P6uBLH8dTzXxG49M/A87zPgLxrzV/DDZ0+WATtu2pgHSoLpMpNzMyq+0uHrSaNzFA12W7H/pkgH14On96C8JsocTo/C9j//fGe78+qj9aZBJlaS+9T40iDxcyVCaoCHJK/aQCM7ccVnxGFg0obwFkloXl3LiEhPUP6yJRISgKbybFxpYNVjAwNfJN3PN4kHcedW9bTsD5767bOjMSZHLdeuiM4LvqNesDiVWPuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5I1xPOkGDtWgMNcyh+3O6NWAttuG5jea2LcYePamBZU=; b=dJ73rllkJhiRJdVo+VqXGp1KF3NBbIPf/bV8+CptLJjFH+5mAFhKIzonvywMfY+Ikzn2DU15N7UnnlKXX/iHG2yyhb3jnTpaBRjPUw6GOafvxL/QHqsgwyXr8YqFbfP1JtbAen7jdL9/GHmNyXD4o3cxcME0s0v5ONHBLx7j+FUDk/RVco27OIE2euOK/y/nIZmb7ImiDldAXL462mVsVMvvT6Uv7pEDEm/S7k3L78q+KwHMN0zqORj+9D2hovXUPA2PrJKapxwVZUklRtAP0EmcJmKluQCODsZL7uZQhjaFxh48gKf0qwyatbsFHqWiKrW7UVsXOYdIU9nfNldMNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5I1xPOkGDtWgMNcyh+3O6NWAttuG5jea2LcYePamBZU=; b=Nsy2XTVM/nB8X9uGbX/U2YasJDBxElzXwaGEHsTdGlVXiyoIq0IaYm2pEY9fjbE73WsuCQe/tPmWwySwOXiN3n5egJvvjfY0UOIimUILhPjFfNsHSgvt7RzSMArKAepo/QFDVe9URveDzIa8NpQEi+7F1wvjQiGY8aZzdY33Y04= Received: from AS4P189CA0007.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5d7::18) by VI0PR02MB11523.eurprd02.prod.outlook.com (2603:10a6:800:2e8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9913.11; Tue, 12 May 2026 19:04:25 +0000 Received: from AMS1EPF00000094.eurprd05.prod.outlook.com (2603:10a6:20b:5d7:cafe::b4) by AS4P189CA0007.outlook.office365.com (2603:10a6:20b:5d7::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.25.16 via Frontend Transport; Tue, 12 May 2026 19:04:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS1EPF00000094.mail.protection.outlook.com (10.167.242.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.25.13 via Frontend Transport; Tue, 12 May 2026 19:04:24 +0000 Received: from se-mail10w.axis.com (10.20.40.10) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.39; Tue, 12 May 2026 21:04:24 +0200 Received: from se-intmail01x.se.axis.com (10.4.0.28) by se-mail10w.axis.com (10.20.40.10) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Tue, 12 May 2026 21:04:24 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 4218729BC for ; Tue, 12 May 2026 21:04:24 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 3E444125E2D; Tue, 12 May 2026 21:04:24 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 5/5] useradd.bbclass: Show a deprecation warning if GROUPMEMS_PARAM is used Date: Tue, 12 May 2026 21:04:15 +0200 Message-ID: <20260512190415.948535-6-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260512190415.948535-1-pkj@axis.com> References: <20260512190415.948535-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF00000094:EE_|VI0PR02MB11523:EE_ X-MS-Office365-Filtering-Correlation-Id: 087b0443-c952-4696-616b-08deb059485b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|1800799024|376014|11063799003|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: LGoI2cFiV+wGyghAje8B7fCw0oPcxuafE81GQnkdwk8JImW1jC+22iry7LnvWjMr5zPO+YQjzbztwn1UxQZHDxseKwLcpLS8lvw49k0QlDBXQfnm2+DNKlInY9Sh0IAcwylzFL9peQugkcHEtUPXO5fBrNgHRXkV9bK0jmhhCsm7rTR/VYi4kHxmK+MyeyMRzmJ7G9J4ScBN0wMK79lha/TEbYPH7nrknAWKwUUMalpVbLYERBBSID7TlnG6bi4cR/OSFHAdnCGHF+z1B98UaUjtaRXejGTacwAupnFuLttgQd9hfFOc1Dth9X/TI1ICyt+fbObuUuW1fSi56sPBUmiiKvPu5SVAq8gZOWW8Uf9RdRPr2QvnNAPagt/mWMKVVCsqckwt12zIkUFpjU8smqSk5X5RoGYGpKhDmu2PX3nWv7NP/9oAsby+qCw3TAyizB59sZMavNjgR3ey3s77rSQjk9sp7q4wEbcr1JYBu5S/fzZSyW4SEkYPMfLohBM53cwnBNV7GRqm+6tiQkr4DHKE7+KTl9/qSeGcG5sUiEALtF9/68oM9LafeQSaQqJePbuhoGafb5cp0iiywmjIXwqiMf/tFXlg4fP+QlxTSqp7P/byIsV2N5b/kMLxRAEf1ha8JAhUYnqQblUvf5wYzyzivoOh45+eYE5vIv9Ia1AwQNkj6BRv9xlR2M4DR2/E9iEJ8gkvUrk38n72hZbi3mseg4MiV8qAR3soXWWPcjQ= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(1800799024)(376014)(11063799003)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Gsa+8KpNGo+5TRFCznovSeK8a09GlaX9Lh26XrOIJuxiMpwq28mGfLb/ff1g3H4u+0WspCvN2KLhEDqzGlQ4xEWqU1OBhDwoIF0W0OvcpTLiODdo9vSbEsjUNu0kDswJOj/koi0wRfaHTEtzQfFGTZj89Jbwrzm+gZedgrz8917esf06jbZ0Ies9gQtPf1R1WiOWPsS8cB4qlJYLbUp9DOzBzKkvmRxjlghps82QNh+/wxkDWzw6npV7uvgdVCB9p8ueEdjOnWGhxIYA01ZyVaAJ7XHq0fIG/9dkJQEW7gxAPvKKWREIas9cMIv7aXGhADijJhLcbbuRlVT60ZXvxVUtFBzqvuoHq+x5MYWDOYIWJsMc5jrOG208PWYe6cXNT3J+vbfGqgkhFQM/vmu33Pjnh/GYZaASY4jpd4pvqcRbfbICA6Xf/CZlLciyo38t X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 19:04:24.5356 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 087b0443-c952-4696-616b-08deb059485b X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000094.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR02MB11523 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 12 May 2026 19:04:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236904 Tell the user that they should switch to using USERMOD_PARAM instead of GROUPMEMS_PARAM. [YOCTO#16277] Signed-off-by: Peter Kjellerstedt --- meta/classes/useradd.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 55393d38f7..e83a886af0 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -308,6 +308,15 @@ 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("Use of the GROUPMEMS_PARAM variable is deprecated. Please switch to using USERMOD_PARAM instead") + return +} + # Use the following to extend the useradd with custom functions USERADDEXTENSION ?= ""