mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-30 00:33:19 +00:00
pcsc-lite: install systemd system units
pcsc-lite 2.5.0 defaults to installing systemd user units, which leaves the package without a system-level pcscd.service while SYSTEMD_SERVICE still enables pcscd.socket. On target systems this makes systemctl status pcscd fail, and systemctl --user start pcscd can fail because the user unit requires polkit.service from the user manager. Select upstream Meson systemdunit=system so pcscd.service and pcscd.socket are installed as system units. Keep upstream sysusers.d packaging so systemd-sysusers can create the pcscd system user required by the generated service and socket units. Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
@@ -18,6 +18,7 @@ inherit meson systemd pkgconfig perlnative
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dlibusb=false \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemdunit=system', '', d)} \
|
||||
-Dusbdropdir=${libdir}/pcsc/drivers \
|
||||
"
|
||||
|
||||
@@ -38,7 +39,10 @@ RPROVIDES:${PN}:append:class-native = " pcsc-lite-lib-native"
|
||||
|
||||
FILES:${PN} = "${sbindir}/pcscd \
|
||||
${datadir}/polkit-1 \
|
||||
${nonarch_libdir}/systemd/user \
|
||||
${systemd_system_unitdir}/pcscd.service \
|
||||
${systemd_system_unitdir}/pcscd.socket \
|
||||
${libdir}/sysusers.d \
|
||||
${exec_prefix}/sysusers.d \
|
||||
${sysconfdir}/default/pcscd"
|
||||
FILES:${PN}-lib = "${libdir}/libpcsclite*${SOLIBS}"
|
||||
FILES:${PN}-dev = "${includedir} \
|
||||
@@ -54,12 +58,18 @@ FILES:${PN}-spy-dev = "${libdir}/libpcscspy.la \
|
||||
|
||||
do_install:append() {
|
||||
rm -rf ${D}${datadir}/metainfo
|
||||
# pcsc-lite installs pcscd-sysusers.conf into systemd's sysusersdir when
|
||||
# the systemd pkg-config variable is available (${libdir}/sysusers.d),
|
||||
# and falls back to ${exec_prefix}/sysusers.d otherwise. Drop both so the
|
||||
# file is not left unpackaged (installed-vs-shipped QA).
|
||||
rm -rf ${D}${libdir}/sysusers.d
|
||||
rm -rf ${D}${exec_prefix}/sysusers.d
|
||||
# In sysvinit environments, remove all systemd-related files
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
|
||||
# pcsc-lite installs pcscd-sysusers.conf into systemd's sysusersdir when
|
||||
# the systemd pkg-config variable is available (${libdir}/sysusers.d),
|
||||
# and falls back to ${exec_prefix}/sysusers.d otherwise. Drop both so the
|
||||
# file is not left unpackaged (installed-vs-shipped QA).
|
||||
rm -rf ${D}${libdir}/sysusers.d
|
||||
rm -rf ${D}${exec_prefix}/sysusers.d
|
||||
|
||||
rm -rf ${D}${systemd_system_unitdir}
|
||||
rm -rf ${D}${libdir}/systemd
|
||||
fi
|
||||
}
|
||||
|
||||
RPROVIDES:${PN} += "${PN}-systemd"
|
||||
|
||||
Reference in New Issue
Block a user