Blame SPECS/python3.spec

900f19
# ==================
900f19
# Top-level metadata
900f19
# ==================
900f19
900f19
Name: python3
900f19
Summary: Interpreter of the Python programming language
900f19
URL: https://www.python.org/
900f19
900f19
%global pybasever 3.6
900f19
900f19
# pybasever without the dot:
900f19
%global pyshortver 36
900f19
900f19
#  WARNING  When rebasing to a new Python version,
900f19
#           remember to update the python3-docs package as well
900f19
Version: %{pybasever}.8
fa50f4
Release: 33%{?dist}
900f19
License: Python
900f19
900f19
900f19
# ==================================
900f19
# Conditionals controlling the build
900f19
# ==================================
900f19
900f19
# Note that the bcond macros are named for the CLI option they create.
900f19
# "%%bcond_without" means "ENABLE by default and create a --without option"
900f19
b7e076
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
b7e076
# Uses upstream bundled prebuilt wheels otherwise
b7e076
%bcond_without rpmwheels
b7e076
900f19
# Expensive optimizations (mainly, profile-guided optimizations)
900f19
%bcond_without optimizations
900f19
900f19
# Run the test suite in %%check
900f19
%bcond_without tests
900f19
900f19
# Extra build for debugging the interpreter or C-API extensions
900f19
# (the -debug subpackages)
900f19
%bcond_without debug_build
900f19
900f19
# Support for the GDB debugger
900f19
%bcond_without gdb_hooks
900f19
900f19
# The dbm.gnu module (key-value database)
900f19
%bcond_without gdbm
900f19
900f19
# Main interpreter loop optimization
900f19
%bcond_without computed_gotos
900f19
900f19
# Support for the Valgrind debugger/profiler
900f19
%ifarch %{valgrind_arches}
900f19
%bcond_without valgrind
900f19
%else
900f19
# Some arches don't have valgrind, disable support for it there.
900f19
%bcond_with valgrind
900f19
%endif
900f19
fa50f4
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
fa50f4
# For a very long time we have converted "upstream architecture names" to "Fedora names".
fa50f4
# This made sense at the time, see https://github.com/pypa/manylinux/issues/687#issuecomment-666362947
fa50f4
# However, with manylinux wheels popularity growth, this is now a problem.
fa50f4
# Wheels built on a Linux that doesn't do this were not compatible with ours and vice versa.
fa50f4
# We now have a compatibility layer to workaround a problem,
fa50f4
# but we also no longer use the legacy arch names in Fedora 34+.
fa50f4
# This bcond controls the behavior. The defaults should be good for anybody.
fa50f4
%bcond_without legacy_archnames
900f19
900f19
# ==================================
900f19
# Notes from bootstraping Python 3.6
900f19
# ==================================
900f19
#
900f19
# New Python major version (3.X) break ABI and bytecode compatibility,
900f19
# so all packages depending on it need to be rebuilt.
900f19
#
900f19
# Due to a dependency cycle between Python, gdb, rpm, pip, setuptools, wheel,
900f19
# and other packages, this isn't straightforward.
900f19
# Build in the following order:
900f19
#
900f19
# 1. At the same time:
900f19
#     - gdb without python support (add %%global _without_python 1 on top of
900f19
#       gdb's SPEC file)
900f19
#     - python-rpm-generators with bootstrapping_python set to 1
900f19
#       (this can be done also during step 2., but should be done before 3.)
900f19
# 2. python3 without rewheel (use %%bcond_with rewheel instead of
900f19
#     %%bcond_without)
900f19
# 3. At the same time:
900f19
#     - gdb with python support (remove %%global _without_python 1 on top of
900f19
#       gdb's SPEC file)
900f19
#     - python-rpm-generators with bootstrapping_python set to 0
900f19
#       (this can be done at any later step without negative effects)
900f19
# 4. rpm
900f19
# 5. python-setuptools with bootstrap set to 1
900f19
# 6. python-pip with build_wheel set to 0
900f19
# 7. python-wheel with %%bcond_without bootstrap
900f19
# 8. python-setuptools with bootstrap set to 0 and also with_check set to 0
900f19
# 9. python-pip with build_wheel set to 1
900f19
# 10. pyparsing
900f19
# 11. python3 with rewheel
900f19
#
900f19
# Then the most important packages have to be built, in dependency order.
900f19
# These were:
900f19
#   python-sphinx, pytest, python-requests, cloud-init, dnf, anaconda, abrt
900f19
#
900f19
# After these have been built, a targeted rebuild should be done for the rest.
900f19
900f19
900f19
# =====================
900f19
# General global macros
900f19
# =====================
900f19
900f19
%global pylibdir %{_libdir}/python%{pybasever}
900f19
%global dynload_dir %{pylibdir}/lib-dynload
900f19
900f19
# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac
900f19
# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/
900f19
%global ABIFLAGS_optimized m
900f19
%global ABIFLAGS_debug     dm
900f19
900f19
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
900f19
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
900f19
fa50f4
# When we use the upstream arch triplets, we convert them from the legacy ones
fa50f4
# This is reversed in prep when %%with legacy_archnames, so we keep both macros
fa50f4
%global platform_triplet_legacy %{_arch}-linux%{_gnu}
fa50f4
%global platform_triplet_upstream %{expand:%(echo %{platform_triplet_legacy} | sed -E \\
fa50f4
    -e 's/^arm(eb)?-linux-gnueabi$/arm\\1-linux-gnueabihf/' \\
fa50f4
    -e 's/^mips64(el)?-linux-gnu$/mips64\\1-linux-gnuabi64/' \\
fa50f4
    -e 's/^ppc(64)?(le)?-linux-gnu$/powerpc\\1\\2-linux-gnu/')}
fa50f4
%if %{with legacy_archnames}
fa50f4
%global platform_triplet %{platform_triplet_legacy}
fa50f4
%else
fa50f4
%global platform_triplet %{platform_triplet_upstream}
fa50f4
%endif
fa50f4
 
