summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2018-06-12 23:03:03 -0400
committerJia Zhang <zhang.jia@linux.alibaba.com>2018-06-15 13:01:25 +0800
commita504af5587cbfa7a03936028c74790620d8effe2 (patch)
treeb1446bc993b0b52171a6bdba33722bca85093861
parent156cf9252806137c81cf2b006bc2f7de54517aca (diff)
downloadmeta-secure-core-a504af5587cbfa7a03936028c74790620d8effe2.tar.gz
tpm2-abrmd: cleanup and update
Cleanup the tpm2-abrmd recipe such that there is a recipe for building the latest release (the default) and one for building the latest, auto-incrementing version from git master placing all pieces common to the two recipes into an include file. Update release from 1.2.0 to 1.3.1. Signed-off-by: Trevor Woerner <twoerner@gmail.com>
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd.inc41
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_1.3.1.bb7
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb77
3 files changed, 63 insertions, 62 deletions
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd.inc b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd.inc
new file mode 100644
index 0000000..2cadb64
--- /dev/null
+++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd.inc
@@ -0,0 +1,41 @@
1SUMMARY = "TPM2 Access Broker & Resource Manager"
2DESCRIPTION = "This is a system daemon implementing the TPM2 Access Broker (AB) \
3and Resource Manager (RM) specification from the TCG (Trusted Computing Group). \
4The daemon (tpm2-abrmd) is implemented using Glib and the GObject system."
5HOMEPAGE = "https://github.com/tpm2-software/tpm2-abrmd"
6SECTION = "security/tpm"
7LICENSE = "BSD-2-Clause"
8LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
9
10DEPENDS += "autoconf-archive-native dbus glib-2.0 glib-2.0-native"
11
12SRC_URI = "\
13 file://tpm2-abrmd-init.sh \
14 file://tpm2-abrmd.default \
15"
16
17inherit autotools pkgconfig systemd update-rc.d useradd
18
19SYSTEMD_PACKAGES += "${PN}"
20SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service"
21SYSTEMD_AUTO_ENABLE_${PN} = "enable"
22
23INITSCRIPT_NAME = "${PN}"
24INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."
25
26USERADD_PACKAGES = "${PN}"
27GROUPADD_PARAM_${PN} = "tss"
28USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
29
30do_install_append() {
31 install -d "${D}${sysconfdir}/init.d"
32 install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd"
33
34 install -d "${D}${sysconfdir}/default"
35 install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
36}
37
38FILES_${PN} += "\
39 ${libdir}/systemd \
40 ${datadir}/dbus-1/system-services/com.intel.tss2.Tabrmd.service \
41"
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_1.3.1.bb b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_1.3.1.bb
new file mode 100644
index 0000000..ce1459c
--- /dev/null
+++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_1.3.1.bb
@@ -0,0 +1,7 @@
1include ${BPN}.inc
2
3DEPENDS += "libtctidevice libtctisocket libtss2"
4
5SRC_URI += "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz"
6SRC_URI[md5sum] = "3f5f2461fd98aca0add1187e4705c0de"
7SRC_URI[sha256sum] = "859d777a0d2c5d78309c4a2f06879a1e914b41324ea8258920a778a1ad7e38ea"
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb
index da51776..43f2650 100644
--- a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb
+++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb
@@ -1,71 +1,24 @@
1SUMMARY = "TPM2 Access Broker & Resource Manager" 1include ${BPN}.inc
2DESCRIPTION = "This is a system daemon implementing the TPM2 access \
3broker (TAB) & Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) \
4is implemented using Glib and the GObject system. In this documentation and \
5in the code we use `tpm2-abrmd` and `tabrmd` interchangeably. \
6"
7SECTION = "security/tpm"
8 2
9LICENSE = "BSD-2-Clause" 3DEFAULT_PREFERENCE = "-1"
10LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
11 4
12DEPENDS += "autoconf-archive dbus glib-2.0 pkgconfig tpm2-tss glib-2.0-native" 5DEPENDS += "tpm2-tss libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim"
13 6
14PV = "1.2.0+git${SRCPV}" 7PVBASE := "${PV}"
8PV = "${PVBASE}.${SRCPV}"
15 9
16SRC_URI = "\ 10SRC_URI += "git://github.com/01org/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}"
17 git://github.com/tpm2-software/tpm2-abrmd \
18 file://tpm2-abrmd-init.sh \
19 file://tpm2-abrmd.default \
20"
21SRCREV = "59ce1008e5fa3bd5a143437b0f7390851fd25bd8"
22 11
23S = "${WORKDIR}/git" 12SRCREV = "${AUTOREV}"
24 13
25inherit autotools pkgconfig systemd update-rc.d useradd 14S = "${WORKDIR}/${BPN}"
26 15
27SYSTEMD_PACKAGES += "${PN}" 16do_configure_prepend () {
28SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service" 17 # execute the bootstrap script
29SYSTEMD_AUTO_ENABLE_${PN} = "enable" 18 currentdir=$(pwd)
30 19 cd ${S}
31INITSCRIPT_NAME = "${PN}" 20 AUTORECONF=true ./bootstrap
32INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." 21 cd ${currentdir}
33
34USERADD_PACKAGES = "${PN}"
35GROUPADD_PARAM_${PN} = "tss"
36USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
37
38# break out tcti into a package: libtcti-tabrmd
39# package up the service file
40
41EXTRA_OECONF += "\
42 --with-systemdsystemunitdir=${systemd_system_unitdir} \
43 --with-udevrulesdir=${sysconfdir}/udev/rules.d \
44"
45
46do_configure_prepend() {
47 # execute the bootstrap script
48 currentdir=$(pwd)
49 cd "${S}"
50 ACLOCAL="aclocal --system-acdir=${STAGING_DATADIR}/aclocal" \
51 ./bootstrap
52 cd "${currentdir}"
53} 22}
54 23
55do_install_append() { 24RDEPENDS_${PN} += "tpm2-tss"
56 install -d "${D}${sysconfdir}/init.d"
57 install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd"
58
59 install -d "${D}${sysconfdir}/default"
60 install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
61}
62
63FILES_${PN} += "\
64 ${libdir}/systemd \
65"
66
67RDEPENDS_${PN} += "\
68 libgcc dbus-glib libtss2 libtctidevice libtctisocket \
69"
70
71BBCLASSEXTEND = "native"