From patchwork Tue Feb 10 00:25:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 80802 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 5B337E94627 for ; Tue, 10 Feb 2026 00:26:20 +0000 (UTC) Received: from BYAPR05CU005.outbound.protection.outlook.com (BYAPR05CU005.outbound.protection.outlook.com [52.101.85.63]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.9403.1770683175494138573 for ; Mon, 09 Feb 2026 16:26:15 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ti.com header.s=selector1 header.b=snmvXnnO; spf=permerror, err=parse error for token &{10 18 spf.protection.outlook.com}: limit exceeded (domain: ti.com, ip: 52.101.85.63, mailfrom: rs@ti.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o2uG/QEEenpOU8Es9BaStln0uWtaVp9pifNZGBgaasJb+jWv27ZGSuw4ClyIkqAHw99KeoHOCahvFDlvS2YZX7xOoGownLLgVCFhZG0U57LQxole2YB1WUhlzQpJMTwYKcSozcXysTlb9062Rxy3nalJr8dhujm1tXLBa2nZBUd3+w1xjkPuAOnR2t8ZwuqF2xz8YoMg5U/Pn12WuXJAKZ/E9o6So2xo0MUXYw6QDIEhNTMy8qDKnUuvaeXJn7qtWcYXQv1ZX8MqpCyKQn1cHZ30w1Et9mH5D/bM2ocSCaC0BvO7NyGRLYAx37t4K0qAWf8zmybAC4m6bpa0QoDsKA== 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=gCoLcXVhYfM0yjeC8wwuvztECmgqhoYfzZiRkdFtlYQ=; b=tPNaORkeyd5S5plvPYAJQnRPXruxDRuF6A65Srg2rFuNiIMC8tVgGsKuR4FyqdnggfBYcTvPJbpx15NBusPdhVyMxq4J147CebobnG1DhsaYb3yBfq9hGtvlNAF5ljIyZyhEgJDEhy4n+OLFtiPZSUnKWiE0aNUJ5WKelaNxLoksq0Vdp5OSHb6/FUgaMzRFuZYdX0w5zh55YqOWOf8e7j/W/95g0f8D+e1tiJCJq33uL7D1n3Yzg/nx8g8uayzPnOPDF1QljxPKjra/WdFsvDbo1SHjYT+BldYBPB8425oWYWHVZ+wHEhWCMjmIU9LkDK3yAQ6lfWcHqsGiri+dlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.195) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gCoLcXVhYfM0yjeC8wwuvztECmgqhoYfzZiRkdFtlYQ=; b=snmvXnnOAaQfD56gAFvV2BQp7K+B8aZezGrQfEBGf1wzIp8j4MQqaqv0bCQnralLdR3jAyWFJithHRHZe1furM6MSTUADxCuoH/4TIsqv1Lkvmple4DWpGCAecoshZOXPcdJvi2+VDF/DKv8+1EvbIkgmdgBri7oLl1xN40q51Q= Received: from MN2PR12CA0013.namprd12.prod.outlook.com (2603:10b6:208:a8::26) by BN0PR10MB4871.namprd10.prod.outlook.com (2603:10b6:408:128::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.19; Tue, 10 Feb 2026 00:26:13 +0000 Received: from BL02EPF0002992A.namprd02.prod.outlook.com (2603:10b6:208:a8:cafe::c2) by MN2PR12CA0013.outlook.office365.com (2603:10b6:208:a8::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9587.19 via Frontend Transport; Tue, 10 Feb 2026 00:26:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.195; helo=flwvzet201.ext.ti.com; pr=C Received: from flwvzet201.ext.ti.com (198.47.21.195) by BL02EPF0002992A.mail.protection.outlook.com (10.167.249.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.10 via Frontend Transport; Tue, 10 Feb 2026 00:26:11 +0000 Received: from DFLE209.ent.ti.com (10.64.6.67) by flwvzet201.ext.ti.com (10.248.192.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 9 Feb 2026 18:26:07 -0600 Received: from DFLE209.ent.ti.com (10.64.6.67) by DFLE209.ent.ti.com (10.64.6.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 9 Feb 2026 18:26:07 -0600 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE209.ent.ti.com (10.64.6.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 9 Feb 2026 18:26:07 -0600 Received: from rs-desk.dhcp.ti.com (rs-desk.dhcp.ti.com [128.247.81.144]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 61A0Q7lr2925776; Mon, 9 Feb 2026 18:26:07 -0600 From: To: , , , , , CC: , , , , , Subject: [oe-core][RFC] xuser-account: convert to standard-user-account Date: Mon, 9 Feb 2026 18:25:07 -0600 Message-ID: <20260210002506.95298-2-rs@ti.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0002992A:EE_|BN0PR10MB4871:EE_ X-MS-Office365-Filtering-Correlation-Id: c0217205-e324-4f08-cc73-08de683afe01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700013|1800799024|7142099003; X-Microsoft-Antispam-Message-Info: JMcg3dzsV6mTlkokKSTFifIGCo/lKhYmG76q15TkxVeCbGI+q2m+rfW7uEmEgXKmIz3yucd7PUhIJxq5OMDZIyUeigmGem6AuyLq3PjdA679cQaw8HSn99ql38gF5aaWMan90PKHwycHv+cmf6w7OibFzDX9os3MU+2o7G9BUOnlQl+D+U8ERhw/Gav6TufJ6IEO2MR+fPhgVned3HM2lvgq3eWhF/EculiCJmTZI28K9zkVt7LcTvgQziaXWj5fsNHmy8GiiN9z0oNunCAPNKZGizX+F1mK8sJmdbiGGhqsV5bbh3QVyORSpLC/4CiQV4e1sP7thxifzdXfeRuyvPkUVCnP2kSM+zfpobLuzkaQctz3do+kT0a+cVdv3GnrNbjsFQExdU4pvXLadB8EMLUuIqcAzyHcAPRjuPeWzFDd5aGqlqjBRxxUzxej0Xqvu1cz+iqN7MtPiqE6Q4rNoIFqXZopx6sXIblO/66lz7IVLopao7nWyHT2C649u3+yHbPvTpRwidXPp8prXxOCE5Xu5C5L1cGzZb4V6YvWYo2Iw2tYCvf8MqGhGeC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:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet201.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700013)(1800799024)(7142099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wIMJD/4KbHkHIja6tFR8bIV8Gxj4YrCLvThoMWsAqAzxCYH5RDcz1saNeKVw3AV/fNbuGnfvXgqquYPSOsdrj/uNE5g68j3tOGd4Y/OJ7nAqcTzoFm4uW3+JWOn63jGE5nE11IRPZp0B1W/K00rDs/V1HDF9Clj50Wmi3gVi+YvUZZ8KpitokWsTnJ7Ey93PbPGdQji1Bu7IUhJoqpc/UMRwlzr3/6fwi36RJfF/SGTySsDX/jjBB9HBzSThbzz3AmhOv5/k+A0ri6aVDJErTGC2UvfiawyF3tQdOUqhYPTLqTFCsr2u/ngddrMd2KNe9Rpn24Vu9JvH2BjXQ+hHGqjstQiI6yT//mf7ET5PlLmp3i5D+RMoHP0szZGVLYiqMuExMogAPZNq9cxtDPF5VF2/VeNrUom0/7kbfDOYHU9poYcDuOyMSrgm8SwaBj2r X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2026 00:26:11.0859 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0217205-e324-4f08-cc73-08de683afe01 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.195];Helo=[flwvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0002992A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB4871 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, 10 Feb 2026 00:26:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/230828 From: Randolph Sapp Change this single xuser account template into a generic standard-user-account that uses distro level variables for configuration. This allows for seamless configuration of multiple out-of-box scripts and tests across layers without having to implicitly hope that the username or groups haven't been changed by a bbappend or recipe override. This was proposed specifically to remove some issues highlighted in: https://lists.openembedded.org/g/openembedded-core/message/230665 Signed-off-by: Randolph Sapp --- I'm thinking about adding something like REQUIRED_STANDARD_USER_GROUPS and REQUIRED_STANDARD_USER_SYSTEM_GROUPS checks to the features_check class so recipes can indicate when they will fail due to bad distro configs. Please let me know what you all think. meta-selftest/files/static-group | 3 +- meta-selftest/files/static-passwd | 3 +- .../distro/include/default-distrovars.inc | 12 ++++++ meta/conf/distro/include/maintainers.inc | 2 +- meta/recipes-graphics/wayland/weston-init.bb | 13 +++---- .../x11-common/xserver-nodm-init_3.0.bb | 7 ++-- .../user-creation/files/system-xuser.conf | 11 ------ .../standard-user-account_0.1.bb | 38 +++++++++++++++++++ .../user-creation/xuser-account_0.1.bb | 30 --------------- scripts/sstate-sysroot-cruft.sh | 6 +-- 10 files changed, 65 insertions(+), 60 deletions(-) delete mode 100644 meta/recipes-support/user-creation/files/system-xuser.conf create mode 100644 meta/recipes-support/user-creation/standard-user-account_0.1.bb delete mode 100644 meta/recipes-support/user-creation/xuser-account_0.1.bb diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group index 3fca4aa5c9..8bdf362ed7 100644 --- a/meta-selftest/files/static-group +++ b/meta-selftest/files/static-group @@ -20,12 +20,11 @@ pulse:x:520: bind:x:521: builder:x:522: weston-launch:x:524: -weston:x:525: +user:x:525: wayland:x:526: render:x:527: sgx:x:528: ptest:x:529: -xuser:x:530: seat:x:531: audio:x:532: nogroup:x:65534: diff --git a/meta-selftest/files/static-passwd b/meta-selftest/files/static-passwd index cc6c5acd5c..b309dad101 100644 --- a/meta-selftest/files/static-passwd +++ b/meta-selftest/files/static-passwd @@ -16,6 +16,5 @@ pulse:x:520:520::/:/bin/nologin bind:x:521:521::/:/bin/nologin builder:x:522:522::/:/bin/nologin _apt:x:523:523::/:/bin/nologin -weston:x:525:525::/:/bin/nologin ptest:x:529:529::/:/bin/nologin -xuser:x:530:530::/:/bin/nologin +user:x:530:530::/:/bin/nologin diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc index bbd936efa6..63c7a11c7e 100644 --- a/meta/conf/distro/include/default-distrovars.inc +++ b/meta/conf/distro/include/default-distrovars.inc @@ -64,3 +64,15 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}" # the variable to be empty. # Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master CONNECTIVITY_CHECK_URIS ?= "https://www.yoctoproject.org/connectivity.html" + +# The STANDARD_USER_NAME is the default underprivileged user account name. +# The STANDARD_USER_GROUPS is a space delimited list of user groups that account +# should belong to, and STANDARD_USER_SYSTEM_GROUPS is the same but for system +# groups. +# +# Please take note that not all tooling currently supports changing these +# variables. Scripts like sstate-sysroot-cruft.sh and reproducible builds expect +# these values to be the defaults listed below. +STANDARD_USER_NAME ??= "user" +STANDARD_USER_GROUPS ??= "" +STANDARD_USER_SYSTEM_GROUPS ??= "video render tty audio input shutdown disk wayland" diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index b231daf485..6f595f6d02 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -808,6 +808,7 @@ RECIPE_MAINTAINER:pn-spirv-tools = "Jose Quaresma " RECIPE_MAINTAINER:pn-sqlite3 = "Unassigned " RECIPE_MAINTAINER:pn-squashfs-tools = "Robert Yang " RECIPE_MAINTAINER:pn-ssh-pregen-hostkeys = "Richard Purdie " +RECIPE_MAINTAINER:pn-standard-user-account = "Unassigned " RECIPE_MAINTAINER:pn-startup-notification = "Unassigned " RECIPE_MAINTAINER:pn-strace = "Robert Yang " RECIPE_MAINTAINER:pn-stress-ng = "Unassigned " @@ -934,7 +935,6 @@ RECIPE_MAINTAINER:pn-xserver-xf86-config = "Unassigned - - - - - - - - - diff --git a/meta/recipes-support/user-creation/standard-user-account_0.1.bb b/meta/recipes-support/user-creation/standard-user-account_0.1.bb new file mode 100644 index 0000000000..1aa1e71bc3 --- /dev/null +++ b/meta/recipes-support/user-creation/standard-user-account_0.1.bb @@ -0,0 +1,38 @@ +SUMMARY = "Creates a standard user account" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit allarch useradd + +do_compile[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" + +COMMON_ARGS = "--create-home --user-group" + +python __anonymous() { + common_args = d.getVar("COMMON_ARGS") or "" + user = d.getVar("STANDARD_USER_NAME") or "" + pn = d.getVar("PN") or "" + + unique_groups = sorted(set((d.getVar("STANDARD_USER_GROUPS") or "").split())) + unique_system_groups = sorted(set((d.getVar("STANDARD_USER_SYSTEM_GROUPS") or "").split())) + + if unique_groups or unique_system_groups: + joined_groups = ','.join(unique_groups + unique_system_groups) + d.setVar(f"USERADD_PARAM:{pn}", f"{common_args} --groups {joined_groups} {user}") + + # make sure all the groups exist + groupadd_str = "" + for group in unique_groups: + groupadd_str += f" {group} ;" + for group in unique_system_groups: + groupadd_str += f" --system {group} ;" + d.setVar(f"GROUPADD_PARAM:{pn}", f"{groupadd_str}") +} + +# default case, and a requirement to satisfy the parser check +USERADD_PARAM:${PN} = "${COMMON_ARGS} ${STANDARD_USER_NAME}" +USERADD_PACKAGES = "${PN}" + +ALLOW_EMPTY:${PN} = "1" diff --git a/meta/recipes-support/user-creation/xuser-account_0.1.bb b/meta/recipes-support/user-creation/xuser-account_0.1.bb deleted file mode 100644 index 04f506e7a3..0000000000 --- a/meta/recipes-support/user-creation/xuser-account_0.1.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Creates an 'xuser' account used for running X11" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -SRC_URI = "file://system-xuser.conf" - -inherit allarch useradd - -S = "${UNPACKDIR}" - -do_configure() { - : -} - -do_compile() { - : -} - -do_install() { - install -D -m 0644 ${UNPACKDIR}/system-xuser.conf ${D}${sysconfdir}/dbus-1/system.d/system-xuser.conf -} - -FILES:${PN} = "${sysconfdir}/dbus-1/system.d/system-xuser.conf" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--create-home \ - --groups video,tty,audio,input,shutdown,disk \ - --user-group xuser" - -ALLOW_EMPTY:${PN} = "1" diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh index b2002badfb..5e1ae9c535 100755 --- a/scripts/sstate-sysroot-cruft.sh +++ b/scripts/sstate-sysroot-cruft.sh @@ -127,9 +127,9 @@ WHITELIST="${WHITELIST} \ # generated by useradd.bbclass WHITELIST="${WHITELIST} \ [^/]*/home \ - [^/]*/home/xuser \ - [^/]*/home/xuser/.bashrc \ - [^/]*/home/xuser/.profile \ + [^/]*/home/user \ + [^/]*/home/user/.bashrc \ + [^/]*/home/user/.profile \ [^/]*/home/builder \ [^/]*/home/builder/.bashrc \ [^/]*/home/builder/.profile \