From 8729bbe2c086d07d280d3dbc27dfe45dca2ce0ed0b75de0171202002101bac44 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 16 Jan 2023 21:00:29 +0000 Subject: [PATCH 1/2] Accepting request 1058352 from home:bmwiedemann:reproducible:test Add fix2038.patch to allow tests of python-aiosmtplib to pass after 2038 OBS-URL: https://build.opensuse.org/request/show/1058352 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-trustme?expand=0&rev=17 --- fix2038.patch | 17 +++++++++++++++++ python-trustme.changes | 5 +++++ python-trustme.spec | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 fix2038.patch diff --git a/fix2038.patch b/fix2038.patch new file mode 100644 index 0000000..3d99cf6 --- /dev/null +++ b/fix2038.patch @@ -0,0 +1,17 @@ +Author: Bernhard M. Wiedemann +Date: 2023-01-14 +Subject: Fix tests of python-aiosmtplib after 2038 + +diff --git a/trustme/__init__.py b/trustme/__init__.py +index cc280b0..f24e100 100644 +--- a/trustme/__init__.py ++++ b/trustme/__init__.py +@@ -50,7 +50,7 @@ _KEY_SIZE = 2048 + # Some versions of cryptography on 32-bit platforms fail if you give + # them dates after ~2038-01-19: + # https://github.com/pyca/cryptography/pull/4658 +-DEFAULT_EXPIRY = datetime.datetime(2038, 1, 1) ++DEFAULT_EXPIRY = datetime.datetime(2098, 1, 1) + + def _name(name, organization_name=None, common_name=None): + # type: (Text, Optional[Text], Optional[Text]) -> x509.Name diff --git a/python-trustme.changes b/python-trustme.changes index 6fd2550..0c9a86f 100644 --- a/python-trustme.changes +++ b/python-trustme.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jan 14 10:45:50 UTC 2023 - Bernhard Wiedemann + +- Add fix2038.patch to allow tests of python-aiosmtplib to pass after 2038 + ------------------------------------------------------------------- Mon Aug 30 14:18:19 UTC 2021 - John Paul Adrian Glaubitz diff --git a/python-trustme.spec b/python-trustme.spec index e8912d5..16937e4 100644 --- a/python-trustme.spec +++ b/python-trustme.spec @@ -25,6 +25,7 @@ Summary: Fake CA provider for Python tests License: Apache-2.0 OR MIT URL: https://github.com/python-trio/trustme Source: https://files.pythonhosted.org/packages/source/t/trustme/trustme-%{version}.tar.gz +Patch0: fix2038.patch BuildRequires: %{python_module cryptography} BuildRequires: %{python_module idna} BuildRequires: %{python_module pyOpenSSL} @@ -54,6 +55,7 @@ circle of the CA is limited to the test environment. %prep %setup -q -n trustme-%{version} +%patch0 -p1 %build %python_build From f6da47d308b6589ed7a7bdd7ee2ddec22381905a9529ff75359392d16ba32cac Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 16 Jan 2023 21:04:28 +0000 Subject: [PATCH 2/2] - Clean up SPEC file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-trustme?expand=0&rev=18 --- python-trustme.changes | 5 +++++ python-trustme.spec | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/python-trustme.changes b/python-trustme.changes index 0c9a86f..3d26e82 100644 --- a/python-trustme.changes +++ b/python-trustme.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 16 21:04:12 UTC 2023 - Matej Cepl + +- Clean up SPEC file + ------------------------------------------------------------------- Sat Jan 14 10:45:50 UTC 2023 - Bernhard Wiedemann diff --git a/python-trustme.spec b/python-trustme.spec index 16937e4..1298df5 100644 --- a/python-trustme.spec +++ b/python-trustme.spec @@ -1,7 +1,7 @@ # # spec file for package python-trustme # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-trustme Version: 0.9.0 @@ -72,6 +71,7 @@ circle of the CA is limited to the test environment. %license LICENSE.MIT %license LICENSE.APACHE2 %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/trustme +%{python_sitelib}/trustme-%{version}*-info %changelog