polkit-rule-agl-app: add useradd class and USERADD_PARAM 23/29023/3 15.91.0 pike/15.91.0 pike_15.91.0
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 16 Jun 2023 11:11:19 +0000 (13:11 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 16 Jun 2023 12:17:15 +0000 (12:17 +0000)
The only diff left to e.g. polkit and systemd is the USERADD_PARAM.
Add it into the recipe.

Bug-AGL: SPEC-4824
Change-Id: I7eb2862dc5c40577a1c3311ac9b7a7cc43c5be2a
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29023

meta-app-framework/recipes-config/polkit-rule-agl-app/polkit-rule-agl-app.bb

index fe6ecf8..57dda77 100644 (file)
@@ -6,7 +6,7 @@ SRC_URI = "file://50-agl-app.rules"
 
 DEPENDS += "polkit"
 
-inherit features_check
+inherit useradd features_check
 REQUIRED_DISTRO_FEATURES = "polkit"
 
 do_install() {
@@ -15,4 +15,7 @@ do_install() {
     install -m 0644 ${WORKDIR}/50-agl-app.rules ${D}${datadir}/polkit-1/rules.d
 }
 
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} += "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;"
+
 FILES:${PN} += "${datadir}/polkit-1/rules.d/*.rules"