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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E8C2F158020 for ; Wed, 21 Dec 2022 23:37:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6881DE0877; Wed, 21 Dec 2022 23:37:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4DDE4E0877 for ; Wed, 21 Dec 2022 23:37:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35F313412DB for ; Wed, 21 Dec 2022 23:37:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AE13A7E7 for ; Wed, 21 Dec 2022 23:37:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1671665741.3bdbc2eaa6fa54078c93fc70915d2b5ec9950f3f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/tpm2-tss/Manifest app-crypt/tpm2-tss/files/tpm2-tss-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch app-crypt/tpm2-tss/tpm2-tss-3.2.1.ebuild X-VCS-Directories: app-crypt/tpm2-tss/ app-crypt/tpm2-tss/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3bdbc2eaa6fa54078c93fc70915d2b5ec9950f3f X-VCS-Branch: master Date: Wed, 21 Dec 2022 23:37:05 +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: 72749e0b-9f9d-4b12-803f-c09cac19b7b4 X-Archives-Hash: f19f2049a41180ccb71be1ebc2e651e8 commit: 3bdbc2eaa6fa54078c93fc70915d2b5ec9950f3f Author: Christopher Byrne gmail com> AuthorDate: Tue Dec 13 19:07:20 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Dec 21 23:35:41 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bdbc2ea app-crypt/tpm2-tss: add 3.2.1 Signed-off-by: Christopher Byrne gmail.com> Signed-off-by: Sam James gentoo.org> app-crypt/tpm2-tss/Manifest | 1 + ...2.1-Dont-run-systemd-sysusers-in-Makefile.patch | 61 +++++++++++++++ app-crypt/tpm2-tss/tpm2-tss-3.2.1.ebuild | 90 ++++++++++++++++++++++ 3 files changed, 152 insertions(+) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index fbe1511216da..3a945d93a771 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1 +1,2 @@ DIST tpm2-tss-3.2.0.tar.gz 1629211 BLAKE2B a89aa4d89a50bdfb5a9652874d30e2138747bd022049f2be2d0b56e296329d0c41254033ec3a062dbd64fde54a62e952f54446c551e5788231827cd53fae045a SHA512 cabb411f074dfa94919ba914849aac77a0ac2f50622e28a1406cf575369148774748e0e2b7a7c566ec83561a96d4b883bac5a3b1763f4cf48668a0c5d68c0a23 +DIST tpm2-tss-3.2.1.tar.gz 1638566 BLAKE2B bdf5eeca1e7269a639cefd8b4a38e16c5b7c08518411a22718dcd14bc9fe3b621eee77cdd98f9ece0f6d9a52319bce5e0a502ff9a6e4ba6716341bd01f5967a9 SHA512 dbe5e29349d78621fcd608d9c75fa58f5e6462264b9654ca85af9f9faafebe1107d9f735a1b6ad4956a089b0dd96cbda3f46364cabd846f9fb29a419b074c78f diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index 000000000000..7e55f965bd2f --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,61 @@ +diff --git a/Makefile.am b/Makefile.am +index 6242b19c..b30ec6e0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -492,7 +492,6 @@ fapi-config.json: dist/fapi-config.json.in + -e 's|[@]userstatedir@|$(userstatedir)|g' \ + < "$<" > "$@" + +-sysusers_DATA = dist/sysusers.d/tpm2-tss.conf + tmpfiles_DATA = tpm2-tss-fapi.conf + + CLEANFILES += tpm2-tss-fapi.conf +@@ -516,7 +515,6 @@ EXTRA_DIST += \ + dist/fapi-config.json.in \ + dist/fapi-profiles/P_RSA2048SHA256.json \ + dist/fapi-profiles/P_ECCP256SHA256.json \ +- dist/sysusers.d/tpm2-tss.conf \ + dist/tmpfiles.d/tpm2-tss-fapi.conf.in \ + doc/fapi-config.md \ + doc/fapi-profile.md \ +@@ -726,13 +724,6 @@ EXTRA_DIST += dist/tpm-udev.rules + + install-dirs: + if HOSTOS_LINUX +-if SYSD_SYSUSERS +- @echo "systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf" +- @systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf || echo "WARNING Failed to create the tss user and group" +-else +- @echo "call make_tss_user_and_group" +- @$(call make_tss_user_and_group) || echo "WARNING Failed to create the tss user and group" +-endif + if SYSD_TMPFILES + @echo "systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf" + @systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf|| echo "WARNING Failed to create the FAPI directories with the correct permissions" +diff --git a/configure.ac b/configure.ac +index 83554edd..c9599b93 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -483,22 +483,9 @@ AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_cer + [AC_MSG_WARN([Running integration tests without EK certificate verification, use --enable-self-generated-certificate for full test coverage])]) + + # Check for systemd helper tools used by make install +-AC_CHECK_PROG(systemd_sysusers, systemd-sysusers, yes) +-AM_CONDITIONAL(SYSD_SYSUSERS, test "x$systemd_sysusers" = "xyes") + AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes) + AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes") + +-# Check all tools used by make install +-AS_IF([test "$HOSTOS" = "Linux"], +- [ AC_CHECK_PROG(useradd, useradd, yes) +- AC_CHECK_PROG(groupadd, groupadd, yes) +- AC_CHECK_PROG(adduser, adduser, yes) +- AC_CHECK_PROG(addgroup, addgroup, yes) +- AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ], +- [AC_MSG_ERROR([addgroup or groupadd are needed.])]) +- AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ], +- [AC_MSG_ERROR([adduser or useradd are needed.])])]) +- + AC_SUBST([PATH]) + + dnl --------- Doxy Gen ----------------------- diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.1.ebuild new file mode 100644 index 000000000000..0a1f2270a6ce --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev + +DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" +HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0/3" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls static-libs test" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls )" + +RDEPEND="acct-group/tss + acct-user/tss + fapi? ( dev-libs/json-c:=[${MULTILIB_USEDEP}] + >=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] ) + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] ) + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )" + +DEPEND="${RDEPEND} + test? ( app-crypt/swtpm + dev-libs/uthash + dev-util/cmocka + fapi? ( >=net-misc/curl-7.80.0 ) )" +BDEPEND="sys-apps/acl + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}/${PN}-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch" +) + +pkg_setup() { + local CONFIG_CHECK=" \ + ~TCG_TPM + " + linux-info_pkg_setup + kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required" +} + +src_prepare() { + eautoreconf + default +} + +multilib_src_configure() { + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + + ECONF_SOURCE=${S} econf \ + --localstatedir=/var \ + $(multilib_native_use_enable doc doxygen-doc) \ + $(use_enable fapi) \ + $(use_enable static-libs static) \ + $(multilib_native_use_enable test unit) \ + $(multilib_native_use_enable test integration) \ + $(multilib_native_use_enable test self-generated-certificate) \ + --disable-tcti-libtpms \ + --disable-defaultflags \ + --disable-weakcrypto \ + --with-crypto="$(usex mbedtls mbed ossl)" \ + --with-runstatedir=/run \ + --with-udevrulesdir="$(get_udevdir)/rules.d" \ + --with-udevrulesprefix=60- \ + --with-sysusersdir="/usr/lib/sysusers.d" \ + --with-tmpfilesdir="/usr/lib/tmpfiles.d" +} + +multilib_src_install() { + default + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process tpm2-tss-fapi.conf + udev_reload +} + +pkg_postrm() { + udev_reload +}