diff mbox series

[meta-oe,blacksail] pcsc-lite: create pcscd user and group also via useradd

Message ID 20261009131633.4147806-1-bst@pengutronix.de
State New
Headers show
Series [meta-oe,blacksail] pcsc-lite: create pcscd user and group also via useradd | expand

Commit Message

Bastian Krause Oct. 9, 2026, 1:16 p.m. UTC
The recipe currently only does this via systemd-sysusers. This does not
work for read-only root filesystems, though. So use useradd to create
the pcscd user and group.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb
index a8735a449f..daa1b78304 100644
--- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb
+++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb
@@ -14,7 +14,7 @@  DEPENDS = "autoconf-archive-native flex-native"
 SRC_URI = "https://pcsclite.apdu.fr/files/${BP}.tar.xz"
 SRC_URI[sha256sum] = "bfcfe38a20afc49849c6bf55325e38f449fc4b26d3923fdc32b969ae41a8741b"
 
-inherit meson systemd pkgconfig perlnative
+inherit meson systemd pkgconfig perlnative useradd
 
 EXTRA_OEMESON = " \
     -Dlibusb=false \
@@ -37,6 +37,9 @@  RRECOMMENDS:${PN} = "ccid"
 RRECOMMENDS:${PN}:class-native = ""
 RPROVIDES:${PN}:append:class-native = " pcsc-lite-lib-native"
 
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "--system --no-create-home --shell /sbin/nologin --user-group pcscd"
+
 FILES:${PN} = "${sbindir}/pcscd \
                ${datadir}/polkit-1 \
                ${systemd_system_unitdir}/pcscd.service \