summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Klausen <kristian@klausen.dk>2021-10-02 20:37:38 +0200
committerArmin Kuster <akuster808@gmail.com>2021-10-18 21:50:13 -0700
commit01bdc2918cfe74da7d6615711d5544b505429ddc (patch)
tree8c66eed72f83500b20426e77cf97b808628afb3a
parenta85fbe980e5bc6acb50c0b2d520e65b98c7b3cd9 (diff)
downloadmeta-security-01bdc2918cfe74da7d6615711d5544b505429ddc.tar.gz
swtpm: update to 0.6.1
swtpm no longer depends on Python[1] so the dependencies have been removed. "inherit perlnative" has been added due to (in oe-core): deda455b3c ("bitbake.conf: drop pod2man from hosttools") Some leftover dependencies have also been removed, ex: tpm-tools required in the past by swtpm_setup.sh (<0.4.0)[2]. [1] https://github.com/stefanberger/swtpm/issues/437 [2] https://github.com/stefanberger/swtpm/commit/eee8cb5dfb13f87140dddda38f65bf61aff19508 Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb12
-rw-r--r--meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb (renamed from meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb)23
2 files changed, 14 insertions, 21 deletions
diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb b/meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb
index 644f3ac..bb93374 100644
--- a/meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb
+++ b/meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb
@@ -1,6 +1,6 @@
1SUMMARY = "SWTPM - OpenEmbedded wrapper scripts for native swtpm tools" 1SUMMARY = "SWTPM - OpenEmbedded wrapper scripts for native swtpm tools"
2LICENSE = "MIT" 2LICENSE = "MIT"
3DEPENDS = "swtpm-native tpm-tools-native net-tools-native" 3DEPENDS = "swtpm-native"
4 4
5inherit native 5inherit native
6 6
@@ -14,23 +14,19 @@ do_create_wrapper () {
14 for i in `find ${bindir} ${base_bindir} ${sbindir} ${base_sbindir} -name 'swtpm*' -perm /+x -type f`; do 14 for i in `find ${bindir} ${base_bindir} ${sbindir} ${base_sbindir} -name 'swtpm*' -perm /+x -type f`; do
15 exe=`basename $i` 15 exe=`basename $i`
16 case $exe in 16 case $exe in
17 swtpm_setup.sh) 17 swtpm_setup)
18 cat >${WORKDIR}/swtpm_setup_oe.sh <<EOF 18 cat >${WORKDIR}/swtpm_setup_oe.sh <<EOF
19#! /bin/sh 19#! /bin/sh
20# 20#
21# Wrapper around swtpm_setup.sh which adds parameters required to 21# Wrapper around swtpm_setup which adds parameters required to
22# run the setup as non-root directly from the native sysroot. 22# run the setup as non-root directly from the native sysroot.
23 23
24PATH="${bindir}:${base_bindir}:${sbindir}:${base_sbindir}:\$PATH" 24PATH="${bindir}:${base_bindir}:${sbindir}:${base_sbindir}:\$PATH"
25export PATH 25export PATH
26 26
27# tcsd only allows to be run as root or tss. Pretend to be root... 27exec swtpm_setup --config ${STAGING_DIR_NATIVE}/etc/swtpm_setup.conf "\$@"
28exec env ${FAKEROOTENV} ${FAKEROOTCMD} swtpm_setup.sh --config ${STAGING_DIR_NATIVE}/etc/swtpm_setup.conf "\$@"
29EOF 28EOF
30 ;; 29 ;;
31 swtpm_setup)
32 true
33 ;;
34 *) 30 *)
35 cat >${WORKDIR}/${exe}_oe.sh <<EOF 31 cat >${WORKDIR}/${exe}_oe.sh <<EOF
36#! /bin/sh 32#! /bin/sh
diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
index 912e939..c7fc131 100644
--- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.5.2.bb
+++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.6.1.bb
@@ -3,14 +3,11 @@ LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8" 3LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
4SECTION = "apps" 4SECTION = "apps"
5 5
6DEPENDS = "libtasn1 coreutils-native expect socat glib-2.0 net-tools-native libtpm libtpm-native" 6# expect-native, socat-native, coreutils-native and net-tools-native are reportedly only required for the tests
7DEPENDS = "libtasn1 coreutils-native expect-native socat-native glib-2.0 net-tools-native libtpm json-glib"
7 8
8# configure checks for the tools already during compilation and 9SRCREV = "98187d24fe14851653a7c46eb16e9c5f0b9beaa1"
9# then swtpm_setup needs them at runtime 10SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.6 \
10DEPENDS:append = " tpm-tools-native expect-native socat-native python3-pip-native python3-cryptography-native"
11
12SRCREV = "e59c0c1a7b4c8d652dbb280fd6126895a7057464"
13SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.5 \
14 file://ioctl_h.patch \ 11 file://ioctl_h.patch \
15 file://oe_configure.patch \ 12 file://oe_configure.patch \
16 " 13 "
@@ -19,7 +16,7 @@ PE = "1"
19S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
20 17
21PARALLEL_MAKE = "" 18PARALLEL_MAKE = ""
22inherit autotools pkgconfig python3native 19inherit autotools pkgconfig perlnative
23 20
24TSS_USER="tss" 21TSS_USER="tss"
25TSS_GROUP="tss" 22TSS_GROUP="tss"
@@ -28,7 +25,10 @@ PACKAGECONFIG ?= "openssl"
28PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" 25PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
29PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}" 26PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"
30PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" 27PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
31PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" 28# expect, bash, tpm2-pkcs11-tools (tpm2_ptool), tpmtool and certtool is
29# used by swtpm-create-tpmca (the last two is provided by gnutls)
30# gnutls is required by: swtpm-create-tpmca, swtpm-localca and swtpm_cert
31PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls, gnutls, expect bash tpm2-pkcs11-tools"
32PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" 32PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
33PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse" 33PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse"
34PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp" 34PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp"
@@ -41,14 +41,11 @@ USERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir \
41 --no-create-home --shell /bin/false ${BPN}" 41 --no-create-home --shell /bin/false ${BPN}"
42 42
43 43
44PACKAGES =+ "${PN}-python"
45FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
46
47PACKAGE_BEFORE_PN = "${PN}-cuse" 44PACKAGE_BEFORE_PN = "${PN}-cuse"
48FILES:${PN}-cuse = "${bindir}/swtpm_cuse" 45FILES:${PN}-cuse = "${bindir}/swtpm_cuse"
49 46
50INSANE_SKIP:${PN} += "dev-so" 47INSANE_SKIP:${PN} += "dev-so"
51 48
52RDEPENDS:${PN} = "libtpm expect socat bash tpm-tools python3 python3-cryptography python3-twisted" 49RDEPENDS:${PN} = "libtpm"
53 50
54BBCLASSEXTEND = "native nativesdk" 51BBCLASSEXTEND = "native nativesdk"