|
|
|
@ -16,12 +16,12 @@ 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}.1
|
|
|
|
|
#global prerel ...
|
|
|
|
|
%global upstream_version %{general_version}%{?prerel}
|
|
|
|
|
Version: %{general_version}%{?prerel:~%{prerel}}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
License: Python-2.0.1
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
License: Python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ==================================
|
|
|
|
@ -62,35 +62,39 @@ License: Python-2.0.1
|
|
|
|
|
# Whether to use RPM build wheels from the python-{pip,setuptools,wheel}-wheel packages
|
|
|
|
|
# Uses upstream bundled prebuilt wheels otherwise
|
|
|
|
|
%bcond_without rpmwheels
|
|
|
|
|
|
|
|
|
|
# If the rpmwheels condition is disabled, we use the bundled wheel packages
|
|
|
|
|
# from Python with the versions below.
|
|
|
|
|
# This needs to be manually updated when we update Python.
|
|
|
|
|
%global pip_version 24.2
|
|
|
|
|
%global pip_version 23.2.1
|
|
|
|
|
%global setuptools_version 67.6.1
|
|
|
|
|
%global wheel_version 0.40.0
|
|
|
|
|
# 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
|
|
|
|
|
Provides: bundled(python3dist(certifi)) = 2024.7.4
|
|
|
|
|
Provides: bundled(python3dist(distlib)) = 0.3.8
|
|
|
|
|
Provides: bundled(python3dist(distro)) = 1.9
|
|
|
|
|
Provides: bundled(python3dist(idna)) = 3.7
|
|
|
|
|
Provides: bundled(python3dist(msgpack)) = 1.0.8
|
|
|
|
|
Provides: bundled(python3dist(packaging)) = 24.1
|
|
|
|
|
Provides: bundled(python3dist(platformdirs)) = 4.2.2
|
|
|
|
|
Provides: bundled(python3dist(pygments)) = 2.18
|
|
|
|
|
Provides: bundled(python3dist(cachecontrol)) = 0.12.11
|
|
|
|
|
Provides: bundled(python3dist(certifi)) = 2023.5.7
|
|
|
|
|
Provides: bundled(python3dist(chardet)) = 5.1
|
|
|
|
|
Provides: bundled(python3dist(colorama)) = 0.4.6
|
|
|
|
|
Provides: bundled(python3dist(distlib)) = 0.3.6
|
|
|
|
|
Provides: bundled(python3dist(distro)) = 1.8
|
|
|
|
|
Provides: bundled(python3dist(idna)) = 3.4
|
|
|
|
|
Provides: bundled(python3dist(msgpack)) = 1.0.5
|
|
|
|
|
Provides: bundled(python3dist(packaging)) = 21.3
|
|
|
|
|
Provides: bundled(python3dist(platformdirs)) = 3.8.1
|
|
|
|
|
Provides: bundled(python3dist(pygments)) = 2.15.1
|
|
|
|
|
Provides: bundled(python3dist(pyparsing)) = 3.1
|
|
|
|
|
Provides: bundled(python3dist(pyproject-hooks)) = 1
|
|
|
|
|
Provides: bundled(python3dist(requests)) = 2.32.3
|
|
|
|
|
Provides: bundled(python3dist(requests)) = 2.31
|
|
|
|
|
Provides: bundled(python3dist(resolvelib)) = 1.0.1
|
|
|
|
|
Provides: bundled(python3dist(rich)) = 13.7.1
|
|
|
|
|
Provides: bundled(python3dist(setuptools)) = 70.3
|
|
|
|
|
Provides: bundled(python3dist(rich)) = 13.4.2
|
|
|
|
|
Provides: bundled(python3dist(setuptools)) = 68
|
|
|
|
|
Provides: bundled(python3dist(six)) = 1.16
|
|
|
|
|
Provides: bundled(python3dist(tenacity)) = 8.2.2
|
|
|
|
|
Provides: bundled(python3dist(tomli)) = 2.0.1
|
|
|
|
|
Provides: bundled(python3dist(truststore)) = 0.9.1
|
|
|
|
|
Provides: bundled(python3dist(typing-extensions)) = 4.12.2
|
|
|
|
|
Provides: bundled(python3dist(urllib3)) = 1.26.18
|
|
|
|
|
Provides: bundled(python3dist(typing-extensions)) = 4.7.1
|
|
|
|
|
Provides: bundled(python3dist(urllib3)) = 1.26.16
|
|
|
|
|
Provides: bundled(python3dist(webencodings)) = 0.5.1
|
|
|
|
|
}
|
|
|
|
|
# setuptools
|
|
|
|
|
# vendor.txt files not in .whl
|
|
|
|
@ -111,7 +115,7 @@ Provides: bundled(python3dist(typing-extensions)) = 4.4
|
|
|
|
|
Provides: bundled(python3dist(zipp)) = 3.7
|
|
|
|
|
}
|
|
|
|
|
# wheel
|
|
|
|
|
# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/test/wheeldata/wheel-*.whl wheel/vendored/vendor.txt)
|
|
|
|
|
# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/test/wheel-*.whl wheel/vendored/vendor.txt)
|
|
|
|
|
%global wheel_bundled_provides %{expand:
|
|
|
|
|
Provides: bundled(python3dist(packaging)) = 23
|
|
|
|
|
}
|
|
|
|
@ -195,13 +199,6 @@ Provides: bundled(python3dist(packaging)) = 23
|
|
|
|
|
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
|
|
|
|
|
%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
|
|
|
|
|
|
|
|
|
|
# The -O flag for the compiler, optimized builds
|
|
|
|
|
# https://fedoraproject.org/wiki/Changes/Python_built_with_gcc_O3
|
|
|
|
|
%global optflags_optimized -O3
|
|
|
|
|
# The -O flag for the compiler, debug builds
|
|
|
|
|
# -Wno-cpp avoids some warnings with -O0
|
|
|
|
|
%global optflags_debug -O0 -Wno-cpp
|
|
|
|
|
|
|
|
|
|
# Disable automatic bytecompilation. The python3 binary is not yet be
|
|
|
|
|
# available in /usr/bin when Python is built. Also, the bytecompilation fails
|
|
|
|
|
# on files that test invalid syntax.
|
|
|
|
@ -316,6 +313,11 @@ Source1: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz.a
|
|
|
|
|
# The release manager for Python 3.12 is Thomas Wouters
|
|
|
|
|
Source2: https://github.com/Yhg1s.gpg
|
|
|
|
|
|
|
|
|
|
# Sources for the python3.12-rpm-macros
|
|
|
|
|
Source3: macros.python3.12
|
|
|
|
|
Source4: import_all_modules_py3_12.py
|
|
|
|
|
Source5: pathfix_py3_12.py
|
|
|
|
|
|
|
|
|
|
# A simple script to check timestamps of bytecode files
|
|
|
|
|
# Run in check section with Python that is currently being built
|
|
|
|
|
# Originally written by bkabrda
|
|
|
|
@ -387,17 +389,6 @@ Patch397: 00397-tarfile-filter.patch
|
|
|
|
|
# Thomas Dwyer.
|
|
|
|
|
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
|
|
|
|
|
# [CVE-2024-8088] gh-122905: Sanitize names in zipfile.Path.
|
|
|
|
|
Patch436: 00436-cve-2024-8088-gh-122905-sanitize-names-in-zipfile-path.patch
|
|
|
|
|
|
|
|
|
|
# (New patches go here ^^^)
|
|
|
|
|
#
|
|
|
|
|
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
|
|
|
@ -416,6 +407,14 @@ Patch436: 00436-cve-2024-8088-gh-122905-sanitize-names-in-zipfile-path.patch
|
|
|
|
|
# Descriptions, and metadata for subpackages
|
|
|
|
|
# ==========================================
|
|
|
|
|
|
|
|
|
|
# Require alternatives version that implements the --keep-foreign flag and fixes rhbz#2203820
|
|
|
|
|
Requires: alternatives >= 1.19.2-1
|
|
|
|
|
Requires(post): alternatives >= 1.19.2-1
|
|
|
|
|
Requires(postun): alternatives >= 1.19.2-1
|
|
|
|
|
|
|
|
|
|
# When the user tries to `yum install python`, yum will list this package among
|
|
|
|
|
# the possible alternatives
|
|
|
|
|
Provides: alternative-for(python)
|
|
|
|
|
|
|
|
|
|
%if %{with main_python}
|
|
|
|
|
# Description for the python3X SRPM only:
|
|
|
|
@ -490,6 +489,7 @@ Documentation for Python is provided in the %{pkgname}-docs package.
|
|
|
|
|
Packages containing additional libraries for Python are generally named with
|
|
|
|
|
the "%{pkgname}-" prefix.
|
|
|
|
|
|
|
|
|
|
For the unversioned "python" executable, see manual page "unversioned-python".
|
|
|
|
|
|
|
|
|
|
%if %{with main_python}
|
|
|
|
|
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
|
|
|
|
@ -570,9 +570,12 @@ 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.12-rpm-macros here to make it possible to
|
|
|
|
|
# BuildRequire them in the same manner as RHEL8.
|
|
|
|
|
Provides: %{pkgname}-rpm-macros = %{version}-%{release}
|
|
|
|
|
# Require alternatives version that implements the --keep-foreign flag and fixes rhbz#2203820
|
|
|
|
|
Requires(postun): alternatives >= 1.19.2-1
|
|
|
|
|
|
|
|
|
|
# python3.12 installs the alternatives master symlink to which we attach a slave
|
|
|
|
|
Requires(post): %{pkgname}
|
|
|
|
|
Requires(postun): %{pkgname}
|
|
|
|
|
|
|
|
|
|
%unversioned_obsoletes_of_python3_X_if_main devel
|
|
|
|
|
|
|
|
|
@ -621,6 +624,13 @@ Provides: idle = %{version}-%{release}
|
|
|
|
|
Provides: %{pkgname}-tools = %{version}-%{release}
|
|
|
|
|
Provides: %{pkgname}-tools%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
# Require alternatives version that implements the --keep-foreign flag and fixes rhbz#2203820
|
|
|
|
|
Requires(postun): alternatives >= 1.19.2-1
|
|
|
|
|
|
|
|
|
|
# python3.12 installs the alternatives master symlink to which we attach a slave
|
|
|
|
|
Requires(post): %{pkgname}
|
|
|
|
|
Requires(postun): %{pkgname}
|
|
|
|
|
|
|
|
|
|
%description -n %{pkgname}-idle
|
|
|
|
|
IDLE is Python’s Integrated Development and Learning Environment.
|
|
|
|
|
|
|
|
|
@ -692,6 +702,13 @@ Requires: %{pkgname}-idle%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%unversioned_obsoletes_of_python3_X_if_main debug
|
|
|
|
|
|
|
|
|
|
# Require alternatives version that implements the --keep-foreign flag and fixes rhbz#2203820
|
|
|
|
|
Requires(postun): alternatives >= 1.19.2-1
|
|
|
|
|
|
|
|
|
|
# python3.12 installs the alternatives master symlink to which we attach a slave
|
|
|
|
|
Requires(post): %{pkgname}
|
|
|
|
|
Requires(postun): %{pkgname}
|
|
|
|
|
|
|
|
|
|
%description -n %{pkgname}-debug
|
|
|
|
|
python3-debug provides a version of the Python runtime with numerous debugging
|
|
|
|
|
features enabled, aimed at advanced Python users such as developers of Python
|
|
|
|
@ -710,6 +727,24 @@ The debug runtime additionally supports debug builds of C-API extensions
|
|
|
|
|
%endif # with debug_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# We package the python3.12-rpm-macros in RHEL8 as to properly set the
|
|
|
|
|
# %%__python3 and %%python3_pkgversion macros as well as provide modern
|
|
|
|
|
# versions the current base macros.
|
|
|
|
|
%package -n %{pkgname}-rpm-macros
|
|
|
|
|
Summary: RPM macros for building RPMs with Python %{pybasever}
|
|
|
|
|
License: MIT
|
|
|
|
|
Provides: python-modular-rpm-macros == %{pybasever}
|
|
|
|
|
Conflicts: python-modular-rpm-macros > %{pybasever}
|
|
|
|
|
Requires: python3-rpm-macros
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n %{pkgname}-rpm-macros
|
|
|
|
|
RPM macros for building RPMs with Python %{pybasever} from the python%{pyshortver} module.
|
|
|
|
|
If you want to build an RPM against the python%{pyshortver} module, you need to add:
|
|
|
|
|
|
|
|
|
|
BuildRequire: %{pkgname}-rpm-macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ======================================================
|
|
|
|
|
# The prep phase of the build:
|
|
|
|
|
# ======================================================
|
|
|
|
@ -718,18 +753,10 @@ The debug runtime additionally supports debug builds of C-API extensions
|
|
|
|
|
%gpgverify -k2 -s1 -d0
|
|
|
|
|
%autosetup -S git_am -n Python-%{upstream_version}
|
|
|
|
|
|
|
|
|
|
# Verify the second level of bundled provides is up to date
|
|
|
|
|
# Arguably this should be done in %%check, but %%prep has a faster feedback loop
|
|
|
|
|
# setuptools.whl does not contain the vendored.txt files
|
|
|
|
|
if [ -f %{_rpmconfigdir}/pythonbundles.py ]; then
|
|
|
|
|
%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt) --compare-with '%pip_bundled_provides'
|
|
|
|
|
%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/test/wheeldata/wheel-*.whl wheel/vendored/vendor.txt) --compare-with '%wheel_bundled_provides'
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%if %{with rpmwheels}
|
|
|
|
|
rm Lib/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
|
|
|
|
|
rm Lib/test/wheeldata/setuptools-%{setuptools_version}-py3-none-any.whl
|
|
|
|
|
rm Lib/test/wheeldata/wheel-%{wheel_version}-py3-none-any.whl
|
|
|
|
|
rm Lib/test/setuptools-%{setuptools_version}-py3-none-any.whl
|
|
|
|
|
rm Lib/test/wheel-%{wheel_version}-py3-none-any.whl
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Remove all exe files to ensure we are not shipping prebuilt binaries
|
|
|
|
@ -808,7 +835,6 @@ BuildPython() {
|
|
|
|
|
ConfName=$1
|
|
|
|
|
ExtraConfigArgs=$2
|
|
|
|
|
MoreCFlags=$3
|
|
|
|
|
MoreCFlagsNodist=$4
|
|
|
|
|
|
|
|
|
|
# Each build is done in its own directory
|
|
|
|
|
ConfDir=build/$ConfName
|
|
|
|
@ -848,7 +874,7 @@ BuildPython() {
|
|
|
|
|
$ExtraConfigArgs \
|
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags $MoreCFlagsNodist"
|
|
|
|
|
%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags"
|
|
|
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
# Regenerate generated files (needs python3)
|
|
|
|
@ -871,14 +897,12 @@ BuildPython() {
|
|
|
|
|
# See also: https://bugzilla.redhat.com/show_bug.cgi?id=1818857
|
|
|
|
|
BuildPython debug \
|
|
|
|
|
"--without-ensurepip --with-pydebug" \
|
|
|
|
|
"%{optflags_debug}" \
|
|
|
|
|
""
|
|
|
|
|
"-O0 -Wno-cpp"
|
|
|
|
|
%endif # with debug_build
|
|
|
|
|
|
|
|
|
|
BuildPython optimized \
|
|
|
|
|
"--without-ensurepip %{optimizations_flag}" \
|
|
|
|
|
"" \
|
|
|
|
|
"%{optflags_optimized}"
|
|
|
|
|
""
|
|
|
|
|
|
|
|
|
|
# ======================================================
|
|
|
|
|
# Installing the built code:
|
|
|
|
@ -983,7 +1007,7 @@ EOF
|
|
|
|
|
%if %{with debug_build}
|
|
|
|
|
InstallPython debug \
|
|
|
|
|
%{py_INSTSONAME_debug} \
|
|
|
|
|
"%{optflags_debug}" \
|
|
|
|
|
-O0 \
|
|
|
|
|
%{LDVERSION_debug}
|
|
|
|
|
%endif # with debug_build
|
|
|
|
|
|
|
|
|
@ -1035,8 +1059,11 @@ done
|
|
|
|
|
# Switch all shebangs to refer to the specific Python version.
|
|
|
|
|
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$,
|
|
|
|
|
# so handle files named using other naming scheme separately.
|
|
|
|
|
# - RHEL 8 note: we use %%{SOURCE5} instead of pathfix.py, because in RHEL 8 we
|
|
|
|
|
# ship our own versioned pathfix_py3_12.py in this package, but during
|
|
|
|
|
# bootstrap it's not yet installed.
|
|
|
|
|
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
|
|
|
|
|
%{_rpmconfigdir}/redhat/pathfix.py \
|
|
|
|
|
%{SOURCE5} \
|
|
|
|
|
-i "%{_bindir}/python%{pybasever}" -pn \
|
|
|
|
|
%{buildroot} \
|
|
|
|
|
%{buildroot}%{_bindir}/*%{pybasever}.py \
|
|
|
|
@ -1138,6 +1165,29 @@ for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py'
|
|
|
|
|
rm ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.opt-?.pyc,${module}.py}
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Python RPM macros for python3.12-rpm-macros
|
|
|
|
|
mkdir -p %{buildroot}%{rpmmacrodir}/
|
|
|
|
|
install -m 644 %{SOURCE3} \
|
|
|
|
|
%{buildroot}/%{rpmmacrodir}/
|
|
|
|
|
|
|
|
|
|
# Add scripts that are being used by python3.12-rpm-macros
|
|
|
|
|
mkdir -p %{buildroot}%{_rpmconfigdir}/redhat
|
|
|
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/redhat/
|
|
|
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/redhat/
|
|
|
|
|
|
|
|
|
|
# All ghost files controlled by alternatives need to exist for the files
|
|
|
|
|
# section check to succeed
|
|
|
|
|
# - Don't list /usr/bin/python as a ghost file so `yum install /usr/bin/python`
|
|
|
|
|
# doesn't install this package
|
|
|
|
|
touch %{buildroot}%{_bindir}/unversioned-python
|
|
|
|
|
touch %{buildroot}%{_mandir}/man1/python.1.gz
|
|
|
|
|
touch %{buildroot}%{_bindir}/python3
|
|
|
|
|
touch %{buildroot}%{_mandir}/man1/python3.1.gz
|
|
|
|
|
touch %{buildroot}%{_bindir}/pydoc3
|
|
|
|
|
touch %{buildroot}%{_bindir}/pydoc-3
|
|
|
|
|
touch %{buildroot}%{_bindir}/idle3
|
|
|
|
|
touch %{buildroot}%{_bindir}/python3-config
|
|
|
|
|
|
|
|
|
|
# ======================================================
|
|
|
|
|
# Checks for packaging issues
|
|
|
|
|
# ======================================================
|
|
|
|
@ -1222,10 +1272,119 @@ CheckPython optimized
|
|
|
|
|
|
|
|
|
|
%endif # with tests
|
|
|
|
|
|
|
|
|
|
# ======================================================
|
|
|
|
|
# Scriptlets for alternatives on rhel8
|
|
|
|
|
# ======================================================
|
|
|
|
|
%post
|
|
|
|
|
# Alternative for /usr/bin/python -> /usr/bin/python3 + man page
|
|
|
|
|
alternatives --install %{_bindir}/unversioned-python \
|
|
|
|
|
python \
|
|
|
|
|
%{_bindir}/python3 \
|
|
|
|
|
300 \
|
|
|
|
|
--slave %{_bindir}/python \
|
|
|
|
|
unversioned-python \
|
|
|
|
|
%{_bindir}/python3 \
|
|
|
|
|
--slave %{_mandir}/man1/python.1.gz \
|
|
|
|
|
unversioned-python-man \
|
|
|
|
|
%{_mandir}/man1/python3.1.gz
|
|
|
|
|
|
|
|
|
|
# Alternative for /usr/bin/python -> /usr/bin/python3.12 + man page
|
|
|
|
|
alternatives --install %{_bindir}/unversioned-python \
|
|
|
|
|
python \
|
|
|
|
|
%{_bindir}/python3.12 \
|
|
|
|
|
211 \
|
|
|
|
|
--slave %{_bindir}/python \
|
|
|
|
|
unversioned-python \
|
|
|
|
|
%{_bindir}/python3.12 \
|
|
|
|
|
--slave %{_mandir}/man1/python.1.gz \
|
|
|
|
|
unversioned-python-man \
|
|
|
|
|
%{_mandir}/man1/python3.12.1.gz
|
|
|
|
|
|
|
|
|
|
# Alternative for /usr/bin/python3 -> /usr/bin/python3.12 + related files
|
|
|
|
|
# Create only if it doesn't exist already
|
|
|
|
|
EXISTS=`alternatives --display python3 | \
|
|
|
|
|
grep -c "^/usr/bin/python3.12 - priority [0-9]*"`
|
|
|
|
|
|
|
|
|
|
if [ $EXISTS -eq 0 ]; then
|
|
|
|
|
alternatives --install %{_bindir}/python3 \
|
|
|
|
|
python3 \
|
|
|
|
|
%{_bindir}/python3.12 \
|
|
|
|
|
31200 \
|
|
|
|
|
--slave %{_mandir}/man1/python3.1.gz \
|
|
|
|
|
python3-man \
|
|
|
|
|
%{_mandir}/man1/python3.12.1.gz \
|
|
|
|
|
--slave %{_bindir}/pydoc3 \
|
|
|
|
|
pydoc3 \
|
|
|
|
|
%{_bindir}/pydoc3.12 \
|
|
|
|
|
--slave %{_bindir}/pydoc-3 \
|
|
|
|
|
pydoc-3 \
|
|
|
|
|
%{_bindir}/pydoc3.12
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
# Do this only during uninstall process (not during update)
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
|
alternatives --keep-foreign --remove python \
|
|
|
|
|
%{_bindir}/python3.12
|
|
|
|
|
|
|
|
|
|
alternatives --keep-foreign --remove python3 \
|
|
|
|
|
%{_bindir}/python3.12
|
|
|
|
|
|
|
|
|
|
# Remove link python → python3 if no other python3.* exists
|
|
|
|
|
if ! alternatives --display python3 > /dev/null; then
|
|
|
|
|
alternatives --keep-foreign --remove python \
|
|
|
|
|
%{_bindir}/python3
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post devel
|
|
|
|
|
alternatives --add-slave python3 %{_bindir}/python3.12 \
|
|
|
|
|
%{_bindir}/python3-config \
|
|
|
|
|
python3-config \
|
|
|
|
|
%{_bindir}/python3.12-config
|
|
|
|
|
|
|
|
|
|
%postun devel
|
|
|
|
|
# Do this only during uninstall process (not during update)
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
|
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python3.12 \
|
|
|
|
|
python3-config
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%post idle
|
|
|
|
|
alternatives --add-slave python3 %{_bindir}/python3.12 \
|
|
|
|
|
%{_bindir}/idle3 \
|
|
|
|
|
idle3 \
|
|
|
|
|
%{_bindir}/idle3.12
|
|
|
|
|
|
|
|
|
|
%postun idle
|
|
|
|
|
# Do this only during uninstall process (not during update)
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
|
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python3.12 \
|
|
|
|
|
idle3
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# ======================================================
|
|
|
|
|
# Files for each RPM (sub)package
|
|
|
|
|
# ======================================================
|
|
|
|
|
|
|
|
|
|
%files -n %{pkgname}-rpm-macros
|
|
|
|
|
%{rpmmacrodir}/macros.python%{pybasever}
|
|
|
|
|
%{_rpmconfigdir}/redhat/import_all_modules_py3_12.py
|
|
|
|
|
%{_rpmconfigdir}/redhat/pathfix_py3_12.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{pkgname}
|
|
|
|
|
%doc README.rst
|
|
|
|
|
|
|
|
|
|
# Alternatives
|
|
|
|
|
%ghost %{_bindir}/unversioned-python
|
|
|
|
|
%ghost %{_mandir}/man1/python.1.gz
|
|
|
|
|
%ghost %{_bindir}/python3
|
|
|
|
|
%ghost %{_mandir}/man1/python3.1.gz
|
|
|
|
|
%ghost %{_bindir}/pydoc3
|
|
|
|
|
%ghost %{_bindir}/pydoc-3
|
|
|
|
|
|
|
|
|
|
%if %{with main_python}
|
|
|
|
|
%{_bindir}/pydoc*
|
|
|
|
|
%{_bindir}/python3
|
|
|
|
@ -1358,6 +1517,10 @@ CheckPython optimized
|
|
|
|
|
%{dynload_dir}/termios.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_uuid.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/xxlimited_35.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/xxsubtype.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/zlib.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_zoneinfo.%{SOABI_optimized}.so
|
|
|
|
|
|
|
|
|
@ -1458,6 +1621,12 @@ CheckPython optimized
|
|
|
|
|
|
|
|
|
|
%{pylibdir}/zoneinfo
|
|
|
|
|
|
|
|
|
|
%dir %{pylibdir}/__phello__/
|
|
|
|
|
%dir %{pylibdir}/__phello__/__pycache__/
|
|
|
|
|
%{pylibdir}/__phello__/__init__.py
|
|
|
|
|
%{pylibdir}/__phello__/spam.py
|
|
|
|
|
%{pylibdir}/__phello__/__pycache__/*%{bytecode_suffixes}
|
|
|
|
|
|
|
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
|
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
|
|
|
|
|
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
|
|
|
|
@ -1507,6 +1676,9 @@ CheckPython optimized
|
|
|
|
|
%{_bindir}/python%{pybasever}-config
|
|
|
|
|
%{_bindir}/python%{LDVERSION_optimized}-config
|
|
|
|
|
%{_bindir}/python%{LDVERSION_optimized}-*-config
|
|
|
|
|
# Alternatives
|
|
|
|
|
%ghost %{_bindir}/python3-config
|
|
|
|
|
|
|
|
|
|
%{_libdir}/libpython%{LDVERSION_optimized}.so
|
|
|
|
|
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
|
|
|
|
|
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}-embed.pc
|
|
|
|
@ -1519,6 +1691,8 @@ CheckPython optimized
|
|
|
|
|
%{_bindir}/idle*
|
|
|
|
|
%else
|
|
|
|
|
%{_bindir}/idle%{pybasever}
|
|
|
|
|
# Alternatives
|
|
|
|
|
%ghost %{_bindir}/idle3
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{pylibdir}/idlelib
|
|
|
|
@ -1552,17 +1726,7 @@ CheckPython optimized
|
|
|
|
|
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_testsinglephase.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_xxinterpchannels.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/xxlimited_35.%{SOABI_optimized}.so
|
|
|
|
|
%{dynload_dir}/xxsubtype.%{SOABI_optimized}.so
|
|
|
|
|
|
|
|
|
|
%dir %{pylibdir}/__phello__/
|
|
|
|
|
%dir %{pylibdir}/__phello__/__pycache__/
|
|
|
|
|
%{pylibdir}/__phello__/__init__.py
|
|
|
|
|
%{pylibdir}/__phello__/spam.py
|
|
|
|
|
%{pylibdir}/__phello__/__pycache__/*%{bytecode_suffixes}
|
|
|
|
|
|
|
|
|
|
# We don't bother splitting the debug build out into further subpackages:
|
|
|
|
|
# if you need it, you're probably a developer.
|
|
|
|
@ -1644,6 +1808,10 @@ CheckPython optimized
|
|
|
|
|
%{dynload_dir}/termios.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_uuid.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/xxlimited.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/xxlimited_35.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_xxsubinterpreters.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/xxsubtype.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/zlib.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_zoneinfo.%{SOABI_debug}.so
|
|
|
|
|
|
|
|
|
@ -1680,11 +1848,7 @@ CheckPython optimized
|
|
|
|
|
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_testsinglephase.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_xxinterpchannels.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_xxsubinterpreters.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/xxlimited.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/xxlimited_35.%{SOABI_debug}.so
|
|
|
|
|
%{dynload_dir}/xxsubtype.%{SOABI_debug}.so
|
|
|
|
|
|
|
|
|
|
%{pylibdir}/_sysconfigdata_%{ABIFLAGS_debug}_linux_%{platform_triplet}.py
|
|
|
|
|
%{pylibdir}/__pycache__/_sysconfigdata_%{ABIFLAGS_debug}_linux_%{platform_triplet}%{bytecode_suffixes}
|
|
|
|
@ -1712,48 +1876,8 @@ CheckPython optimized
|
|
|
|
|
# ======================================================
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Aug 23 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.5-2
|
|
|
|
|
- Security fix for CVE-2024-8088
|
|
|
|
|
Resolves: RHEL-55963
|
|
|
|
|
|
|
|
|
|
* Wed Aug 07 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.5-1
|
|
|
|
|
- Update to 3.12.5
|
|
|
|
|
- Security fix for CVE-2024-6923
|
|
|
|
|
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-2
|
|
|
|
|
- Build Python with -O3
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/Python_built_with_gcc_O3
|
|
|
|
|
|
|
|
|
|
* Fri Jun 28 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.4-1
|
|
|
|
|
- Update to 3.12.4
|
|
|
|
|
Resolves: RHEL-44103
|
|
|
|
|
|
|
|
|
|
* Tue Jun 11 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.3-2
|
|
|
|
|
- Enable importing of hash-based .pyc files under FIPS mode
|
|
|
|
|
Resolves: RHEL-40772
|
|
|
|
|
|
|
|
|
|
* Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.3-1
|
|
|
|
|
- Update to 3.12.3
|
|
|
|
|
Related: RHEL-33690
|
|
|
|
|
|
|
|
|
|
* Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-3
|
|
|
|
|
- Move all test modules to the python3-test package, namely:
|
|
|
|
|
- __phello__
|
|
|
|
|
- _xxsubinterpreters
|
|
|
|
|
- xxlimited
|
|
|
|
|
- xxlimited_35
|
|
|
|
|
- xxsubtype
|
|
|
|
|
|
|
|
|
|
* Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-2
|
|
|
|
|
- Fix tests for XMLPullParser with Expat with fixed CVE
|
|
|
|
|
|
|
|
|
|
* Fri May 03 2024 Lumír Balhar <lbalhar@redhat.com> - 3.12.2-1
|
|
|
|
|
- Update to 3.12.2
|
|
|
|
|
Resolves: RHEL-33690
|
|
|
|
|
* Fri Mar 29 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.12.1-4
|
|
|
|
|
- Rebuilt for MSVSphere 8.10 beta
|
|
|
|
|
|
|
|
|
|
* Mon Feb 19 2024 Charalampos Stratakis <cstratak@redhat.com> - 3.12.1-4
|
|
|
|
|
- Add Red Hat configuration for CVE-2007-4559
|
|
|
|
@ -1811,3 +1935,4 @@ Resolves: RHEL-33690
|
|
|
|
|
Ville Skyttä <ville.skytta@iki.fi>
|
|
|
|
|
Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
|
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
|
|
|
|
|
|
|
|
|