summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2017-03-24 11:52:56 +0100
committerArmin Kuster <akuster808@gmail.com>2017-03-27 14:57:26 -0700
commit4c4fa8c5036da1c3d8d3e7d5849f28cc47e95bb8 (patch)
tree48053cc276104eeaf5e919ce099480cbf4e602e8
parent1cca28c3d544b18eb1622e03c1e2fa468ba0f7cc (diff)
downloadmeta-security-4c4fa8c5036da1c3d8d3e7d5849f28cc47e95bb8.tar.gz
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>
-rw-r--r--recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb24
1 files changed, 22 insertions, 2 deletions
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb b/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
index a03559c..ca82562 100644
--- a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
+++ b/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
@@ -10,7 +10,7 @@ SRC_URI = " \
10 file://ax_pthread.m4 \ 10 file://ax_pthread.m4 \
11 file://fix_musl_select_include.patch " 11 file://fix_musl_select_include.patch "
12 12
13inherit autotools pkgconfig 13inherit autotools pkgconfig systemd
14 14
15S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}" 15S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}"
16 16
@@ -24,6 +24,26 @@ do_configure_prepend () {
24 cd $currentdir 24 cd $currentdir
25} 25}
26 26
27INHERIT += "extrausers"
28EXTRA_USERS_PARAMS = "\
29 useradd -p '' tss; \
30 groupadd tss; \
31 "
32
33SYSTEMD_PACKAGES += "resourcemgr"
34SYSTEMD_SERVICE_resourcemgr = "resourcemgr.service"
35SYSTEMD_AUTO_ENABLE_resourcemgr = "enable"
36
37do_patch[postfuncs] += "fix_systemd_unit"
38fix_systemd_unit () {
39 sed -i -e 's;^ExecStart=.*/resourcemgr;ExecStart=${sbindir}/resourcemgr;' ${S}/contrib/resourcemgr.service
40}
41
42do_install_append() {
43 install -d ${D}${systemd_system_unitdir}
44 install -m0644 ${S}/contrib/resourcemgr.service ${D}${systemd_system_unitdir}/resourcemgr.service
45}
46
27PROVIDES = "${PACKAGES}" 47PROVIDES = "${PACKAGES}"
28PACKAGES = " \ 48PACKAGES = " \
29 ${PN}-dbg \ 49 ${PN}-dbg \
@@ -64,4 +84,4 @@ FILES_libtctisocket-dev = " \
64 ${libdir}/pkgconfig/tcti-socket.pc \ 84 ${libdir}/pkgconfig/tcti-socket.pc \
65" 85"
66FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a" 86FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a"
67FILES_resourcemgr = "${sbindir}/resourcemgr" 87FILES_resourcemgr = "${sbindir}/resourcemgr ${systemd_system_unitdir}/resourcemgr.service"