Compare commits

...

No commits in common. 'i10c-beta' and 'c9-beta' have entirely different histories.

@ -1,4 +1,4 @@
From d307f5706434e0cb445fb48291852bd7ec46ddbd Mon Sep 17 00:00:00 2001 From 43ce74d971fad62db6ccd723fe6b01da9c7ff407 Mon Sep 17 00:00:00 2001
From: Charalampos Stratakis <cstratak@redhat.com> From: Charalampos Stratakis <cstratak@redhat.com>
Date: Thu, 12 Dec 2019 16:58:31 +0100 Date: Thu, 12 Dec 2019 16:58:31 +0100
Subject: [PATCH 1/5] Expose blake2b and blake2s hashes from OpenSSL Subject: [PATCH 1/5] Expose blake2b and blake2s hashes from OpenSSL
@ -254,7 +254,7 @@ index fb61a44..1e42b87 100644
2.45.0 2.45.0
From c247ff164269fb68236a79a1359cc37c1a8a0004 Mon Sep 17 00:00:00 2001 From 6872b634078a2c69644235781ebffb07f8edcb83 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pviktori@redhat.com> From: Petr Viktorin <pviktori@redhat.com>
Date: Thu, 25 Jul 2019 17:19:06 +0200 Date: Thu, 25 Jul 2019 17:19:06 +0200
Subject: [PATCH 2/5] Disable Python's hash implementations in FIPS mode, Subject: [PATCH 2/5] Disable Python's hash implementations in FIPS mode,
@ -445,10 +445,10 @@ index a8bad9d..1b1d937 100644
+ if (_Py_hashlib_fips_error(exc, name)) return NULL; \ + if (_Py_hashlib_fips_error(exc, name)) return NULL; \
+} while (0) +} while (0)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 384718d..c4a1198 100644 index 65ad1c2..b5f9ab5 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -7445,7 +7445,8 @@ PY_STDLIB_MOD([_sha2], @@ -7463,7 +7463,8 @@ PY_STDLIB_MOD([_sha2],
PY_STDLIB_MOD([_sha3], [test "$with_builtin_sha3" = yes]) PY_STDLIB_MOD([_sha3], [test "$with_builtin_sha3" = yes])
PY_STDLIB_MOD([_blake2], PY_STDLIB_MOD([_blake2],
[test "$with_builtin_blake2" = yes], [], [test "$with_builtin_blake2" = yes], [],
@ -462,7 +462,7 @@ index 384718d..c4a1198 100644
2.45.0 2.45.0
From e58b32f238f1d4503248f3a8b1489f7567bdbd6d Mon Sep 17 00:00:00 2001 From f904abdd7a607282c2cdfd18288045cedfa28414 Mon Sep 17 00:00:00 2001
From: Charalampos Stratakis <cstratak@redhat.com> From: Charalampos Stratakis <cstratak@redhat.com>
Date: Fri, 29 Jan 2021 14:16:21 +0100 Date: Fri, 29 Jan 2021 14:16:21 +0100
Subject: [PATCH 3/5] Use python's fall back crypto implementations only if we Subject: [PATCH 3/5] Use python's fall back crypto implementations only if we
@ -555,7 +555,7 @@ index dd61a9a..6031b02 100644
2.45.0 2.45.0
From 2b14d347948dc01af587b9e21cd448833a38c7b5 Mon Sep 17 00:00:00 2001 From 9bf0a53b7831409613c44fd7feecb56476f5e5e7 Mon Sep 17 00:00:00 2001
From: Charalampos Stratakis <cstratak@redhat.com> From: Charalampos Stratakis <cstratak@redhat.com>
Date: Wed, 31 Jul 2019 15:43:43 +0200 Date: Wed, 31 Jul 2019 15:43:43 +0200
Subject: [PATCH 4/5] Test equivalence of hashes for the various digests with Subject: [PATCH 4/5] Test equivalence of hashes for the various digests with
@ -715,18 +715,18 @@ index 6031b02..5bd5297 100644
2.45.0 2.45.0
From b98c72b356a529a68cb4216526b838a57937cf6f Mon Sep 17 00:00:00 2001 From 8a76571515a64a57b4ea0586ae8376cf2ef0ac60 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pviktori@redhat.com> From: Petr Viktorin <pviktori@redhat.com>
Date: Mon, 26 Aug 2019 19:39:48 +0200 Date: Mon, 26 Aug 2019 19:39:48 +0200
Subject: [PATCH 5/5] Guard against Python HMAC in FIPS mode Subject: [PATCH 5/5] Guard against Python HMAC in FIPS mode
--- ---
Lib/hmac.py | 12 +++++++++--- Lib/hmac.py | 13 +++++++++----
Lib/test/test_hmac.py | 10 ++++++++++ Lib/test/test_hmac.py | 10 ++++++++++
2 files changed, 19 insertions(+), 3 deletions(-) 2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/Lib/hmac.py b/Lib/hmac.py diff --git a/Lib/hmac.py b/Lib/hmac.py
index 8b4eb2f..8930bda 100644 index 8b4eb2f..e8e4864 100644
--- a/Lib/hmac.py --- a/Lib/hmac.py
+++ b/Lib/hmac.py +++ b/Lib/hmac.py
@@ -16,8 +16,9 @@ else: @@ -16,8 +16,9 @@ else:
@ -741,7 +741,14 @@ index 8b4eb2f..8930bda 100644
# The size of the digests returned by HMAC depends on the underlying # The size of the digests returned by HMAC depends on the underlying
# hashing module used. Use digest_size from the instance of HMAC instead. # hashing module used. Use digest_size from the instance of HMAC instead.
@@ -55,10 +56,12 @@ class HMAC: @@ -48,17 +49,18 @@ class HMAC:
msg argument. Passing it as a keyword argument is
recommended, though not required for legacy API reasons.
"""
-
if not isinstance(key, (bytes, bytearray)):
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)
if not digestmod: if not digestmod:
raise TypeError("Missing required argument 'digestmod'.") raise TypeError("Missing required argument 'digestmod'.")
@ -755,7 +762,7 @@ index 8b4eb2f..8930bda 100644
self._init_old(key, msg, digestmod) self._init_old(key, msg, digestmod)
else: else:
self._init_old(key, msg, digestmod) self._init_old(key, msg, digestmod)
@@ -69,6 +72,9 @@ class HMAC: @@ -69,6 +71,9 @@ class HMAC:
self.block_size = self._hmac.block_size self.block_size = self._hmac.block_size
def _init_old(self, key, msg, digestmod): def _init_old(self, key, msg, digestmod):
@ -766,7 +773,7 @@ index 8b4eb2f..8930bda 100644
digest_cons = digestmod digest_cons = digestmod
elif isinstance(digestmod, str): elif isinstance(digestmod, str):
diff --git a/Lib/test/test_hmac.py b/Lib/test/test_hmac.py diff --git a/Lib/test/test_hmac.py b/Lib/test/test_hmac.py
index a39a2c4..b7b24ab 100644 index 1502fba..7997073 100644
--- a/Lib/test/test_hmac.py --- a/Lib/test/test_hmac.py
+++ b/Lib/test/test_hmac.py +++ b/Lib/test/test_hmac.py
@@ -5,6 +5,7 @@ import hashlib @@ -5,6 +5,7 @@ import hashlib
@ -805,7 +812,7 @@ index a39a2c4..b7b24ab 100644
@unittest.skipUnless(sha256_module is not None, 'need _sha256') @unittest.skipUnless(sha256_module is not None, 'need _sha256')
def test_with_sha256_module(self): def test_with_sha256_module(self):
h = hmac.HMAC(b"key", b"hash this!", digestmod=sha256_module.sha256) h = hmac.HMAC(b"key", b"hash this!", digestmod=sha256_module.sha256)
@@ -481,6 +489,7 @@ class SanityTestCase(unittest.TestCase): @@ -489,6 +497,7 @@ class UpdateTestCase(unittest.TestCase):
class CopyTestCase(unittest.TestCase): class CopyTestCase(unittest.TestCase):
@ -813,7 +820,7 @@ index a39a2c4..b7b24ab 100644
@hashlib_helper.requires_hashdigest('sha256') @hashlib_helper.requires_hashdigest('sha256')
def test_attributes_old(self): def test_attributes_old(self):
# Testing if attributes are of same type. # Testing if attributes are of same type.
@@ -492,6 +501,7 @@ class CopyTestCase(unittest.TestCase): @@ -500,6 +509,7 @@ class CopyTestCase(unittest.TestCase):
self.assertEqual(type(h1._outer), type(h2._outer), self.assertEqual(type(h1._outer), type(h2._outer),
"Types of outer don't match.") "Types of outer don't match.")

@ -255,7 +255,7 @@ index 1de547a011..e53abc8b84 100644
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index a373c53c7c..c616398eb1 100644 index fc8d87974e..ef8aa0d53c 100644
--- a/Lib/test/test_email/test_email.py --- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@

@ -0,0 +1,63 @@
From 60d40d7095983e0bc23a103b2050adc519dc7fe3 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Fri, 3 May 2024 14:17:48 +0200
Subject: [PATCH] Expect failures in tests not working properly with expat with
a fixed CVE in RHEL
---
Lib/test/test_pyexpat.py | 1 +
Lib/test/test_sax.py | 1 +
Lib/test/test_xml_etree.py | 3 +++
3 files changed, 5 insertions(+)
diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py
index 43cbd27..27b1502 100644
--- a/Lib/test/test_pyexpat.py
+++ b/Lib/test/test_pyexpat.py
@@ -793,6 +793,7 @@ class ReparseDeferralTest(unittest.TestCase):
self.assertEqual(started, ['doc'])
+ @unittest.expectedFailure
def test_reparse_deferral_disabled(self):
started = []
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 9b3014a..646c92d 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -1240,6 +1240,7 @@ class ExpatReaderTest(XmlTestBase):
self.assertEqual(result.getvalue(), start + b"<doc></doc>")
+ @unittest.expectedFailure
def test_flush_reparse_deferral_disabled(self):
result = BytesIO()
xmlgen = XMLGenerator(result)
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 9c382d1..62f2871 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1424,9 +1424,11 @@ class XMLPullParserTest(unittest.TestCase):
self.assert_event_tags(parser, [('end', 'root')])
self.assertIsNone(parser.close())
+ @unittest.expectedFailure
def test_simple_xml_chunk_1(self):
self.test_simple_xml(chunk_size=1, flush=True)
+ @unittest.expectedFailure
def test_simple_xml_chunk_5(self):
self.test_simple_xml(chunk_size=5, flush=True)
@@ -1651,6 +1653,7 @@ class XMLPullParserTest(unittest.TestCase):
self.assert_event_tags(parser, [('end', 'doc')])
+ @unittest.expectedFailure
def test_flush_reparse_deferral_disabled(self):
parser = ET.XMLPullParser(events=('start', 'end'))
--
2.44.0

@ -1,3 +1,6 @@
%global __python3 /usr/bin/python3.12
%global python3_pkgversion 3.12
# ================== # ==================
# Top-level metadata # Top-level metadata
# ================== # ==================
@ -31,12 +34,8 @@ License: Python-2.0.1
# Main Python, i.e. whether this is the main Python version in the distribution # Main Python, i.e. whether this is the main Python version in the distribution
# that owns /usr/bin/python3 and other unique paths # that owns /usr/bin/python3 and other unique paths
# This also means the built subpackages are called python3 rather than python3X # This also means the built subpackages are called python3 rather than python3X
# By default, this is determined by the %%__default_python3_pkgversion value # RHEL: Disabled by default
%if "%{?__default_python3_pkgversion}" == "%{pybasever}"
%bcond_without main_python
%else
%bcond_with main_python %bcond_with main_python
%endif
# If this is *not* Main Python, should it contain `Provides: python(abi) ...`? # If this is *not* Main Python, should it contain `Provides: python(abi) ...`?
# In Fedora no package shall depend on an alternative Python via this tag, so we do not provide it. # In Fedora no package shall depend on an alternative Python via this tag, so we do not provide it.
@ -62,12 +61,8 @@ License: Python-2.0.1
# Whether to use RPM build wheels from the python-{pip,setuptools,wheel}-wheel packages # Whether to use RPM build wheels from the python-{pip,setuptools,wheel}-wheel packages
# Uses upstream bundled prebuilt wheels otherwise # Uses upstream bundled prebuilt wheels otherwise
# Only F39+ has a pip new enough to work with Python 3.12
%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
%bcond_without rpmwheels %bcond_without rpmwheels
%else
%bcond_with rpmwheels
%endif
# If the rpmwheels condition is disabled, we use the bundled wheel packages # If the rpmwheels condition is disabled, we use the bundled wheel packages
# from Python with the versions below. # from Python with the versions below.
# This needs to be manually updated when we update Python. # This needs to be manually updated when we update Python.
@ -147,14 +142,6 @@ Provides: bundled(python3dist(packaging)) = 23
%bcond_with valgrind %bcond_with valgrind
%endif %endif
# In RHEL 9+, we obsolete/provide Platform Python from regular Python
# This is only appropriate for the main Python build
%if 0%{?rhel} >= 9 && %{with main_python}
%bcond_without rhel8_compat_shims
%else
%bcond_with rhel8_compat_shims
%endif
# ===================== # =====================
# General global macros # General global macros
# ===================== # =====================
@ -214,21 +201,12 @@ Provides: bundled(python3dist(packaging)) = 23
# The -O flag for the compiler, debug builds # The -O flag for the compiler, debug builds
# -Wno-cpp avoids some warnings with -O0 # -Wno-cpp avoids some warnings with -O0
%global optflags_debug -O0 -Wno-cpp %global optflags_debug -O0 -Wno-cpp
# Remove the default -O2 flag, our flags are applied in %%build/%%install
%global __global_compiler_flags %(echo '%{__global_compiler_flags}' | sed 's/-O[[:digit:]]//')
# Disable automatic bytecompilation. The python3 binary is not yet be # Disable automatic bytecompilation. The python3 binary is not yet be
# available in /usr/bin when Python is built. Also, the bytecompilation fails # available in /usr/bin when Python is built. Also, the bytecompilation fails
# on files that test invalid syntax. # on files that test invalid syntax.
%undefine py_auto_byte_compile %undefine py_auto_byte_compile
# When a main_python build is attempted despite the %%__default_python3_pkgversion value
# We undefine magic macros so the python3-... package does not provide wrong python3X-...
%if %{with main_python} && ("%{?__default_python3_pkgversion}" != "%{pybasever}")
%undefine __pythonname_provides
%{warn:Doing a main_python build with wrong %%__default_python3_pkgversion (0%{?__default_python3_pkgversion}, but this is %pyshortver)}
%endif
%if %{with main_python} %if %{with main_python}
# To keep the upgrade path clean, we Obsolete python3.X from the python3 # To keep the upgrade path clean, we Obsolete python3.X from the python3
# package and python3.X-foo from individual subpackages. # package and python3.X-foo from individual subpackages.
@ -254,8 +232,7 @@ BuildRequires: bluez-libs-devel
BuildRequires: bzip2 BuildRequires: bzip2
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
# See the runtime requirement in the -libs subpackage BuildRequires: expat-devel
BuildRequires: expat-devel >= 2.6
BuildRequires: findutils BuildRequires: findutils
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -272,6 +249,7 @@ BuildRequires: libappstream-glib
BuildRequires: libb2-devel BuildRequires: libb2-devel
%endif %endif
BuildRequires: libffi-devel BuildRequires: libffi-devel
BuildRequires: libnsl2-devel
BuildRequires: libtirpc-devel BuildRequires: libtirpc-devel
BuildRequires: libGL-devel BuildRequires: libGL-devel
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
@ -284,7 +262,7 @@ BuildRequires: openssl-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: redhat-rpm-config >= 127 BuildRequires: redhat-rpm-config
BuildRequires: sqlite-devel BuildRequires: sqlite-devel
BuildRequires: gdb BuildRequires: gdb
@ -400,7 +378,7 @@ Patch371: 00371-revert-bpo-1596321-fix-threading-_shutdown-for-the-main-thread-g
# - https://access.redhat.com/articles/7004769 # - https://access.redhat.com/articles/7004769
Patch397: 00397-tarfile-filter.patch Patch397: 00397-tarfile-filter.patch
# 00415 # 5b830b814be638d1a167802780b5f498a4a5e97c # 00415 # 83e0fc3ec7bc38055c536f482578a10f6efcc08c
# [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (#111116) # [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (#111116)
# #
# Detect email address parsing errors and return empty tuple to # Detect email address parsing errors and return empty tuple to
@ -409,6 +387,13 @@ Patch397: 00397-tarfile-filter.patch
# Thomas Dwyer. # Thomas Dwyer.
Patch415: 00415-cve-2023-27043-gh-102988-reject-malformed-addresses-in-email-parseaddr-111116.patch Patch415: 00415-cve-2023-27043-gh-102988-reject-malformed-addresses-in-email-parseaddr-111116.patch
# 00422 # a353cebef737c41420dc7ae2469dd657371b8881
# Fix tests for XMLPullParser with Expat 2.6.0
#
# Feeding the parser by too small chunks defers parsing to prevent
# CVE-2023-52425. Future versions of Expat may be more reactive.
Patch422: 00422-fix-tests-for-xmlpullparser-with-expat-2-6-0.patch
# 00436 # c76cc2aa3a2c30375ade4859b732ada851cc89ed # 00436 # c76cc2aa3a2c30375ade4859b732ada851cc89ed
# [CVE-2024-8088] gh-122905: Sanitize names in zipfile.Path. # [CVE-2024-8088] gh-122905: Sanitize names in zipfile.Path.
Patch436: 00436-cve-2024-8088-gh-122905-sanitize-names-in-zipfile-path.patch Patch436: 00436-cve-2024-8088-gh-122905-sanitize-names-in-zipfile-path.patch
@ -460,12 +445,6 @@ Provides: python%{pybasever}%{?_isa} = %{version}-%{release}
Recommends: %{_bindir}/python Recommends: %{_bindir}/python
%endif %endif
%if %{with rhel8_compat_shims}
Provides: platform-python = %{version}-%{release}
Provides: platform-python%{?_isa} = %{version}-%{release}
Obsoletes: platform-python < %{pybasever}
%endif
# Python interpreter packages used to be named (or provide) name pythonXY (e.g. # Python interpreter packages used to be named (or provide) name pythonXY (e.g.
# python39). However, to align it with the executable names and to prepare for # python39). However, to align it with the executable names and to prepare for
# Python 3.10, they were renamed to pythonX.Y (e.g. python3.9, python3.10). We # Python 3.10, they were renamed to pythonX.Y (e.g. python3.9, python3.10). We
@ -542,12 +521,12 @@ Summary: Python runtime libraries
%if %{with rpmwheels} %if %{with rpmwheels}
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 23.1.2 Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 23.1.2
# Bundled libb2 is CC0, covered by grandfathering exception # Bundled libb2 is CC0, covered by grandfathering exception
License: Python-2.0.1 AND CC0-1.0 License: Python and CC0
%else %else
Provides: bundled(python3dist(pip)) = %{pip_version} Provides: bundled(python3dist(pip)) = %{pip_version}
%pip_bundled_provides %pip_bundled_provides
# License manually combined form Python + pip # License manually combined form Python + pip
License: Python-2.0.1 AND CC0-1.0 AND MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LGPL-2.1-only AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) License: Python and CC0 and MIT and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
%endif %endif
%unversioned_obsoletes_of_python3_X_if_main libs %unversioned_obsoletes_of_python3_X_if_main libs
@ -570,14 +549,6 @@ Recommends: (%{pkgname}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa})
# The zoneinfo module needs tzdata # The zoneinfo module needs tzdata
Requires: tzdata Requires: tzdata
# The requirement on libexpat is generated, but we need to version it.
# When built with expat >= 2.6, but installed with older expat, we get:
# ImportError: /usr/lib64/python3.X/lib-dynload/pyexpat.cpython-....so:
# undefined symbol: XML_SetReparseDeferralEnabled
# This breaks many things, including python -m venv.
# Other subpackages (like -debug) also need this, but they all depend on -libs.
Requires: expat >= 2.6
%description -n %{pkgname}-libs %description -n %{pkgname}-libs
This package contains runtime libraries for use by Python: This package contains runtime libraries for use by Python:
- the majority of the Python standard library - the majority of the Python standard library
@ -599,6 +570,10 @@ Requires: (python3-rpm-macros if rpm-build)
# On Fedora, we keep this to avoid one additional round of %%generate_buildrequires. # On Fedora, we keep this to avoid one additional round of %%generate_buildrequires.
%{!?rhel:Requires: (pyproject-rpm-macros if rpm-build)} %{!?rhel:Requires: (pyproject-rpm-macros if rpm-build)}
# We provide the python3.12-rpm-macros here to make it possible to
# BuildRequire them in the same manner as RHEL8.
Provides: %{pkgname}-rpm-macros = %{version}-%{release}
%unversioned_obsoletes_of_python3_X_if_main devel %unversioned_obsoletes_of_python3_X_if_main devel
%if %{with main_python} %if %{with main_python}
@ -622,12 +597,6 @@ Provides: 2to3 = %{version}-%{release}
Conflicts: %{pkgname} < %{version}-%{release} Conflicts: %{pkgname} < %{version}-%{release}
%if %{with rhel8_compat_shims}
Provides: platform-python-devel = %{version}-%{release}
Provides: platform-python-devel%{?_isa} = %{version}-%{release}
Obsoletes: platform-python-devel < %{pybasever}
%endif
%description -n %{pkgname}-devel %description -n %{pkgname}-devel
This package contains the header files and configuration needed to compile This package contains the header files and configuration needed to compile
Python extension modules (typically written in C or C++), to embed Python Python extension modules (typically written in C or C++), to embed Python
@ -689,12 +658,12 @@ Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel Requires: %{python_wheel_pkg_prefix}-setuptools-wheel
Requires: %{python_wheel_pkg_prefix}-wheel-wheel Requires: %{python_wheel_pkg_prefix}-wheel-wheel
%else %else
Provides: bundled(python3dist(setuptools)) = %{setuptools_version} Provides: bundled(python%{python3_pkgversion}dist(setuptools)) = %{setuptools_version}
%setuptools_bundled_provides %setuptools_bundled_provides
Provides: bundled(python3dist(wheel)) = %{wheel_version} Provides: bundled(python%{python3_pkgversion}dist(wheel)) = %{wheel_version}
%wheel_bundled_provides %wheel_bundled_provides
# License manually combined from Python + setuptools + wheel # License manually combined from Python + setuptools + wheel
License: Python-2.0.1 AND MIT AND Apache-2.0 AND (Apache-2.0 OR BSD-2-Clause) License: Python and MIT and ASL 2.0 and (ASL 2.0 or BSD)
%endif %endif
%unversioned_obsoletes_of_python3_X_if_main test %unversioned_obsoletes_of_python3_X_if_main test
@ -723,12 +692,6 @@ Requires: %{pkgname}-idle%{?_isa} = %{version}-%{release}
%unversioned_obsoletes_of_python3_X_if_main debug %unversioned_obsoletes_of_python3_X_if_main debug
%if %{with rhel8_compat_shims}
Provides: platform-python-debug = %{version}-%{release}
Provides: platform-python-debug%{?_isa} = %{version}-%{release}
Obsoletes: platform-python-debug < %{pybasever}
%endif
%description -n %{pkgname}-debug %description -n %{pkgname}-debug
python3-debug provides a version of the Python runtime with numerous debugging python3-debug provides a version of the Python runtime with numerous debugging
features enabled, aimed at advanced Python users such as developers of Python features enabled, aimed at advanced Python users such as developers of Python
@ -783,6 +746,11 @@ rm -r Modules/_decimal/libmpdec
rm configure pyconfig.h.in rm configure pyconfig.h.in
# Python 3.12 requires autoconf 2.71 which is not available in RHEL,
# we verified that it builds also with autoconf 2.69 therefore we
# are unpinning it
sed -i 's/AC_PREREQ(\[2.71/AC_PREREQ(\[2.69/' configure.ac
# ====================================================== # ======================================================
# Configuring and building the code: # Configuring and building the code:
# ====================================================== # ======================================================
@ -840,6 +808,7 @@ BuildPython() {
ConfName=$1 ConfName=$1
ExtraConfigArgs=$2 ExtraConfigArgs=$2
MoreCFlags=$3 MoreCFlags=$3
MoreCFlagsNodist=$4
# Each build is done in its own directory # Each build is done in its own directory
ConfDir=build/$ConfName ConfDir=build/$ConfName
@ -879,7 +848,7 @@ BuildPython() {
$ExtraConfigArgs \ $ExtraConfigArgs \
%{nil} %{nil}
%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags" %global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags $MoreCFlagsNodist"
%if %{without bootstrap} %if %{without bootstrap}
# Regenerate generated files (needs python3) # Regenerate generated files (needs python3)
@ -902,11 +871,13 @@ BuildPython() {
# See also: https://bugzilla.redhat.com/show_bug.cgi?id=1818857 # See also: https://bugzilla.redhat.com/show_bug.cgi?id=1818857
BuildPython debug \ BuildPython debug \
"--without-ensurepip --with-pydebug" \ "--without-ensurepip --with-pydebug" \
"%{optflags_debug}" "%{optflags_debug}" \
""
%endif # with debug_build %endif # with debug_build
BuildPython optimized \ BuildPython optimized \
"--without-ensurepip %{optimizations_flag}" \ "--without-ensurepip %{optimizations_flag}" \
"" \
"%{optflags_optimized}" "%{optflags_optimized}"
# ====================================================== # ======================================================
@ -1019,7 +990,7 @@ InstallPython debug \
# Now the optimized build: # Now the optimized build:
InstallPython optimized \ InstallPython optimized \
%{py_INSTSONAME_optimized} \ %{py_INSTSONAME_optimized} \
"%{optflags_optimized}" \ "" \
%{LDVERSION_optimized} %{LDVERSION_optimized}
# Install directories for additional packages # Install directories for additional packages
@ -1159,25 +1130,6 @@ ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug
%endif %endif
%endif %endif
%if %{with rhel8_compat_shims}
# Provide RHEL8 backwards compatible symbolic links in %%_libexecdir
mkdir -p %{buildroot}%{_libexecdir}
ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python
ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python%{pybasever}
ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python-config
ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-config
ln -s %{_bindir}/python%{pybasever}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-`uname -m`-config
# There were also executables with %%{LDVERSION_optimized} in RHEL 8,
# but since Python 3.8 %%{LDVERSION_optimized} == %%{pybasever}.
# We list both in the %%files section to assert this.
%if %{with debug_build}
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python-debug
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}
ln -s %{_bindir}/python%{LDVERSION_debug}-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-config
ln -s %{_bindir}/python%{LDVERSION_debug}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-`uname -m`-config
%endif
%endif
# Remove large, autogenerated sources and keep only the non-optimized pycache # Remove large, autogenerated sources and keep only the non-optimized pycache
for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do
directory=$(dirname ${file}) directory=$(dirname ${file})
@ -1285,11 +1237,6 @@ CheckPython optimized
%{_bindir}/python%{LDVERSION_optimized} %{_bindir}/python%{LDVERSION_optimized}
%{_mandir}/*/*3* %{_mandir}/*/*3*
%if %{with rhel8_compat_shims}
%{_libexecdir}/platform-python
%{_libexecdir}/platform-python%{pybasever}
%{_libexecdir}/platform-python%{LDVERSION_optimized}
%endif
%if %{with main_python} %if %{with main_python}
%files -n python-unversioned-command %files -n python-unversioned-command
@ -1399,6 +1346,7 @@ CheckPython optimized
%{dynload_dir}/grp.%{SOABI_optimized}.so %{dynload_dir}/grp.%{SOABI_optimized}.so
%{dynload_dir}/math.%{SOABI_optimized}.so %{dynload_dir}/math.%{SOABI_optimized}.so
%{dynload_dir}/mmap.%{SOABI_optimized}.so %{dynload_dir}/mmap.%{SOABI_optimized}.so
%{dynload_dir}/nis.%{SOABI_optimized}.so
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so %{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
%{dynload_dir}/_posixshmem.%{SOABI_optimized}.so %{dynload_dir}/_posixshmem.%{SOABI_optimized}.so
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so %{dynload_dir}/pyexpat.%{SOABI_optimized}.so
@ -1565,14 +1513,6 @@ CheckPython optimized
%{_libdir}/pkgconfig/python-%{pybasever}.pc %{_libdir}/pkgconfig/python-%{pybasever}.pc
%{_libdir}/pkgconfig/python-%{pybasever}-embed.pc %{_libdir}/pkgconfig/python-%{pybasever}-embed.pc
%if %{with rhel8_compat_shims}
%{_libexecdir}/platform-python-config
%{_libexecdir}/platform-python%{pybasever}-config
%{_libexecdir}/platform-python%{LDVERSION_optimized}-config
%{_libexecdir}/platform-python%{pybasever}-*-config
%{_libexecdir}/platform-python%{LDVERSION_optimized}-*-config
%endif
%files -n %{pkgname}-idle %files -n %{pkgname}-idle
%if %{with main_python} %if %{with main_python}
@ -1692,6 +1632,7 @@ CheckPython optimized
%{dynload_dir}/grp.%{SOABI_debug}.so %{dynload_dir}/grp.%{SOABI_debug}.so
%{dynload_dir}/math.%{SOABI_debug}.so %{dynload_dir}/math.%{SOABI_debug}.so
%{dynload_dir}/mmap.%{SOABI_debug}.so %{dynload_dir}/mmap.%{SOABI_debug}.so
%{dynload_dir}/nis.%{SOABI_debug}.so
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so %{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
%{dynload_dir}/_posixshmem.%{SOABI_debug}.so %{dynload_dir}/_posixshmem.%{SOABI_debug}.so
%{dynload_dir}/pyexpat.%{SOABI_debug}.so %{dynload_dir}/pyexpat.%{SOABI_debug}.so
@ -1722,13 +1663,6 @@ CheckPython optimized
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc %{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc %{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc
%if %{with rhel8_compat_shims}
%{_libexecdir}/platform-python-debug
%{_libexecdir}/platform-python%{LDVERSION_debug}
%{_libexecdir}/platform-python%{LDVERSION_debug}-config
%{_libexecdir}/platform-python%{LDVERSION_debug}-*-config
%endif
# Analog of the -tools subpackage's files: # Analog of the -tools subpackage's files:
# None for now; we could build precanned versions that have the appropriate # None for now; we could build precanned versions that have the appropriate
# shebang if needed # shebang if needed
@ -1778,57 +1712,35 @@ CheckPython optimized
# ====================================================== # ======================================================
%changelog %changelog
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.12.5-2
- Rebuilt for MSVSphere 10
* Fri Aug 23 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.5-2 * Fri Aug 23 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.5-2
- Security fix for CVE-2024-8088 - Security fix for CVE-2024-8088
Resolves: RHEL-55923 Resolves: RHEL-55963
* Wed Aug 07 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.5-1 * Wed Aug 07 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.5-1
- Update to 3.12.5 - Update to 3.12.5
- Security fix for CVE-2024-6923 - Security fix for CVE-2024-6923
Resolves: RHEL-53036 Resolves: RHEL-53041
* Thu Jul 25 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.4-3
- Properly propagate the optimization flags to C extensions
* Wed Jul 17 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.4-4 * Wed Jul 17 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.4-2
- Build Python with -O3 - Build Python with -O3
- https://fedoraproject.org/wiki/Changes/Python_built_with_gcc_O3 - https://fedoraproject.org/wiki/Changes/Python_built_with_gcc_O3
* Thu Jul 11 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.4-3 * Fri Jun 28 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.4-1
- Fix issues uncovered by static analysis
Resolves: RHEL-45021
* Thu Jul 04 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.4-2
- Require expat >= 2.6 to prevent errors when creating venvs with older expat
* Wed Jul 03 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.4-1
- Update to 3.12.4 - Update to 3.12.4
Resolves: RHEL-44054 Resolves: RHEL-44103
* Wed Jul 03 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.3-1
- Update to 3.12.3
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.12.2-8 * Tue Jun 11 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.3-2
- Bump release for June 2024 mass rebuild
* Tue Jun 11 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.2-7
- Enable importing of hash-based .pyc files under FIPS mode - Enable importing of hash-based .pyc files under FIPS mode
Resolves: RHEL-40769 Resolves: RHEL-40772
* Tue May 28 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.2-6
- Support OpenSSL FIPS mode
- Disable the builtin hashlib hashes except blake2
Resolves: RHEL-39066
* Wed Apr 24 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.2-5
- Add Red Hat configuration for CVE-2007-4559
Resolves: RHEL-33847
* Tue Apr 23 2024 Miro Hrončok <mhroncok@redhat.com> - 3.12.2-4 * Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.3-1
- Remove the nis module, drop the dependency on libnsl2 - Update to 3.12.3
Related: RHEL-33690
* Thu Mar 21 2024 Miro Hrončok <mhroncok@redhat.com> - 3.12.2-3 * Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-3
- Fix tests for XMLPullParser with Expat 2.6.0
- Move all test modules to the python3-test package, namely: - Move all test modules to the python3-test package, namely:
- __phello__ - __phello__
- _xxsubinterpreters - _xxsubinterpreters
@ -1836,104 +1748,66 @@ Resolves: RHEL-33847
- xxlimited_35 - xxlimited_35
- xxsubtype - xxsubtype
* Mon Mar 04 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-2 * Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-2
- Add provides and symbolic links for compatibility with platform-python - Fix tests for XMLPullParser with Expat with fixed CVE
Resolves: RHEL-27855
* Wed Feb 07 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.2-1 * Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-1
- Update to 3.12.2 - Update to 3.12.2
Resolves: RHEL-33690
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.1-4 * Mon Feb 19 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - Add Red Hat configuration for CVE-2007-4559
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Dec 18 2023 Lumír Balhar <lbalhar@redhat.com> - 3.12.1-2
- Security fix for CVE-2023-27043 (rhbz#2196190)
* Fri Dec 08 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.1-1
- Update to 3.12.1
- Own stray directories in /usr/lib64/python3.12
- Fixes: rhbz#2252143
* Thu Oct 05 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.12.0-2
- Use bundled libb2 in RHEL builds
* Mon Oct 02 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0-1
- Update to 3.12.0 final
* Tue Sep 19 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~rc3-1
- Update to 3.12.0rc3
* Wed Sep 06 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~rc2-1
- Update to 3.12.0rc2
* Mon Aug 07 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~rc1-1
- Update to 3.12.0rc1
* Wed Aug 02 2023 Charalampos Stratakis <cstratak@redhat.com> - 3.12.0~b4-3
- Remove extra distro-applied CFLAGS passed to user built C extensions
- https://fedoraproject.org/wiki/Changes/Python_Extension_Flags_Reduction
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.0~b4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 12 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~b4-1
- Update to 3.12.0b4
* Wed Jun 21 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b3-2
- Backport upstream patch to add PyType_GetDict() function
* Tue Jun 20 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b3-1
- Update to 3.12.0b3
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.12.0~b2-3
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.12.0~b2-2
- Bootstrap for Python 3.12
* Wed Jun 07 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b2-1
- Update to 3.12.0b2
* Mon May 29 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~b1-2
- Use wheels from RPMs, at least on Fedora 39+
- On older Fedora releases, declare bundled() provides and a complex License tag
* Tue May 23 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b1-1
- Update to 3.12.0b1
* Wed Apr 05 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a7-1
- Update to 3.12.0a7
* Thu Mar 23 2023 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~a6-2
- Increase the test timeout during package build
* Wed Mar 08 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a6-1
- Update to 3.12.0a6
* Wed Feb 08 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a5-1
- Update to 3.12.0a5
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.0~a4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 11 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a4-1
- Update to 3.12.0a4
* Mon Dec 19 2022 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~a3-2
- No longer patch the default bytecode cache invalidation policy
* Wed Dec 07 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a3-1
- Update to 3.12.0a3
* Tue Nov 15 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a2-1
- Update to 3.12.0a2
- Fixes: rhbz#2133847
* Thu Oct 27 2022 Miro Hrončok <mhroncok@redhat.com> - 3.12.0~a1-2 * Thu Jan 18 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.1-3
- Finish initial bootstrap of Python 3.12.0a1 - Support OpenSSL FIPS mode
- Disable the builtin hashlib hashes except blake2
* Wed Oct 26 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a1-1 * Wed Dec 20 2023 Charalampos Stratakis <cstratak@redhat.com> - 3.12.1-2
- Initial Python 3.12 package forked from Python 3.11 - Disable bootstrap
* Wed Dec 20 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.1-1
- Initial package
- Fedora contributions by:
Björn Esser <besser82@fedoraproject.org>
Bohuslav Kabrda <bkabrda@redhat.com>
Charalampos Stratakis <cstratak@redhat.com>
Dan Horák <dan@danny.cz>
David Malcolm <dmalcolm@redhat.com>
Dennis Gilmore <dennis@ausil.us>
Florian Weimer <fweimer@redhat.com>
Gwyn Ciesla <limb@fedoraproject.org>
Igor Gnatenko <ignatenko@redhat.com>
Iryna Shcherbina <shcherbina.iryna@gmail.com>
Jaroslav Škarvada <jskarvad@redhat.com>
Jason ティビツ <tibbs@fedoraproject.org>
Kalev Lember <klember@redhat.com>
Karsten Hopp <karsten@redhat.com>
Lumir Balhar <lbalhar@redhat.com>
Marcel Plch <marcel.plch@protonmail.com>
Matej Stuchlik <mstuchli@redhat.com>
Michal Cyprian <m.cyprian@gmail.com>
Michal Toman <mtoman@fedoraproject.org>
Miro Hrončok <miro@hroncok.cz>
Nicolas Chauvet <kwizart@gmail.com>
Orion Poplawski <orion@cora.nwra.com>
Patrik Kopkan <pkopkan@redhat.com>
Peter Robinson <pbrobinson@gmail.com>
Petr Šplíchal <psplicha@redhat.com>
Petr Viktorin <pviktori@redhat.com>
Rex Dieter <rdieter@fedoraproject.org>
Richard W.M. Jones <rjones@redhat.com>
Robert Kuska <rkuska@gmail.com>
Sahana Prasad <sahana@redhat.com>
Stephen Gallagher <sgallagh@redhat.com>
Than Ngo <than@redhat.com>
Thomas Spura <thomas.spura@gmail.com>
Till Maas <opensource@till.name>
Tomáš Hrnčiar <thrnciar@redhat.com>
Tomas Mraz <tmraz@fedoraproject.org>
Tomas Orsava <torsava@redhat.com>
Tomas Radej <tradej@redhat.com>
Toshio Kuratomi <toshio@fedoraproject.org>
Victor Stinner <vstinner@python.org>
Ville Skyttä <ville.skytta@iki.fi>
Yaakov Selkowitz <yselkowi@redhat.com>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

Loading…
Cancel
Save