mirror of
https://git.yoctoproject.org/meta-security
synced 2026-05-07 04:58:47 +00:00
tpm2.0-tss: install resourcemgr service
Install systemd resource.mgr service and it needed user/group.
version 2:
- do not hardcode sbin directory in a patch but use ${sbindir} instead
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
This commit is contained in:
committed by
Armin Kuster
parent
1cca28c3d5
commit
4c4fa8c503
@@ -10,7 +10,7 @@ SRC_URI = " \
|
|||||||
file://ax_pthread.m4 \
|
file://ax_pthread.m4 \
|
||||||
file://fix_musl_select_include.patch "
|
file://fix_musl_select_include.patch "
|
||||||
|
|
||||||
inherit autotools pkgconfig
|
inherit autotools pkgconfig systemd
|
||||||
|
|
||||||
S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}"
|
S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}"
|
||||||
|
|
||||||
@@ -24,6 +24,26 @@ do_configure_prepend () {
|
|||||||
cd $currentdir
|
cd $currentdir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INHERIT += "extrausers"
|
||||||
|
EXTRA_USERS_PARAMS = "\
|
||||||
|
useradd -p '' tss; \
|
||||||
|
groupadd tss; \
|
||||||
|
"
|
||||||
|
|
||||||
|
SYSTEMD_PACKAGES += "resourcemgr"
|
||||||
|
SYSTEMD_SERVICE_resourcemgr = "resourcemgr.service"
|
||||||
|
SYSTEMD_AUTO_ENABLE_resourcemgr = "enable"
|
||||||
|
|
||||||
|
do_patch[postfuncs] += "fix_systemd_unit"
|
||||||
|
fix_systemd_unit () {
|
||||||
|
sed -i -e 's;^ExecStart=.*/resourcemgr;ExecStart=${sbindir}/resourcemgr;' ${S}/contrib/resourcemgr.service
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
install -d ${D}${systemd_system_unitdir}
|
||||||
|
install -m0644 ${S}/contrib/resourcemgr.service ${D}${systemd_system_unitdir}/resourcemgr.service
|
||||||
|
}
|
||||||
|
|
||||||
PROVIDES = "${PACKAGES}"
|
PROVIDES = "${PACKAGES}"
|
||||||
PACKAGES = " \
|
PACKAGES = " \
|
||||||
${PN}-dbg \
|
${PN}-dbg \
|
||||||
@@ -64,4 +84,4 @@ FILES_libtctisocket-dev = " \
|
|||||||
${libdir}/pkgconfig/tcti-socket.pc \
|
${libdir}/pkgconfig/tcti-socket.pc \
|
||||||
"
|
"
|
||||||
FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a"
|
FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a"
|
||||||
FILES_resourcemgr = "${sbindir}/resourcemgr"
|
FILES_resourcemgr = "${sbindir}/resourcemgr ${systemd_system_unitdir}/resourcemgr.service"
|
||||||
|
|||||||
Reference in New Issue
Block a user