agl-users: factor out reusable include file 40/29340/3
authorScott Murray <scott.murray@konsulko.com>
Mon, 30 Oct 2023 21:21:46 +0000 (17:21 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Sun, 5 Nov 2023 17:38:46 +0000 (17:38 +0000)
Refactor the recipe to put the actual useradd configuration into an
include file.  This will allow other recipes that need to use the
agl-driver user for file ownership to pull that in as opposed to
duplicating the configuration and risking mismatches.

Bug-AGL: SPEC-4952

Change-Id: Ica16a13a3750722c6d22b14944898f7b289e4bbe
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29340
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-core/recipes-config/agl-users/agl-users.inc [new file with mode: 0644]
meta-agl-core/recipes-config/agl-users/agl-users_1.0.bb

diff --git a/meta-agl-core/recipes-config/agl-users/agl-users.inc b/meta-agl-core/recipes-config/agl-users/agl-users.inc
new file mode 100644 (file)
index 0000000..428af38
--- /dev/null
@@ -0,0 +1,14 @@
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+USERADDEXTENSION = "useradd-staticids"
+
+GROUPADD_PARAM:${PN} = "\
+    --system video ; \
+    --system pipewire ; \
+    -g 1001 agl-driver ; \
+"
+
+USERADD_PARAM:${PN} = "\
+    -g 1001 -u 1001 -G video,pipewire -o -d /home/agl-driver -m -K PASS_MAX_DAYS=-1 agl-driver ; \
+"
index eda477f..18f25e4 100644 (file)
@@ -2,19 +2,8 @@ SUMMARY = "AGL Users"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-inherit allarch useradd
+inherit allarch
 
-USERADD_PACKAGES = "${PN}"
-USERADDEXTENSION = "useradd-staticids"
-
-GROUPADD_PARAM:${PN} = "\
-    --system video ; \
-    --system pipewire ; \
-    -g 1001 agl-driver ; \
-"
-
-USERADD_PARAM:${PN} = "\
-    -g 1001 -u 1001 -G video,pipewire -o -d /home/agl-driver -m -K PASS_MAX_DAYS=-1 agl-driver ; \
-"
+require agl-users.inc
 
 ALLOW_EMPTY:${PN} = "1"