import python-tpm2-pytss-2.3.0-1.el10

cs10 imports/cs10/python-tpm2-pytss-2.3.0-1.el10
MSVSphere Packaging Team 4 months ago
commit 45c64ea307
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/tpm2-pytss-2.3.0.tar.gz

@ -0,0 +1 @@
279444ed9ed1e8ea7e43c88e29af2ca84cf285a2 SOURCES/tpm2-pytss-2.3.0.tar.gz

@ -0,0 +1,36 @@
From 3cd9d2e5f9b4760c4c178c6e6c23247249012611 Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Wed, 3 Jul 2024 18:26:34 +0200
Subject: [PATCH 1/2] tests: Use p384 instead of p192
The p192 is not available on all platforms, such as Fedora.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
---
test/test_cryptography.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/test_cryptography.py b/test/test_cryptography.py
index ed3dd6f..7f1bad5 100644
--- a/test/test_cryptography.py
+++ b/test/test_cryptography.py
@@ -297,14 +297,14 @@ class TestCryptography(TSS2_EsapiTest):
)
privkey = tpm_ecc_private_key(self.ectx, handle)
- peer_key = ec.generate_private_key(ec.SECP192R1())
+ peer_key = ec.generate_private_key(ec.SECP384R1())
peer_public_key = peer_key.public_key()
with self.assertRaises(ValueError) as e:
privkey.exchange(ec.ECDH(), peer_public_key)
self.assertEqual(
str(e.exception),
- "curve mismatch for peer key, got secp192r1, expected secp256r1",
+ "curve mismatch for peer key, got secp384r1, expected secp256r1",
)
def test_ecc_no_sign(self):
--
2.45.2

@ -0,0 +1,35 @@
From 8e4ee856ac15bb1e1c3818d2d6956f76ee3c673a Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Wed, 3 Jul 2024 18:26:44 +0200
Subject: [PATCH 2/2] tests: Fix typo in the curve name
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
---
test/test_policy.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/test_policy.py b/test/test_policy.py
index 5f56e21..af0c45f 100644
--- a/test/test_policy.py
+++ b/test/test_policy.py
@@ -531,7 +531,7 @@ class TestPolicy(TSS2_EsapiTest):
def test_exec_sign_callback(self):
if not self._has_secp192r1:
- self.skipTest("cryptography doesn't have secp129r1")
+ self.skipTest("cryptography doesn't have secp192r1")
private_key = textwrap.dedent(
"""
-----BEGIN PRIVATE KEY-----
@@ -605,7 +605,7 @@ class TestPolicy(TSS2_EsapiTest):
def test_exec_polauth_callback(self):
if not self._has_secp192r1:
- self.skipTest("cryptography doesn't have secp129r1")
+ self.skipTest("cryptography doesn't have secp192r1")
private_key = textwrap.dedent(
"""
-----BEGIN PRIVATE KEY-----
--
2.45.2

@ -0,0 +1,109 @@
%global pypi_name tpm2-pytss
%global _name tpm2_pytss
Name: python-%{pypi_name}
Version: 2.3.0
Release: 1%{?dist}
Summary: TPM 2.0 TSS Bindings for Python
License: BSD-2-Clause
URL: https://github.com/tpm2-software/tpm2-pytss
Source: %{pypi_source %{pypi_name}}
Patch0: 0001-tests-Use-p384-instead-of-p192.patch
Patch1: 0002-tests-Fix-typo-in-the-curve-name.patch
BuildRequires: python3-devel
BuildRequires: python3-pytest
%if %{undefined rhel}
BuildRequires: python3-pytest-xdist
%endif
BuildRequires: tpm2-tss-devel >= 2.0.0
BuildRequires: gcc
# for tests
BuildRequires: swtpm
BuildRequires: tpm2-tools
%global _description %{expand:
TPM2 TSS Python bindings for Enhanced System API (ESYS), Feature API (FAPI),
Marshaling (MU), TCTI Loader (TCTILdr) and RC Decoding (rcdecode) libraries.
It also contains utility methods for wrapping keys to TPM 2.0 data structures
for importation into the TPM, unwrapping keys and exporting them from the TPM,
TPM-less makecredential command and name calculations, TSS2 PEM Key format
support, importing Keys from PEM, DER and SSH formats, conversion from
tpm2-tools based command line strings and loading tpm2-tools context files.
}
%description %{_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name} %{_description}
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files %{_name}
%check
%pyproject_check_import
%ifarch s390x
# this test does not work for some reason on the s390x as it times out
%global testargs -k "not test_spi_helper_good"
%endif
%pytest --import-mode=append %{?!rhel:-n 1} %{?testargs}
%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%changelog
* Thu Aug 8 2024 Štěpán Horáček <shoracek@redhat.com> - 2.3.0-1
- Update to 2.3.0
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.1.0-6
- Bump release for June 2024 mass rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Aug 16 2023 Jakub Jelen <jjelen@redhat.com> - 2.1.0-3
- Enable tests on i686 again
* Wed Aug 16 2023 Jakub Jelen <jjelen@redhat.com> - 2.1.0-2
- Enable builds on i686 again
- Fix another test issues
* Mon Aug 07 2023 Jakub Jelen <jjelen@redhat.com> - 2.1.0-1
- New upstream release (#2149103)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 1.2.0-3
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Oct 26 2022 Jakub Jelen <jjelen@redhat.com> - 1.2.0-1
- Official Fedora package (#2135713)
* Tue Apr 12 2022 Traxtopel <traxtopel@gmail.com> - 1.1.0-1
- Initial package.
Loading…
Cancel
Save