diff options
| author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2017-03-24 11:52:56 +0100 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2017-03-27 14:57:26 -0700 |
| commit | 4c4fa8c5036da1c3d8d3e7d5849f28cc47e95bb8 (patch) | |
| tree | 48053cc276104eeaf5e919ce099480cbf4e602e8 | |
| parent | 1cca28c3d544b18eb1622e03c1e2fa468ba0f7cc (diff) | |
| download | meta-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.bb | 24 |
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 | ||
| 13 | inherit autotools pkgconfig | 13 | inherit autotools pkgconfig systemd |
| 14 | 14 | ||
| 15 | S = "${WORKDIR}/${@d.getVar('BPN',d).upper()}" | 15 | S = "${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 | ||
| 27 | INHERIT += "extrausers" | ||
| 28 | EXTRA_USERS_PARAMS = "\ | ||
| 29 | useradd -p '' tss; \ | ||
| 30 | groupadd tss; \ | ||
| 31 | " | ||
| 32 | |||
| 33 | SYSTEMD_PACKAGES += "resourcemgr" | ||
| 34 | SYSTEMD_SERVICE_resourcemgr = "resourcemgr.service" | ||
| 35 | SYSTEMD_AUTO_ENABLE_resourcemgr = "enable" | ||
| 36 | |||
| 37 | do_patch[postfuncs] += "fix_systemd_unit" | ||
| 38 | fix_systemd_unit () { | ||
| 39 | sed -i -e 's;^ExecStart=.*/resourcemgr;ExecStart=${sbindir}/resourcemgr;' ${S}/contrib/resourcemgr.service | ||
| 40 | } | ||
| 41 | |||
| 42 | do_install_append() { | ||
| 43 | install -d ${D}${systemd_system_unitdir} | ||
| 44 | install -m0644 ${S}/contrib/resourcemgr.service ${D}${systemd_system_unitdir}/resourcemgr.service | ||
| 45 | } | ||
| 46 | |||
| 27 | PROVIDES = "${PACKAGES}" | 47 | PROVIDES = "${PACKAGES}" |
| 28 | PACKAGES = " \ | 48 | PACKAGES = " \ |
| 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 | " |
| 66 | FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a" | 86 | FILES_libtctisocket-staticdev = "${libdir}/libtcti-socket.*a" |
| 67 | FILES_resourcemgr = "${sbindir}/resourcemgr" | 87 | FILES_resourcemgr = "${sbindir}/resourcemgr ${systemd_system_unitdir}/resourcemgr.service" |
