From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2B96813835B for ; Mon, 12 Oct 2020 09:06:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F327E090A; Mon, 12 Oct 2020 09:06:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 23DAFE0907 for ; Mon, 12 Oct 2020 09:06:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 712B233BEF8 for ; Mon, 12 Oct 2020 09:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6FC573A6 for ; Mon, 12 Oct 2020 09:06:13 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1602493556.6831cad0d840161769d2621073ffa5ec335fdb6c.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/swtpm/, app-crypt/swtpm/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/swtpm/Manifest app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch app-crypt/swtpm/swtpm-0.5.0.ebuild X-VCS-Directories: app-crypt/swtpm/ app-crypt/swtpm/files/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 6831cad0d840161769d2621073ffa5ec335fdb6c X-VCS-Branch: master Date: Mon, 12 Oct 2020 09:06:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f2e35ee0-bee1-4dbe-bcd3-41e39e34f856 X-Archives-Hash: 7efb787eaf020d6bc9a850c96aeb38c1 commit: 6831cad0d840161769d2621073ffa5ec335fdb6c Author: Salah Coronya gmail com> AuthorDate: Thu Oct 8 03:41:22 2020 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Mon Oct 12 09:05:56 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6831cad0 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 gmail.com> Signed-off-by: Joonas Niilola gentoo.org> app-crypt/swtpm/Manifest | 1 + .../swtpm-0.5.0-build-sys-Remove-WError.patch | 13 +++ .../swtpm-0.5.0-disable-test-dependencies.patch | 26 ++++++ .../swtpm/files/swtpm-0.5.0-fix-localca-path.patch | 31 +++++++ app-crypt/swtpm/swtpm-0.5.0.ebuild | 95 ++++++++++++++++++++++ 5 files changed, 166 insertions(+) diff --git a/app-crypt/swtpm/Manifest b/app-crypt/swtpm/Manifest index 8866875bdcf..d8b82e32ecb 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 00000000000..4afd5408d9c --- /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 00000000000..3880385256e --- /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 00000000000..27d29fc55ae --- /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 00000000000..c3d81294665 --- /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 +}