From 946c6a7beec6e3e3ae5cbe4cc1c02f1e9f7a6305 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Oct 21 2019 12:45:09 +0000 Subject: Rebase to 2.7.17rc1 Upstreamed patches: - 157: https://github.com/python/cpython/pull/12235 - 168: https://github.com/python/cpython/pull/12349 Rebased patches: - 189: updated bundles setuptools/pip versions --- diff --git a/00157-uid-gid-overflows.patch b/00157-uid-gid-overflows.patch deleted file mode 100644 index a31c98a..0000000 --- a/00157-uid-gid-overflows.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows Python-2.7.3/Lib/test/test_os.py ---- Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows 2012-04-09 19:07:32.000000000 -0400 -+++ Python-2.7.3/Lib/test/test_os.py 2012-06-26 14:51:36.000817929 -0400 -@@ -677,30 +677,36 @@ if sys.platform != 'win32': - def test_setuid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setuid, 0) -+ self.assertRaises(TypeError, os.setuid, 'not an int') - self.assertRaises(OverflowError, os.setuid, 1<<32) - - @unittest.skipUnless(hasattr(os, 'setgid'), 'test needs os.setgid()') - def test_setgid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setgid, 0) -+ self.assertRaises(TypeError, os.setgid, 'not an int') - self.assertRaises(OverflowError, os.setgid, 1<<32) - - @unittest.skipUnless(hasattr(os, 'seteuid'), 'test needs os.seteuid()') - def test_seteuid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.seteuid, 0) -+ self.assertRaises(TypeError, os.seteuid, 'not an int') - self.assertRaises(OverflowError, os.seteuid, 1<<32) - - @unittest.skipUnless(hasattr(os, 'setegid'), 'test needs os.setegid()') - def test_setegid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setegid, 0) -+ self.assertRaises(TypeError, os.setegid, 'not an int') - self.assertRaises(OverflowError, os.setegid, 1<<32) - - @unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()') - def test_setreuid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setreuid, 0, 0) -+ self.assertRaises(TypeError, os.setreuid, 'not an int', 0) -+ self.assertRaises(TypeError, os.setreuid, 0, 'not an int') - self.assertRaises(OverflowError, os.setreuid, 1<<32, 0) - self.assertRaises(OverflowError, os.setreuid, 0, 1<<32) - -@@ -715,6 +721,8 @@ if sys.platform != 'win32': - def test_setregid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setregid, 0, 0) -+ self.assertRaises(TypeError, os.setregid, 'not an int', 0) -+ self.assertRaises(TypeError, os.setregid, 0, 'not an int') - self.assertRaises(OverflowError, os.setregid, 1<<32, 0) - self.assertRaises(OverflowError, os.setregid, 0, 1<<32) - diff --git a/00168-distutils-cflags.patch b/00168-distutils-cflags.patch deleted file mode 100644 index 0c4a8df..0000000 --- a/00168-distutils-cflags.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up Python-2.6.6/Lib/distutils/sysconfig.py.distutils-cflags Python-2.6.6/Lib/distutils/sysconfig.py ---- Python-2.6.6/Lib/distutils/sysconfig.py.distutils-cflags 2011-08-12 17:18:17.833091153 -0400 -+++ Python-2.6.6/Lib/distutils/sysconfig.py 2011-08-12 17:18:27.449106938 -0400 -@@ -187,7 +187,7 @@ def customize_compiler(compiler): - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: -- cflags = opt + ' ' + os.environ['CFLAGS'] -+ cflags = cflags + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] diff --git a/00189-use-rpm-wheels.patch b/00189-use-rpm-wheels.patch index 76a1324..4c52497 100644 --- a/00189-use-rpm-wheels.patch +++ b/00189-use-rpm-wheels.patch @@ -18,10 +18,10 @@ index 5021ebf..1903cc0 100644 __all__ = ["version", "bootstrap"] --_SETUPTOOLS_VERSION = "40.6.2" +-_SETUPTOOLS_VERSION = "41.2.0" +_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "18.1" +-_PIP_VERSION = "19.2.3" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" diff --git a/python2.spec b/python2.spec index 845011f..440863b 100644 --- a/python2.spec +++ b/python2.spec @@ -118,11 +118,11 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python2-docs when changing this: -%global general_version %{pybasever}.16 -#global prerel ... +%global general_version %{pybasever}.17 +%global prerel rc1 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} License: Python Requires: %{python}-libs%{?_isa} = %{version}-%{release} Provides: python(abi) = %{pybasever} @@ -225,7 +225,7 @@ Recommends: python2-pip # Source code and patches # ======================= -Source: https://www.python.org/ftp/python/%{version}/Python-%{upstream_version}.tar.xz +Source: https://www.python.org/ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz # Work around bug 562906 until it's fixed in rpm-build by providing a fixed # version of pythondeps.sh: @@ -630,22 +630,6 @@ Patch155: 00155-avoid-ctypes-thunks.patch # Not yet sent upstream Patch156: 00156-gdb-autoload-safepath.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 - # 00165 # # Backport to Python 2 from Python 3.3 of improvements to the "crypt" module # adding precanned ways of salting a password (rhbz#835021) @@ -664,18 +648,6 @@ Patch165: 00165-crypt-module-salt-backport.patch # Not yet sent upstream Patch167: 00167-disable-stack-navigation-tests-when-optimized-in-test_gdb.patch -# 00168 # -# Update distutils.sysconfig so that if CFLAGS is defined in the environment, -# when building extension modules, it is appended to the full compilation -# flags from Python's Makefile, rather than instead reducing the compilation -# flags to the subset within OPT and adding it to those. -# -# In particular, this should ensure that "-fno-strict-aliasing" is used by -# "python setup.py build" even when CFLAGS is defined in the environment. -# -# (rhbz#849994) -Patch168: 00168-distutils-cflags.patch - # 00169 # # Use SHA-256 rather than implicitly using MD5 within the challenge handling # in multiprocessing.connection @@ -830,8 +802,8 @@ Requires: gdbm%{?_isa} >= 1:1.13 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python2-pip) = 18.1 -Provides: bundled(python2-setuptools) = 40.6.2 +Provides: bundled(python2-pip) = 19.2.3 +Provides: bundled(python2-setuptools) = 41.2.0 %endif %{?python_provide:%python_provide python2-libs} @@ -1076,11 +1048,9 @@ rm -r Modules/zlib || exit 1 %patch147 -p1 %patch155 -p1 %patch156 -p1 -%patch157 -p1 %patch165 -p1 mv Modules/cryptmodule.c Modules/_cryptmodule.c %patch167 -p1 -%patch168 -p1 %patch169 -p1 %patch170 -p1 %patch174 -p1 -b .fix-for-usr-move @@ -2001,6 +1971,9 @@ CheckPython \ # ====================================================== %changelog +* Wed Oct 09 2019 Miro Hrončok - 2.7.17~rc1-1 +- Rebase to 2.7.17rc1 + * Fri Apr 26 2019 Tomas Orsava - 2.7.16-2 - Remove pyc/pyo files from /usr/bin (#1703575) - Update the macro that disables automatic bytecompilation to the new correct diff --git a/sources b/sources index f0a0c91..6938a38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Python-2.7.16.tar.xz) = 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0 +SHA512 (Python-2.7.17rc1.tar.xz) = 9faf2218c7279ea301f6487b5d417b32451551e0a6e744d06d0a09a0256d493f84d74de50971361d928a638e98c9c3b437cf947c3b6fb290428f056ba587816f