fa50f4
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{platform_triplet}
fa50f4
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{platform_triplet}
900f19
900f19
# All bytecode files are in a __pycache__ subdirectory, with a name
900f19
# reflecting the version of the bytecode.
900f19
# See PEP 3147: http://www.python.org/dev/peps/pep-3147/
900f19
# For example,
900f19
#   foo/bar.py
900f19
# has bytecode at:
900f19
#   foo/__pycache__/bar.cpython-%%{pyshortver}.pyc
900f19
#   foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc
900f19
#   foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc
900f19
%global bytecode_suffixes .cpython-%{pyshortver}*.pyc
900f19
900f19
# Python's configure script defines SOVERSION, and this is used in the Makefile
900f19
# to determine INSTSONAME, the name of the libpython DSO:
900f19
#   LDLIBRARY='libpython$(VERSION).so'
900f19
#   INSTSONAME="$LDLIBRARY".$SOVERSION
900f19
# We mirror this here in order to make it easier to add the -gdb.py hooks.
900f19
# (if these get out of sync, the payload of the libs subpackage will fail
900f19
# and halt the build)
900f19
%global py_SOVERSION 1.0
900f19
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
900f19
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
900f19
900f19
# Disable automatic bytecompilation. The python3 binary is not yet be
900f19
# available in /usr/bin when Python is built. Also, the bytecompilation fails
900f19
# on files that test invalid syntax.
900f19
%undefine py_auto_byte_compile
900f19
900f19
# For multilib support, files that are different between 32- and 64-bit arches
900f19
# need different filenames. Use "64" or "32" according to the word size.
900f19
# Currently, the best way to determine an architecture's word size happens to
900f19
# be checking %%{_lib}.
900f19
%if "%{_lib}" == "lib64"
900f19
%global wordsize 64
900f19
%else
900f19
%global wordsize 32
900f19
%endif
900f19
900f19
900f19
# =======================
900f19
# Build-time requirements
900f19
# =======================
900f19
900f19
# (keep this list alphabetized)
900f19
900f19
BuildRequires: autoconf
900f19
BuildRequires: bluez-libs-devel
900f19
BuildRequires: bzip2
900f19
BuildRequires: bzip2-devel
900f19
BuildRequires: desktop-file-utils
900f19
BuildRequires: expat-devel
900f19
900f19
BuildRequires: findutils
900f19
BuildRequires: gcc-c++
900f19
%if %{with gdbm}
900f19
BuildRequires: gdbm-devel >= 1:1.13
900f19
%endif
d43968
BuildRequires: git-core
900f19
BuildRequires: glibc-devel
900f19
BuildRequires: gmp-devel
900f19
BuildRequires: libappstream-glib
900f19
BuildRequires: libffi-devel
900f19
BuildRequires: libnsl2-devel
900f19
BuildRequires: libtirpc-devel
900f19
BuildRequires: libGL-devel
900f19
BuildRequires: libX11-devel
900f19
BuildRequires: ncurses-devel
900f19
900f19
BuildRequires: openssl-devel
900f19
BuildRequires: pkgconfig
900f19
BuildRequires: readline-devel
900f19
BuildRequires: redhat-rpm-config >= 118
900f19
BuildRequires: sqlite-devel
900f19
BuildRequires: gdb
900f19
900f19
BuildRequires: tar
900f19
BuildRequires: tcl-devel
900f19
BuildRequires: tix-devel
900f19
BuildRequires: tk-devel
900f19
900f19
%if %{with valgrind}
900f19
BuildRequires: valgrind-devel
900f19
%endif
900f19
900f19
BuildRequires: xz-devel
900f19
BuildRequires: zlib-devel
900f19
900f19
BuildRequires: /usr/bin/dtrace
900f19
900f19
# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
900f19
BuildRequires: /usr/sbin/ifconfig
900f19
b7e076
%if %{with rpmwheels}
b7e076
BuildRequires: python3-setuptools-wheel
b7e076
BuildRequires: python3-pip-wheel
900f19
900f19
# Verify that the BuildRoot includes python36.
900f19
# Not actually needed for build.
900f19
BuildRequires: python36-devel
900f19
%endif
900f19
900f19
900f19
# =======================
900f19
# Source code and patches
900f19
# =======================
900f19
900f19
# The upstream tarball includes questionable executable files for Windows,
900f19
# which we should not ship even in the SRPM.
900f19
# Run the "get-source.sh" with the version as argument to download the upstream
900f19
# tarball and generate a version with the .exe files removed. For example:
900f19
# $ ./get-source.sh 3.7.0
900f19
900f19
Source: Python-%{version}-noexe.tar.xz
900f19
900f19
# A script to remove .exe files from the source distribution
900f19
Source1: get-source.sh
900f19
900f19
# A simple script to check timestamps of bytecode files
900f19
# Run in check section with Python that is currently being built
900f19
# Written by bkabrda
900f19
Source8: check-pyc-and-pyo-timestamps.py
900f19
900f19
# Desktop menu entry for idle3
900f19
Source10: idle3.desktop
900f19
900f19
# AppData file for idle3
900f19
Source11: idle3.appdata.xml
900f19
900f19
# unversioned-python script
900f19
Source12: no-python
900f19
900f19
# unversioned-python man page
900f19
Source13: unversioned-python.1
900f19
900f19
# 00001 #
900f19
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
900f19
# Was Patch0 in ivazquez' python3000 specfile:
900f19
Patch1:         00001-rpath.patch
900f19
900f19
# 00102 #
900f19
# Change the various install paths to use /usr/lib64/ instead or /usr/lib
900f19
# Only used when "%%{_lib}" == "lib64"
900f19
# Not yet sent upstream.
900f19
Patch102: 00102-lib64.patch
900f19
900f19
# 00111 #
900f19
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
900f19
# a libpythonMAJOR.MINOR.a
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=556092
900f19
# Downstream only: not appropriate for upstream
900f19
Patch111: 00111-no-static-lib.patch
900f19
900f19
# 00132 #
900f19
# Add non-standard hooks to unittest for use in the "check" phase below, when
900f19
# running selftests within the build:
900f19
#   @unittest._skipInRpmBuild(reason)
900f19
# for tests that hang or fail intermittently within the build environment, and:
900f19
#   @unittest._expectedFailureInRpmBuild
900f19
# for tests that always fail within the build environment
900f19
#
900f19
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
900f19
# environment, which we set manually in the appropriate portion of the "check"
900f19
# phase below (and which potentially other python-* rpms could set, to reuse
900f19
# these unittest hooks in their own "check" phases)
900f19
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
900f19
900f19
# 00155 #
900f19
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
900f19
# generating SELinux denials on "import ctypes" and "import uuid" when
900f19
# embedding Python within httpd
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=814391
900f19
Patch155: 00155-avoid-ctypes-thunks.patch
900f19
900f19
# 00160 #
900f19
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
900f19
# header files in the build chroot, but may not be supported in the running
900f19
# kernel, hence we disable this test in an rpm build.
900f19
# Adding these was upstream issue http://bugs.python.org/issue10142
900f19
# Not yet sent upstream
900f19
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
900f19
900f19
# 00163 #
900f19
# Some tests within test_socket fail intermittently when run inside Koji;
900f19
# disable them using unittest._skipInRpmBuild
900f19
# Not yet sent upstream
900f19
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch
900f19
900f19
# 00170 #
900f19
# In debug builds, try to print repr() when a C-level assert fails in the
900f19
# garbage collector (typically indicating a reference-counting error
900f19
# somewhere else e.g in an extension module)
900f19
# The new macros/functions within gcmodule.c are hidden to avoid exposing
900f19
# them within the extension API.
900f19
# Sent upstream: http://bugs.python.org/issue9263
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=614680
900f19
Patch170: 00170-gc-assertions.patch
900f19
900f19
# 00189 #
b7e076
# Instead of bundled wheels, use our RPM packaged wheels from
b7e076
# /usr/share/python3-wheels
b7e076
Patch189: 00189-use-rpm-wheels.patch
900f19
900f19
# 00251
900f19
# Set values of prefix and exec_prefix in distutils install command
900f19
# to /usr/local if executable is /usr/bin/python* and RPM build
900f19
# is not detected to make pip and distutils install into separate location
900f19
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
900f19
Patch251: 00251-change-user-install-location.patch
900f19
900f19
# 00262 #
900f19
# Backport of PEP 538: Coercing the legacy C locale to a UTF-8 based locale
900f19
# https://www.python.org/dev/peps/pep-0538/
900f19
# Fedora Change: https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale
900f19
# Original proposal: https://bugzilla.redhat.com/show_bug.cgi?id=1404918
900f19
Patch262: 00262-pep538_coerce_legacy_c_locale.patch
900f19
900f19
# 00294 #
900f19
# Define TLS cipher suite on build time depending
900f19
# on the OpenSSL default cipher suite selection.
900f19
# Fixed upstream on CPython's 3.7 branch:
900f19
# https://bugs.python.org/issue31429
900f19
# See also: https://bugzilla.redhat.com/show_bug.cgi?id=1489816
900f19
Patch294: 00294-define-TLS-cipher-suite-on-build-time.patch
900f19
b7e076
# 00316 #
b7e076
# We remove the exe files from distutil's bdist_wininst
b7e076
# So we mark the command as unsupported - and the tests are skipped
b7e076
# Fixed upstream and backported from the 3.7 branch: https://bugs.python.org/issue10945
b7e076
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1754040
b7e076
Patch316: 00316-mark-bdist_wininst-unsupported.patch
b7e076
900f19
# 00317 #
900f19
# Security fix for CVE-2019-5010: Fix segfault in ssl's cert parser
900f19
# https://bugzilla.redhat.com/show_bug.cgi?id=1666789
900f19
# Fixed upstream: https://bugs.python.org/issue35746
900f19
Patch317: 00317-CVE-2019-5010.patch
900f19
900f19
# 00318 #
b7e076
# Various fixes for TLS 1.3 and OpenSSL 1.1.1
900f19
# https://bugzilla.redhat.com/show_bug.cgi?id=1639531
b7e076
b7e076
# test_ssl fixes for TLS 1.3 and OpenSSL 1.1.1
900f19
# https://bugs.python.org/issue32947#msg333990
900f19
# https://github.com/python/cpython/pull/11612
b7e076
b7e076
# Encrypt private key test files with AES256
b7e076
# https://bugs.python.org/issue38271
b7e076
# https://github.com/python/cpython/pull/16396
b7e076
b7e076
# Prefer PROTOCOL_TLS_CLIENT/SERVER (partial backport)
b7e076
# https://bugs.python.org/issue31346
b7e076
# https://github.com/python/cpython/pull/3058
b7e076
b7e076
# Enable TLS 1.3 in tests (partial backport)
b7e076
# https://bugs.python.org/issue33618
b7e076
# https://github.com/python/cpython/pull/7082
b7e076
b7e076
# OpenSSL 1.1.1-pre1 / TLS 1.3 fixes (partial backport)
b7e076
# https://bugs.python.org/issue32947
b7e076
# https://github.com/python/cpython/pull/5923
b7e076
Patch318: 00318-fixes-for-tls-13.patch
900f19
900f19
# 00319 #
900f19
# Fix test_tarfile on ppc64
900f19
# https://bugzilla.redhat.com/show_bug.cgi?id=1639490
900f19
# https://bugs.python.org/issue35772
900f19
Patch319: 00319-test_tarfile_ppc64.patch
900f19
900f19
# 00320 #
b7e076
# Security fix for CVE-2019-9636 and CVE-2019-10160: Information Disclosure due to urlsplit improper NFKC normalization
900f19
# Fixed upstream: https://bugs.python.org/issue36216 and https://bugs.python.org/issue36742
900f19
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689318
b7e076
Patch320: 00320-CVE-2019-9636-and-CVE-2019-10160.patch
900f19
900f19
# 00324 #
900f19
# Disallow control chars in http URLs
900f19
# Security fix for CVE-2019-9740 and CVE-2019-9947
900f19
# Fixed upstream: https://bugs.python.org/issue30458
900f19
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1704365
900f19
# and https://bugzilla.redhat.com/show_bug.cgi?id=1703531
900f19
Patch324: 00324-disallow-control-chars-in-http-urls.patch
900f19
900f19
# 00325 #
900f19
# Unnecessary URL scheme exists to allow local_file:// reading file  in urllib
900f19
# Security fix for CVE-2019-9948
900f19
# Fixed upstream: https://bugs.python.org/issue35907
900f19
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1714643
900f19
Patch325: 00325-CVE-2019-9948.patch
900f19
b7e076
# 00326 #
b7e076
# Don't set the post-handshake authentication verify flag on client side
b7e076
# on TLS 1.3, as it also implicitly enables cert chain validation and an
b7e076
# SSL/TLS connection will fail when verify mode is set to CERT_NONE.
b7e076
# Fixed upstream: https://bugs.python.org/issue37428
b7e076
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1725721
b7e076
Patch326: 00326-do-not-set-PHA-verify-flag-on-client-side.patch
b7e076
b7e076
# 00327 #
b7e076
# Enable TLS 1.3 post-handshake authentication in http.client for default
b7e076
# context or if a cert_file is passed to HTTPSConnection
b7e076
# Fixed upstream: https://bugs.python.org/issue37440
b7e076
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1671353
b7e076
Patch327: 00327-enable-tls-1.3-PHA-in-http.client.patch
b7e076
b7e076
# 00329 #
b7e076
# Support OpenSSL FIPS mode
b7e076
# - Fallback implementations md5, sha1, sha256, sha512 are removed in favor of OpenSSL wrappers
b7e076
# - In FIPS mode, OpenSSL wrappers are always used in hashlib
b7e076
# - add a new "usedforsecurity" keyword argument to the various digest
b7e076
#   algorithms in hashlib so that you can whitelist a callsite with
b7e076
#   "usedforsecurity=False"
b7e076
#   The change has been implemented upstream since Python 3.9:
b7e076
#   https://bugs.python.org/issue9216
b7e076
# - OpenSSL wrappers for the hashes blake2{b512,s256},
b7e076
#     sha3_{224,256,384,512}, shake_{128,256} are now exported from _hashlib
b7e076
# - In FIPS mode, the blake2, sha3 and shake hashes use OpenSSL wrappers
b7e076
#   and do not offer extended functionality (keys, tree hashing, custom digest size)
b7e076
# - In FIPS mode, hmac.HMAC can only be instantiated with an OpenSSL wrapper
b7e076
#   or an string with OpenSSL hash name as the "digestmod" argument.
b7e076
#   The argument must be specified (instead of defaulting to ‘md5’).
b7e076
#
b7e076
# - Also while in FIPS mode, we utilize OpenSSL's DRBG and disable the
b7e076
#   os.getrandom() function.
b7e076
#
b7e076
#   Upstream changes that have also been backported with this patch
b7e076
#   to allow tests to pass on stricter environments:
b7e076
#
b7e076
#   Avoid MD5 or check for MD5 availablity
b7e076
#   https://bugs.python.org/issue38270
b7e076
#   https://github.com/python/cpython/pull/16393
b7e076
#   https://github.com/python/cpython/pull/16437
b7e076
#   https://github.com/python/cpython/pull/17446
b7e076
#
b7e076
#   add usedforsecurity to hashlib constructors (partial backport for fixing a uuid test)
b7e076
#   https://github.com/python/cpython/pull/16044
b7e076
# Resolves: rhbz#1731424
b7e076
Patch329: 00329-fips.patch
b7e076
b7e076
# 00330 #
b7e076
# Fix CVE-2018-20852: cookie domain check returning incorrect results
b7e076
# Fixed upstream: https://bugs.python.org/issue35121
b7e076
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741553
b7e076
Patch330: 00330-CVE-2018-20852.patch
b7e076
b7e076
# 00332 #
b7e076
# Fix CVE-2019-16056: Don't parse email addresses containing
b7e076
# multiple '@' characters.
b7e076
# Fixed upstream: https://bugs.python.org/issue34155
b7e076
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1750776
b7e076
Patch332: 00332-CVE-2019-16056.patch
b7e076
b7e076
# 00333 #
b7e076
# Reduce the number of tests run during the profile guided optimizations build,
b7e076
# as running the whole test suite during profiling increases the build time
b7e076
# substantially, with negligible performance gain.
b7e076
# Fixed upstream and backported from the 3.8 branch:
b7e076
# https://bugs.python.org/issue36044
b7e076
# https://bugs.python.org/issue37667
b7e076
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749576
b7e076
Patch333: 00333-reduce-pgo-tests.patch
b7e076
3d909f
# 00338 #
3d909f
# Fix test_gdb for when compiling python with Link Time Optimizations
3d909f
# Fixed upstream: https://bugs.python.org/issue38239
3d909f
Patch338: 00338-fix-test_gdb-for-LTO.patch
3d909f
3d909f
# 00344 #
3d909f
# Fix CVE-2019-16935: XSS vulnerability in the ocumentation XML-RPC server in server_title field
3d909f
# Fixed upstream: https://bugs.python.org/issue38243
3d909f
# Resolves: https://bugzilla.redhat.com/how_bug.cgi?id=1798001
3d909f
Patch344: 00344-CVE-2019-16935.patch
3d909f
3d909f
# 00345 #
3d909f
# Skip from test_site the test_startup_imports case if a path of sys.path
3d909f
# contains a .pth file
3d909f
# Fixed upstream: https://bugs.python.org/issue27807
3d909f
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1814392
3d909f
Patch345: 00345-fix-test_site-with-extra-pth-files.patch
3d909f
3d909f
# 00346 #
3d909f
# Fix CVE-2020-8492: wrong backtracking in urllib.request.AbstractBasicAuthHandler allows for a ReDoS
3d909f
# Fixed upstream: https://bugs.python.org/issue39503
3d909f
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1810618
3d909f
Patch346: 00346-CVE-2020-8492.patch
3d909f
d43968
# 00351 #
d43968
# Avoid infinite loop when reading specially crafted TAR files using the tarfile module
d43968
# (CVE-2019-20907).
d43968
# See: https://bugs.python.org/issue39017
d43968
Patch351: 00351-avoid-infinite-loop-in-the-tarfile-module.patch
d43968
d43968
# 00352 # 5253c417a23b3658fa115d2c72fa54b20293a31c
d43968
# Resolve hash collisions for IPv4Interface and IPv6Interface
d43968
#
d43968
# CVE-2020-14422
d43968
# The hash() methods of classes IPv4Interface and IPv6Interface had issue
d43968
# of generating constant hash values of 32 and 128 respectively causing hash collisions.
d43968
# The fix uses the hash() function to generate hash values for the objects
d43968
# instead of XOR operation.
d43968
# Fixed upstream: https://bugs.python.org/issue41004
d43968
Patch352: 00352-resolve-hash-collisions-for-ipv4interface-and-ipv6interface.patch
d43968
fa50f4
# 00353 #
fa50f4
# Original names for architectures with different names downstream
fa50f4
#
fa50f4
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
fa50f4
#
fa50f4
# Pythons in RHEL/Fedora used different names for some architectures
fa50f4
# than upstream and other distros (for example ppc64 vs. powerpc64).
fa50f4
# This was patched in patch 274, now it is sedded if %%with legacy_archnames.
fa50f4
#
fa50f4
# That meant that an extension built with the default upstream settings
fa50f4
# (on other distro or as an manylinux wheel) could not been found by Python
fa50f4
# on RHEL/Fedora because it had a different suffix.
fa50f4
# This patch adds the legacy names to importlib so Python is able
fa50f4
# to import extensions with a legacy architecture name in its
fa50f4
# file name.
fa50f4
# It work both ways, so it support both %%with and %%without legacy_archnames.
fa50f4
#
fa50f4
# WARNING: This patch has no effect on Python built with bootstrap
fa50f4
# enabled because Python/importlib_external.h is not regenerated
fa50f4
# and therefore Python during bootstrap contains importlib from
fa50f4
# upstream without this feature. It's possible to include
fa50f4
# Python/importlib_external.h to this patch but it'd make rebasing
fa50f4
# a nightmare because it's basically a binary file.
fa50f4
Patch353: 00353-architecture-names-upstream-downstream.patch
fa50f4
be5967
# 00354 #
be5967
# Reject control chars in HTTP method in http.client to prevent
be5967
# HTTP header injection
be5967
# Fixed ustream: https://bugs.python.org/issue39603
be5967
Patch354: 00354-cve-2020-26116-http-request-method-crlf-injection-in-httplib.patch
be5967
900f19
# (New patches go here ^^^)
900f19
#
900f19
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
900f19
# please try to keep the patch numbers in-sync between all specfiles.
900f19
#
900f19
# More information, and a patch number catalog, is at:
900f19
#
900f19
#     https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
900f19
900f19
900f19
# ==========================================
900f19
# Descriptions, and metadata for subpackages
900f19
# ==========================================
900f19
900f19
%package -n platform-python
900f19
Summary: Internal interpreter of the Python programming language
900f19
900f19
Conflicts: python3 < 3.6.6-13
900f19
900f19
# Packages with Python modules in standard locations automatically
900f19
# depend on python(abi). Provide that here.
900f19
Provides: python(abi) = %{pybasever}
900f19
900f19
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
900f19
b7e076
%if %{with rpmwheels}
b7e076
b7e076
# RHEL8 was forked from F28 and thus required python3-setuptools here
b7e076
# for the rewheel module to work. We've since backported the use of RPM
b7e076
# prepared wheels from F29+ into RHEL8, and thus this dependency isn't
b7e076
# strictly needed.
b7e076
# However, it is possible, that some packages in BaseOS actually depend on
b7e076
# setuptools without declaring the dependency in their spec file. Thus
b7e076
# we're keeping this dependency here to avoid the possibility of breaking
b7e076
# them.
900f19
Requires: platform-python-setuptools
b7e076
# For python3-pip the Requires has been reduced to Recommends, as there are
b7e076
# generally less packages that depend on pip than packages that depend on
b7e076
# setuptools at runtime, and thus there's less chance of breakage.
b7e076
# (rhbz#1756217).
b7e076
Recommends: platform-python-pip
b7e076
b7e076
Requires: python3-setuptools-wheel
b7e076
Requires: python3-pip-wheel
900f19
%endif
900f19
900f19
# Runtime require alternatives
900f19
Requires:         %{_sbindir}/alternatives
900f19
Requires(post):   %{_sbindir}/alternatives
900f19
Requires(postun): %{_sbindir}/alternatives
900f19
900f19
# This prevents ALL subpackages built from this spec to require
900f19
# /usr/bin/python3*. Granularity per subpackage is impossible.
900f19
# It's intended for the libs package not to drag in the interpreter, see
900f19
# https://bugzilla.redhat.com/show_bug.cgi?id=1547131
900f19
# All others require %%{name} anyway.
900f19
%global __requires_exclude ^/usr/bin/python3
900f19
900f19
900f19
# The description is the same for the SRPM and the main `platform-python` subpackage:
900f19
%description
900f19
This is the internal interpreter of the Python language for the system.
900f19
To use Python yourself, please install one of the available Python 3 packages,
900f19
for example python36.
900f19
900f19
900f19
# The description is the same for the SRPM and the main `platform-python` subpackage:
900f19
%description -n platform-python
900f19
This is the internal interpreter of the Python language for the system.
900f19
To use Python yourself, please install one of the available Python 3 packages,
900f19
for example python36.
900f19
900f19
900f19
%package libs
900f19
Summary:        Python runtime libraries
900f19
900f19
# The "enum" module is included in the standard library.
900f19
# Provide an upgrade path from the external library.
900f19
Provides: python3-enum34 = 1.0.4-5%{?dist}
900f19
Obsoletes: python3-enum34 < 1.0.4-5%{?dist}
900f19
900f19
# Python 3 built with glibc >= 2.24.90-26 needs to require it
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=1410644
900f19
Requires: glibc%{?_isa} >= 2.24.90-26
900f19
900f19
Requires: chkconfig
900f19
900f19
%if %{with gdbm}
900f19
# When built with this (as guarded by the BuildRequires above), require it
900f19
Requires: gdbm%{?_isa} >= 1:1.13
900f19
%endif
900f19
b7e076
%if %{with rpmwheels}
b7e076
Requires: python3-setuptools-wheel
b7e076
Requires: python3-pip-wheel
b7e076
%else
b7e076
Provides: bundled(python3-pip) = 18.1
b7e076
Provides: bundled(python3-setuptools) = 40.6.2
b7e076
%endif
b7e076
900f19
# There are files in the standard library that have python shebang.
900f19
# We've filtered the automatic requirement out so libs are installable without
900f19
# the main package. This however makes it pulled in by default.
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=1547131
900f19
Recommends: platform-python%{?_isa} = %{version}-%{release}
900f19
900f19
%description libs
900f19
This package contains runtime libraries for use by Python:
900f19
- the majority of the Python standard library
900f19
- a dynamically linked library for use by applications that embed Python as
900f19
  a scripting language, and by the main "python3" executable
