diff options
| author | Trevor Woerner <twoerner@gmail.com> | 2018-06-12 23:03:03 -0400 |
|---|---|---|
| committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2018-06-15 13:01:25 +0800 |
| commit | a504af5587cbfa7a03936028c74790620d8effe2 (patch) | |
| tree | b1446bc993b0b52171a6bdba33722bca85093861 | |
| parent | 156cf9252806137c81cf2b006bc2f7de54517aca (diff) | |
| download | meta-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.inc | 41 | ||||
| -rw-r--r-- | meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_1.3.1.bb | 7 | ||||
| -rw-r--r-- | meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb | 77 |
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 @@ | |||
| 1 | SUMMARY = "TPM2 Access Broker & Resource Manager" | ||
| 2 | DESCRIPTION = "This is a system daemon implementing the TPM2 Access Broker (AB) \ | ||
| 3 | and Resource Manager (RM) specification from the TCG (Trusted Computing Group). \ | ||
| 4 | The daemon (tpm2-abrmd) is implemented using Glib and the GObject system." | ||
| 5 | HOMEPAGE = "https://github.com/tpm2-software/tpm2-abrmd" | ||
| 6 | SECTION = "security/tpm" | ||
| 7 | LICENSE = "BSD-2-Clause" | ||
| 8 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" | ||
| 9 | |||
| 10 | DEPENDS += "autoconf-archive-native dbus glib-2.0 glib-2.0-native" | ||
| 11 | |||
| 12 | SRC_URI = "\ | ||
| 13 | file://tpm2-abrmd-init.sh \ | ||
| 14 | file://tpm2-abrmd.default \ | ||
| 15 | " | ||
| 16 | |||
| 17 | inherit autotools pkgconfig systemd update-rc.d useradd | ||
| 18 | |||
| 19 | SYSTEMD_PACKAGES += "${PN}" | ||
| 20 | SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service" | ||
| 21 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | ||
| 22 | |||
| 23 | INITSCRIPT_NAME = "${PN}" | ||
| 24 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." | ||
| 25 | |||
| 26 | USERADD_PACKAGES = "${PN}" | ||
| 27 | GROUPADD_PARAM_${PN} = "tss" | ||
| 28 | USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" | ||
| 29 | |||
| 30 | do_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 | |||
| 38 | FILES_${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 @@ | |||
| 1 | include ${BPN}.inc | ||
| 2 | |||
| 3 | DEPENDS += "libtctidevice libtctisocket libtss2" | ||
| 4 | |||
| 5 | SRC_URI += "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz" | ||
| 6 | SRC_URI[md5sum] = "3f5f2461fd98aca0add1187e4705c0de" | ||
| 7 | SRC_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 @@ | |||
| 1 | SUMMARY = "TPM2 Access Broker & Resource Manager" | 1 | include ${BPN}.inc |
| 2 | DESCRIPTION = "This is a system daemon implementing the TPM2 access \ | ||
| 3 | broker (TAB) & Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) \ | ||
| 4 | is implemented using Glib and the GObject system. In this documentation and \ | ||
| 5 | in the code we use `tpm2-abrmd` and `tabrmd` interchangeably. \ | ||
| 6 | " | ||
| 7 | SECTION = "security/tpm" | ||
| 8 | 2 | ||
| 9 | LICENSE = "BSD-2-Clause" | 3 | DEFAULT_PREFERENCE = "-1" |
| 10 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" | ||
| 11 | 4 | ||
| 12 | DEPENDS += "autoconf-archive dbus glib-2.0 pkgconfig tpm2-tss glib-2.0-native" | 5 | DEPENDS += "tpm2-tss libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim" |
| 13 | 6 | ||
| 14 | PV = "1.2.0+git${SRCPV}" | 7 | PVBASE := "${PV}" |
| 8 | PV = "${PVBASE}.${SRCPV}" | ||
| 15 | 9 | ||
| 16 | SRC_URI = "\ | 10 | SRC_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 | " | ||
| 21 | SRCREV = "59ce1008e5fa3bd5a143437b0f7390851fd25bd8" | ||
| 22 | 11 | ||
| 23 | S = "${WORKDIR}/git" | 12 | SRCREV = "${AUTOREV}" |
| 24 | 13 | ||
| 25 | inherit autotools pkgconfig systemd update-rc.d useradd | 14 | S = "${WORKDIR}/${BPN}" |
| 26 | 15 | ||
| 27 | SYSTEMD_PACKAGES += "${PN}" | 16 | do_configure_prepend () { |
| 28 | SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service" | 17 | # execute the bootstrap script |
| 29 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | 18 | currentdir=$(pwd) |
| 30 | 19 | cd ${S} | |
| 31 | INITSCRIPT_NAME = "${PN}" | 20 | AUTORECONF=true ./bootstrap |
| 32 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." | 21 | cd ${currentdir} |
| 33 | |||
| 34 | USERADD_PACKAGES = "${PN}" | ||
| 35 | GROUPADD_PARAM_${PN} = "tss" | ||
| 36 | USERADD_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 | |||
| 41 | EXTRA_OECONF += "\ | ||
| 42 | --with-systemdsystemunitdir=${systemd_system_unitdir} \ | ||
| 43 | --with-udevrulesdir=${sysconfdir}/udev/rules.d \ | ||
| 44 | " | ||
| 45 | |||
| 46 | do_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 | ||
| 55 | do_install_append() { | 24 | RDEPENDS_${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 | |||
| 63 | FILES_${PN} += "\ | ||
| 64 | ${libdir}/systemd \ | ||
| 65 | " | ||
| 66 | |||
| 67 | RDEPENDS_${PN} += "\ | ||
| 68 | libgcc dbus-glib libtss2 libtctidevice libtctisocket \ | ||
| 69 | " | ||
| 70 | |||
| 71 | BBCLASSEXTEND = "native" | ||
