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>
This commit is contained in:
Trevor Woerner
2018-06-12 23:03:03 -04:00
committed by Jia Zhang
parent 156cf92528
commit a504af5587
3 changed files with 63 additions and 62 deletions

View File

@@ -0,0 +1,41 @@
SUMMARY = "TPM2 Access Broker & Resource Manager"
DESCRIPTION = "This is a system daemon implementing the TPM2 Access Broker (AB) \
and Resource Manager (RM) specification from the TCG (Trusted Computing Group). \
The daemon (tpm2-abrmd) is implemented using Glib and the GObject system."
HOMEPAGE = "https://github.com/tpm2-software/tpm2-abrmd"
SECTION = "security/tpm"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
DEPENDS += "autoconf-archive-native dbus glib-2.0 glib-2.0-native"
SRC_URI = "\
file://tpm2-abrmd-init.sh \
file://tpm2-abrmd.default \
"
inherit autotools pkgconfig systemd update-rc.d useradd
SYSTEMD_PACKAGES += "${PN}"
SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
INITSCRIPT_NAME = "${PN}"
INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "tss"
USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
do_install_append() {
install -d "${D}${sysconfdir}/init.d"
install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd"
install -d "${D}${sysconfdir}/default"
install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
}
FILES_${PN} += "\
${libdir}/systemd \
${datadir}/dbus-1/system-services/com.intel.tss2.Tabrmd.service \
"

View File

@@ -0,0 +1,7 @@
include ${BPN}.inc
DEPENDS += "libtctidevice libtctisocket libtss2"
SRC_URI += "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz"
SRC_URI[md5sum] = "3f5f2461fd98aca0add1187e4705c0de"
SRC_URI[sha256sum] = "859d777a0d2c5d78309c4a2f06879a1e914b41324ea8258920a778a1ad7e38ea"

View File

@@ -1,71 +1,24 @@
SUMMARY = "TPM2 Access Broker & Resource Manager"
DESCRIPTION = "This is a system daemon implementing the TPM2 access \
broker (TAB) & Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) \
is implemented using Glib and the GObject system. In this documentation and \
in the code we use `tpm2-abrmd` and `tabrmd` interchangeably. \
"
SECTION = "security/tpm"
include ${BPN}.inc
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
DEFAULT_PREFERENCE = "-1"
DEPENDS += "autoconf-archive dbus glib-2.0 pkgconfig tpm2-tss glib-2.0-native"
DEPENDS += "tpm2-tss libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim"
PV = "1.2.0+git${SRCPV}"
PVBASE := "${PV}"
PV = "${PVBASE}.${SRCPV}"
SRC_URI = "\
git://github.com/tpm2-software/tpm2-abrmd \
file://tpm2-abrmd-init.sh \
file://tpm2-abrmd.default \
"
SRCREV = "59ce1008e5fa3bd5a143437b0f7390851fd25bd8"
SRC_URI += "git://github.com/01org/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}"
S = "${WORKDIR}/git"
SRCREV = "${AUTOREV}"
inherit autotools pkgconfig systemd update-rc.d useradd
S = "${WORKDIR}/${BPN}"
SYSTEMD_PACKAGES += "${PN}"
SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
INITSCRIPT_NAME = "${PN}"
INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "tss"
USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
# break out tcti into a package: libtcti-tabrmd
# package up the service file
EXTRA_OECONF += "\
--with-systemdsystemunitdir=${systemd_system_unitdir} \
--with-udevrulesdir=${sysconfdir}/udev/rules.d \
"
do_configure_prepend() {
# execute the bootstrap script
currentdir=$(pwd)
cd "${S}"
ACLOCAL="aclocal --system-acdir=${STAGING_DATADIR}/aclocal" \
./bootstrap
cd "${currentdir}"
do_configure_prepend () {
# execute the bootstrap script
currentdir=$(pwd)
cd ${S}
AUTORECONF=true ./bootstrap
cd ${currentdir}
}
do_install_append() {
install -d "${D}${sysconfdir}/init.d"
install -m 0755 "${WORKDIR}/tpm2-abrmd-init.sh" "${D}${sysconfdir}/init.d/tpm2-abrmd"
install -d "${D}${sysconfdir}/default"
install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
}
FILES_${PN} += "\
${libdir}/systemd \
"
RDEPENDS_${PN} += "\
libgcc dbus-glib libtss2 libtctidevice libtctisocket \
"
BBCLASSEXTEND = "native"
RDEPENDS_${PN} += "tpm2-tss"