Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2913ab24d |
@ -1 +0,0 @@
|
||||
1
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1 @@
|
||||
/*.tar.*
|
||||
/*.src.rpm
|
||||
/results_python3*
|
||||
SOURCES/Python-3.14.3.tar.xz
|
||||
|
||||
1
.python3.14.metadata
Normal file
1
.python3.14.metadata
Normal file
@ -0,0 +1 @@
|
||||
83eed62ba54742382542474db798717e6ee6b3f2 SOURCES/Python-3.14.3.tar.xz
|
||||
@ -1,124 +0,0 @@
|
||||
From 4f17f6e04534d93fbd23862f9f290d3a281ab30b Mon Sep 17 00:00:00 2001
|
||||
From: Petr Viktorin <encukou@gmail.com>
|
||||
Date: Fri, 5 Jun 2026 10:50:14 +0200
|
||||
Subject: [PATCH] [3.14] gh-149144: Use decodeURIComponent() for UTF-8 support
|
||||
in js_output() (GH-149157)
|
||||
|
||||
(cherry picked from commit 461b1d96313de02992d284c1782be9aff24586c9)
|
||||
|
||||
Co-authored-by: Seth Larson <seth@python.org>
|
||||
---
|
||||
Lib/http/cookies.py | 6 +++---
|
||||
Lib/test/test_http_cookies.py | 27 ++++++++++++++-------------
|
||||
2 files changed, 17 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py
|
||||
index 5c5b14788dc2f09..abebb4b69fd05f4 100644
|
||||
--- a/Lib/http/cookies.py
|
||||
+++ b/Lib/http/cookies.py
|
||||
@@ -391,18 +391,18 @@ def __repr__(self):
|
||||
return '<%s: %s>' % (self.__class__.__name__, self.OutputString())
|
||||
|
||||
def js_output(self, attrs=None):
|
||||
- import base64
|
||||
+ import urllib.parse
|
||||
# Print javascript
|
||||
output_string = self.OutputString(attrs)
|
||||
if _has_control_character(output_string):
|
||||
raise CookieError("Control characters are not allowed in cookies")
|
||||
# Base64-encode value to avoid template
|
||||
# injection in cookie values.
|
||||
- output_encoded = base64.b64encode(output_string.encode('utf-8')).decode("ascii")
|
||||
+ output_encoded = urllib.parse.quote(output_string, safe='', encoding='utf-8')
|
||||
return """
|
||||
<script type="text/javascript">
|
||||
<!-- begin hiding
|
||||
- document.cookie = atob(\"%s\");
|
||||
+ document.cookie = decodeURIComponent(\"%s\");
|
||||
// end hiding -->
|
||||
</script>
|
||||
""" % (output_encoded,)
|
||||
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py
|
||||
index 4884b07c95b9c50..3ace949afd403eb 100644
|
||||
--- a/Lib/test/test_http_cookies.py
|
||||
+++ b/Lib/test/test_http_cookies.py
|
||||
@@ -1,11 +1,11 @@
|
||||
# Simple test suite for http/cookies.py
|
||||
-import base64
|
||||
import copy
|
||||
import unittest
|
||||
import doctest
|
||||
from http import cookies
|
||||
import pickle
|
||||
from test import support
|
||||
+import urllib.parse
|
||||
|
||||
|
||||
class CookieTests(unittest.TestCase):
|
||||
@@ -152,19 +152,19 @@ def test_load(self):
|
||||
|
||||
self.assertEqual(C.output(['path']),
|
||||
'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
|
||||
- cookie_encoded = base64.b64encode(b'Customer="WILE_E_COYOTE"; Path=/acme; Version=1').decode('ascii')
|
||||
+ cookie_encoded = urllib.parse.quote('Customer="WILE_E_COYOTE"; Path=/acme; Version=1', safe='', encoding='utf-8')
|
||||
self.assertEqual(C.js_output(), fr"""
|
||||
<script type="text/javascript">
|
||||
<!-- begin hiding
|
||||
- document.cookie = atob("{cookie_encoded}");
|
||||
+ document.cookie = decodeURIComponent("{cookie_encoded}");
|
||||
// end hiding -->
|
||||
</script>
|
||||
""")
|
||||
- cookie_encoded = base64.b64encode(b'Customer="WILE_E_COYOTE"; Path=/acme').decode('ascii')
|
||||
+ cookie_encoded = urllib.parse.quote('Customer="WILE_E_COYOTE"; Path=/acme', safe='', encoding='utf-8')
|
||||
self.assertEqual(C.js_output(['path']), fr"""
|
||||
<script type="text/javascript">
|
||||
<!-- begin hiding
|
||||
- document.cookie = atob("{cookie_encoded}");
|
||||
+ document.cookie = decodeURIComponent("{cookie_encoded}");
|
||||
// end hiding -->
|
||||
</script>
|
||||
""")
|
||||
@@ -269,19 +269,19 @@ def test_quoted_meta(self):
|
||||
|
||||
self.assertEqual(C.output(['path']),
|
||||
'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
|
||||
- expected_encoded_cookie = base64.b64encode(b'Customer=\"WILE_E_COYOTE\"; Path=/acme; Version=1').decode('ascii')
|
||||
+ expected_encoded_cookie = urllib.parse.quote('Customer=\"WILE_E_COYOTE\"; Path=/acme; Version=1', safe='', encoding='utf-8')
|
||||
self.assertEqual(C.js_output(), fr"""
|
||||
<script type="text/javascript">
|
||||
<!-- begin hiding
|
||||
- document.cookie = atob("{expected_encoded_cookie}");
|
||||
+ document.cookie = decodeURIComponent("{expected_encoded_cookie}");
|
||||
// end hiding -->
|
||||
</script>
|
||||
""")
|
||||
- expected_encoded_cookie = base64.b64encode(b'Customer=\"WILE_E_COYOTE\"; Path=/acme').decode('ascii')
|
||||
+ expected_encoded_cookie = urllib.parse.quote('Customer=\"WILE_E_COYOTE\"; Path=/acme', safe='', encoding='utf-8')
|
||||
self.assertEqual(C.js_output(['path']), fr"""
|
||||
<script type="text/javascript">
|
||||
<!-- begin hiding
|
||||
- document.cookie = atob("{expected_encoded_cookie}");
|
||||
+ document.cookie = decodeURIComponent("{expected_encoded_cookie}");
|
||||
// end hiding -->
|
||||
</script>
|
||||
""")
|
||||
@@ -372,13 +372,14 @@ def test_setter(self):
|
||||
self.assertEqual(
|
||||
M.output(),
|
||||
"Set-Cookie: %s=%s; Path=/foo" % (i, "%s_coded_val" % i))
|
||||
- expected_encoded_cookie = base64.b64encode(
|
||||
- ("%s=%s; Path=/foo" % (i, "%s_coded_val" % i)).encode("ascii")
|
||||
- ).decode('ascii')
|
||||
+ expected_encoded_cookie = urllib.parse.quote(
|
||||
+ "%s=%s; Path=/foo" % (i, "%s_coded_val" % i),
|
||||
+ safe='', encoding='utf-8',
|
||||
+ )
|
||||
expected_js_output = """
|
||||
<script type="text/javascript">
|
||||
<!-- begin hiding
|
||||
- document.cookie = atob("%s");
|
||||
+ document.cookie = decodeURIComponent("%s");
|
||||
// end hiding -->
|
||||
</script>
|
||||
""" % (expected_encoded_cookie,)
|
||||
@ -51,7 +51,7 @@ index aeb7c6cfc7..86f9ae9e76 100644
|
||||
if os.path.isdir(sitedir):
|
||||
addsitedir(sitedir, known_paths)
|
||||
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
|
||||
index faf8273bd0..d7667bbc77 100644
|
||||
index 2ecbff222f..7211773bad 100644
|
||||
--- a/Lib/sysconfig/__init__.py
|
||||
+++ b/Lib/sysconfig/__init__.py
|
||||
@@ -106,6 +106,12 @@
|
||||
@ -130,7 +130,7 @@ index faf8273bd0..d7667bbc77 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 1fe4b6849f..e0cb3ec23a 100644
|
||||
index 09eff11179..c227815ebd 100644
|
||||
--- a/Lib/test/test_sysconfig.py
|
||||
+++ b/Lib/test/test_sysconfig.py
|
||||
@@ -132,8 +132,19 @@ def test_get_path(self):
|
||||
@ -154,7 +154,7 @@ index 1fe4b6849f..e0cb3ec23a 100644
|
||||
os.path.normpath(expected),
|
||||
)
|
||||
|
||||
@@ -397,7 +408,7 @@ def test_get_config_h_filename(self):
|
||||
@@ -395,7 +406,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 1fe4b6849f..e0cb3ec23a 100644
|
||||
if HAS_USER_BASE:
|
||||
wanted.extend(['nt_user', 'osx_framework_user', 'posix_user'])
|
||||
self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
|
||||
@@ -409,6 +420,8 @@ def test_symlink(self): # Issue 7880
|
||||
@@ -407,6 +418,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))
|
||||
|
||||
@ -15,10 +15,10 @@ which is tested as working.
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py
|
||||
index 465f65a03b..3379ab8aa9 100644
|
||||
index daeaa38a3c..b243f1da14 100644
|
||||
--- a/Lib/test/test_pyexpat.py
|
||||
+++ b/Lib/test/test_pyexpat.py
|
||||
@@ -905,6 +905,8 @@ def start_element(name, _):
|
||||
@@ -847,6 +847,8 @@ def start_element(name, _):
|
||||
|
||||
self.assertEqual(started, ['doc'])
|
||||
|
||||
@ -41,7 +41,7 @@ index 5c10bcedc6..1fd7a273b5 100644
|
||||
result = BytesIO()
|
||||
xmlgen = XMLGenerator(result)
|
||||
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
|
||||
index 1bd0fde844..f87134c11e 100644
|
||||
index 0b343cc4bb..145ecacd21 100644
|
||||
--- a/Lib/test/test_xml_etree.py
|
||||
+++ b/Lib/test/test_xml_etree.py
|
||||
@@ -1573,9 +1573,13 @@ def test_simple_xml(self, chunk_size=None, flush=False):
|
||||
@ -81,10 +81,10 @@ index 2a17c891dd..64017c666c 100644
|
||||
}
|
||||
#endif
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index da6d7c3315..92a6825b5e 100644
|
||||
index 38a355a23f..67c19c329e 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -3420,3 +3420,6 @@ MODULE__MULTIBYTECODEC_DEPS=$(srcdir)/Modules/cjkcodecs/multibytecodec.h
|
||||
@@ -3415,3 +3415,6 @@ MODULE__MULTIBYTECODEC_DEPS=$(srcdir)/Modules/cjkcodecs/multibytecodec.h
|
||||
# Local Variables:
|
||||
# mode: makefile
|
||||
# End:
|
||||
@ -45,7 +45,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}.5
|
||||
%global general_version %{pybasever}.3
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
@ -109,30 +109,31 @@ 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 26.1.1
|
||||
%global pip_version 25.3
|
||||
%global setuptools_version 79.0.1
|
||||
# All of those also include a list of indirect bundled libs:
|
||||
# pip
|
||||
# $ %%{_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.4
|
||||
Provides: bundled(python3dist(certifi)) = 2026.2.25
|
||||
Provides: bundled(python3dist(cachecontrol)) = 0.14.3
|
||||
Provides: bundled(python3dist(certifi)) = 2025.10.5
|
||||
Provides: bundled(python3dist(dependency-groups)) = 1.3.1
|
||||
Provides: bundled(python3dist(distlib)) = 0.4
|
||||
Provides: bundled(python3dist(distro)) = 1.9
|
||||
Provides: bundled(python3dist(idna)) = 3.11
|
||||
Provides: bundled(python3dist(idna)) = 3.10
|
||||
Provides: bundled(python3dist(msgpack)) = 1.1.2
|
||||
Provides: bundled(python3dist(packaging)) = 26.2
|
||||
Provides: bundled(python3dist(platformdirs)) = 4.5.1
|
||||
Provides: bundled(python3dist(packaging)) = 25
|
||||
Provides: bundled(python3dist(platformdirs)) = 4.5
|
||||
Provides: bundled(python3dist(pygments)) = 2.19.2
|
||||
Provides: bundled(python3dist(pyproject-hooks)) = 1.2
|
||||
Provides: bundled(python3dist(requests)) = 2.33.1
|
||||
Provides: bundled(python3dist(requests)) = 2.32.5
|
||||
Provides: bundled(python3dist(resolvelib)) = 1.2.1
|
||||
Provides: bundled(python3dist(rich)) = 14.2
|
||||
Provides: bundled(python3dist(setuptools)) = 70.3
|
||||
Provides: bundled(python3dist(tomli)) = 2.3.1
|
||||
Provides: bundled(python3dist(tomli)) = 2.3
|
||||
Provides: bundled(python3dist(tomli-w)) = 1.2
|
||||
Provides: bundled(python3dist(truststore)) = 0.10.4
|
||||
Provides: bundled(python3dist(urllib3)) = 2.6.3
|
||||
Provides: bundled(python3dist(urllib3)) = 1.26.20
|
||||
}
|
||||
# setuptools
|
||||
# vendor.txt not in .whl
|
||||
@ -340,9 +341,6 @@ Source0: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz
|
||||
# Originally written by bkabrda
|
||||
Source8: check-pyc-timestamps.py
|
||||
|
||||
# A script that determines the required expat version
|
||||
Source9: expat-requires.py
|
||||
|
||||
# Desktop menu entry for idle3
|
||||
Source10: idle3.desktop
|
||||
|
||||
@ -437,12 +435,6 @@ Patch475: 00475-cve-2025-15367.patch
|
||||
# direct call to the check function.
|
||||
Patch477: 00477-raise-an-error-when-importing-stdlib-modules-compiled-for-a-different-python-version.patch
|
||||
|
||||
# 00487 #
|
||||
# Fixup for CVE-2026-6019
|
||||
# Use decodeURIComponent() for UTF-8 support in js_output()
|
||||
# Resolved upstream: https://github.com/python/cpython/issues/149144
|
||||
Patch487: 00487-fixup-for-CVE-2026-6019.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
#
|
||||
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
||||
@ -623,20 +615,6 @@ Recommends: (%{pkgname}-tkinter%{?_isa} if tk%{?_isa})
|
||||
# The zoneinfo module needs tzdata
|
||||
Requires: tzdata
|
||||
|
||||
# The requirement on libexpat is generated, but we need to version it.
|
||||
# When built with a specific expat version, but installed with an older one,
|
||||
# we sometimes get:
|
||||
# ImportError: /usr/lib64/python3.X/lib-dynload/pyexpat.cpython-....so:
|
||||
# undefined symbol: XML_...
|
||||
# The pyexpat module has build-time checks for expat version to only use the
|
||||
# available symbols. However, there is no runtime protection, so when the module
|
||||
# is later installed with an older expat, it may error due to undefined symbols.
|
||||
# This breaks many things, including python -m venv.
|
||||
# We avoid this problem by requiring expat equal or greater than the latest known
|
||||
# version which introduced new symbols used by Python.
|
||||
# Other subpackages (like -debug) also need this, but they all depend on -libs.
|
||||
%global expat_min_version 2.7.2
|
||||
Requires: expat%{?_isa} >= %{expat_min_version}
|
||||
|
||||
%description -n %{pkgname}-libs
|
||||
This package contains runtime libraries for use by Python:
|
||||
@ -661,6 +639,10 @@ Requires: (python3-rpm-macros if rpm-build)
|
||||
# On Fedora, we keep this to avoid one additional round of %%generate_buildrequires.
|
||||
%{!?rhel:Requires: (pyproject-rpm-macros if rpm-build)}
|
||||
|
||||
# We provide the python3.14-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
|
||||
|
||||
%if %{with main_python}
|
||||
@ -834,7 +816,6 @@ License: %{libs_license} AND Apache-2.0 AND ISC AND LGPL-2.1-only AND MPL-2.0 AN
|
||||
# See the comments in the definition of main -libs subpackage for detailed explanations
|
||||
Provides: bundled(mimalloc) = 2.12
|
||||
Requires: tzdata
|
||||
Requires: expat%{?_isa} >= %{expat_min_version}
|
||||
|
||||
# There are files in the standard library that have python shebang.
|
||||
# We've filtered the automatic requirement out so libs are installable without
|
||||
@ -1459,12 +1440,6 @@ for Module in %{buildroot}/%{dynload_dir}/*.so ; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Check the expat compatibility
|
||||
expat_found=$(LD_LIBRARY_PATH="%{buildroot}%{_libdir}" PYTHONPATH="%{buildroot}%{pylibdir}" %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE9})
|
||||
if [ "${expat_found}" != "%{expat_min_version}" ]; then
|
||||
echo "Found expat version is different than the declared one, found: ${expat_found}" ; exit 1
|
||||
fi
|
||||
|
||||
|
||||
# ======================================================
|
||||
# Running the upstream test suite
|
||||
@ -1980,42 +1955,17 @@ CheckPython freethreading
|
||||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Tue Jun 09 2026 Miro Hrončok <mhroncok@redhat.com> - 3.14.5-1
|
||||
- Update to 3.14.5
|
||||
Resolves: RHEL-176147
|
||||
|
||||
* Tue Jun 09 2026 Miro Hrončok <mhroncok@redhat.com> - 3.14.5~rc1-1
|
||||
- Update to 3.14.5rc1
|
||||
- Move back to the generational from the incremental garbage collector
|
||||
- Security fix for CVE-2026-6019
|
||||
Resolves: RHEL-176147
|
||||
|
||||
* Thu Apr 16 2026 Charalampos Stratakis <cstratak@redhat.com> - 3.14.4-2
|
||||
- Security fixes for CVE-2026-1502, CVE-2026-4786, CVE-2026-5713, CVE-2026-6100
|
||||
Resolves: RHEL-168121, RHEL-167887
|
||||
|
||||
* Wed Apr 08 2026 Karolina Surma <ksurma@redhat.com> - 3.14.4-1
|
||||
- Update to Python 3.14.4
|
||||
- Security fixes for CVE-2026-2297, CVE-2026-3644, CVE-2026-4224, CVE-2026-0865
|
||||
Related: RHEL-168121, RHEL-167887
|
||||
|
||||
* Thu Mar 26 2026 Lumír Balhar <lbalhar@redhat.com> - 3.14.3-2
|
||||
- Security fix for CVE-2026-4519
|
||||
Resolves: RHEL-158114
|
||||
|
||||
* Wed Feb 04 2026 Karolina Surma <ksurma@redhat.com> - 3.14.3-1
|
||||
- Update to Python 3.14.3
|
||||
- Security fixes for CVE-2025-11468, CVE-2026-0672, CVE-2026-0865,
|
||||
CVE-2025-15282, CVE-2026-1299, CVE-2025-15366, CVE-2025-15367
|
||||
Resolves: RHEL-144855, RHEL-143058, RHEL-143111
|
||||
- Security fixes for CVE-2025-11468, CVE-2026-0672,CVE-2026-0865,
|
||||
CVE-2025-15282, CVE-2026-1299, CVE-2025-11468, CVE-2025-15366,
|
||||
CVE-2025-15367
|
||||
Resolves: RHEL-144896, RHEL-143115, RHEL-143173
|
||||
|
||||
* Mon Jan 19 2026 Charalampos Stratakis <cstratak@redhat.com> - 3.14.2-3
|
||||
* Fri Jan 09 2026 Charalampos Stratakis <cstratak@redhat.com> - 3.14.2-3
|
||||
- Support OpenSSL FIPS mode
|
||||
- Disable the builtin hashlib hashes except blake2
|
||||
Related: RHEL-120788
|
||||
|
||||
* Mon Jan 12 2026 Karolina Surma <ksurma@redhat.com> - 3.14.2-2
|
||||
- Explicitly require expat >= 2.7.2
|
||||
Related: RHEL-120823
|
||||
|
||||
* Fri Dec 05 2025 Miro Hrončok <mhroncok@redhat.com> - 3.14.2-1
|
||||
- Update to Python 3.14.2
|
||||
@ -1,50 +0,0 @@
|
||||
import pathlib
|
||||
import pyexpat
|
||||
import sys
|
||||
|
||||
|
||||
# This will determine the version of currently installed expat
|
||||
EXPAT_VERSION = pyexpat.EXPAT_VERSION.removeprefix('expat_')
|
||||
MAJOR, MINOR, PATCH = (int(i) for i in EXPAT_VERSION.split('.'))
|
||||
EXPAT_COMBINED_VERSION = 10000*MAJOR + 100*MINOR + PATCH
|
||||
|
||||
# For the listed files, we find all XML_COMBINED_VERSION-based #ifs
|
||||
SRC = pathlib.Path.cwd()
|
||||
SOURCES = [
|
||||
SRC / 'Modules/pyexpat.c',
|
||||
SRC / 'Modules/clinic/pyexpat.c.h',
|
||||
]
|
||||
versions = set()
|
||||
for source in SOURCES:
|
||||
for line in source.read_text().splitlines():
|
||||
if 'XML_COMBINED_VERSION' not in line:
|
||||
continue
|
||||
words = line.split()
|
||||
if words[0] == '#define':
|
||||
continue
|
||||
if len(words) != 4:
|
||||
continue
|
||||
if words[0] not in ('#if', '#elif'):
|
||||
continue
|
||||
if words[1].startswith('(') and words[-1].endswith(')'):
|
||||
words[1] = words[1][1:]
|
||||
words[-1] = words[-1][:-1]
|
||||
if words[1] == 'XML_COMBINED_VERSION':
|
||||
version = int(words[3])
|
||||
if words[2] == '>':
|
||||
versions.add(version+1)
|
||||
continue
|
||||
if words[2] == '>=':
|
||||
versions.add(version)
|
||||
continue
|
||||
raise ValueError(
|
||||
'Unknown line with XML_COMBINED_VERSION, adjust this script:\n\n'
|
||||
f'{line}'
|
||||
)
|
||||
|
||||
# We need the highest satisfiable version used in the #ifs, in x.y.z notation
|
||||
v = max({v for v in versions if v <= EXPAT_COMBINED_VERSION})
|
||||
major, minor_patch = divmod(v, 10000)
|
||||
minor, patch = divmod(minor_patch, 100)
|
||||
print(f"{major}.{minor}.{patch}")
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
80
plan.fmf
80
plan.fmf
@ -1,80 +0,0 @@
|
||||
execute:
|
||||
how: tmt
|
||||
|
||||
provision:
|
||||
hardware:
|
||||
memory: '>= 3 GB'
|
||||
|
||||
environment:
|
||||
pybasever: '3.14'
|
||||
|
||||
discover:
|
||||
- name: tests_python
|
||||
how: shell
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/python.git
|
||||
tests:
|
||||
- name: smoke
|
||||
path: /smoke
|
||||
test: "VERSION=${pybasever} CYTHON=true ./venv.sh"
|
||||
- name: smoke_virtualenv
|
||||
path: /smoke
|
||||
test: "VERSION=${pybasever} METHOD=virtualenv CYTHON=true ./venv.sh"
|
||||
- name: debugsmoke
|
||||
path: /smoke
|
||||
test: "PYTHON=python${pybasever}d TOX=false VERSION=${pybasever} CYTHON=true ./venv.sh"
|
||||
- name: selftest
|
||||
path: /selftest
|
||||
test: "VERSION=${pybasever} X='-i test_check_probes' ./parallel.sh"
|
||||
- name: debugtest
|
||||
path: /selftest
|
||||
# test_base_interpreter: https://github.com/python/cpython/issues/131372
|
||||
test: "VERSION=${pybasever} PYTHON=python${pybasever}d X='-i test_check_probes -i test_base_interpreter' ./parallel.sh"
|
||||
- name: freethreadingtest
|
||||
path: /selftest
|
||||
test: "VERSION=${pybasever}t X='-i test_check_probes -i test_base_interpreter' ./parallel.sh"
|
||||
- name: optimizedflags
|
||||
path: /flags
|
||||
test: "python${pybasever} ./assertflags.py -O3 CFLAGS PY_BUILTIN_MODULE_CFLAGS PY_CFLAGS PY_CORE_CFLAGS PY_CFLAGS_NODIST PY_STDMODULE_CFLAGS"
|
||||
- name: debugflags
|
||||
path: /flags
|
||||
test: "python${pybasever}d ./assertflags.py -O0 CFLAGS PY_BUILTIN_MODULE_CFLAGS PY_CFLAGS PY_CORE_CFLAGS PY_CFLAGS_NODIST PY_STDMODULE_CFLAGS"
|
||||
- name: freethreadingflags
|
||||
path: /flags
|
||||
test: "python${pybasever}t ./assertflags.py -O3 CFLAGS PY_BUILTIN_MODULE_CFLAGS PY_CFLAGS PY_CORE_CFLAGS PY_CFLAGS_NODIST PY_STDMODULE_CFLAGS"
|
||||
- name: freethreadingdebugflags
|
||||
path: /flags
|
||||
test: "python${pybasever}td ./assertflags.py -O0 CFLAGS PY_BUILTIN_MODULE_CFLAGS PY_CFLAGS PY_CORE_CFLAGS PY_CFLAGS_NODIST PY_STDMODULE_CFLAGS"
|
||||
- name: marshalparser
|
||||
path: /marshalparser
|
||||
test: "VERSION=${pybasever} SAMPLE=10 ./test_marshalparser_compatibility.sh"
|
||||
|
||||
prepare:
|
||||
- name: Install dependencies
|
||||
how: install
|
||||
package:
|
||||
- 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm'
|
||||
- gcc # for extension building in venv and selftest
|
||||
- gcc-c++ # for test_cppext
|
||||
- gdb # for test_gdb
|
||||
- "python${pybasever}" # the test subject
|
||||
- "python${pybasever}-debug" # for leak testing
|
||||
- "python${pybasever}-devel" # for extension building in venv and selftest
|
||||
- "python${pybasever}-tkinter" # for selftest
|
||||
- "python${pybasever}-test" # for selftest
|
||||
- "python${pybasever}-freethreading" # for -O... flag test
|
||||
- "python${pybasever}-freethreading-debug" # for -O... flag test
|
||||
- "python${pybasever}-freethreading-tkinter" # for freethreadingtest
|
||||
- "python${pybasever}-freethreading-test" # for freethreadingtest
|
||||
- tox # for venv tests
|
||||
- virtualenv # for virtualenv tests
|
||||
- glibc-all-langpacks # for locale tests
|
||||
- marshalparser # for testing compatibility (magic numbers) with marshalparser
|
||||
- rpm # for debugging
|
||||
- dnf # for upgrade
|
||||
- name: Update packages
|
||||
how: shell
|
||||
script: dnf upgrade -y
|
||||
- name: rpm_qa
|
||||
order: 100
|
||||
how: shell
|
||||
script: rpm -qa | sort | tee $TMT_PLAN_DATA/rpmqa.txt
|
||||
@ -1,37 +0,0 @@
|
||||
# exclude test XML data (not always valid) from XML validity check:
|
||||
xml:
|
||||
ignore:
|
||||
- '/usr/lib*/python*/test/xmltestdata/*'
|
||||
- '/usr/lib*/python*/test/xmltestdata/*/*'
|
||||
|
||||
# exclude _socket from ipv4 only functions check, it has both ipv4 and ipv6 only
|
||||
badfuncs:
|
||||
allowed:
|
||||
'/usr/lib*/python*/lib-dynload/_socket.*':
|
||||
- inet_aton
|
||||
- inet_ntoa
|
||||
|
||||
# exclude the debug build from annocheck entirely
|
||||
annocheck:
|
||||
ignore:
|
||||
- '/usr/bin/python*d'
|
||||
- '/usr/lib*/libpython*d.so.1.0'
|
||||
- '/usr/lib*/python*/lib-dynload/*.cpython-*d-*-*-*.so'
|
||||
|
||||
# don't report changed content of compiled files
|
||||
# that is expected with every toolchain update and not reproducible yet
|
||||
changedfiles:
|
||||
# note that this is a posix regex, so no \d
|
||||
exclude_path: (\.so(\.[0-9]+(\.[0-9]+)?)?$|^/usr/bin/python[0-9]+\.[0-9]+d?m?$)
|
||||
|
||||
# files change size all the time, we don't need to VERIFY it
|
||||
# however, the INFO is useful, so we don't disable the check entirely
|
||||
filesize:
|
||||
# artificially large number, TODO a better way
|
||||
size_threshold: 100000
|
||||
|
||||
|
||||
# completely disabled inspections:
|
||||
inspections:
|
||||
# we know about our patches, no need to report anything
|
||||
patches: off
|
||||
106
rpmlint.toml
106
rpmlint.toml
@ -1,106 +0,0 @@
|
||||
Filters = [
|
||||
|
||||
# KNOWN BUGS:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1489816
|
||||
'crypto-policy-non-compliance-openssl',
|
||||
|
||||
|
||||
# TESTS:
|
||||
'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/python3\.\d+t?/test',
|
||||
|
||||
|
||||
# OTHER DELIBERATES:
|
||||
# chroot function
|
||||
'missing-call-to-chdir-with-chroot',
|
||||
|
||||
# gethostbyname function calls gethostbyname
|
||||
'(E|W): binary-or-shlib-calls-gethostbyname /usr/lib(64)?/python3\.\d+t?/lib-dynload/_socket\.',
|
||||
|
||||
# intentionally unversioned and selfobsoleted
|
||||
'unversioned-explicit-obsoletes python',
|
||||
'unversioned Obsoletes: Obsoletes: python3\.\d+$',
|
||||
'self-obsoletion python3\.\d+(-\S+)? obsoletes python3\.\d+(-\S+)?',
|
||||
|
||||
# intentionally hardcoded
|
||||
'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})',
|
||||
|
||||
# we have non binary stuff, python files
|
||||
'only-non-binary-in-usr-lib',
|
||||
|
||||
# some devel files that are deliberately needed
|
||||
'devel-file-in-non-devel-package /usr/include/python3\.\d+m?t?/pyconfig-(32|64)\.h',
|
||||
'devel-file-in-non-devel-package /usr/lib(64)?/python3\.\d+t?/distutils/tests/xxmodule\.c',
|
||||
# ...or are used as test data
|
||||
'devel-file-in-non-devel-package /usr/lib(64)?/python3\.\d+t?/test',
|
||||
|
||||
# some bytecode is shipped without sources on purpose, as a space optimization
|
||||
# if this regex needs to be relaxed in the future, make sure it **does not** match pyc files in __pycache__
|
||||
'python-bytecode-without-source /usr/lib(64)?/python3\.\d+t?/(encodings|pydoc_data)/[^/]+.pyc',
|
||||
|
||||
# DUPLICATE FILES
|
||||
# test data are often duplicated
|
||||
'(E|W): files-duplicate /usr/lib(64)?/python3\.\d+t?/(test|__phello__)/',
|
||||
# duplicated inits or mains are also common
|
||||
'(E|W): files-duplicate .+__init__\.py.+__init__\.py',
|
||||
'(E|W): files-duplicate .+__main__\.py.+__main__\.py',
|
||||
# files in the debugsource package
|
||||
'(E|W): files-duplicate /usr/src/debug',
|
||||
# general waste report
|
||||
'(E|W): files-duplicated-waste',
|
||||
|
||||
# SORRY, NOT SORRY:
|
||||
# manual pages
|
||||
'no-manual-page-for-binary (idle|pydoc|pyvenv|2to3|python3?-debug|pathfix|msgfmt|pygettext)',
|
||||
'no-manual-page-for-binary python3?.*-config$',
|
||||
'no-manual-page-for-binary python3\.\d+t?dm?$',
|
||||
|
||||
# missing documentation from subpackages
|
||||
'^python3(\.\d+)?-(freethreading(-debug)?|debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation',
|
||||
|
||||
# platform python is obsoleted, but not provided
|
||||
'obsolete-not-provided platform-python',
|
||||
|
||||
# we have extra tokens at the end of %endif/%else directives, we consider them useful
|
||||
'extra tokens at the end of %(endif|else) directive',
|
||||
|
||||
|
||||
# RPMLINT IMPERFECTIONS
|
||||
# https://github.com/rpm-software-management/rpmlint/issues/780
|
||||
'/usr/lib/debug',
|
||||
|
||||
# we provide python(abi) manually to be sure. createrepo will merge this with the automatic
|
||||
'python3(\.\d+)?\.[^:-]+: (E|W): useless-provides python\(abi\)',
|
||||
|
||||
# debugsource and debuginfo have no docs
|
||||
'^python3(\.\d+)?-debug(source|info)\.[^:]+: (E|W): no-documentation',
|
||||
|
||||
# this is OK for F28+
|
||||
'library-without-ldconfig-post',
|
||||
|
||||
# freethreading/debug package contains devel and non-devel files
|
||||
'python3(\.\d+)?-(freethreading(-debug)?|debug)\.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package',
|
||||
|
||||
# this goes to other subpackage, hence not actually dangling
|
||||
'dangling-relative-symlink /usr/bin/python python3',
|
||||
'dangling-relative-symlink /usr/share/man/man1/python\.1\.gz python3\.1\.gz',
|
||||
'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\d+t?d?m?(-embed)?\.pc python-3\.\d+t?(-embed)?\.pc',
|
||||
|
||||
# the python-unversioned-command package contains dangling symlinks by design
|
||||
'^python-unversioned-command\.[^:]+: (E|W): dangling-relative-symlink (/usr/bin/python \./python3|/usr/share/man/man1/python\.1\S* ./python3\.1\S*)$',
|
||||
|
||||
# we need this macro to evaluate, even if the line starts with #
|
||||
'macro-in-comment %\{_pyconfig(32|64)_h\}',
|
||||
|
||||
# Python modules don't need to be linked against libc
|
||||
# Since 3.8 they are no longer linked against libpython3.8.so.1.0
|
||||
'(E|W): library-not-linked-against-libc /usr/lib(64)?/python3\.\d+/lib-dynload/',
|
||||
'(E|W): shared-lib(rary)?-without-dependency-information /usr/lib(64)?/python3\.\d+/lib-dynload/',
|
||||
|
||||
# specfile-errors are listed twice, once with reason and once without
|
||||
# we filter out the empty ones
|
||||
'\bpython3(\.\d+)?\.(src|spec): (E|W): specfile-error\s+$',
|
||||
|
||||
# SPELLING ERRORS
|
||||
'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest|unittest|gil) ',
|
||||
|
||||
]
|
||||
Loading…
Reference in New Issue
Block a user