[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: e39e3ae8045d92d376b9ab9d0caa1354d6d13602 Author: Christopher Byrne gmail com> AuthorDate: Thu May 9 16:18:26 2024 + Commit: Sam James gentoo org> CommitDate: Thu May 9 21:59:51 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e39e3ae8 app-crypt/tpm2-tss: Exclude TCTIs with automagic external dependencies Closes: https://bugs.gentoo.org/931513 Closes: https://bugs.gentoo.org/931239 Closes: https://bugs.gentoo.org/931122 Signed-off-by: Christopher Byrne gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36619 Signed-off-by: Sam James gentoo.org> .../files/tpm2-tss-4.1.1-Remove-bash-syntax.patch | 28 ++ ...piler-common.sh-Remove-dependency-on-whic.patch | 32 ++ app-crypt/tpm2-tss/tpm2-tss-4.1.1-r1.ebuild| 112 + 3 files changed, 172 insertions(+) diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.1.1-Remove-bash-syntax.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.1.1-Remove-bash-syntax.patch new file mode 100644 index ..81673e55f4fa --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.1.1-Remove-bash-syntax.patch @@ -0,0 +1,28 @@ +From 03726ba7684d672201dd773a49b7bec86ca877f5 Mon Sep 17 00:00:00 2001 +From: David Seifert +Date: Tue, 7 May 2024 20:37:14 +0200 +Subject: [PATCH] Remove bash syntax + +* `==` is bash and not POSIX +Bug: https://bugs.gentoo.org/931239 +Signed-off-by: David Seifert +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a763b683..eb6051ea 100644 +--- a/configure.ac b/configure.ac +@@ -652,7 +652,7 @@ AS_IF([test "x$enable_self_generated_certificate" = xyes], + [AC_DEFINE([SELF_GENERATED_CERTIFICATE], [1], [Allow usage of self generated root certificate])], + [AS_IF([test "x$integration_tcti" != "xdevice"], [AC_DEFINE([FAPI_TEST_EK_CERT_LESS], [1], [Perform integration tests without EK certificate verification])])]) + +-AM_CONDITIONAL([INIT_CA], [test "x$enable_self_generated_certificate" == xyes]) ++AM_CONDITIONAL([INIT_CA], [test "x$enable_self_generated_certificate" = xyes]) + + AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_certificate" != "xyes" && test "x$integration_tcti" != "xdevice"], + [AC_MSG_WARN([Running integration tests without EK certificate verification, use --enable-self-generated-certificate for full test coverage])]) +-- +2.43.2 + diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.1.1-int-log-compiler-common.sh-Remove-dependency-on-whic.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.1.1-int-log-compiler-common.sh-Remove-dependency-on-whic.patch new file mode 100644 index ..1a3a203ae5b1 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.1.1-int-log-compiler-common.sh-Remove-dependency-on-whic.patch @@ -0,0 +1,32 @@ +From ce2ca92af5f215e9c3fa262ea40de0c1d2ff71a3 Mon Sep 17 00:00:00 2001 +From: Christopher Byrne +Date: Fri, 3 May 2024 10:30:34 -0500 +Subject: [PATCH] int-log-compiler-common.sh: Remove dependency on which + +Signed-off-by: Christopher Byrne +--- + script/int-log-compiler-common.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/script/int-log-compiler-common.sh b/script/int-log-compiler-common.sh +index 5d0b3b95..577a 100755 +--- a/script/int-log-compiler-common.sh b/script/int-log-compiler-common.sh +@@ -55,12 +55,12 @@ sanity_test () + exit 1 + fi + +-if [ -z "$(which ${sock_tool})" ]; then ++if [ -z "$(command -v ${sock_tool})" ]; then + echo "ss not on PATH; exiting" + exit 1 + fi + +-if [[ ! -z ${simulator_bin} && -z "$(which ${simulator_bin})" ]]; then ++if [[ ! -z ${simulator_bin} && -z "$(command -v ${simulator_bin})" ]]; then + echo "${simulator_bin} not on PATH; exiting" + exit 1 + fi +-- +2.43.2 + diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.1.1-r1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.1.1-r1.ebuild new file mode 100644 index ..eb0fa6293ad5 --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.1.1-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/4" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls +policy static-libs test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls ) + policy? ( openssl !mbedtls ) +" + +RDEPEND=" + acct-group/tss + acct-user/tss + sys-apps/util-linux:=[${MULTILIB_USEDEP}] + fapi? ( +
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: 798f98a615dff20f47a97bfa01309b4029aa8c5a Author: Christopher Byrne gmail com> AuthorDate: Fri Apr 26 16:14:10 2024 + Commit: Sam James gentoo org> CommitDate: Sun May 5 11:36:02 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=798f98a6 app-crypt/tpm2-tss: add 4.0.2 Bug: https://bugs.gentoo.org/931055 Signed-off-by: Christopher Byrne gmail.com> Signed-off-by: Sam James gentoo.org> app-crypt/tpm2-tss/Manifest| 1 + ...pm2-tss-4.0.2-Dont-install-files-into-run.patch | 26 + app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild | 109 + 3 files changed, 136 insertions(+) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index e5a285d2b763..32adf0e5b611 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1 +1,2 @@ DIST tpm2-tss-4.0.1.tar.gz 1787139 BLAKE2B 627cdefeff6c64148f9da1425922a0a7a72debcee4930ffab208a3b9b66127c2d4f923e3e105bfd45410cdb13c19cb40cc15a720e9a05dd32ff622dabf5fcc32 SHA512 ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d +DIST tpm2-tss-4.0.2.tar.gz 1833499 BLAKE2B 91e70bcc66099fe5d7d53cf98a2c46582e96f204fc7bcb89c46497cc811ca1eb39c752be077a6e8132fc980a6581a2df075fcc6670d646d1270e642c144f043c SHA512 e92038de985ac928bf87a707b0f9b190aaa936827923ea5e3cbdda216cbc6cf8590af650c59c2e1e420ad9914dc6c1f14232ab7930ffc1a50fb0c49fdef6d3f0 diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch new file mode 100644 index ..022cd6145c18 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile.am b/Makefile.am +index 07b7a2bf..e478fc77 100644 +--- a/Makefile.am b/Makefile.am +@@ -770,13 +770,11 @@ define set_tss_permissions + endef + + define make_fapi_dirs +-($(call make_tss_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/) || true) && \ + ($(call make_tss_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) + endef + + define set_fapi_permissions + if test -z "${DESTDIR}"; then \ +-($(call set_tss_permissions,$(DESTDIR)$(runstatedir)/tpm2-tss)) && \ + ($(call set_tss_permissions,$(DESTDIR)$(localstatedir)/lib/tpm2-tss)) \ + fi + endef +@@ -787,7 +785,6 @@ endef + + define check_fapi_dirs + if test -z "${DESTDIR}"; then \ +-($(call check_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/)) && \ + ($(call check_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) \ + fi; + endef diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild new file mode 100644 index ..0c4f132f9e5c --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/4" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls +policy static-libs test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls ) + policy? ( openssl !mbedtls ) +" + +RDEPEND=" + acct-group/tss + acct-user/tss + sys-apps/util-linux:=[${MULTILIB_USEDEP}] + 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-text/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.2-Dont-install-files-into-run.patch" + "${FILESDIR}/${PN}-4.0.1-Make-sysusers-and-tmpfiles-optional.patch" + "${FILESDIR}/${PN}-4.0.1-Do-not-consider-failures-to-write-files-in-sys-hard.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() { + default + eautoreconf +} + +multilib_src_configure() { + # Fails with inlining + filter-flags -fno-semantic-interposition + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + +
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: 0662bc0999c4b695e6f0f8f7869a0e3db4a550ab Author: David Seifert gentoo org> AuthorDate: Sun Jun 25 22:29:58 2023 + Commit: David Seifert gentoo org> CommitDate: Sun Jun 25 22:29:58 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0662bc09 app-crypt/tpm2-tss: drop 3.2.0-r4, 3.2.1, 3.2.2, 4.0.0 Bug: https://bugs.gentoo.org/891519 Signed-off-by: David Seifert gentoo.org> app-crypt/tpm2-tss/Manifest| 4 - ...2.0-Dont-run-systemd-sysusers-in-Makefile.patch | 57 .../tpm2-tss/files/tpm2-tss-3.2.0-slibtool.patch | 49 --- ...st-fix-usage-of-FILE-in-unit-test-fapi-io.patch | 146 - ...2.1-Dont-run-systemd-sysusers-in-Makefile.patch | 61 - app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild| 104 --- app-crypt/tpm2-tss/tpm2-tss-3.2.1.ebuild | 90 - app-crypt/tpm2-tss/tpm2-tss-3.2.2.ebuild | 90 - app-crypt/tpm2-tss/tpm2-tss-4.0.0.ebuild | 93 - 9 files changed, 694 deletions(-) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index b76f835b2de8..e5a285d2b763 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1,5 +1 @@ -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 -DIST tpm2-tss-3.2.2.tar.gz 1638857 BLAKE2B 164c54b7c43a3379a9aae86fd39788a0906030bc2df9a96d7264635b0e281088f46f470d28098e194e77067f1c4412a8f1ef30d7877eb2410aeefee2d3639409 SHA512 efa71d04de907f74cf0e451a55124cb6fa804fddc2530ecc728a76030e0ae1e8597048c81cd4316397318f273e95754cf85745fc49966208b60babd398989aa6 -DIST tpm2-tss-4.0.0.tar.gz 1787084 BLAKE2B 9b9d466eab77ae71ec916c911f9e1321013fe49594e103610fcb03492a2f20e811a2faddc2237519b710a1931226d5664581cd671d2318319a92e16bcb5ccfb4 SHA512 1058aa74e2358bfb60a17b85291dc642d40b49bb076453810c5b2b0c37c72671c319d783c879f719ccbe7aaeb5f464e0144c6ee12d28242b477be5d579cb3f9c DIST tpm2-tss-4.0.1.tar.gz 1787139 BLAKE2B 627cdefeff6c64148f9da1425922a0a7a72debcee4930ffab208a3b9b66127c2d4f923e3e105bfd45410cdb13c19cb40cc15a720e9a05dd32ff622dabf5fcc32 SHA512 ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch deleted file mode 100644 index 90b12801226b.. --- a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index ce19aac3..22a8c075 100644 a/Makefile.am -+++ b/Makefile.am -@@ -498,10 +498,9 @@ 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 - --EXTRA_DIST += dist/sysusers.d/tpm2-tss.conf dist/tmpfiles.d/tpm2-tss-fapi.conf.in -+EXTRA_DIST += dist/tmpfiles.d/tpm2-tss-fapi.conf.in - CLEANFILES += tpm2-tss-fapi.conf - - # We have to do this ourselves, in order to get absolute paths -@@ -726,13 +725,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 6482944f..44c0e383 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
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: a638393fbda99d061ed5e9298031431ceb679fd6 Author: Christopher Byrne gmail com> AuthorDate: Mon Jan 2 17:46:11 2023 + Commit: Viorel Munteanu gentoo org> CommitDate: Fri Jan 20 07:25:52 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a638393f app-crypt/tpm2-tss: add 4.0.0 Signed-off-by: Christopher Byrne gmail.com> Closes: https://github.com/gentoo/gentoo/pull/28937 Signed-off-by: Viorel Munteanu gentoo.org> app-crypt/tpm2-tss/Manifest| 1 + ...pm2-tss-4.0.0-Dont-install-files-into-run.patch | 26 ++ app-crypt/tpm2-tss/metadata.xml| 1 + app-crypt/tpm2-tss/tpm2-tss-4.0.0.ebuild | 93 ++ 4 files changed, 121 insertions(+) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index 3a945d93a771..4058c153abbc 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1,2 +1,3 @@ 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 +DIST tpm2-tss-4.0.0.tar.gz 1787084 BLAKE2B 9b9d466eab77ae71ec916c911f9e1321013fe49594e103610fcb03492a2f20e811a2faddc2237519b710a1931226d5664581cd671d2318319a92e16bcb5ccfb4 SHA512 1058aa74e2358bfb60a17b85291dc642d40b49bb076453810c5b2b0c37c72671c319d783c879f719ccbe7aaeb5f464e0144c6ee12d28242b477be5d579cb3f9c diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.0.0-Dont-install-files-into-run.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.0-Dont-install-files-into-run.patch new file mode 100644 index ..ca51ab7f9382 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.0-Dont-install-files-into-run.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile.am b/Makefile.am +index 2c81cfa9..2673995c 100644 +--- a/Makefile.am b/Makefile.am +@@ -767,13 +767,11 @@ define set_tss_permissions + endef + + define make_fapi_dirs +-($(call make_tss_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/) || true) && \ + ($(call make_tss_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) + endef + + define set_fapi_permissions + if test -z "${DESTDIR}"; then \ e +-($(call set_tss_permissions,$(DESTDIR)$(runstatedir)/tpm2-tss)) && \ + ($(call set_tss_permissions,$(DESTDIR)$(localstatedir)/lib/tpm2-tss)) \ + fi + endef +@@ -784,7 +782,6 @@ endef + + define check_fapi_dirs + if test -z "${DESTDIR}"; then \ +-($(call check_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/)) && \ + ($(call check_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) \ + fi; + endef diff --git a/app-crypt/tpm2-tss/metadata.xml b/app-crypt/tpm2-tss/metadata.xml index 0a726fa2d171..ada5791c33d5 100644 --- a/app-crypt/tpm2-tss/metadata.xml +++ b/app-crypt/tpm2-tss/metadata.xml @@ -13,6 +13,7 @@ Enable feature API (requires openssl as crypto backend) Use net-libs/mbedtls as crypto engine Use dev-libs/openssl as crypto engine + Enable policy library (requires openssl as crypto backend) tpm2-software/tpm2-tss diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.0.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.0.0.ebuild new file mode 100644 index ..ba650e60ee44 --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.0.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/4" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls +policy static-libs test" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls ) + policy? ( 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 +
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: 3bdbc2eaa6fa54078c93fc70915d2b5ec9950f3f Author: Christopher Byrne gmail com> AuthorDate: Tue Dec 13 19:07:20 2022 + Commit: Sam James gentoo org> CommitDate: Wed Dec 21 23:35:41 2022 + 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 ..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 ..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
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: 1b00c3313f3cafb09b94ec635dbadb86547744c5 Author: Christopher Byrne gmail com> AuthorDate: Tue Sep 27 23:22:13 2022 + Commit: Sam James gentoo org> CommitDate: Wed Sep 28 00:06:47 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b00c331 app-crypt/tpm2-tss: Fix tests under musl Closes: https://bugs.gentoo.org/833530 Signed-off-by: Christopher Byrne gmail.com> Closes: https://github.com/gentoo/gentoo/pull/27503 Signed-off-by: Sam James gentoo.org> ...st-fix-usage-of-FILE-in-unit-test-fapi-io.patch | 146 + app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild| 1 + 2 files changed, 147 insertions(+) diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch new file mode 100644 index ..aff792a28263 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-test-fix-usage-of-FILE-in-unit-test-fapi-io.patch @@ -0,0 +1,146 @@ +https://github.com/tpm2-software/tpm2-tss/commit/bda22252507124bb8e466ac2f0c61d5ebed9027d +https://github.com/tpm2-software/tpm2-tss/pull/2423 +https://bugs.gentoo.org/833530 + +From bda22252507124bb8e466ac2f0c61d5ebed9027d Mon Sep 17 00:00:00 2001 +From: William Roberts +Date: Mon, 26 Sep 2022 15:16:15 -0500 +Subject: [PATCH] test: fix usage of FILE in unit test fapi-io + +The unit test had a static FILE structure used to pass to stdio FILE * +routines as a dummy value to indicate to use the __real_xxx variant of +the mocked function. This doesn't work when FILE is opaque as the +compiler cannot figure out how much storage space is needed for a FILE +struct. + +Fix this by passing a dummy pointer to a data type the compiler knows +about and casting it to FILE pointer. + +Fixes: #2419 + +Signed-off-by: William Roberts +--- + test/unit/fapi-io.c | 30 -- + 1 file changed, 16 insertions(+), 14 deletions(-) + +diff --git a/test/unit/fapi-io.c b/test/unit/fapi-io.c +index dbadcb47..8a883a43 100644 +--- a/test/unit/fapi-io.c b/test/unit/fapi-io.c +@@ -38,7 +38,9 @@ + bool wrap_fcntl_test = false; + bool wrap_malloc_test = false; + bool wrap_read_test = false; +-FILE mock_stream; /**< stream will be used to activate wrapper.*/ ++char _mock_stream; /**< stream will be used to activate wrapper.*/ ++ ++#define MOCK_STREAM ((FILE *)(&_mock_stream)) + + /* + * Wrapper functions for file system io. +@@ -74,7 +76,7 @@ __real_fclose(FILE *stream, ...); + int + __wrap_fclose(FILE *stream, ...) + { +-if (stream != _stream) { ++if (stream != MOCK_STREAM) { + return __real_fclose(stream); + } + return mock_type(int); +@@ -86,7 +88,7 @@ __real_fseek(FILE *stream, long offset, int whence, ...); + int + __wrap_fseek(FILE *stream, long offset, int whence, ...) + { +-if (stream != _stream) { ++if (stream != MOCK_STREAM) { + return __real_fseek(stream, offset, whence); + } + return mock_type(int); +@@ -98,7 +100,7 @@ __real_ftell(FILE *stream, ...); + long + __wrap_ftell(FILE *stream, ...) + { +-if (stream != _stream) { ++if (stream != MOCK_STREAM) { + return __real_ftell(stream); + } + return mock_type(int); +@@ -135,7 +137,7 @@ __real_fileno(FILE *stream, ...); + int + __wrap_fileno(FILE *stream, ...) + { +-if (stream != _stream) { ++if (stream != MOCK_STREAM) { + return __real_fileno(stream); + } + return 1; +@@ -179,7 +181,7 @@ check_io_read_async(void **state) { + assert_int_equal(r, TSS2_FAPI_RC_IO_ERROR); + + wrap_fcntl_test = true; +-will_return(__wrap_fopen, _stream); ++will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, -1); + will_return_always(__wrap_fclose, 0); + errno = EAGAIN; +@@ -187,8 +189,8 @@ check_io_read_async(void **state) { + r = ifapi_io_read_async(, "tss_unit_dummyf"); + assert_int_equal(r, TSS2_FAPI_RC_IO_ERROR); + +-will_return(__wrap_fopen, _stream); +-will_return(__wrap_fopen, _stream); ++will_return(__wrap_fopen, MOCK_STREAM); ++will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, 0); + will_return(__wrap_fseek, 0); + will_return(__wrap_ftell, 1); +@@ -202,8 +204,8 @@ check_io_read_async(void **state) { + + wrap_malloc_test = false; + +-will_return(__wrap_fopen, _stream); +-will_return(__wrap_fopen, _stream); ++will_return(__wrap_fopen, MOCK_STREAM); ++will_return(__wrap_fopen, MOCK_STREAM); + will_return(__wrap_fcntl, 0); + will_return(__wrap_fseek, 0); + will_return(__wrap_ftell, 1); +@@ -236,7 +238,7 @@ check_io_read_finish(void **state) { + will_return_always(__wrap_fclose, 0); + io.char_buffer = _char_buffer[0]; + io.buffer_length = 10; +-io.stream = _stream; ++io.stream = MOCK_STREAM; + errno = EAGAIN; + r = ifapi_io_read_finish(, [0], ); +
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: ca44589bcf74c1a331ed8948bf2357bcb4d6870a Author: Christopher Byrne gmail com> AuthorDate: Sat Jul 16 00:54:56 2022 + Commit: Joonas Niilola gentoo org> CommitDate: Sat Jul 16 07:16:49 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca44589b app-crypt/tpm2-tss: Remove tss user and group creation machinery Closes: https://github.com/gentoo/gentoo/pull/26274 Signed-off-by: Joonas Niilola gentoo.org> ...2.0-Dont-run-systemd-sysusers-in-Makefile.patch | 57 + app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild| 99 ++ 2 files changed, 156 insertions(+) diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index ..90b12801226b --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.2.0-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,57 @@ +diff --git a/Makefile.am b/Makefile.am +index ce19aac3..22a8c075 100644 +--- a/Makefile.am b/Makefile.am +@@ -498,10 +498,9 @@ 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 + +-EXTRA_DIST += dist/sysusers.d/tpm2-tss.conf dist/tmpfiles.d/tpm2-tss-fapi.conf.in ++EXTRA_DIST += dist/tmpfiles.d/tpm2-tss-fapi.conf.in + CLEANFILES += tpm2-tss-fapi.conf + + # We have to do this ourselves, in order to get absolute paths +@@ -726,13 +725,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 6482944f..44c0e383 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.0-r4.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild new file mode 100644 index ..4591425a0733 --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r4.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools 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 ~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? (
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: 18d079c6cf72da1fea9aa5a5db7fedc6da564475 Author: Christopher Byrne gmail com> AuthorDate: Sat May 22 01:09:44 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Thu Jun 10 08:13:14 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18d079c6 app-crypt/tpm2-tss: Bump to 3.1.0 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Christopher Byrne gmail.com> Signed-off-by: Joonas Niilola gentoo.org> app-crypt/tpm2-tss/Manifest| 1 + ...1.0-Dont-run-systemd-sysusers-in-Makefile.patch | 29 + app-crypt/tpm2-tss/tpm2-tss-3.1.0.ebuild | 75 ++ 3 files changed, 105 insertions(+) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index 25dc36ae177..24f31fe276b 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -2,3 +2,4 @@ DIST tpm2-tss-2.4.3.tar.gz 1439120 BLAKE2B 21acce29f96e8039124874c024b43eb8d2c4f DIST tpm2-tss-2.4.5.tar.gz 1439394 BLAKE2B 644d917f545e93dd81856611522329caf4ff038e4ddb04d761f03339cc7308095abc1c9b46a4d601cad67deea6f917ee5e4236c59f3d7042a7fdf2d33630dd3f SHA512 2c92af07ed1cc3665c19479c00ce5608883081f311192a264a4f7d9119c75ac582596c53b910534c4b66dbb60de2ffd3d6218169748332609c2e0fc89f519259 DIST tpm2-tss-2.4.6.tar.gz 1472883 BLAKE2B e007de07c759e77e377f8569c0c5d94ab57597ea3cb452fb598a47c9b404714a7816c86221d4eacad962436fc7625066d4066f433cd957c37b92d51b0455e2a0 SHA512 f7f7f067605ea30661ac891e22095238689856e22e45f11a6b603cb36ed1ae0724ae52d36f0ee5dd72208da8520457667676ae08107647faa5441a0c9b642f7a DIST tpm2-tss-3.0.3.tar.gz 1489136 BLAKE2B 5bf24cf2c36e579388f62eea06ab3811eab1a89c0cd5d12f6f61cee7f6836487f25fefb864432ff8920931ff37327ca867d1d40fad89e0305d5e1edfb8f0e883 SHA512 54a926db55790250d69c81ac6e436556072057dd7c610d2718689030287dee69d533d4e04b3325dd73d9fc7635dad0bf0a7bfb082957bb51cb420efdb68efaf8 +DIST tpm2-tss-3.1.0.tar.gz 1584690 BLAKE2B cee2807a030b8bab653045cb11dfc7a6a3f7b1e60c1ce4650ba5f0549f29f36ff307e7d53fb5ef9c950b4dae720bdaf35f7cd1e59ebc07b3f16740035e1d5738 SHA512 8967f172c92f1e3e5ba324dbe8afe07bf1bc7179dd755cef9812105f32634f312ee7cc7dfe8e13af69dc219432463f5dc9b93477743de47aba6af1d70b252405 diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.1.0-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.1.0-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index 000..b66b6e79c14 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.1.0-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,29 @@ +diff --git a/Makefile.am b/Makefile.am +index 183289f7..c791896c 100644 +--- a/Makefile.am b/Makefile.am +@@ -689,24 +689,6 @@ endif #FAPI + 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" +-else +- @echo "(call make_fapi_dirs) && (call set_fapi_permissions)" +- @-$(call make_fapi_dirs) && $(call set_fapi_permissions) || echo "WARNING Failed to create the FAPI directories with the correct permissions" +-endif +- @echo "call check_fapi_dirs" +- @$(call check_fapi_dirs) +-endif + + install-data-hook: install-dirs + -if [ ! -z "$(udevrulesprefix)" ]; then \ diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.1.0.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.1.0.ebuild new file mode 100644 index 000..1ca59fe382e --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-3.1.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools linux-info 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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~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 + net-misc/curl ) + mbedtls? ( net-libs/mbedtls:= ) + openssl? ( dev-libs/openssl:= )" +DEPEND="${RDEPEND} + test? ( dev-util/cmocka )"
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: fb7e62b8d311d8bae45b47e61d5b7fd0601d1ab1 Author: Salah Coronya gmail com> AuthorDate: Wed Aug 5 23:16:32 2020 + Commit: Joonas Niilola gentoo org> CommitDate: Sun Sep 6 05:55:17 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb7e62b8 app-crypt/tpm2-tss: Bump to 3.0.0 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Salah Coronya gmail.com> Closes: https://github.com/gentoo/gentoo/pull/17025 Signed-off-by: Joonas Niilola gentoo.org> app-crypt/tpm2-tss/Manifest| 1 + ...0.0-Dont-run-systemd-sysusers-in-Makefile.patch | 16 + app-crypt/tpm2-tss/metadata.xml| 1 + app-crypt/tpm2-tss/tpm2-tss-3.0.0.ebuild | 75 ++ 4 files changed, 93 insertions(+) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index 5e42808b9f8..88f3e328b95 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1,2 +1,3 @@ DIST tpm2-tss-2.4.1.tar.gz 1445103 BLAKE2B c7be91b93d19b5afeddb6ec455db9ba06795f8dc76ee2a0c6cbabbd8f623930d7c9fdf6319497c70790445531d1e36fe3f904f4c1f4bc9254d833b6d19280f1f SHA512 51551d63fa404e23664aaad1b247bd4b1f93812ced1aed144c37f28cdb3adb4e696aa9e93a502c8fa0eb7e9b4376ac9377f0537eb4c717b68c0b014fee7a0643 DIST tpm2-tss-2.4.2.tar.gz 1461987 BLAKE2B 7d37818ba91c4128862206d5179dcde2c5149b5b00807b242a0b4311531ad2da9e8ad435a6b46872aab5eb91777012010a352ba0f478737740175e0353275643 SHA512 db31d216abcefdad76f5d9ff2995c99c552400392a4dec800b962fa1fa3ac83effacca831602a9b7f814045c996a1bb066802c5373b54233aa24ddafd636c27e +DIST tpm2-tss-3.0.0.tar.gz 1509288 BLAKE2B 23c46ba6c9ea2b61703556d3aab5b4e75b1a0242a688c44e8c254a4defd8258e100a933598755373ffec9db3ca0ab9d35e6a290a73851c2a456449e04bd8313a SHA512 ba54904f2cd8cbcca85ce4d4ac5c8650da6ab076e8d8d142e1b7ee75c5e9a645520f1a5ac8ffe5269deceba84762c9074b131296e8b2d4c684ddc335a828d7a8 diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-3.0.0-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-3.0.0-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index 000..fd1d462151f --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-3.0.0-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile.am b/Makefile.am +index f2fa515a..7d2aca29 100644 +--- a/Makefile.am b/Makefile.am +@@ -664,11 +664,6 @@ endif #FAPI + EXTRA_DIST += dist/tpm-udev.rules + + install-dirs: +-if HOSTOS_LINUX +- (systemd-sysusers && systemd-tmpfiles --create) || \ +- ($(call make_tss_user_and_group) && $(call make_fapi_dirs) && ($call set_fapi_permissions)) || true +- $(call check_fapi_dirs) +-endif + + install-data-hook: install-dirs + -if [ ! -z "$(udevrulesprefix)" ]; then \ diff --git a/app-crypt/tpm2-tss/metadata.xml b/app-crypt/tpm2-tss/metadata.xml index ca0c0ecca08..eec8488de47 100644 --- a/app-crypt/tpm2-tss/metadata.xml +++ b/app-crypt/tpm2-tss/metadata.xml @@ -12,6 +12,7 @@ Enable feature API (requires openssl as crypto backend) Use dev-libs/libgcrypt as crypto engine + Use net-libs/mbedtls as crypto engine Use dev-libs/openssl as crypto engine diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.0.0.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.0.0.ebuild new file mode 100644 index 000..b746508251c --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-3.0.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools linux-info 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" +KEYWORDS="~amd64 ~arm ~arm64 ~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 + net-misc/curl ) + mbedtls? ( net-libs/mbedtls:= ) + openssl? ( dev-libs/openssl:= )" +DEPEND="${RDEPEND} + test? ( dev-util/cmocka )" +BDEPEND="virtual/pkgconfig + doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}/${P}-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() { + default + eautoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + $(use_enable doc doxygen-doc) \ + $(use_enable fapi) \ + $(use_enable static-libs static) \ +
[gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/files/, app-crypt/tpm2-tss/
commit: 2139c6d267a9e66da3fb7e477cb3233094a65475 Author: Salah Coronya gmail com> AuthorDate: Sun May 24 19:56:08 2020 + Commit: Joonas Niilola gentoo org> CommitDate: Wed Jun 17 17:00:24 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2139c6d2 app-crypt/tpm2-tss: Bump to version 2.4.1 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Salah Coronya gmail.com> Signed-off-by: Joonas Niilola gentoo.org> app-crypt/tpm2-tss/Manifest| 1 + ...4.1-Dont-run-systemd-sysusers-in-Makefile.patch | 13 ...igure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch | 53 +++ app-crypt/tpm2-tss/tpm2-tss-2.4.1.ebuild | 78 ++ 4 files changed, 145 insertions(+) diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index e25f40f7a50..f810a2ffc5b 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1 +1,2 @@ DIST tpm2-tss-2.4.0.tar.gz 1446509 BLAKE2B bb078719fa85d9ea07b9710b5ac5d2f9c2b842700ed5b26a30ab2708a227b4bd599563c76e648d6f0b9dfe7785a25c049826f953baffdd39113bd62e7b4563df SHA512 763370381584f2124f751f0736e6a8b34428fd52134fd9966f3581e128f3b74b3f1261992f5d6162d7c866e47f7e5519ea80c1d1d39b80d5ed6e067eb2cd35a0 +DIST tpm2-tss-2.4.1.tar.gz 1445103 BLAKE2B c7be91b93d19b5afeddb6ec455db9ba06795f8dc76ee2a0c6cbabbd8f623930d7c9fdf6319497c70790445531d1e36fe3f904f4c1f4bc9254d833b6d19280f1f SHA512 51551d63fa404e23664aaad1b247bd4b1f93812ced1aed144c37f28cdb3adb4e696aa9e93a502c8fa0eb7e9b4376ac9377f0537eb4c717b68c0b014fee7a0643 diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index 000..81c223df957 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 85683f9b..986d4c8d 100644 +--- a/Makefile.am b/Makefile.am +@@ -582,8 +582,6 @@ EXTRA_DIST += dist/tpm-udev.rules + + install-data-hook: + -mv $(DESTDIR)$(udevrulesdir)/tpm-udev.rules $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules +- (systemd-sysusers && systemd-tmpfiles --create) || \ +- ($(call make_tss_user_and_group) && $(call make_fapi_dirs) && ($call set_fapi_permissions)) || true + + uninstall-local: + -rm $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch new file mode 100644 index 000..111c3d75c69 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch @@ -0,0 +1,53 @@ +From 94cc338b0c5b97702e994ec628d684ee2c114547 Mon Sep 17 00:00:00 2001 +From: Tadeusz Struk +Date: Tue, 24 Mar 2020 16:42:14 -0700 +Subject: [PATCH] configure.ac: wrap PKG_CHECK_MODULES in braces + +PKG_CHECK_MODULES needs to be wrapped inside squere +brackets when inside AS_IF, or it spit out errors: + +./configure: line 13054: JSONC_CFLAGS: command not found +./configure: line 13055: C: command not found +./configure: line 13056: JSONC_LIBS: command not found +./configure: line 13155: CURL_CFLAGS: command not found +./configure: line 13156: CURL_LIBS: command not found + +Signed-off-by: Tadeusz Struk +--- + Makefile.am | 2 +- + configure.ac | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 85683f9b..9144a5ad 100644 +--- a/Makefile.am b/Makefile.am +@@ -467,7 +467,7 @@ src_tss2_fapi_libtss2_fapi_la_LIBADD = $(libtss2_sys) $(libtss2_mu) $(libtss2_e + + src_tss2_fapi_libtss2_fapi_la_SOURCES = $(TSS2_FAPI_SRC) + src_tss2_fapi_libtss2_fapi_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/tss2-fapi +-src_tss2_fapi_libtss2_fapi_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LIBS) $(JSON_C_LIBS) $(CURL_LIBS) ++src_tss2_fapi_libtss2_fapi_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LIBS) $(JSONC_LIBS) $(CURL_LIBS) + if HAVE_LD_VERSION_SCRIPT + src_tss2_fapi_libtss2_fapi_la_LDFLAGS += -Wl,--version-script=$(srcdir)/lib/tss2-fapi.map + endif # HAVE_LD_VERSION_SCRIPT +diff --git a/configure.ac b/configure.ac +index a202d4a6..2edf609e 100644 +--- a/configure.ac b/configure.ac +@@ -165,10 +165,10 @@ AS_IF([test "x$enable_fapi" != xno -a "x$with_crypto" != "xossl"], + AC_MSG_ERROR([FAPI has to be compiled with OpenSSL])) + + AS_IF([test "x$enable_fapi" = xyes ], +-PKG_CHECK_MODULES([JSON_C], [json-c])) ++ [PKG_CHECK_MODULES([JSONC], [json-c])]) + + AS_IF([test "x$enable_fapi" = xyes ], +-PKG_CHECK_MODULES([CURL], [libcurl])) ++ [PKG_CHECK_MODULES([CURL], [libcurl])]) + + AC_ARG_WITH([tctidefaultmodule], + [AS_HELP_STRING([--with-tctidefaultmodule], +-- +2.26.2 + diff