Skip to contentSkip to conversation

pcsc-lite: create pcscd user and group also via useradd

PATCH New Bastian Krause 1 participant 1 message Oct 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcsc-lite: create pcscd user and group also via useradd

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.

---
 meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-support/pcsc-lite/pcsc-lite_2.5.1.bb +4 -1
index a8735a449f..daa1b78304 100644
@@ -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 \
Signature · 1 line
2.47.3