summaryrefslogtreecommitdiff
path: root/app-crypt/tpm2-tools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
commite23a08d0c97a0cc415aaa165da840b056f93c997 (patch)
tree4c5f7db60483518201fef36f8cc0712789a08db2 /app-crypt/tpm2-tools
parent391b5b359a346aff490103da7dddc85047f83830 (diff)
gentoo resync : 08.10.2021
Diffstat (limited to 'app-crypt/tpm2-tools')
-rw-r--r--app-crypt/tpm2-tools/Manifest6
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch34
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch33
-rw-r--r--app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild (renamed from app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild)44
4 files changed, 56 insertions, 61 deletions
diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest
index 68948400c880..cc01d183fece 100644
--- a/app-crypt/tpm2-tools/Manifest
+++ b/app-crypt/tpm2-tools/Manifest
@@ -1,8 +1,8 @@
AUX tpm2-tools-4.3.0-Remove-WError.patch 360 BLAKE2B 440f48fca6e8aaf9b2c0fd094011738c467a22dc31bd94b53f6788b8fa52c00c5d7ebe074434be60b6370dcf1e94ee4d57bcfc93857fcf03dbdff30c8e157445 SHA512 0d246d1446b5b2ebca0e12467c746a731897311448840a7aac35b57d22edcdec0c9f424d1c95c9614d969a57dba458bbbad8826516cc05329b47d2dad05318fe
-AUX tpm2-tools-5.1.1-fix-tpm-checkquote.patch 1193 BLAKE2B d65717bc15b490c99123ad8022dace6b337b638b797d6f5b0aa783e04fd4f12f2f4281bcc5d53728a6b612c6106aa2ab1593bce9833fcd4109e94de1a1718135 SHA512 a38cdc124eaf1321d954dc969c3c5a409a90ee7d5d25eb0bb692b9a56f8340a6f783852e995a4e9790f5472c47d8475ad083b76015ccfddb7d74ea167cc54364
AUX tpm2-tools-5.1.1-no-efivar-automagic.patch 1083 BLAKE2B 10a8299a28ee54339ac73692dc54475da3044d3afcfe570d6c72f5d8ace2bbf3faf5242002be02c4a765ba9b9c37ba9777d9b4b8bac416e6721d9b8660d19bf2 SHA512 4622e235ef5202cc3448fbc67f362ce36396ca04892c340f275f67c93d5bb2857a14094329ec499c4f7215ac10002b70d18cfc2bdef1474d93f556c5759383ae
+AUX tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch 1380 BLAKE2B ffbbe59cbfd4a411544ef7f03ed04c73afc774edebaa2da8deb11e7fe4f321b88b686d3138fd5524b2279407518dda32de0e1cb96a5517ba87f8cc8c9ddb2be5 SHA512 557ad07048e288a9611222b920e8c82fab9852dde04da2b57981cb04ce3bb9d4ea40c57ba24fb2b3dc09cacc16ef731d11428d0603d757f7f7adc2023c5ca779
DIST tpm2-tools-4.3.2.tar.gz 887708 BLAKE2B ee6fe3d0566138d6289d1a91252ccb106d36ff80d55f2d6f9ee30c8e16338d706e80085ac5f4f56a79bcb339e5dcb240efcf71d4003bcffdad366f3cd7a1165b SHA512 1aa47c62c3d2a83195ec649e50c0be2c8be39f926806d8d7cb96edc499c385d527661813e02024e98f83ae9ebcb22d7dadc507ddfab48be9bbe428d9439d7ee1
-DIST tpm2-tools-5.1.1.tar.gz 1044427 BLAKE2B 885ff61ad971c95d067bf8f9339de289f082f3103d1c382f45ac3ffbd4d5effc343ddc3c2c74b97b9d31f3f823d264991d1726c1f9c21d5c9b82ac1cdf714d3f SHA512 4e094dcffb66103773d85e866ab9ba8db5d0f205ff9658e08fe14e8e41250570a7f7274b4048934adf256ea41650fa498fc3d6da2786adc241a4bf2e8f7bf78e
+DIST tpm2-tools-5.2.tar.gz 1072078 BLAKE2B 27d035e0f44029db57477a1fd10e1cee9b470ad54411297985cb7f33ba7bbb7a94ac392815e32287d69abf928dce0c361703542b812ae88b208ddca645bb3be2 SHA512 9fb5dc298717a8a57c89d286e3590370a096c81b14d2d8d4eb5fca140d66148a8e24727ee04fb02057bbfcc3ede50e93ba0ef22396888c9df48bf6f42a5d6e6b
EBUILD tpm2-tools-4.3.2.ebuild 1052 BLAKE2B 7c6f919d4a43a7c990803e12b9f2233c018975c01fe792aa6ea49a944ec4865c57fb947803c8e4b3360fcd5933e24607b0750fe90cdc9272c261f579eecc8997 SHA512 ed36b9a1721c02268e5990b9d63721bbcf0c09eb2360e3dc02f295d83c01b2f98aeb306def7052a79de6b98e10c7edc1ec46aff2009e1babacdbc681a9e33dfd
-EBUILD tpm2-tools-5.1.1-r2.ebuild 1648 BLAKE2B 73ab30ec326263a71d298d5f88046ec3379e1bb4b13e4ebaeba67ebccb83cbd126103618dac1240db8c6562ede67bd8ebd52b27378e031c4afd831fe2c513f86 SHA512 6faf487b4da7b073d79ec59475f84e3e048302596ca97988c2ada9b26e8c7ac18b0699b456f56eed8ebaef6ae161afc76371f29be1ff235c4534a97fedb5289e
+EBUILD tpm2-tools-5.2.ebuild 1560 BLAKE2B 01459fa5e19f8b2e188ad22ab0d4b6baf011b678d1644d6bc567a3c330e9a807754764e96cae438e7d9a934b504e71b835985fdc580400c0f848409cac0d39dd SHA512 03e01d581da6fdd9a78d0a23bb4f9eca67088e983b53c31af9c97ecd015644464a2ae57cfb551b4f5180ab085dceff5744f61651689cd0e6fb88000f2a60a8a1
MISC metadata.xml 560 BLAKE2B fe8daaba2a7586247537f8ed7b92769676b20f2c1377f7bb582dff49e06cf3f9beba4f79e28f10ea76d67d089eb152b060b091414dd9b47c5694ca153211421f SHA512 a744fcc50c7e44b1939190150404aee9054eab8e921e6f63cafa58dc80be5f20692632509de85399b6a9633701da72fd951e8bcfbe9e5177f315fa1dcbcc9ee5
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch
deleted file mode 100644
index 73fb0e3f487a..000000000000
--- a/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3d7edb1c70cba6c34c71c9b856c07b8adcebb15c Mon Sep 17 00:00:00 2001
-From: Alberto Planas <aplanas@suse.com>
-Date: Thu, 17 Jun 2021 11:07:25 +0200
-Subject: [PATCH] tpm2_checkquote: fix uninitialized variable
-
-The variable `temp_pcrs` is uninitialized, and later partially
-uninitialized when reading the selection data from file.
-
-When activating lto optimizations, this bug presents itself showing an
-error during the read of the quote:
-
-ERROR: Malformed PCR file, pcr count cannot be greater than 32, got: ...
-
-Fixes: #2767
-
-Co-authored-by: Martin Liska <marxin.liska@gmail.com>
-Signed-off-by: Alberto Planas <aplanas@suse.com>
----
- tools/misc/tpm2_checkquote.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/misc/tpm2_checkquote.c b/tools/misc/tpm2_checkquote.c
-index 531508579..8d780f111 100644
---- a/tools/misc/tpm2_checkquote.c
-+++ b/tools/misc/tpm2_checkquote.c
-@@ -376,7 +376,7 @@ static tool_rc init(void) {
- TPM2B_ATTEST *msg = NULL;
- TPML_PCR_SELECTION pcr_select;
- tpm2_pcrs *pcrs;
-- tpm2_pcrs temp_pcrs;
-+ tpm2_pcrs temp_pcrs = {};
- tool_rc return_value = tool_rc_general_error;
-
- msg = message_from_file(ctx.msg_file_path);
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch
new file mode 100644
index 000000000000..e1094647bdfd
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch
@@ -0,0 +1,33 @@
+From 3d80fad66694ad14a58dd89204a25e9248c4ab0c Mon Sep 17 00:00:00 2001
+From: Jonas Witschel <git@diabonas.de>
+Date: Wed, 29 Sep 2021 17:08:07 +0200
+Subject: [PATCH] testparms: fix condition for negative test
+
+Commit e858dec76686bb4c42e74e0984b433231e530f93 ("testparms: ensure curve not
+supported before negative test") is supposed to ensure that the negative test
+is run only if ecc521 is *not* supported, but instead it runs the negative test
+if ecc521 is *available*. This worked anyway for libtpms < 0.9.0 because camellia
+was not supported, but since libtpms 0.9.0 added support for this algorithm, the
+test suite fails now with swtpm.
+
+Signed-off-by: Jonas Witschel <git@diabonas.de>
+---
+ test/integration/tests/testparms.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/integration/tests/testparms.sh b/test/integration/tests/testparms.sh
+index 8c3548e5..a587a60a 100644
+--- a/test/integration/tests/testparms.sh
++++ b/test/integration/tests/testparms.sh
+@@ -63,7 +63,7 @@ else
+ fi
+
+ # Attempt to specify a suite that is not supported (error from TPM)
+-if tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then
++if ! tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then
+ if tpm2 testparms "ecc521:ecdsa:camellia" &>/dev/null; then
+ echo "tpm2 testparms succeeded while it shouldn't or TPM failed"
+ exit 1
+--
+2.32.0
+
diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild
index 6ede7d5e055c..f5db2002958f 100644
--- a/app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild
+++ b/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild
@@ -1,20 +1,23 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8,9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit autotools bash-completion-r1 python-single-r1
DESCRIPTION="Tools for the TPM 2.0 TSS"
HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
-SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
+SRC_URI="https://github.com/tpm2-software/tpm2-tools/releases/download/${PV}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+fapi test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
RDEPEND=">=app-crypt/tpm2-tss-3.0.1[fapi?]
dev-libs/openssl:=
net-misc/curl
@@ -24,30 +27,28 @@ DEPEND="${RDEPEND}
test? (
app-crypt/swtpm
app-crypt/tpm2-abrmd
- app-editors/vim-core
- dev-tcltk/expect
dev-util/cmocka
- dev-python/pyyaml
)"
BDEPEND="virtual/pkgconfig
- sys-devel/autoconf-archive"
-
-RESTRICT="!test? ( test )"
-REQUIRED_USE=" ${PYTHON_REQUIRED_USE} "
+ sys-devel/autoconf-archive
+ test? (
+ app-editors/vim-core
+ dev-tcltk/expect
+ $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
+ )
+ ${PYTHON_DEPS}"
-# One of the tests fails without this patch. See
-# https://github.com/tpm2-software/tpm2-tools/issues/2767
PATCHES=(
- "${FILESDIR}/${PN}-5.1.1-fix-tpm-checkquote.patch"
"${FILESDIR}/${PN}-5.1.1-no-efivar-automagic.patch"
+ "${FILESDIR}/${PN}-5.2-testparms-fix-condition-for-negative-test.patch"
)
src_prepare() {
+ default
sed -i \
"s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/" \
- "${S}/configure.ac" || die
- "${S}/scripts/utils/man_to_bashcompletion.sh"
- default
+ "configure.ac" || die
+ "./scripts/utils/man_to_bashcompletion.sh" || die
eautoreconf
}
@@ -61,12 +62,7 @@ src_configure() {
src_install() {
default
-
- mv "${D}/$(get_bashcompdir)/tpm2_completion.bash" \
- "${D}/$(get_bashcompdir)/tpm2" || die
- for B in "${D}"/usr/bin/tpm2_*
- do
- TPM2_UTILS="${TPM2_UTILS} $(basename ${B})"
- done
- bashcomp_alias tpm2 ${TPM2_UTILS}
+ mv "${ED}"/$(get_bashcompdir)/tpm2{_completion.bash,} || die
+ local utils=( "${ED}"/usr/bin/tpm2_* )
+ bashcomp_alias tpm2 "${utils[@]##*/}"
}