Update to 3.13.1

Security fix for CVE-2024-9287

Fixes: rhbz#2321657
This commit is contained in:
Charalampos Stratakis 2024-12-04 00:29:07 +01:00
commit ae3b33f266
3 changed files with 22 additions and 17 deletions

View file

@ -30,7 +30,7 @@ Co-authored-by: Lumír Balhar <frenzy.madness@gmail.com>
3 files changed, 72 insertions(+), 4 deletions(-)
diff --git a/Lib/site.py b/Lib/site.py
index 0a0dc47b17..bb42e1cf5a 100644
index 89a81c55cb..950e2e337f 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -414,8 +414,15 @@ def getsitepackages(prefixes=None):
@ -51,7 +51,7 @@ index 0a0dc47b17..bb42e1cf5a 100644
if os.path.isdir(sitedir):
addsitedir(sitedir, known_paths)
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
index 80aef34471..4e4ea6aeea 100644
index ec3b638f00..28ad8a2321 100644
--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -106,6 +106,12 @@
@ -87,7 +87,7 @@ index 80aef34471..4e4ea6aeea 100644
_SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include',
'scripts', 'data')
@@ -261,11 +280,40 @@ def _extend_dict(target_dict, other_dict):
@@ -259,11 +278,40 @@ def _extend_dict(target_dict, other_dict):
target_dict[key] = value
@ -120,7 +120,7 @@ index 80aef34471..4e4ea6aeea 100644
+ # we only change the defaults here, so explicit --prefix will take precedence
+ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
+ if (scheme == 'posix_prefix' and
+ _PREFIX == '/usr' and
+ get_config_vars('prefix')[0] == '/usr' and
+ 'RPM_BUILD_ROOT' not in os.environ):
+ _extend_dict(vars, _config_vars_local())
+ else:
@ -130,10 +130,10 @@ index 80aef34471..4e4ea6aeea 100644
# On Windows we want to substitute 'lib' for schemes rather
# than the native value (without modifying vars, in case it
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 1ade49281b..e21ca34733 100644
index bf53413021..33fa2feb28 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -121,8 +121,19 @@ def test_get_path(self):
@@ -130,8 +130,19 @@ def test_get_path(self):
for scheme in _INSTALL_SCHEMES:
for name in _INSTALL_SCHEMES[scheme]:
expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars)
@ -154,7 +154,7 @@ index 1ade49281b..e21ca34733 100644
os.path.normpath(expected),
)
@@ -377,7 +388,7 @@ def test_get_config_h_filename(self):
@@ -386,7 +397,7 @@ def test_get_config_h_filename(self):
self.assertTrue(os.path.isfile(config_h), config_h)
def test_get_scheme_names(self):
@ -163,7 +163,7 @@ index 1ade49281b..e21ca34733 100644
if HAS_USER_BASE:
wanted.extend(['nt_user', 'osx_framework_user', 'posix_user'])
self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
@@ -389,6 +400,8 @@ def test_symlink(self): # Issue 7880
@@ -398,6 +409,8 @@ def test_symlink(self): # Issue 7880
cmd = "-c", "import sysconfig; print(sysconfig.get_platform())"
self.assertEqual(py.call_real(*cmd), py.call_link(*cmd))

View file

@ -13,7 +13,7 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
%global general_version %{pybasever}.0
%global general_version %{pybasever}.1
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
@ -57,7 +57,7 @@ License: Python-2.0.1
# This needs to be manually updated when we update Python.
# Explore the sources tarball (you need the version before %%prep is executed):
# $ tar -tf Python-%%{upstream_version}.tar.xz | grep whl
%global pip_version 24.2
%global pip_version 24.3.1
%global setuptools_version 67.6.1
%global wheel_version 0.43.0
# All of those also include a list of indirect bundled libs:
@ -65,8 +65,8 @@ License: Python-2.0.1
# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt)
%global pip_bundled_provides %{expand:
Provides: bundled(python3dist(cachecontrol)) = 0.14
Provides: bundled(python3dist(certifi)) = 2024.7.4
Provides: bundled(python3dist(distlib)) = 0.3.8
Provides: bundled(python3dist(certifi)) = 2024.8.30
Provides: bundled(python3dist(distlib)) = 0.3.9
Provides: bundled(python3dist(distro)) = 1.9
Provides: bundled(python3dist(idna)) = 3.7
Provides: bundled(python3dist(msgpack)) = 1.0.8
@ -79,9 +79,9 @@ Provides: bundled(python3dist(resolvelib)) = 1.0.1
Provides: bundled(python3dist(rich)) = 13.7.1
Provides: bundled(python3dist(setuptools)) = 70.3
Provides: bundled(python3dist(tomli)) = 2.0.1
Provides: bundled(python3dist(truststore)) = 0.9.1
Provides: bundled(python3dist(truststore)) = 0.10
Provides: bundled(python3dist(typing-extensions)) = 4.12.2
Provides: bundled(python3dist(urllib3)) = 1.26.18
Provides: bundled(python3dist(urllib3)) = 1.26.20
}
# setuptools
# vendor.txt files not in .whl
@ -341,7 +341,7 @@ Source11: idle3.appdata.xml
# (Patches taken from github.com/fedora-python/cpython)
# 00251 # 60dd97be7bf3662ff65edd8471e948924b4175b2
# 00251 # f5b56b9d4a79df04e9d90ceff7388554c5f818b6
# Change user install location
#
# Set values of base and platbase in sysconfig from /usr
@ -1699,6 +1699,11 @@ CheckPython freethreading
# ======================================================
%changelog
* Tue Dec 03 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.13.1-1
- Update to 3.13.1
- Security fix for CVE-2024-9287
- Fixes: rhbz#2321657
* Tue Oct 08 2024 Karolina Surma <ksurma@redhat.com> - 3.13.0-1
- Update to Python 3.13.0

View file

@ -1,2 +1,2 @@
SHA512 (Python-3.13.0.tar.xz) = 44a143c9b96b55b01885ec020c3364265bda55289615cd7d5071915b0d0178a6f35e7551a89090001fcb7f3172d38177a56bf8b8532b15c9dbc50295c9210152
SHA512 (Python-3.13.0.tar.xz.asc) = 1b8bb0fe4eb93e31ec1770e90b94d44b5864c0391aad5dcba3a30d8e505d9b17107385414353c0060007f8a536254f49b8e919f36ddf6421a6e4330f817f1a3e
SHA512 (Python-3.13.1.tar.xz) = 056c9b5fc0a6b540f41513d045f43c1ed463d15e0f345cecec703ec9c2335e53b4beb19de9c74ab2b236b023f934d5fd9ae7727a808634eaa01cfe66018a9a35
SHA512 (Python-3.13.1.tar.xz.asc) = 1b56b7c2f547aa39c75c18978e174debb113444ce3f9da3829ba6842e3160051e0de70bd49d306b8014299aa8aa911d7c67efe71dd648c3528cf8d7535a01599