summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Byrne <salah.coronya@gmail.com>2023-09-16 10:51:13 -0500
committerMatthias Maier <tamiko@gentoo.org>2023-09-16 10:54:02 -0500
commit385cf751b98496cf4e297b0f1cbf3e1ba9e26d80 (patch)
tree60ef630671c2e53710d2994da6cd4c005210a861 /app-crypt/swtpm/swtpm-0.8.0-r2.ebuild
parentprofiles/features/musl/package.mask: mask dev-lang/dafny-bin on musl (diff)
downloadgentoo-385cf751b98496cf4e297b0f1cbf3e1ba9e26d80.tar.gz
gentoo-385cf751b98496cf4e297b0f1cbf3e1ba9e26d80.tar.bz2
gentoo-385cf751b98496cf4e297b0f1cbf3e1ba9e26d80.zip
app-crypt/swtpm: Add gnutls dependency back for swtpm_cert
RDEPEND=net-libs/gnutls[tools,pkcs11] is essentiallly required for app-crypt/swtpm. New vTPMs cannot be provisioned without it, and upstream expects gnutls to have PKCS11 support: https://github.com/stefanberger/swtpm/issues/477 . Closes: https://github.com/gentoo/gentoo/pull/32704 Closes: https://bugs.gentoo.org/913586 Bug: https://bugs.gentoo.org/909754 Signed-off-by: Christopher Byrne <salah.coronya@gmail.com> Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'app-crypt/swtpm/swtpm-0.8.0-r2.ebuild')
-rw-r--r--app-crypt/swtpm/swtpm-0.8.0-r2.ebuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/app-crypt/swtpm/swtpm-0.8.0-r2.ebuild b/app-crypt/swtpm/swtpm-0.8.0-r2.ebuild
new file mode 100644
index 000000000000..650e54402d13
--- /dev/null
+++ b/app-crypt/swtpm/swtpm-0.8.0-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit autotools python-any-r1
+
+DESCRIPTION="Libtpms-based TPM emulator"
+HOMEPAGE="https://github.com/stefanberger/swtpm"
+SRC_URI="https://github.com/stefanberger/swtpm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86"
+IUSE="fuse seccomp test"
+RESTRICT="!test? ( test )"
+
+# net-libs/gnutls[pkcs11,tools] is required otherwsie it not possible to
+# provision new vTPMs. swtpm_cert spawns certttool, and upstream expects
+# pkcs11 in gnutls: https://github.com/stefanberger/swtpm/issues/477.
+
+RDEPEND="fuse? (
+ dev-libs/glib:2
+ sys-fs/fuse:0
+ )
+ seccomp? ( sys-libs/libseccomp )
+ acct-group/tss
+ acct-user/tss
+ dev-libs/openssl:0=
+ dev-libs/json-glib
+ dev-libs/libtpms
+ dev-libs/libtasn1:=
+ net-libs/gnutls[pkcs11,tools]
+"
+
+DEPEND="${RDEPEND}
+ test? (
+ net-misc/socat
+ dev-tcltk/expect
+ )"
+
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.0-fix-localca-path.patch"
+ "${FILESDIR}/${PN}-0.5.0-build-sys-Remove-WError.patch"
+ "${FILESDIR}/${PN}-0.7.2-Conditionalize-test-dependencies.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-openssl \
+ --with-gnutls \
+ --without-selinux \
+ $(use_with fuse cuse) \
+ $(use_with seccomp) \
+ $(use_enable test)
+}
+
+src_install() {
+ default
+ fowners -R tss:root /var/lib/swtpm-localca
+ fperms 750 /var/lib/swtpm-localca
+ keepdir /var/lib/swtpm-localca
+ find "${D}" -name '*.la' -delete || die
+}