900f19
900f19
900f19
# The contents of this package were moved into the `platform-python-devel` subpackage.
900f19
# See a comment above the definition of that subpackage for details.
900f19
%package devel
900f19
Summary: Libraries and header files needed for Python development
900f19
Requires: platform-python-devel%{?_isa} = %{version}-%{release}
900f19
Requires: platform-python = %{version}-%{release}
900f19
Requires: python36-devel
900f19
900f19
%description devel
900f19
This package contains the header files and configuration needed to compile
900f19
Python extension modules (typically written in C or C++), to embed Python
900f19
into other programs, and to make binary distributions for Python libraries.
900f19
900f19
It also contains the necessary macros to build RPM packages with Python modules
900f19
and 2to3 tool, an automatic source converter from Python 2.X.
900f19
900f19
It also makes the "python3" and "python3-config" commands available
900f19
for compatibility with some build systems.
900f19
When building packages, prefer requiring platform-python-devel and using
900f19
the %%{__python3} macro instead, if possible.
900f19
900f19
900f19
900f19
# The `platform-python-devel` (previously python3-libs-devel)
900f19
# subpackage was created because the `python3-devel` subpackage needs
900f19
# to pull into the buildroot the /usr/bin/python3{,-config} symlinks (for old
900f19
# buildsystems that are hard to switch to platform-python). But these symlinks
900f19
# cannot be shipped in RHEL8 to customers. Therefore we'll ship only
900f19
# `platform-python-devel` and have the `python3-devel` package require it in
900f19
# the buildroot, as well as pull in the symlinks.
900f19
%package -n platform-python-devel
900f19
Summary: Libraries and header files needed for Python development
900f19
Provides: %{name}-libs-devel = %{version}-%{release}
900f19
Provides: %{name}-libs-devel%{?_isa} = %{version}-%{release}
900f19
Obsoletes: %{name}-libs-devel < 3.6.6-12
900f19
Requires: platform-python = %{version}-%{release}
900f19
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
900f19
BuildRequires: python-rpm-macros
900f19
Requires: python-rpm-macros
900f19
Requires: python3-rpm-macros
900f19
Requires: python3-rpm-generators
900f19
b7e076
# This is not "API" (packages that need setuptools should still BuildRequire it)
b7e076
# However some packages apparently can build both with and without setuptools
b7e076
# producing egg-info as file or directory (depending on setuptools presence).
b7e076
# Directory-to-file updates are problematic in RPM, so we ensure setuptools is
b7e076
# installed when -devel is required.
b7e076
# See https://bugzilla.redhat.com/show_bug.cgi?id=1623914
b7e076
# See https://fedoraproject.org/wiki/Packaging:Directory_Replacement
b7e076
Requires: platform-python-setuptools
b7e076
900f19
Provides: %{name}-2to3 = %{version}-%{release}
900f19
Provides: 2to3 = %{version}-%{release}
900f19
900f19
Conflicts: platform-python < %{version}-%{release}
900f19
Conflicts: python3 < 3.6.6-9
900f19
900f19
%description -n platform-python-devel
900f19
This package contains the header files and configuration needed to compile
900f19
Python extension modules (typically written in C or C++), to embed Python
900f19
into other programs, and to make binary distributions for Python libraries.
900f19
900f19
It also contains the necessary macros to build RPM packages with Python modules
900f19
and 2to3 tool, an automatic source converter from Python 2.X.
900f19
900f19
900f19
%package idle
900f19
Summary: A basic graphical development environment for Python
900f19
Requires: platform-python = %{version}-%{release}
900f19
Requires: %{name}-tkinter = %{version}-%{release}
900f19
900f19
Provides: idle3 = %{version}-%{release}
900f19
900f19
Provides: %{name}-tools = %{version}-%{release}
900f19
Provides: %{name}-tools%{?_isa} = %{version}-%{release}
900f19
Obsoletes: %{name}-tools < %{version}-%{release}
900f19
900f19
# python36 installs the alternatives master symlink to which we attach a slave
900f19
Requires: python36
900f19
Requires(post): python36
900f19
Requires(postun): python36
900f19
900f19
%description idle
900f19
IDLE is Python’s Integrated Development and Learning Environment.
900f19
900f19
IDLE has the following features: Python shell window (interactive
900f19
interpreter) with colorizing of code input, output, and error messages;
900f19
multi-window text editor with multiple undo, Python colorizing,
900f19
smart indent, call tips, auto completion, and other features;
900f19
search within any window, replace within editor windows, and
900f19
search through multiple files (grep); debugger with persistent
900f19
breakpoints, stepping, and viewing of global and local namespaces;
900f19
configuration, browsers, and other dialogs.
900f19
900f19
900f19
%package tkinter
900f19
Summary: A GUI toolkit for Python
900f19
Requires: platform-python = %{version}-%{release}
900f19
900f19
%description tkinter
900f19
The Tkinter (Tk interface) library is a graphical user interface toolkit for
900f19
the Python programming language.
900f19
900f19
900f19
%package test
900f19
Summary: The self-test suite for the main python3 package
900f19
Requires: platform-python = %{version}-%{release}
900f19
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
900f19
900f19
%description test
900f19
The self-test suite for the Python interpreter.
900f19
900f19
This is only useful to test Python itself. For testing general Python code,
900f19
you should use the unittest module from %{name}-libs, or a library such as
900f19
%{name}-pytest or %{name}-nose.
900f19
900f19
900f19
%if %{with debug_build}
900f19
%package -n platform-python-debug
900f19
Conflicts: python3-debug < 3.6.6-13
900f19
Summary: Debug version of the Python runtime
900f19
900f19
# The debug build is an all-in-one package version of the regular build, and
900f19
# shares the same .py/.pyc files and directories as the regular build. Hence
900f19
# we depend on all of the subpackages of the regular build:
900f19
Requires: platform-python%{?_isa} = %{version}-%{release}
900f19
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
900f19
Requires: platform-python-devel%{?_isa} = %{version}-%{release}
900f19
Requires: %{name}-test%{?_isa} = %{version}-%{release}
900f19
Requires: %{name}-tkinter%{?_isa} = %{version}-%{release}
900f19
Requires: %{name}-idle%{?_isa} = %{version}-%{release}
900f19
900f19
%description -n platform-python-debug
900f19
python3-debug provides a version of the Python runtime with numerous debugging
900f19
features enabled, aimed at advanced Python users such as developers of Python
900f19
extension modules.
900f19
900f19
This version uses more memory and will be slower than the regular Python build,
900f19
but is useful for tracking down reference-counting issues and other bugs.
900f19
900f19
The bytecode format is unchanged, so that .pyc files are compatible between
900f19
this and the standard version of Python, but the debugging features mean that
900f19
C/C++ extension modules are ABI-incompatible and must be built for each version
900f19
separately.
900f19
900f19
The debug build shares installation directories with the standard Python
900f19
runtime, so that .py and .pyc files can be shared.
900f19
Compiled extension modules use a special ABI flag ("d") in the filename,
900f19
so extensions for both versions can co-exist in the same directory.
900f19
%endif # with debug_build
900f19
900f19
900f19
# ======================================================
900f19
# The prep phase of the build:
900f19
# ======================================================
900f19
900f19
%prep
900f19
%setup -q -n Python-%{version}%{?prerel}
900f19
900f19
# Remove bundled libraries to ensure that we're using the system copy.
900f19
rm -r Modules/expat
900f19
rm -r Modules/zlib
900f19
900f19
#
900f19
# Apply patches:
900f19
#
900f19
%patch1 -p1
900f19
900f19
%if "%{_lib}" == "lib64"
900f19
%patch102 -p1
900f19
%endif
900f19
%patch111 -p1
900f19
%patch132 -p1
900f19
%patch155 -p1
900f19
%patch160 -p1
900f19
%patch163 -p1
900f19
%patch170 -p1
900f19
b7e076
%if %{with rpmwheels}
900f19
%patch189 -p1
b7e076
rm Lib/ensurepip/_bundled/*.whl
900f19
%endif
900f19
900f19
%patch251 -p1
900f19
%patch262 -p1
900f19
%patch294 -p1
b7e076
%patch316 -p1
900f19
%patch317 -p1
900f19
%patch318 -p1
900f19
%patch319 -p1
900f19
%patch320 -p1
900f19
%patch324 -p1
900f19
%patch325 -p1
b7e076
%patch326 -p1
b7e076
%patch327 -p1
b7e076
%patch329 -p1
b7e076
%patch330 -p1
b7e076
%patch332 -p1
b7e076
%patch333 -p1
3d909f
%patch338 -p1
3d909f
%patch344 -p1
3d909f
%patch345 -p1
3d909f
%patch346 -p1
fa50f4
%patch353 -p1
be5967
%patch354 -p1
900f19
d43968
# Patch 351 adds binary file for testing. We need to apply it using Git.
d43968
git apply %{PATCH351}
d43968
d43968
%patch352 -p1
900f19
900f19
# Remove files that should be generated by the build
900f19
# (This is after patching, so that we can use patches directly from upstream)
900f19
rm configure pyconfig.h.in
900f19
fa50f4
# When we use the legacy arch names, we need to change them in configure.ac
fa50f4
%if %{with legacy_archnames}
fa50f4
sed -i configure.ac \
fa50f4
    -e 's/\b%{platform_triplet_upstream}\b/%{platform_triplet_legacy}/'
fa50f4
%endif
fa50f4
900f19
900f19
# ======================================================
900f19
# Configuring and building the code:
900f19
# ======================================================
900f19
900f19
%build
900f19
900f19
# Regenerate the configure script and pyconfig.h.in
900f19
autoconf
900f19
autoheader
900f19
900f19
# Remember the current directory (which has sources and the configure script),
900f19
# so we can refer to it after we "cd" elsewhere.
900f19
topdir=$(pwd)
900f19
900f19
# Get proper option names from bconds
900f19
%if %{with computed_gotos}
900f19
%global computed_gotos_flag yes
900f19
%else
900f19
%global computed_gotos_flag no
900f19
%endif
900f19
900f19
%if %{with optimizations}
900f19
%global optimizations_flag "--enable-optimizations"
900f19
%else
900f19
%global optimizations_flag "--disable-optimizations"
900f19
%endif
900f19
900f19
# Set common compiler/linker flags
900f19
# We utilize the %%extension_...flags macros here so users building C/C++
900f19
# extensions with our python won't get all the compiler/linker flags used
900f19
# in RHEL RPMs.
900f19
# Standard library built here will still use the %%build_...flags,
900f19
# RHEL packages utilizing %%py3_build will use them as well
900f19
# https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
900f19
export CFLAGS="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
3d909f
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv -fno-semantic-interposition"
900f19
export CXXFLAGS="%{extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv"
900f19
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
900f19
export OPT="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
900f19
export LINKCC="gcc"
900f19
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
900f19
export LDFLAGS="%{extension_ldflags} -g $(pkg-config --libs-only-L openssl)"
3d909f
export LDFLAGS_NODIST="%{build_ldflags} -fno-semantic-interposition -g $(pkg-config --libs-only-L openssl)"
900f19
900f19
# We can build several different configurations of Python: regular and debug.
900f19
# Define a common function that does one build:
900f19
BuildPython() {
900f19
  ConfName=$1
900f19
  ExtraConfigArgs=$2
900f19
  MoreCFlags=$3
900f19
900f19
  # Each build is done in its own directory
900f19
  ConfDir=build/$ConfName
900f19
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
900f19
  mkdir -p $ConfDir
900f19
  pushd $ConfDir
900f19
900f19
  # Normally, %%configure looks for the "configure" script in the current
900f19
  # directory.
900f19
  # Since we changed directories, we need to tell %%configure where to look.
900f19
  %global _configure $topdir/configure
900f19
900f19
%configure \
900f19
  --enable-ipv6 \
900f19
  --enable-shared \
900f19
  --with-computed-gotos=%{computed_gotos_flag} \
900f19
  --with-dbmliborder=gdbm:ndbm:bdb \
900f19
  --with-system-expat \
900f19
  --with-system-ffi \
900f19
  --enable-loadable-sqlite-extensions \
900f19
  --with-dtrace \
900f19
  --with-lto \
900f19
  --with-ssl-default-suites=openssl \
900f19
%if %{with valgrind}
900f19
  --with-valgrind \
900f19
%endif
900f19
  $ExtraConfigArgs \
900f19
  %{nil}
900f19
fa50f4
  # Regenerate generated importlib frozen modules (see patch 353)
fa50f4
  %make_build CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags" regen-importlib
fa50f4
900f19
  # Invoke the build
b7e076
  %make_build CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags"
900f19
900f19
  popd
900f19
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
900f19
}
900f19
900f19
# Call the above to build each configuration.
900f19
900f19
%if %{with debug_build}
900f19
BuildPython debug \
900f19
  "--without-ensurepip --with-pydebug" \
900f19
  "-Og"
900f19
%endif # with debug_build
900f19
900f19
BuildPython optimized \
900f19
  "--without-ensurepip %{optimizations_flag}" \
900f19
  ""
900f19
900f19
# ======================================================
900f19
# Installing the built code:
900f19
# ======================================================
900f19
900f19
%install
900f19
900f19
# As in %%build, remember the current directory
900f19
topdir=$(pwd)
900f19
900f19
# We install a collection of hooks for gdb that make it easier to debug
900f19
# executables linked against libpython3* (such as /usr/bin/python3 itself)
900f19
#
900f19
# These hooks are implemented in Python itself (though they are for the version
900f19
# of python that gdb is linked with)
900f19
#
900f19
# gdb-archer looks for them in the same path as the ELF file or its .debug
900f19
# file, with a -gdb.py suffix.
900f19
# We put them next to the debug file, because ldconfig would complain if
900f19
# it found non-library files directly in /usr/lib/
900f19
# (see https://bugzilla.redhat.com/show_bug.cgi?id=562980)
900f19
#
900f19
# We'll put these files in the debuginfo package by installing them to e.g.:
900f19
#  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
900f19
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
900f19
#
900f19
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
900f19
# information
900f19
900f19
%if %{with gdb_hooks}
900f19
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
900f19
mkdir -p %{buildroot}$DirHoldingGdbPy
900f19
%endif # with gdb_hooks
900f19
900f19
# Multilib support for pyconfig.h
900f19
# 32- and 64-bit versions of pyconfig.h are different. For multilib support
900f19
# (making it possible to install 32- and 64-bit versions simultaneously),
900f19
# we need to install them under different filenames, and to make the common
900f19
# "pyconfig.h" include the right file based on architecture.
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=192747
900f19
# Filanames are defined here:
900f19
%global _pyconfig32_h pyconfig-32.h
900f19
%global _pyconfig64_h pyconfig-64.h
900f19
%global _pyconfig_h pyconfig-%{wordsize}.h
900f19
900f19
# Use a common function to do an install for all our configurations:
900f19
InstallPython() {
900f19
900f19
  ConfName=$1
900f19
  PyInstSoName=$2
900f19
  MoreCFlags=$3
900f19
  LDVersion=$4
900f19
900f19
  # Switch to the directory with this configuration's built files
900f19
  ConfDir=build/$ConfName
900f19
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
900f19
  mkdir -p $ConfDir
900f19
  pushd $ConfDir
900f19
900f19
  make \
900f19
    DESTDIR=%{buildroot} \
900f19
    INSTALL="install -p" \
900f19
    EXTRA_CFLAGS="$MoreCFlags" \
900f19
    install
900f19
900f19
  popd
900f19
900f19
%if %{with gdb_hooks}
900f19
  # See comment on $DirHoldingGdbPy above
900f19
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py
900f19
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
900f19
%endif # with gdb_hooks
900f19
900f19
  # Rename the -devel script that differs on different arches to arch specific name
900f19
  mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config
900f19
  echo -e '#!/bin/sh\nexec %{_libexecdir}/platform-python'${LDVersion}'-`uname -m`-config "$@"' > \
900f19
    %{buildroot}%{_bindir}/python${LDVersion}-config
900f19
  echo '[ $? -eq 127 ] && echo "Could not find %{_libexecdir}/platform-python'${LDVersion}'-`uname -m`-config. Look around to see available arches." >&2' >> \
900f19
    %{buildroot}%{_bindir}/python${LDVersion}-config
900f19
    chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config
900f19
900f19
  # Platform Python: Move the python*-config to libexec
900f19
  mkdir -p %{buildroot}%{_libexecdir}
900f19
  mv %{buildroot}%{_bindir}/python${LDVersion}-config %{buildroot}%{_libexecdir}/platform-python${LDVersion}-config
900f19
  ln -s %{_libexecdir}/platform-python${LDVersion}-config %{buildroot}%{_bindir}/python${LDVersion}-config
900f19
  mv %{buildroot}%{_bindir}/python${LDVersion}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python${LDVersion}-`uname -m`-config
900f19
  ln -s %{_libexecdir}/platform-python${LDVersion}-`uname -m`-config %{buildroot}%{_bindir}/python${LDVersion}-`uname -m`-config
900f19
900f19
  # Platform Python: Move optimized and debug executables
900f19
  mv %{buildroot}%{_bindir}/python${LDVersion} %{buildroot}%{_libexecdir}/platform-python${LDVersion}
900f19
  ln -s %{_libexecdir}/platform-python${LDVersion} %{buildroot}%{_bindir}/python${LDVersion}
900f19
900f19
  # Make python3-devel multilib-ready
900f19
  mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \
900f19
     %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h}
900f19
  cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF
900f19
#include <bits/wordsize.h>
900f19
900f19
#if __WORDSIZE == 32
900f19
#include "%{_pyconfig32_h}"
900f19
#elif __WORDSIZE == 64
900f19
#include "%{_pyconfig64_h}"
900f19
#else
900f19
#error "Unknown word size"
900f19
#endif
900f19
EOF
900f19
900f19
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
900f19
}
900f19
900f19
# Install the "debug" build first; any common files will be overridden with
900f19
# later builds
900f19
%if %{with debug_build}
900f19
InstallPython debug \
900f19
  %{py_INSTSONAME_debug} \
900f19
  -O0 \
900f19
  %{LDVERSION_debug}
900f19
%endif # with debug_build
900f19
900f19
# Now the optimized build:
900f19
InstallPython optimized \
900f19
  %{py_INSTSONAME_optimized} \
900f19
  "" \
900f19
  %{LDVERSION_optimized}
900f19
900f19
# Install directories for additional packages
900f19
install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__
900f19
%if "%{_lib}" == "lib64"
900f19
# The 64-bit version needs to create "site-packages" in /usr/lib/ (for
900f19
# pure-Python modules) as well as in /usr/lib64/ (for packages with extension
900f19
# modules).
900f19
# Note that rpmlint will complain about hardcoded library path;
900f19
# this is intentional.
900f19
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
900f19
%endif
900f19
900f19
# add idle3 to menu
900f19
install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png
900f19
install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png
900f19
install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png
900f19
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
900f19
900f19
# Install and validate appdata file
900f19
mkdir -p %{buildroot}%{_metainfodir}
900f19
cp -a %{SOURCE11} %{buildroot}%{_metainfodir}
900f19
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/idle3.appdata.xml
900f19
900f19
# Make sure distutils looks at the right pyconfig.h file
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=201434
900f19
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
900f19
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
900f19
# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058)
900f19
#
900f19
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
900f19
# variants:
900f19
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
900f19
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
900f19
  %{buildroot}%{pylibdir}/sysconfig.py
900f19
900f19
# Install pathfix.py to bindir
900f19
# See https://github.com/fedora-python/python-rpm-porting/issues/24
900f19
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/
900f19
900f19
# Switch all shebangs to refer to the specific Python version.
900f19
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$,
900f19
# so handle files named using other naming scheme separately.
900f19
# - Files in /usr/bin/ (without .py) are listed manually
900f19
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
900f19
  Tools/scripts/pathfix.py \
900f19
  -i "%{_libexecdir}/platform-python" -pn \
900f19
  %{buildroot} \
900f19
  %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} \
900f19
  %{buildroot}%{_bindir}/{idle,pydoc,pyvenv-,2to3-}%{pybasever}
900f19
900f19
# The python-config.py files need to be shebanged with the given LDVERSION'ed
900f19
# executable
900f19
for LDVersion in %{LDVERSION_optimized} %{LDVERSION_debug}
900f19
do
900f19
  LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
900f19
    Tools/scripts/pathfix.py \
900f19
    -i "%{_libexecdir}/platform-python${LDVersion}" -pn \
fa50f4
    %{buildroot}%{pylibdir}/config-${LDVersion}-%{platform_triplet}/python-config.py
900f19
done
900f19
900f19
# Remove tests for python3-tools which was removed in
900f19
# https://bugzilla.redhat.com/show_bug.cgi?id=1312030
900f19
rm -rf %{buildroot}%{pylibdir}/test/test_tools
900f19
900f19
# Remove shebang lines from .py files that aren't executable, and
900f19
# remove executability from .py files that don't have a shebang line:
900f19
find %{buildroot} -name \*.py \
900f19
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
900f19
  -print -exec sed -i '1d' {} \; \) -o \( \
900f19
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
900f19
  -exec chmod a-x {} \; \) \)
900f19
900f19
# Get rid of DOS batch files:
900f19
find %{buildroot} -name \*.bat -exec rm {} \;
900f19
900f19
# Get rid of backup files:
900f19
find %{buildroot}/ -name "*~" -exec rm -f {} \;
900f19
find . -name "*~" -exec rm -f {} \;
900f19
900f19
# Get rid of a stray copy of the license:
900f19
rm %{buildroot}%{pylibdir}/LICENSE.txt
900f19
900f19
# Do bytecompilation with the newly installed interpreter.
900f19
# This is similar to the script in macros.pybytecompile
900f19
# compile *.pyc
900f19
find %{buildroot} -type f -a -name "*.py" -print0 | \
900f19
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
900f19
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
900f19
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || :
900f19
900f19
# Since we have pathfix.py in bindir, this is created, but we don't want it
900f19
rm -rf %{buildroot}%{_bindir}/__pycache__
900f19
900f19
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
900f19
find %{buildroot} -perm 555 -exec chmod 755 {} \;
900f19
900f19
# Install macros for rpm:
900f19
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d/
900f19
900f19
# Create "/usr/bin/python3-debug" (and /usr/libexec/platform-python-debug),
900f19
# a symlink to the python3 debug binary, to
900f19
# avoid the user having to know the precise version and ABI flags.
900f19
# See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748
900f19
%if %{with debug_build}
900f19
ln -s \
900f19
  %{_bindir}/python%{LDVERSION_debug} \
900f19
  %{buildroot}%{_bindir}/python3-debug
900f19
ln -s \
900f19
  %{_libexecdir}/platform-python%{LDVERSION_debug} \
900f19
  %{buildroot}%{_libexecdir}/platform-python-debug
900f19
%endif
900f19
900f19
900f19
# Platform Python: Move the executable to libexec & provide a symlink from bindir
900f19
# (this symlink will be moved to the python36 module)
900f19
mkdir -p %{buildroot}%{_libexecdir}
900f19
mv %{buildroot}%{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python%{pybasever}
900f19
ln -s %{_libexecdir}/platform-python%{pybasever} %{buildroot}%{_bindir}/python%{pybasever}
900f19
ln -s ./platform-python%{pybasever} %{buildroot}%{_libexecdir}/platform-python
900f19
900f19
# Platform Python: Add symlink from platform-python-config
900f19
ln -s ./platform-python%{LDVERSION_optimized}-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-config
900f19
ln -s ./platform-python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python-config
900f19
900f19
# Remove symlinks <name>3 > <name>3.6 for pydoc, idle, manpage
900f19
rm %{buildroot}%{_bindir}/pydoc3
900f19
rm %{buildroot}%{_bindir}/idle3
900f19
rm %{buildroot}%{_mandir}/man1/python3.1
900f19
900f19
# Install the unversioned-python script and its man page
900f19
install -m 755 %{SOURCE12} %{buildroot}%{_libexecdir}/no-python
900f19
install -m 644 %{SOURCE13} %{buildroot}%{_mandir}/man1/unversioned-python.1
900f19
# Touch the files that are controlled by `alternatives` so we can declare them
900f19
# as ghosts in the files section
900f19
touch %{buildroot}%{_bindir}/unversioned-python
900f19
touch %{buildroot}%{_bindir}/idle3
900f19
touch %{buildroot}%{_mandir}/man1/python.1.gz
900f19
900f19
900f19
# ======================================================
900f19
# Checks for packaging issues
900f19
# ======================================================
900f19
900f19
%check
900f19
# first of all, check timestamps of bytecode files
900f19
find %{buildroot} -type f -a -name "*.py" -print0 | \
900f19
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
900f19
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
900f19
    xargs -0 %{buildroot}%{_libexecdir}/platform-python %{SOURCE8}
900f19
900f19
# Ensure that the curses module was linked against libncursesw.so, rather than
900f19
# libncurses.so
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=539917
900f19
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
900f19
    | grep curses \
900f19
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
900f19
900f19
# Ensure that the debug modules are linked against the debug libpython, and
900f19
# likewise for the optimized modules and libpython:
900f19
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
900f19
    case $Module in
900f19
    *.%{SOABI_debug})
900f19
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
900f19
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
900f19
900f19
        ;;
900f19
    *.%{SOABI_optimized})
900f19
        ldd $Module | grep %{py_INSTSONAME_debug} &&
900f19
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
900f19
        ;;
900f19
    esac
900f19
done
900f19
900f19
# ======================================================
900f19
# Running the upstream test suite
900f19
# ======================================================
900f19
900f19
topdir=$(pwd)
900f19
CheckPython() {
900f19
  ConfName=$1
900f19
  ConfDir=$(pwd)/build/$ConfName
900f19
900f19
  export OPENSSL_CONF=/non-existing-file
900f19
900f19
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
900f19
900f19
  # Note that we're running the tests using the version of the code in the
900f19
  # builddir, not in the buildroot.
900f19
900f19
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
900f19
  # our non-standard decorators take effect on the relevant tests:
900f19
  #   @unittest._skipInRpmBuild(reason)
900f19
  #   @unittest._expectedFailureInRpmBuild
900f19
  # test_faulthandler.test_register_chain currently fails on ppc64le and
900f19
  #   aarch64, see upstream bug http://bugs.python.org/issue21131
900f19
  WITHIN_PYTHON_RPM_BUILD= \
900f19
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
900f19
    -wW --slowest --findleaks \
900f19
    -x test_bdist_rpm \
900f19
    %ifarch %{mips64}
900f19
    -x test_ctypes \
900f19
    %endif
900f19
900f19
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
900f19
900f19
}
900f19
900f19
%if %{with tests}
900f19
900f19
# Check each of the configurations:
900f19
%if %{with debug_build}
900f19
CheckPython debug
900f19
%endif # with debug_build
900f19
CheckPython optimized
900f19
900f19
%endif # with tests
900f19
900f19
900f19
%post -n platform-python
900f19
# Default with no /usr/bin/python symlink
900f19
alternatives --install %{_bindir}/unversioned-python \
900f19
                       python \
900f19
                       %{_libexecdir}/no-python \
900f19
                       404 \
900f19
             --slave   %{_mandir}/man1/python.1.gz \
900f19
                       unversioned-python-man \
900f19
                       %{_mandir}/man1/unversioned-python.1.gz
900f19
900f19
%postun -n platform-python
900f19
# Do this only during uninstall process (not during update)
900f19
if [ $1 -eq 0 ]; then
900f19
    alternatives --remove python \
900f19
                          %{_libexecdir}/no-python
900f19
900f19
fi
900f19
900f19
900f19
%post -n python3-idle
900f19
alternatives --add-slave python3 %{_bindir}/python3.6 \
900f19
    %{_bindir}/idle3 \
900f19
    idle3 \
900f19
    %{_bindir}/idle3.6
900f19
900f19
%postun -n python3-idle
900f19
# Do this only during uninstall process (not during update)
900f19
if [ $1 -eq 0 ]; then
900f19
    alternatives --remove-slave python3 %{_bindir}/python3.6 \
900f19
       idle3
900f19
fi
900f19
900f19
900f19
%files -n platform-python
900f19
%license LICENSE
900f19
%doc README.rst
900f19
%{_bindir}/pydoc*
900f19
900f19
%exclude %{_bindir}/python3
900f19
%exclude %{_bindir}/python%{pybasever}
900f19
%exclude %{_bindir}/python%{LDVERSION_optimized}
900f19
%{_libexecdir}/platform-python
900f19
%{_libexecdir}/platform-python%{pybasever}
900f19
%{_libexecdir}/platform-python%{LDVERSION_optimized}
900f19
%{_libexecdir}/no-python
900f19
%ghost %{_bindir}/unversioned-python
900f19
%ghost %{_mandir}/man1/python.1.gz
900f19
900f19
%exclude %{_bindir}/pyvenv
900f19
%{_bindir}/pyvenv-%{pybasever}
b7e076
b7e076
%{_mandir}/man1/python3.6.1*
b7e076
%{_mandir}/man1/unversioned-python.1*
900f19
900f19
%files libs
900f19
%license LICENSE
900f19
%doc README.rst
900f19
900f19
%dir %{pylibdir}
900f19
%dir %{dynload_dir}
900f19
900f19
%{pylibdir}/lib2to3
900f19
%exclude %{pylibdir}/lib2to3/tests
900f19
900f19
%dir %{pylibdir}/unittest/
900f19
%dir %{pylibdir}/unittest/__pycache__/
900f19
%{pylibdir}/unittest/*.py
900f19
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/asyncio/
900f19
%dir %{pylibdir}/asyncio/__pycache__/
900f19
%{pylibdir}/asyncio/*.py
900f19
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/venv/
900f19
%dir %{pylibdir}/venv/__pycache__/
900f19
%{pylibdir}/venv/*.py
900f19
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
900f19
%{pylibdir}/venv/scripts
900f19
900f19
%{pylibdir}/wsgiref
900f19
%{pylibdir}/xmlrpc
900f19
900f19
%dir %{pylibdir}/ensurepip/
900f19
%dir %{pylibdir}/ensurepip/__pycache__/
900f19
%{pylibdir}/ensurepip/*.py
900f19
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
b7e076
%if %{with rpmwheels}
900f19
%exclude %{pylibdir}/ensurepip/_bundled
b7e076
%else
b7e076
%dir %{pylibdir}/ensurepip/_bundled
b7e076
%{pylibdir}/ensurepip/_bundled/*.whl
900f19
%endif
900f19
900f19
# The majority of the test module lives in the test subpackage
900f19
# However test.support is in libs - it contains stuff used when testing your code
900f19
# https://bugzilla.redhat.com/show_bug.cgi?id=1651215
900f19
%dir %{pylibdir}/test/
900f19
%dir %{pylibdir}/test/__pycache__/
900f19
%dir %{pylibdir}/test/support/
900f19
%dir %{pylibdir}/test/support/__pycache__/
900f19
%{pylibdir}/test/__init__.py
900f19
%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
900f19
%{pylibdir}/test/support/*.py
900f19
%{pylibdir}/test/support/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/concurrent/
900f19
%dir %{pylibdir}/concurrent/__pycache__/
900f19
%{pylibdir}/concurrent/*.py
900f19
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/concurrent/futures/
900f19
%dir %{pylibdir}/concurrent/futures/__pycache__/
900f19
%{pylibdir}/concurrent/futures/*.py
900f19
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%{pylibdir}/pydoc_data
900f19
900f19
%{dynload_dir}/_blake2.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_sha3.%{SOABI_optimized}.so
b7e076
%{dynload_dir}/_hmacopenssl.%{SOABI_optimized}.so
900f19
900f19
%{dynload_dir}/_asyncio.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_csv.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_curses.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
900f19
%if %{with gdbm}
900f19
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
900f19
%endif
900f19
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_json.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_opcode.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_random.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_socket.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_struct.%{SOABI_optimized}.so
900f19
%{dynload_dir}/array.%{SOABI_optimized}.so
900f19
%{dynload_dir}/audioop.%{SOABI_optimized}.so
900f19
%{dynload_dir}/binascii.%{SOABI_optimized}.so
900f19
%{dynload_dir}/cmath.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
900f19
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
900f19
%{dynload_dir}/grp.%{SOABI_optimized}.so
900f19
%{dynload_dir}/math.%{SOABI_optimized}.so
900f19
%{dynload_dir}/mmap.%{SOABI_optimized}.so
900f19
%{dynload_dir}/nis.%{SOABI_optimized}.so
900f19
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
900f19
%{dynload_dir}/parser.%{SOABI_optimized}.so
900f19
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
900f19
%{dynload_dir}/readline.%{SOABI_optimized}.so
900f19
%{dynload_dir}/resource.%{SOABI_optimized}.so
900f19
%{dynload_dir}/select.%{SOABI_optimized}.so
900f19
%{dynload_dir}/spwd.%{SOABI_optimized}.so
900f19
%{dynload_dir}/syslog.%{SOABI_optimized}.so
900f19
%{dynload_dir}/termios.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
900f19
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
900f19
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
900f19
%{dynload_dir}/zlib.%{SOABI_optimized}.so
900f19
900f19
%dir %{pylibdir}/site-packages/
900f19
%dir %{pylibdir}/site-packages/__pycache__/
900f19
%{pylibdir}/site-packages/README.txt
900f19
%{pylibdir}/*.py
900f19
%dir %{pylibdir}/__pycache__/
900f19
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/collections/
900f19
%dir %{pylibdir}/collections/__pycache__/
900f19
%{pylibdir}/collections/*.py
900f19
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/ctypes/
900f19
%dir %{pylibdir}/ctypes/__pycache__/
900f19
%{pylibdir}/ctypes/*.py
900f19
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
900f19
%{pylibdir}/ctypes/macholib
900f19
900f19
%{pylibdir}/curses
900f19
900f19
%dir %{pylibdir}/dbm/
900f19
%dir %{pylibdir}/dbm/__pycache__/
900f19
%{pylibdir}/dbm/*.py
900f19
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/distutils/
900f19
%dir %{pylibdir}/distutils/__pycache__/
900f19
%{pylibdir}/distutils/*.py
900f19
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
900f19
%{pylibdir}/distutils/README
900f19
%{pylibdir}/distutils/command
900f19
%exclude %{pylibdir}/distutils/command/wininst-*.exe
900f19
900f19
%dir %{pylibdir}/email/
900f19
%dir %{pylibdir}/email/__pycache__/
900f19
%{pylibdir}/email/*.py
900f19
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
900f19
%{pylibdir}/email/mime
900f19
%doc %{pylibdir}/email/architecture.rst
900f19
900f19
%{pylibdir}/encodings
900f19
900f19
%{pylibdir}/html
900f19
%{pylibdir}/http
900f19
900f19
%dir %{pylibdir}/importlib/
900f19
%dir %{pylibdir}/importlib/__pycache__/
900f19
%{pylibdir}/importlib/*.py
900f19
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%dir %{pylibdir}/json/
900f19
%dir %{pylibdir}/json/__pycache__/
900f19
%{pylibdir}/json/*.py
900f19
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%{pylibdir}/logging
900f19
%{pylibdir}/multiprocessing
900f19
900f19
%dir %{pylibdir}/sqlite3/
900f19
%dir %{pylibdir}/sqlite3/__pycache__/
900f19
%{pylibdir}/sqlite3/*.py
900f19
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%exclude %{pylibdir}/turtle.py
900f19
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
900f19
900f19
%{pylibdir}/urllib
900f19
%{pylibdir}/xml
900f19
900f19
%if "%{_lib}" == "lib64"
900f19
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
900f19
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
900f19
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
900f19
%endif
900f19
900f19
# "Makefile" and the config-32/64.h file are needed by
900f19
# distutils/sysconfig.py:_init_posix(), so we include them in the core
900f19
# package, along with their parent directories (bug 531901):
fa50f4
%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/
fa50f4
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
900f19
%dir %{_includedir}/python%{LDVERSION_optimized}/
900f19
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
900f19
900f19
%{_libdir}/%{py_INSTSONAME_optimized}
900f19
%{_libdir}/libpython3.so
900f19
900f19
%files devel
900f19
900f19
900f19
%files -n platform-python-devel
900f19
%{_bindir}/2to3
900f19
# TODO: Remove 2to3-3.7 once rebased to 3.7
900f19
%{_bindir}/2to3-%{pybasever}
fa50f4
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/*
fa50f4
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
900f19
%exclude %{pylibdir}/distutils/command/wininst-*.exe
900f19
%{_includedir}/python%{LDVERSION_optimized}/*.h
900f19
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
900f19
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
900f19
900f19
%exclude %{_bindir}/python3-config
900f19
%exclude %{_bindir}/python%{pybasever}-config
900f19
%exclude %{_bindir}/python%{LDVERSION_optimized}-config
900f19
%exclude %{_bindir}/python%{LDVERSION_optimized}-*-config
900f19
%{_libexecdir}/platform-python-config
900f19
%{_libexecdir}/platform-python%{pybasever}-config
900f19
%{_libexecdir}/platform-python%{LDVERSION_optimized}-config
900f19
%{_libexecdir}/platform-python%{LDVERSION_optimized}-*-config
900f19
900f19
%{_bindir}/pathfix.py
900f19
%{_libdir}/libpython%{LDVERSION_optimized}.so
900f19
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
900f19
%{_libdir}/pkgconfig/python-%{pybasever}.pc
900f19
%{_libdir}/pkgconfig/python3.pc
900f19
900f19
%files idle
900f19
%{_bindir}/idle%{pybasever}
900f19
%{pylibdir}/idlelib
900f19
%{_metainfodir}/idle3.appdata.xml
900f19
%{_datadir}/applications/idle3.desktop
900f19
%{_datadir}/icons/hicolor/*/apps/idle3.*
900f19
%ghost %{_bindir}/idle3
900f19
900f19
%files tkinter
900f19
%{pylibdir}/tkinter
900f19
%exclude %{pylibdir}/tkinter/test
900f19
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
900f19
%{pylibdir}/turtle.py
900f19
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
900f19
%dir %{pylibdir}/turtledemo
900f19
%{pylibdir}/turtledemo/*.py
900f19
%{pylibdir}/turtledemo/*.cfg
900f19
%dir %{pylibdir}/turtledemo/__pycache__/
900f19
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
900f19
900f19
%files test
900f19
%{pylibdir}/ctypes/test
900f19
%{pylibdir}/distutils/tests
900f19
%{pylibdir}/sqlite3/test
900f19
%{pylibdir}/test
900f19
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
900f19
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
900f19
%{pylibdir}/lib2to3/tests
900f19
%{pylibdir}/tkinter/test
900f19
%{pylibdir}/unittest/test
900f19
900f19
# stuff already owned by the libs subpackage
900f19
# test requires libs, so we are safe not owning those dirs
900f19
%exclude %dir %{pylibdir}/test/
900f19
%exclude %dir %{pylibdir}/test/__pycache__/
900f19
%exclude %{pylibdir}/test/__init__.py
900f19
%exclude %{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
900f19
%exclude %{pylibdir}/test/support/
900f19
900f19
# We don't bother splitting the debug build out into further subpackages:
900f19
# if you need it, you're probably a developer.
900f19
900f19
# Hence the manifest is the combination of analogous files in the manifests of
900f19
# all of the other subpackages
900f19
900f19
%if %{with debug_build}
900f19
%files -n platform-python-debug
900f19
# Analog of the core subpackage's files:
900f19
%exclude %{_bindir}/python%{LDVERSION_debug}
900f19
%{_libexecdir}/platform-python%{LDVERSION_debug}
900f19
%exclude %{_bindir}/python3-debug
900f19
%{_libexecdir}/platform-python-debug
900f19
900f19
# Analog of the -libs subpackage's files:
900f19
# ...with debug builds of the built-in "extension" modules:
900f19
900f19
%{dynload_dir}/_blake2.%{SOABI_debug}.so
900f19
%{dynload_dir}/_sha3.%{SOABI_debug}.so
b7e076
%{dynload_dir}/_hmacopenssl.%{SOABI_debug}.so
900f19
900f19
%{dynload_dir}/_asyncio.%{SOABI_debug}.so
900f19
%{dynload_dir}/_bisect.%{SOABI_debug}.so
900f19
%{dynload_dir}/_bz2.%{SOABI_debug}.so
900f19
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
900f19
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
900f19
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
900f19
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
900f19
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
900f19
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
900f19
%{dynload_dir}/_crypt.%{SOABI_debug}.so
900f19
%{dynload_dir}/_csv.%{SOABI_debug}.so
900f19
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
900f19
%{dynload_dir}/_curses.%{SOABI_debug}.so
900f19
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
900f19
%{dynload_dir}/_dbm.%{SOABI_debug}.so
900f19
%{dynload_dir}/_decimal.%{SOABI_debug}.so
900f19
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
900f19
%if %{with gdbm}
900f19
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
900f19
%endif
900f19
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
900f19
%{dynload_dir}/_heapq.%{SOABI_debug}.so
900f19
%{dynload_dir}/_json.%{SOABI_debug}.so
900f19
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
900f19
%{dynload_dir}/_lzma.%{SOABI_debug}.so
900f19
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
900f19
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
900f19
%{dynload_dir}/_opcode.%{SOABI_debug}.so
900f19
%{dynload_dir}/_pickle.%{SOABI_debug}.so
900f19
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
900f19
%{dynload_dir}/_random.%{SOABI_debug}.so
900f19
%{dynload_dir}/_socket.%{SOABI_debug}.so
900f19
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
900f19
%{dynload_dir}/_ssl.%{SOABI_debug}.so
900f19
%{dynload_dir}/_struct.%{SOABI_debug}.so
900f19
%{dynload_dir}/array.%{SOABI_debug}.so
900f19
%{dynload_dir}/audioop.%{SOABI_debug}.so
900f19
%{dynload_dir}/binascii.%{SOABI_debug}.so
900f19
%{dynload_dir}/cmath.%{SOABI_debug}.so
900f19
%{dynload_dir}/_datetime.%{SOABI_debug}.so
900f19
%{dynload_dir}/fcntl.%{SOABI_debug}.so
900f19
%{dynload_dir}/grp.%{SOABI_debug}.so
900f19
%{dynload_dir}/math.%{SOABI_debug}.so
900f19
%{dynload_dir}/mmap.%{SOABI_debug}.so
900f19
%{dynload_dir}/nis.%{SOABI_debug}.so
900f19
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
900f19
%{dynload_dir}/parser.%{SOABI_debug}.so
900f19
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
900f19
%{dynload_dir}/readline.%{SOABI_debug}.so
900f19
%{dynload_dir}/resource.%{SOABI_debug}.so
900f19
%{dynload_dir}/select.%{SOABI_debug}.so
900f19
%{dynload_dir}/spwd.%{SOABI_debug}.so
900f19
%{dynload_dir}/syslog.%{SOABI_debug}.so
900f19
%{dynload_dir}/termios.%{SOABI_debug}.so
900f19
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
900f19
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
900f19
%{dynload_dir}/zlib.%{SOABI_debug}.so
900f19
900f19
# No need to split things out the "Makefile" and the config-32/64.h file as we
900f19
# do for the regular build above (bug 531901), since they're all in one package
900f19
# now; they're listed below, under "-devel":
900f19
900f19
%{_libdir}/%{py_INSTSONAME_debug}
900f19
900f19
# Analog of the -devel subpackage's files:
fa50f4
%{pylibdir}/config-%{LDVERSION_debug}-%{platform_triplet}
900f19
%{_includedir}/python%{LDVERSION_debug}
900f19
900f19
%exclude %{_bindir}/python%{LDVERSION_debug}-config
900f19
%exclude %{_bindir}/python%{LDVERSION_debug}-*-config
900f19
%{_libexecdir}/platform-python%{LDVERSION_debug}-config
900f19
%{_libexecdir}/platform-python%{LDVERSION_debug}-*-config
900f19
900f19
%{_libdir}/libpython%{LDVERSION_debug}.so
900f19
%{_libdir}/libpython%{LDVERSION_debug}.so.1.0
900f19
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
900f19
900f19
# Analog of the -tools subpackage's files:
900f19
#  None for now; we could build precanned versions that have the appropriate
900f19
# shebang if needed
900f19
900f19
# Analog  of the tkinter subpackage's files:
900f19
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
900f19
900f19
# Analog  of the -test subpackage's files:
900f19
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
900f19
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
900f19
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
900f19
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
900f19
900f19
%endif # with debug_build
900f19
900f19
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig
900f19
# See https://bugzilla.redhat.com/show_bug.cgi?id=562980
900f19
#
900f19
# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use
900f19
# debugfiles.list, and it appears that everything below /usr/lib/debug and
900f19
# (/usr/src/debug) gets added to this file (via LISTFILES) in
900f19
# /usr/lib/rpm/find-debuginfo.sh
900f19
#
900f19
# Hence by installing it below /usr/lib/debug we ensure it is added to the
900f19
# -debuginfo subpackage
900f19
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
900f19
# payload file would be unpackaged)
900f19
900f19
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593
900f19
%undefine _debuginfo_subpackages
900f19
900f19
# ======================================================
900f19
# Finally, the changelog:
900f19
# ======================================================
900f19
900f19
%changelog
fa50f4
* Tue Nov 24 2020 Lumír Balhar <lbalhar@redhat.com> - 3.6.8-33
fa50f4
- Add support for upstream architecture names
fa50f4
https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
fa50f4
Resolves: rhbz#1868003
fa50f4
be5967
* Mon Nov 09 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-32
be5967
- Security fix for CVE-2020-26116: Reject control chars in HTTP method in http.client
be5967
Resolves: rhbz#1883257
be5967
d43968
* Mon Aug 17 2020 Tomas Orsava <torsava@redhat.com> - 3.6.8-31
d43968
- Avoid infinite loop when reading specially crafted TAR files (CVE-2019-20907)
d43968
Resolves: rhbz#1856481
d43968
- Resolve hash collisions for Pv4Interface and IPv6Interface (CVE-2020-14422)
d43968
Resolves: rhbz#1854926
d43968
18c135
* Thu Jun 25 2020 Victor Stinner <vstinner@python.org> - 3.6.8-30
18c135
- Remove downstream 00178-dont-duplicate-flags-in-sysconfig.patch which
18c135
  introduced a bug on distutils.sysconfig.get_config_var('LIBPL')
18c135
  (rhbz#1851090).
18c135
18c135
* Thu Jun 18 2020 Victor Stinner <vstinner@python.org> - 3.6.8-29
18c135
- Fix python3-config --configdir (rhbz#1772992).
18c135
3d909f
* Fri Apr 03 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-28
3d909f
- Security fix for CVE-2020-8492
3d909f
Resolves: rhbz#1810618
3d909f
3d909f
* Tue Mar 31 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-27
3d909f
- Add a sentinel value on the Hmac_members table of the fips compliant hmac module
3d909f
Resolves: rhbz#1800512
3d909f
3d909f
* Mon Mar 23 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-26
3d909f
- Skip test_startup_imports from test_site if we have a .pth file in sys.path
3d909f
Resolves: rhbz#1814392
3d909f
3d909f
* Fri Mar 20 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-25
3d909f
- Security fix for CVE-2019-16935
3d909f
Resolves: rhbz#1798001
3d909f
3d909f
* Mon Mar 16 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-24
3d909f
- Build Python with -fno-semantic-interposition for better performance
3d909f
- https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
3d909f
- Also fix test_gdb failures with Link Time Optimizations
3d909f
Resolves: rhbz#1724996
3d909f
b7e076
* Wed Nov 27 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-23
b7e076
- Modify the test suite to better handle disabled SSL/TLS versions and FIPS mode
b7e076
- Use OpenSSL's DRBG and disable os.getrandom() function in FIPS mode
b7e076
Resolves: rhbz#1754028, rhbz#1754027, rhbz#1754026, rhbz#1774471
b7e076
b7e076
* Thu Oct 24 2019 Tomas Orsava <torsava@redhat.com> - 3.6.8-22
b7e076
- Changed Requires into Recommends for python3-pip to allow a lower RHEL8
b7e076
  footprint for containers and other minimal environments
b7e076
Resolves: rhbz#1756217
b7e076
b7e076
* Wed Oct 16 2019 Tomas Orsava <torsava@redhat.com> - 3.6.8-21
b7e076
- Patch 329 (FIPS) modified: Added workaround for mod_ssl:
b7e076
  Skip error checking in _Py_hashlib_fips_error
b7e076
Resolves: rhbz#1760106
b7e076
b7e076
* Mon Oct 14 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-20
b7e076
- Security fix for CVE-2019-16056
b7e076
Resolves: rhbz#1750776
b7e076
b7e076
* Wed Oct 09 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-19
b7e076
- Skip windows specific test_get_exe_bytes test case and enable test_distutils
b7e076
Resolves: rhbz#1754040
b7e076
b7e076
* Mon Oct 07 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-18
b7e076
- Reduce the number of tests running during the profile guided optimizations build
b7e076
- Enable profile guided optimizations for all the supported architectures
b7e076
Resolves: rhbz#1749576
b7e076
b7e076
* Mon Oct 07 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-17
b7e076
- Security fix for CVE-2018-20852
b7e076
Resolves: rhbz#1741553
b7e076
b7e076
* Fri Oct 04 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-16
b7e076
- Properly pass the -Og optimization flag to the debug build
b7e076
Resolves: rhbz#1712977 and rhbz#1714733
b7e076
b7e076
* Thu Aug 29 2019 Tomas Orsava <torsava@redhat.com> - 3.6.8-15
b7e076
- Patch 329 that adds support for OpenSSL FIPS mode has been improved and
b7e076
  bugfixed
b7e076
Resolves: rhbz#1744670 rhbz#1745499 rhbz#1745685
b7e076
b7e076
* Tue Aug 06 2019 Tomas Orsava <torsava@redhat.com> - 3.6.8-14
b7e076
- Adding a new patch 329 that adds support for OpenSSL FIPS mode
b7e076
- Explicitly listing man pages in files section to fix an RPM warning
b7e076
Resolves: rhbz#1731424
b7e076
b7e076
* Tue Jul 02 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-13
b7e076
- Do not set PHA verify flag on client side (rhbz#1725721)
b7e076
- Enable TLS 1.3 post-handshake authentication in http.client (rhbz#1671353)
b7e076
b7e076
* Fri Jun 21 2019 Miro Hrončok <mhroncok@redhat.com> - 3.6.8-12
b7e076
- Use RPM built wheels of pip and setuptools in ensurepip instead of our rewheel patch
b7e076
- Require platform-python-setuptools from platform-python-devel to prevent packaging errors
b7e076
Resolves: rhbz#1701286
b7e076
900f19
* Fri Jun 07 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-11
b7e076
- Fix for CVE-2019-10160
900f19
Resolves: rhbz#1689318
900f19
900f19
* Wed May 29 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-10
900f19
- Security fix for CVE-2019-9948
900f19
Resolves: rhbz#1714643
900f19
900f19
* Tue May 21 2019 Miro Hrončok <mhroncok@redhat.com> - 3.6.8-9
900f19
- Reduced default build flags used to build extension modules
900f19
  https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
900f19
Resolves: rhbz#1634784
900f19
900f19
* Mon May 13 2019 Tomas Orsava <torsava@redhat.com> - 3.6.8-8
900f19
- gzip the unversioned-python man page
900f19
Resolves: rhbz#1665514
900f19
900f19
* Wed May 08 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-7
900f19
- Disallow control chars in http URLs
900f19
- Fixes CVE-2019-9740 and CVE-2019-9947
900f19
Resolves: rhbz#1704365 and rhbz#1703531
900f19
900f19
* Fri May 03 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-6
900f19
- Updated fix for CVE-2019-9636 (rhbz#1689318)
900f19
900f19
* Wed Apr 3 2019 Miro Hrončok <mhroncok@redhat.com> - 3.6.8-5
900f19
- Security fix for CVE-2019-9636 (rhbz#1689318)
900f19
900f19
* Wed Mar 20 2019 Victor Stinner <vstinner@redhat.com> - 3.6.8-4
900f19
- Security fix for CVE-2019-5010 (rhbz#1666789)
900f19
900f19
* Wed Mar 13 2019 Victor Stinner <vstinner@redhat.com> - 3.6.8-3
900f19
- Fix test_tarfile on ppc64 (rhbz#1639490)
900f19
900f19
* Fri Jan 18 2019 Victor Stinner <vstinner@redhat.com> - 3.6.8-2
900f19
- test_ssl fixes for TLS 1.3 and OpenSSL 1.1.1 (rhbz#1639531)
900f19
900f19
* Wed Jan 09 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.6.8-1
900f19
- Update to 3.6.8
900f19
Resolves: rhbz#1658271
900f19
900f19
* Wed Nov 21 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.7-4
900f19
- Make sure the entire test.support module is in python3-libs
900f19
Resolves: rhbz#1651215
900f19
900f19
* Tue Nov 13 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.7-3
900f19
- Add choices for sort option of cProfile for better output
900f19
Resolves: rhbz#1640151
900f19
900f19
* Mon Nov 05 2018 Tomas Orsava <torsava@redhat.com> - 3.6.7-2
900f19
- Switch to requiring platform-python-pip/setuptools instead of the python3-
900f19
  versions
900f19
- Resolves: rhbz#1638836
900f19
900f19
* Thu Oct 25 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.7-1
900f19
- Update to 3.6.7 (rhbz#1627739)
900f19
- Re-enable test_gdb (rhbz#1639536)
900f19
- Re-enable test_faulthandler (rhbz#1640147)
900f19
900f19
* Tue Oct 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.6-19
900f19
- Add compatibility fixes for openssl 1.1.1 and tls 1.3
900f19
Resolves: rhbz#1610023
900f19
900f19
* Tue Oct 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.6-18
900f19
- Fix test_dbm_gnu for gdbm 1.15 which fails on ppc64le
900f19
Resolves: rhbz#1638710
900f19
900f19
* Sun Oct 14 2018 Tomas Orsava <torsava@redhat.com> - 3.6.6-17
900f19
- Add Requires (/post/postun) on /usr/sbin/alternatives
900f19
- Resolves: rhbz#1632625
900f19
900f19
* Fri Oct 12 2018 Petr Viktorin <pviktori@redhat.com> - 3.6.6-16
900f19
- Remove Windows binaries from the source archive
900f19
- Resolves: rhbz#1633219
900f19
900f19
* Wed Oct 10 2018 Petr Viktorin <pviktori@redhat.com> - 3.6.6-15
900f19
- Compile the debug build with -Og rather than -O0
900f19
- Resolves: rhbz#1624162
900f19
900f19
* Wed Oct 10 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.6-14
900f19
- Security fix for CVE-2018-14647
900f19
- Resolves: rhbz#1632096
900f19
900f19
* Sun Oct 07 2018 Tomas Orsava <torsava@redhat.com> - 3.6.6-13
900f19
- Stop providing the `python3` and `python3-debug` names from the
900f19
  platform-python/-debug subpackages
900f19
- The `python3` and `python3-debug` names are now provided from the python36
900f19
  component
900f19
- Conflict with older versions of `python3` and `python3-debug`
900f19
- Related: rhbz#1619153
900f19
900f19
* Tue Oct 02 2018 Tomas Orsava <torsava@redhat.com> - 3.6.6-12.2
900f19
- Fix update of idle3's alternative symlink
900f19
- Resolves: rhbz#1632625
900f19