From b447ac3a6d1bb09ddb6a5686620670e223b37642 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 1 Oct 2023 11:42:50 +0100 Subject: gentoo auto-resync : 01:10:2023 - 11:42:49 --- dev-python/tpm2-pytss/Manifest | 3 +- ...-add-check-for-renamed-cryptography-types.patch | 45 ++++++++++++++++++++++ dev-python/tpm2-pytss/tpm2-pytss-2.1.0-r1.ebuild | 44 +++++++++++++++++++++ dev-python/tpm2-pytss/tpm2-pytss-2.1.0.ebuild | 38 ------------------ 4 files changed, 91 insertions(+), 39 deletions(-) create mode 100644 dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch create mode 100644 dev-python/tpm2-pytss/tpm2-pytss-2.1.0-r1.ebuild delete mode 100644 dev-python/tpm2-pytss/tpm2-pytss-2.1.0.ebuild (limited to 'dev-python/tpm2-pytss') diff --git a/dev-python/tpm2-pytss/Manifest b/dev-python/tpm2-pytss/Manifest index 8a8ca986a732..016628986aea 100644 --- a/dev-python/tpm2-pytss/Manifest +++ b/dev-python/tpm2-pytss/Manifest @@ -1,3 +1,4 @@ +AUX tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch 1556 BLAKE2B a3346aa7a685514b2dab15c713ae1661e8edbfc91414a2c2d0cfe939fa7761c551095a03156119bcb73cbe8605abf80446f6fbc9ee7efdafd45f39cc88074679 SHA512 68746d0f71141ea4f8add786aec8f04d50e4b2fb5883d7cecea5e9eab13682bee4bf177bf9351f9a7caa9494430e608c4eb70aa9ca82bf42c379dfe6ddcbe1d5 DIST tpm2-pytss-2.1.0.tar.gz 203244 BLAKE2B f960fc08c12d10835ec7127e47842ea82b760e2de4fb3060a2f55f9bab5396cbe6f8edd07cb35b98d90ba8ec22c2d3ff287acbad47feac05f02df38b154f2132 SHA512 b4d8b3a0124e67278f08ff72d3635221e84ae26b6a5489ee159e641931aa9045b4b5111ed02d5ff86d69bd89b8460b2592a3fdb94742562351e41783c78184ba -EBUILD tpm2-pytss-2.1.0.ebuild 915 BLAKE2B 48dccd531172289afb2e3b8a006c32e42f3d721130a4568c3638aab6dc0187aecb102a19aa1a95ec8b7dfa08e7498080e87c5824c3e08596b376148a6dc32d48 SHA512 ae910cfb461ddf7e921d02f9c86130056a9dad184325906ac5e157c8ca2339c97b11d70f8b42f111310467e0dcbac140e487531cf99bb4fa8583c9a9d5a1453e +EBUILD tpm2-pytss-2.1.0-r1.ebuild 1026 BLAKE2B f3c3553bc01cbb83ca7e26516b057f0cc83b67ec3e5d03c0465b9c1224a744b5805414774e75aa03ba21342361df2538aa223cbec130e2a33049b1be1f7b133e SHA512 1ed9a338ece9f58816a77c2364bb7f00dbe15558cf3a2358b9bc1223f67f863bfdc71a90d703869ce6735febd72710fec20824c91e9c474f7b42db2dca7b5a35 MISC metadata.xml 648 BLAKE2B e4de9aae579210454f1a71043de7073c1aa7ead9c5acdea48ec2c8ebf5665ebb6837f198b6de49f7ae58bd1f5062ed4f8ca7092df56d8904aecd16bc226d95cd SHA512 dd87ec10b28530281c08d57d86a5004178e4eda729a43690ad4ab84effe246b34d777ec56c66d61a1e0335d2b9c1599366aa55bc58477f7c2dfa4eec5ab7d9ac diff --git a/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch b/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch new file mode 100644 index 000000000000..c1aeaee4dcd1 --- /dev/null +++ b/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch @@ -0,0 +1,45 @@ +From e4006e6066c015d9ed55befa9b98247fbdcafd7d Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Mon, 26 Jun 2023 12:15:41 +0200 +Subject: [PATCH] test: add check for renamed cryptography types + +Some types have changed their names in newer cryptography release, so add them to the tests + +Signed-off-by: Erik Larsson +--- + test/test_crypto.py | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/test/test_crypto.py b/test/test_crypto.py +index 92cda00..7d7466e 100644 +--- a/test/test_crypto.py ++++ b/test/test_crypto.py +@@ -596,11 +596,23 @@ class CryptoTest(TSS2_EsapiTest): + + with self.assertRaises(ValueError) as e: + TPMT_SENSITIVE.from_pem(der) +- self.assertEqual(str(e.exception), "unsupported key type: _DSAPrivateKey") ++ self.assertIn( ++ str(e.exception), ++ ( ++ "unsupported key type: _DSAPrivateKey", ++ "unsupported key type: DSAPrivateKey", ++ ), ++ ) + + with self.assertRaises(ValueError) as e: + TPMT_PUBLIC.from_pem(dsa_public_key) +- self.assertEqual(str(e.exception), "unsupported key type: _DSAPublicKey") ++ self.assertIn( ++ str(e.exception), ++ ( ++ "unsupported key type: _DSAPublicKey", ++ "unsupported key type: DSAPublicKey", ++ ), ++ ) + + def test_from_pem_with_symmetric(self): + sym = TPMT_SYM_DEF_OBJECT(algorithm=TPM2_ALG.AES) +-- +2.41.0 + diff --git a/dev-python/tpm2-pytss/tpm2-pytss-2.1.0-r1.ebuild b/dev-python/tpm2-pytss/tpm2-pytss-2.1.0-r1.ebuild new file mode 100644 index 000000000000..18d96bdbc4e2 --- /dev/null +++ b/dev-python/tpm2-pytss/tpm2-pytss-2.1.0-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python bindings for TSS" +HOMEPAGE=" + https://pypi.org/project/tpm2-pytss + https://github.com/tpm2-software/tpm2-pytss +" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="+fapi test" + +RDEPEND="app-crypt/tpm2-tss:=[fapi=] + fapi? ( >=app-crypt/tpm2-tss-3.0.3:= ) + dev-python/cffi[${PYTHON_USEDEP}] + dev-python/asn1crypto[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/pycparser[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}]" + +DEPEND="${RDEPEND} + test? ( app-crypt/swtpm )" + +BDEPEND="dev-python/setuptools-scm[${PYTHON_USEDEP}] + dev-python/pkgconfig[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}/${PN}-2.1.0-test-add-check-for-renamed-cryptography-types.patch" + ) + +export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} + +distutils_enable_tests pytest diff --git a/dev-python/tpm2-pytss/tpm2-pytss-2.1.0.ebuild b/dev-python/tpm2-pytss/tpm2-pytss-2.1.0.ebuild deleted file mode 100644 index 087095e3631c..000000000000 --- a/dev-python/tpm2-pytss/tpm2-pytss-2.1.0.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYPI_NO_NORMALIZE=1 -PYTHON_COMPAT=( python3_{9..11} ) -inherit distutils-r1 pypi - -DESCRIPTION="Python bindings for TSS" -HOMEPAGE=" - https://pypi.org/project/tpm2-pytss - https://github.com/tpm2-software/tpm2-pytss -" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="+fapi test" - -RDEPEND="app-crypt/tpm2-tss:=[fapi=] - fapi? ( >=app-crypt/tpm2-tss-3.0.3:= ) - dev-python/cffi[${PYTHON_USEDEP}] - dev-python/asn1crypto[${PYTHON_USEDEP}] - dev-python/cryptography[${PYTHON_USEDEP}] - dev-python/pycparser[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}]" - -DEPEND="${RDEPEND} - test? ( app-crypt/swtpm )" - -BDEPEND="dev-python/setuptools-scm[${PYTHON_USEDEP}] - dev-python/pkgconfig[${PYTHON_USEDEP}]" - -export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} - -distutils_enable_tests pytest -- cgit v1.2.3