diff options
author | Salah Coronya <salah.coronya@gmail.com> | 2020-10-07 22:41:22 -0500 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-10-12 12:05:56 +0300 |
commit | 6831cad0d840161769d2621073ffa5ec335fdb6c (patch) | |
tree | e0e7ab53b6b51c4f7af94d560765ffa9fbe88838 /app-crypt/swtpm | |
parent | media-fonts/fontawesome: drop old versions (diff) | |
download | gentoo-6831cad0d840161769d2621073ffa5ec335fdb6c.tar.gz gentoo-6831cad0d840161769d2621073ffa5ec335fdb6c.tar.bz2 gentoo-6831cad0d840161769d2621073ffa5ec335fdb6c.zip |
app-crypt/swtpm: Bump to 0.5.0
Closes: https://bugs.gentoo.org/744442
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Salah Coronya <salah.coronya@gmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-crypt/swtpm')
-rw-r--r-- | app-crypt/swtpm/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch | 13 | ||||
-rw-r--r-- | app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch | 26 | ||||
-rw-r--r-- | app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch | 31 | ||||
-rw-r--r-- | app-crypt/swtpm/swtpm-0.5.0.ebuild | 95 |
5 files changed, 166 insertions, 0 deletions
diff --git a/app-crypt/swtpm/Manifest b/app-crypt/swtpm/Manifest index 8866875bdcfe..d8b82e32ecb3 100644 --- a/app-crypt/swtpm/Manifest +++ b/app-crypt/swtpm/Manifest @@ -1 +1,2 @@ DIST swtpm-0.3.2.tar.gz 308843 BLAKE2B 501c600e36a437fc99f662f1c217169cab15b0d4ec4a4551a29dd83541c9718e182c7eb13a43e541da453fc28c48232354b617525e32d9721e697744eaa5a17a SHA512 5da668cd8091f0db70bec52cd8d26bacf7b18e4c27c83c1cba25e59c69bb2ba7a1d011d9bf4bafa44e1a49065538445eb56683806be6f1875cba383f8edb6a4f +DIST swtpm-0.5.0.tar.gz 309011 BLAKE2B 3977acef1e68adca82ed5b51adb5f8787f6eb874ee16768b5b4bbbb13b043f8a39f534b2aa99ef92fb1608f0c4c805b51bb8fbc83297b71afcec2d99faff03d9 SHA512 ba7dafc9a9ddd28252615028a45fe3e68efd12df948c1e8ec938caabb840406a7a1935e1e4a6e1b6b8848bee08450673138dc5a0d63f0447f5e0e07350e4aed7 diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch b/app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch new file mode 100644 index 000000000000..4afd5408d9c6 --- /dev/null +++ b/app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index d035653..1db5c5c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -461,7 +461,7 @@ AC_SUBST([TSS_USER]) + AC_SUBST([TSS_GROUP]) + + CFLAGS="$CFLAGS -Wreturn-type -Wsign-compare -Wswitch-enum" +-CFLAGS="$CFLAGS -Wmissing-prototypes -Wall -Werror" ++CFLAGS="$CFLAGS -Wmissing-prototypes -Wall" + CFLAGS="$CFLAGS -Wformat -Wformat-security" + CFLAGS="$CFLAGS $GNUTLS_CFLAGS $COVERAGE_CFLAGS" + diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch b/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch new file mode 100644 index 000000000000..3880385256e3 --- /dev/null +++ b/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch @@ -0,0 +1,26 @@ +diff --git a/configure.ac b/configure.ac +index d035653..0728a2e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -325,21 +325,11 @@ fi + AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = "xyes"]) + AC_SUBST([GNUTLS_LIBS]) + +-AC_PATH_PROG([EXPECT], expect) +-if test "x$EXPECT" = "x"; then +- AC_MSG_ERROR([expect is required: expect package]) +-fi +- + AC_PATH_PROG([GAWK], gawk) + if test "x$GAWK" = "x"; then + AC_MSG_ERROR([gawk is required: gawk package]) + fi + +-AC_PATH_PROG([SOCAT], socat) +-if test "x$SOCAT" = "x"; then +- AC_MSG_ERROR([socat is required: socat package]) +-fi +- + AC_PATH_PROG([BASE64], base64) + if test "x$BASE64" = "x"; then + AC_MSG_ERROR([base64 is required: base64 package]) diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch b/app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch new file mode 100644 index 000000000000..27d29fc55aed --- /dev/null +++ b/app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch @@ -0,0 +1,31 @@ +diff --git a/samples/Makefile.am b/samples/Makefile.am +index 7d69bf8..9fb8338 100644 +--- a/samples/Makefile.am ++++ b/samples/Makefile.am +@@ -56,10 +56,10 @@ endif + + + 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 + + # for out-of-tree builds we need to clean up +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 diff --git a/app-crypt/swtpm/swtpm-0.5.0.ebuild b/app-crypt/swtpm/swtpm-0.5.0.ebuild new file mode 100644 index 000000000000..c3d812946659 --- /dev/null +++ b/app-crypt/swtpm/swtpm-0.5.0.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8} ) +DISTUTILS_USE_SETUPTOOLS=bdepend + +inherit autotools distutils-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 libressl seccomp test" + +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + fuse? ( + dev-libs/glib:2 + sys-fs/fuse:0 + ) + gnutls? ( + dev-libs/libtasn1:= + >=net-libs/gnutls-3.1.0[tools] + ) + !libressl? ( + dev-libs/openssl:0= + dev-libs/libtpms[-libressl] + ) + libressl? ( + dev-libs/libressl:0= + dev-libs/libtpms[libressl] + ) + seccomp? ( sys-libs/libseccomp ) +" + +DEPEND="${COMMON_DEPEND} + test? ( + net-misc/socat + dev-tcltk/expect + ${PYTHON_DEPS} + ) +" + +RDEPEND="${COMMON_DEPEND} + acct-group/tss + acct-user/tss + dev-python/cryptography[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${PN}-0.5.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 + eautomake +} + +src_configure() { + econf \ + --disable-static \ + --with-openssl \ + --without-selinux \ + $(use_with fuse cuse) \ + $(use_with gnutls) \ + $(use_with seccomp) +} + +src_compile() { +# We want the default src_compile, not the version distutils-r1 exports + default +} + +src_install() { + default + python_foreach_impl python_optimize + 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 +} + +src_test() { +# We want the default src_test, not the version distutils-r1 exports + default +} |