| |
@@ -14,7 +14,7 @@
|
| |
# WARNING When rebasing to a new Python version,
|
| |
# remember to update the python3-docs package as well
|
| |
Version: %{pybasever}.2
|
| |
- Release: 12%{?dist}
|
| |
+ Release: 13%{?dist}
|
| |
License: Python
|
| |
|
| |
|
| |
@@ -247,9 +247,10 @@
|
| |
# AppData file for idle3
|
| |
Source11: idle3.appdata.xml
|
| |
|
| |
+ # 00001 #
|
| |
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
|
| |
# Was Patch0 in ivazquez' python3000 specfile:
|
| |
- Patch1: Python-3.1.1-rpath.patch
|
| |
+ Patch1: 00001-rpath.patch
|
| |
|
| |
# 00055 #
|
| |
# Systemtap support: add statically-defined probe points
|
| |
@@ -258,16 +259,16 @@
|
| |
# (where sys.getfilesystemencoding() == 'ascii')
|
| |
Patch55: 00055-systemtap.patch
|
| |
|
| |
- Patch102: 00102-lib64.patch
|
| |
-
|
| |
- # 00104 #
|
| |
+ # 00102 #
|
| |
+ # Change the various install paths to use /usr/lib64/ instead or /usr/lib
|
| |
# Only used when "%{_lib}" == "lib64"
|
| |
- # Another lib64 fix, for distutils/tests/test_install.py; not upstream:
|
| |
- Patch104: 00104-lib64-fix-for-test_install.patch
|
| |
+ # Not yet sent upstream.
|
| |
+ Patch102: 00102-lib64.patch
|
| |
|
| |
# 00111 #
|
| |
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
|
| |
- # a libpythonMAJOR.MINOR.a (bug 550692):
|
| |
+ # a libpythonMAJOR.MINOR.a
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=556092
|
| |
# Downstream only: not appropriate for upstream
|
| |
Patch111: 00111-no-static-lib.patch
|
| |
|
| |
@@ -285,32 +286,13 @@
|
| |
# these unittest hooks in their own "check" phases)
|
| |
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
|
| |
|
| |
- # 00137 #
|
| |
- # Some tests within distutils fail when run in an rpmbuild:
|
| |
- Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch
|
| |
-
|
| |
# 00155 #
|
| |
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
|
| |
# generating SELinux denials on "import ctypes" and "import uuid" when
|
| |
- # embedding Python within httpd (rhbz#814391)
|
| |
+ # embedding Python within httpd
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=814391
|
| |
Patch155: 00155-avoid-ctypes-thunks.patch
|
| |
|
| |
- # 00157 #
|
| |
- # Update uid/gid handling throughout the standard library: uid_t and gid_t are
|
| |
- # unsigned 32-bit values, but existing code often passed them through C long
|
| |
- # values, which are signed 32-bit values on 32-bit architectures, leading to
|
| |
- # negative int objects for uid/gid values >= 2^31 on 32-bit architectures.
|
| |
- #
|
| |
- # Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python
|
| |
- # objects, using int objects where the value will fit (long objects otherwise),
|
| |
- # and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed
|
| |
- # as a special case (since this is given special meaning by the chown syscall)
|
| |
- #
|
| |
- # Update standard library to use this throughout for uid/gid values, so that
|
| |
- # very large uid/gid values are round-trippable, and -1 remains usable.
|
| |
- # (rhbz#697470)
|
| |
- Patch157: 00157-uid-gid-overflows.patch
|
| |
-
|
| |
# 00160 #
|
| |
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
|
| |
# header files in the build chroot, but may not be supported in the running
|
| |
@@ -329,11 +311,10 @@
|
| |
# In debug builds, try to print repr() when a C-level assert fails in the
|
| |
# garbage collector (typically indicating a reference-counting error
|
| |
# somewhere else e.g in an extension module)
|
| |
- # Backported to 2.7 from a patch I sent upstream for py3k
|
| |
- # http://bugs.python.org/issue9263 (rhbz#614680)
|
| |
- # hiding the proposed new macros/functions within gcmodule.c to avoid exposing
|
| |
+ # The new macros/functions within gcmodule.c are hidden to avoid exposing
|
| |
# them within the extension API.
|
| |
- # (rhbz#850013
|
| |
+ # Sent upstream: http://bugs.python.org/issue9263
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=614680
|
| |
Patch170: 00170-gc-assertions.patch
|
| |
|
| |
# 00178 #
|
| |
@@ -342,35 +323,6 @@
|
| |
# Does not affect python2 AFAICS (different sysconfig values initialization)
|
| |
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
|
| |
|
| |
- # 00180 #
|
| |
- # Enable building on ppc64p7
|
| |
- # Not appropriate for upstream, Fedora-specific naming
|
| |
- Patch180: 00180-python-add-support-for-ppc64p7.patch
|
| |
-
|
| |
- # 00186 #
|
| |
- # Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1023607
|
| |
- # Previously, this fixed a problem where some *.py files were not being
|
| |
- # bytecompiled properly during build. This was result of py_compile.compile
|
| |
- # raising exception when trying to convert test file with bad encoding, and
|
| |
- # thus not continuing bytecompilation for other files.
|
| |
- # This was fixed upstream, but the test hasn't been merged yet, so we keep it
|
| |
- Patch186: 00186-dont-raise-from-py_compile.patch
|
| |
-
|
| |
- # 00188 #
|
| |
- # Downstream only patch that should be removed when we compile all guaranteed
|
| |
- # hashlib algorithms properly. The problem is this:
|
| |
- # - during tests, test_hashlib is imported and executed before test_lib2to3
|
| |
- # - if at least one hash function has failed, trying to import it triggers an
|
| |
- # exception that is being caught and exception is logged:
|
| |
- # http://hg.python.org/cpython/file/2de806c8b070/Lib/hashlib.py#l217
|
| |
- # - logging the exception makes logging module run basicConfig
|
| |
- # - when lib2to3 tests are run again, lib2to3 runs basicConfig again, which
|
| |
- # doesn't do anything, because it was run previously
|
| |
- # (logging.root.handlers != []), which means that the default setup
|
| |
- # (most importantly logging level) is not overriden. That means that a test
|
| |
- # relying on this will fail (test_filename_changing_on_output_single_dir)
|
| |
- Patch188: 00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
|
| |
-
|
| |
# 00189 #
|
| |
# Add the rewheel module, allowing to recreate wheels from already installed
|
| |
# ones
|
| |
@@ -382,18 +334,6 @@
|
| |
# but the LIBPL variable defined there doesn't respect libdir macro
|
| |
Patch205: 00205-make-libpl-respect-lib64.patch
|
| |
|
| |
- # 00206 #
|
| |
- # Remove hf flag from arm triplet which is used
|
| |
- # by debian but fedora infra uses only eabi without hf
|
| |
- Patch206: 00206-remove-hf-from-arm-triplet.patch
|
| |
-
|
| |
- # 00243 #
|
| |
- # Fix the triplet used on 64-bit MIPS
|
| |
- # rhbz#1322526: https://bugzilla.redhat.com/show_bug.cgi?id=1322526
|
| |
- # Upstream uses Debian-like style mips64-linux-gnuabi64
|
| |
- # Fedora needs the default mips64-linux-gnu
|
| |
- Patch243: 00243-fix-mips64-triplet.patch
|
| |
-
|
| |
# 00251
|
| |
# Set values of prefix and exec_prefix in distutils install command
|
| |
# to /usr/local if executable is /usr/bin/python* and RPM build
|
| |
@@ -430,15 +370,19 @@
|
| |
# 00272 #
|
| |
# Reject newline characters in ftplib.FTP.putline() arguments to
|
| |
# avoid FTP protocol stream injection via malicious URLs.
|
| |
- # rhbz#1478916
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=1478916
|
| |
# Fixed upstream: http://bugs.python.org/issue30119
|
| |
Patch272: 00272-fix-ftplib-to-reject-newlines.patch
|
| |
|
| |
# 00273 #
|
| |
# Skip test_float_with_comma, which fails in Koji with UnicodeDecodeError
|
| |
- # https://bugzilla.redhat.com/show_bug.cgi?id=1484497
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=1484497
|
| |
Patch273: 00273-skip-float-test.patch
|
| |
|
| |
+ # 00274 #
|
| |
+ # Upstream uses Debian-style architecture naming. Change to match Fedora.
|
| |
+ Patch274: 00274-fix-arch-names.patch
|
| |
+
|
| |
# (New patches go here ^^^)
|
| |
#
|
| |
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
| |
@@ -448,12 +392,6 @@
|
| |
#
|
| |
# https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
|
| |
|
| |
- # add correct arch for ppc64/ppc64le
|
| |
- # it should be ppc64le-linux-gnu/ppc64-linux-gnu instead powerpc64le-linux-gnu/powerpc64-linux-gnu
|
| |
- Patch5001: python3-powerppc-arch.patch
|
| |
-
|
| |
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
| |
-
|
| |
|
| |
# ==========================================
|
| |
# Descriptions, and metadata for subpackages
|
| |
@@ -648,26 +586,9 @@
|
| |
cp -a %{SOURCE7} .
|
| |
%endif # with systemtap
|
| |
|
| |
- # Ensure that we're using the system copy of various libraries, rather than
|
| |
- # copies shipped by upstream in the tarball:
|
| |
- # Remove embedded copy of expat:
|
| |
- rm -r Modules/expat || exit 1
|
| |
-
|
| |
- # Remove embedded copy of zlib:
|
| |
- rm -r Modules/zlib || exit 1
|
| |
-
|
| |
- ## Disabling hashlib patch for now as it needs to be reimplemented
|
| |
- ## for OpenSSL 1.1.0.
|
| |
- # Don't build upstream Python's implementation of these crypto algorithms;
|
| |
- # instead rely on _hashlib and OpenSSL.
|
| |
- #
|
| |
- # For example, in our builds hashlib.md5 is implemented within _hashlib via
|
| |
- # OpenSSL (and thus respects FIPS mode), and does not fall back to _md5
|
| |
- # TODO: there seems to be no OpenSSL support in Python for sha3 so far
|
| |
- # when it is there, also remove _sha3/ dir
|
| |
- #for f in md5module.c sha1module.c sha256module.c sha512module.c; do
|
| |
- # rm Modules/$f
|
| |
- #done
|
| |
+ # Remove bundled libraries to ensure that we're using the system copy.
|
| |
+ rm -r Modules/expat
|
| |
+ rm -r Modules/zlib
|
| |
|
| |
%if %{with rewheel}
|
| |
%global pip_version 9.0.1
|
| |
@@ -685,28 +606,20 @@
|
| |
|
| |
%if "%{_lib}" == "lib64"
|
| |
%patch102 -p1
|
| |
- %patch104 -p1
|
| |
%endif
|
| |
%patch111 -p1
|
| |
%patch132 -p1
|
| |
- %patch137 -p1
|
| |
%patch155 -p1
|
| |
- %patch157 -p1
|
| |
%patch160 -p1
|
| |
%patch163 -p1
|
| |
%patch170 -p1
|
| |
%patch178 -p1
|
| |
- %patch180 -p1
|
| |
- %patch186 -p1
|
| |
- %patch188 -p1
|
| |
|
| |
%if %{with rewheel}
|
| |
%patch189 -p1
|
| |
%endif
|
| |
|
| |
%patch205 -p1
|
| |
- %patch206 -p1
|
| |
- %patch243 -p1
|
| |
%patch251 -p1
|
| |
%patch262 -p1
|
| |
|
| |
@@ -718,24 +631,24 @@
|
| |
%patch271 -p1
|
| |
%patch272 -p1
|
| |
%patch273 -p1
|
| |
+ %patch274 -p1
|
| |
|
| |
- # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
|
| |
- # are many differences between 2.6 and the Python 3 library.
|
| |
- #
|
| |
- # Fix up the URLs within pydoc to point at the documentation for this
|
| |
- # MAJOR.MINOR version:
|
| |
- #
|
| |
- sed --in-place \
|
| |
- --expression="s|http://docs.python.org/library|http://docs.python.org/%{pybasever}/library|g" \
|
| |
- Lib/pydoc.py || exit 1
|
| |
|
| |
- %patch5001 -p1
|
| |
+ # Remove files that should be generated by the build
|
| |
+ # (This is after patching, so that we can use patches directly from upstream)
|
| |
+ rm configure pyconfig.h.in
|
| |
+
|
| |
|
| |
# ======================================================
|
| |
# Configuring and building the code:
|
| |
# ======================================================
|
| |
|
| |
%build
|
| |
+
|
| |
+ # Regenerate the configure script and pyconfig.h.in
|
| |
+ autoconf
|
| |
+ autoheader
|
| |
+
|
| |
topdir=$(pwd)
|
| |
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
|
| |
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
|
| |
@@ -878,7 +791,8 @@
|
| |
#
|
| |
# Initially I tried:
|
| |
# /usr/lib/libpython3.1.so.1.0-gdb.py
|
| |
- # but doing so generated noise when ldconfig was rerun (rhbz:562980)
|
| |
+ # but doing so generated noise when ldconfig was rerun
|
| |
+ # (see https://bugzilla.redhat.com/show_bug.cgi?id=562980)
|
| |
#
|
| |
%if %{with gdb_hooks}
|
| |
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
|
| |
@@ -1072,8 +986,8 @@
|
| |
done
|
| |
|
| |
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
|
| |
- # avoid the user having to know the precise version and ABI flags. (see
|
| |
- # e.g. rhbz#676748):
|
| |
+ # avoid the user having to know the precise version and ABI flags.
|
| |
+ # See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748
|
| |
%if %{with debug_build}
|
| |
ln -s \
|
| |
%{_bindir}/python%{LDVERSION_debug} \
|
| |
@@ -1149,7 +1063,8 @@
|
| |
PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
|
| |
xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
|
| |
|
| |
- # For ppc64 we need a larger stack than default (rhbz#1292462)
|
| |
+ # For ppc64 we need a larger stack than default
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=1292462
|
| |
%ifarch %{power64}
|
| |
ulimit -a
|
| |
ulimit -s 16384
|
| |
@@ -1175,6 +1090,7 @@
|
| |
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
|
| |
-wW --slowest --findleaks \
|
| |
-x test_distutils \
|
| |
+ -x test_bdist_rpm \
|
| |
%ifarch ppc64le aarch64
|
| |
-x test_faulthandler \
|
| |
%endif
|
| |
@@ -1644,8 +1560,8 @@
|
| |
|
| |
%endif # with debug_build
|
| |
|
| |
- # We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
|
| |
- # ldconfig (rhbz:562980).
|
| |
+ # We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=562980
|
| |
#
|
| |
# The /usr/lib/rpm/redhat/macros defines %__debug_package to use
|
| |
# debugfiles.list, and it appears that everything below /usr/lib/debug and
|
| |
@@ -1657,7 +1573,7 @@
|
| |
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
|
| |
# payload file would be unpackaged)
|
| |
|
| |
- # Workaround for rhbz#1476593
|
| |
+ # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593
|
| |
%undefine _debuginfo_subpackages
|
| |
|
| |
# ======================================================
|
| |
@@ -1665,6 +1581,15 @@
|
| |
# ======================================================
|
| |
|
| |
%changelog
|
| |
+ * Mon Aug 28 2017 Petr Viktorin <pviktori@redhat.com> - 3.6.2-13
|
| |
+ - Rename patch files to be consistent
|
| |
+ - Run autotools to generate the configure script before building
|
| |
+ - Merge lib64 patches (104 into 102)
|
| |
+ - Skip test_bdist_rpm using test config rather than a patch (removes patch 137)
|
| |
+ - Remove patches 157 and 186, which had test changes left over after upstreaming
|
| |
+ - Remove patch 188, a temporary workaround for hashlib tests
|
| |
+ - Merge patches 180, 206, 243, 5001 (architecture naming) into new patch 274.
|
| |
+
|
| |
* Mon Aug 28 2017 Michal Cyprian <mcyprian@redhat.com> - 3.6.2-12
|
| |
- Use python3 style of calling super() without arguments in rpath
|
| |
patch to prevent recursion in UnixCCompiler subclasses
|
| |
Here's a cleanup for our patches and the %prep section. See the individual commits.
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=21528721