Skip to content

Commit

Permalink
app-crypt/swtpm: Bump to 0.6.0
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Christopher Byrne <[email protected]>
Closes: https://bugs.gentoo.org/798696
Signed-off-by: Matthias Maier <[email protected]>
  • Loading branch information
salahcoronya authored and tamiko committed Jun 26, 2021
1 parent ab44d06 commit 8d16372
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-crypt/swtpm/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST swtpm-0.5.2.tar.gz 309436 BLAKE2B 0518e59b052c9224d5db1c2720f74ff15717468f73b1665e67c017581dd2b52d7a4cf28f94a932eb6068de3bc50f2e5710b8c447e4a08e6b4a31019db542d910 SHA512 4554f1b7a534829f9fbef4a09e190f1d5e91692d270f4f668bd6ef79799a4186a38db172e37a18be9f203466e2d7c9cdf3a350c0020d25ff6126128085ebe3a3
DIST swtpm-0.6.0.tar.gz 326049 BLAKE2B 52b310e4da1f256f440d9e0022cb6d5f5987b10aa85c8bf2837f5a5c61bc076f7d24d0a027987ef28ba0e7983a2fb04476103b88c33e3312536777366bf9b0cd SHA512 b12bb9cc486c50d0689a5655799c0d52f85d320a1d849fd56ee5c4b497472102c61b5d368f46a81e0b9feacc63b25b434bd6229f492951097af1e9c74a37cc96
31 changes: 31 additions & 0 deletions app-crypt/swtpm/files/swtpm-0.6.0-fix-localca-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/samples/Makefile.am b/samples/Makefile.am
index dcbc9b6..68c8adb 100644
--- a/samples/Makefile.am
+++ b/samples/Makefile.am
@@ -48,10 +48,10 @@ swtpm_localca_CFLAGS = \
$(GLIB_CFLAGS)

install-data-local:
- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/swtpm-localca
+ $(MKDIR_P) $(DESTDIR)$(localstatedir)/swtpm-localca
if test -z $(DESTDIR); then \
- chown -R @TSS_USER@:root $(DESTDIR)$(localstatedir)/lib/swtpm-localca || true; \
- chmod 0750 $(DESTDIR)$(localstatedir)/lib/swtpm-localca || true; \
+ chown -R @TSS_USER@:root $(DESTDIR)$(localstatedir)/swtpm-localca || true; \
+ chmod 0750 $(DESTDIR)$(localstatedir)/swtpm-localca || true; \
fi

EXTRA_DIST= \
diff --git a/samples/swtpm-localca.conf.in b/samples/swtpm-localca.conf.in
index 1f0b48d..63f1fed 100644
--- a/samples/swtpm-localca.conf.in
+++ b/samples/swtpm-localca.conf.in
@@ -1,4 +1,4 @@
-statedir = @LOCALSTATEDIR@/lib/swtpm-localca
-signingkey = @LOCALSTATEDIR@/lib/swtpm-localca/signkey.pem
-issuercert = @LOCALSTATEDIR@/lib/swtpm-localca/issuercert.pem
-certserial = @LOCALSTATEDIR@/lib/swtpm-localca/certserial
+statedir = @LOCALSTATEDIR@/swtpm-localca
+signingkey = @LOCALSTATEDIR@/swtpm-localca/signkey.pem
+issuercert = @LOCALSTATEDIR@/swtpm-localca/issuercert.pem
+certserial = @LOCALSTATEDIR@/swtpm-localca/certserial
69 changes: 69 additions & 0 deletions app-crypt/swtpm/swtpm-0.6.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8,9} )

inherit autotools python-single-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"
IUSE="fuse gnutls seccomp test"
RESTRICT="!test? ( test )"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="fuse? (
dev-libs/glib:2
sys-fs/fuse:0
)
gnutls? (
dev-libs/libtasn1:=
>=net-libs/gnutls-3.1.0[tools]
)
seccomp? ( sys-libs/libseccomp )
test? (
net-misc/socat
dev-tcltk/expect
)
acct-group/tss
acct-user/tss
dev-libs/openssl:0=
dev-libs/json-glib
dev-libs/libtpms
${PYTHON_DEPS}"

PATCHES=(
"${FILESDIR}/${PN}-0.6.0-fix-localca-path.patch"
"${FILESDIR}/${PN}-0.5.0-build-sys-Remove-WError.patch"
)

src_prepare() {
use test || eapply "${FILESDIR}/${PN}-0.5.0-disable-test-dependencies.patch"
default
eautoreconf
}

src_configure() {
econf \
--disable-static \
--with-openssl \
--without-selinux \
$(use_with fuse cuse) \
$(use_with gnutls) \
$(use_with seccomp)
}

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
}

0 comments on commit 8d16372

Please sign in to comment.