Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "SWTPM - Software TPM Emulator" |
| 2 | LICENSE = "BSD-3-Clause" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8" |
| 4 | SECTION = "apps" |
| 5 | |
| 6 | # expect-native, socat-native, coreutils-native and net-tools-native are reportedly only required for the tests |
| 7 | DEPENDS = "libtasn1 coreutils-native expect-native socat-native glib-2.0 net-tools-native libtpm json-glib" |
| 8 | |
| 9 | SRCREV = "92a7035f45d9b08aa7c6b8bd6fa4c6916ef07a9e" |
| 10 | SRC_URI = "git://github.com/stefanberger/swtpm.git;branch=stable-0.7-next;protocol=https \ |
| 11 | file://ioctl_h.patch \ |
| 12 | " |
| 13 | PE = "1" |
| 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | PARALLEL_MAKE = "" |
| 18 | inherit autotools pkgconfig perlnative |
| 19 | |
| 20 | TSS_USER="tss" |
| 21 | TSS_GROUP="tss" |
| 22 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 23 | PACKAGECONFIG ?= "openssl gnutls" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 24 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 25 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)}" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 26 | PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}" |
| 27 | PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" |
| 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 |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 31 | PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls-native gnutls, gnutls-bin expect bash tpm2-pkcs11-tools" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 32 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 33 | PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse, fuse" |
| 34 | PACKAGECONFIG[seccomp] = "--with-seccomp, --without-seccomp, libseccomp" |
| 35 | |
| 36 | EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}" |
| 37 | |
| 38 | USERADD_PACKAGES = "${PN}" |
| 39 | GROUPADD_PARAM:${PN} = "--system ${TSS_USER}" |
| 40 | USERADD_PARAM:${PN} = "--system -g ${TSS_GROUP} --home-dir \ |
| 41 | --no-create-home --shell /bin/false ${BPN}" |
| 42 | |
| 43 | |
| 44 | PACKAGE_BEFORE_PN = "${PN}-cuse" |
| 45 | FILES:${PN}-cuse = "${bindir}/swtpm_cuse" |
| 46 | |
| 47 | INSANE_SKIP:${PN} += "dev-so" |
| 48 | |
| 49 | RDEPENDS:${PN} = "libtpm" |
| 50 | |
| 51 | BBCLASSEXTEND = "native nativesdk" |