From 7b42f48700ac0821a3dcafb0f5cf46e00e9cf6ee Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: May 16 2013 13:25:31 +0000 Subject: Updated to Python 2.7.5. - Refreshed patches: 0 (config), 102 (lib64), 121 (add Modules to build path), 153 (gdb test noise) - Dropped patches: 126, 127 (big endian issues, both fixed upstream), 175 (configure -Wformat, fixed upstream) - Synced patch numbers with python3.spec. --- diff --git a/00121-add-Modules-to-build-path.patch b/00121-add-Modules-to-build-path.patch new file mode 100644 index 0000000..6e3294d --- /dev/null +++ b/00121-add-Modules-to-build-path.patch @@ -0,0 +1,13 @@ +--- Python-2.7.5/Lib/site.py.orig 2013-05-16 12:47:55.000000000 +0200 ++++ Python-2.7.5/Lib/site.py 2013-05-16 12:56:20.089058109 +0200 +@@ -529,6 +529,10 @@ def main(): + + abs__file__() + known_paths = removeduppaths() ++ from sysconfig import is_python_build ++ if is_python_build(): ++ from _sysconfigdata import build_time_vars ++ sys.path.append(os.path.join(build_time_vars['abs_builddir'], 'Modules')) + if ENABLE_USER_SITE is None: + ENABLE_USER_SITE = check_enableusersite() + known_paths = addusersitepackages(known_paths) diff --git a/00121-revert-r79310.patch b/00121-revert-r79310.patch deleted file mode 100644 index 02b0d47..0000000 --- a/00121-revert-r79310.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up Python-2.7.3/Lib/site.py.00121 Python-2.7.3/Lib/site.py ---- Python-2.7.3/Lib/site.py.00121 2013-02-19 14:07:19.156978291 -0500 -+++ Python-2.7.3/Lib/site.py 2013-02-19 14:07:19.233978288 -0500 -@@ -123,7 +123,7 @@ def addbuilddir(): - s = "build/lib.%s-%.3s" % (get_platform(), sys.version) - if hasattr(sys, 'gettotalrefcount'): - s += '-pydebug' -- s = os.path.join(os.path.dirname(sys.path.pop()), s) -+ s = os.path.join(os.path.dirname(sys.path[-1]), s) - sys.path.append(s) - - -diff -up Python-2.7.3/Misc/NEWS.00121 Python-2.7.3/Misc/NEWS diff --git a/00153-fix-test_gdb-noise.patch b/00153-fix-test_gdb-noise.patch index 0495d95..50a0917 100644 --- a/00153-fix-test_gdb-noise.patch +++ b/00153-fix-test_gdb-noise.patch @@ -16,20 +16,16 @@ 'run'] if cmds_after_breakpoint: commands += cmds_after_breakpoint -@@ -135,8 +144,16 @@ class DebuggerTests(unittest.TestCase): - 'Do you need "set solib-search-path" or ' - '"set sysroot"?\n', - '') -+ err = '\n'.join([line -+ for line in err.splitlines() -+ if not line.startswith('warning: Unable to open') -+ if not line.startswith('Missing separate debuginfo for') -+ if not line.startswith('Try: yum --disablerepo=') -+ # In case 'set print entry-values no' failed: -+ if not line.startswith('Undefined set print command')]) - - # Ensure no unexpected error messages: -+ self.maxDiff = None - self.assertEqual(err, '') - - return out +--- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400 ++++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400 +@@ -144,6 +153,10 @@ + 'Do you need "set solib-search-path" or ' + '"set sysroot"?', + ) ++ ignore_patterns += ('warning: Unable to open', ++ 'Missing separate debuginfo for', ++ 'Try: yum --disablerepo=', ++ 'Undefined set print command') + for line in errlines: + if not line.startswith(ignore_patterns): + unexpected_errlines.append(line) diff --git a/00176-allow-arbitrary-timeout-in-condition-wait.patch b/00176-allow-arbitrary-timeout-in-condition-wait.patch deleted file mode 100644 index 665965d..0000000 --- a/00176-allow-arbitrary-timeout-in-condition-wait.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/Lib/threading.py b/Lib/threading.py -index cb49c4a..c9795a5 100644 ---- a/Lib/threading.py -+++ b/Lib/threading.py -@@ -305,7 +305,7 @@ class _Condition(_Verbose): - else: - return True - -- def wait(self, timeout=None): -+ def wait(self, timeout=None, balancing=True): - """Wait until notified or until a timeout occurs. - - If the calling thread has not acquired the lock when this method is -@@ -354,7 +354,10 @@ class _Condition(_Verbose): - remaining = endtime - _time() - if remaining <= 0: - break -- delay = min(delay * 2, remaining, .05) -+ if balancing: -+ delay = min(delay * 2, remaining, 0.05) -+ else: -+ delay = remaining - _sleep(delay) - if not gotit: - if __debug__: -@@ -599,7 +602,7 @@ class _Event(_Verbose): - finally: - self.__cond.release() - -- def wait(self, timeout=None): -+ def wait(self, timeout=None, balancing=True): - """Block until the internal flag is true. - - If the internal flag is true on entry, return immediately. Otherwise, -@@ -617,7 +620,7 @@ class _Event(_Verbose): - self.__cond.acquire() - try: - if not self.__flag: -- self.__cond.wait(timeout) -+ self.__cond.wait(timeout, balancing) - return self.__flag - finally: - self.__cond.release() -@@ -908,7 +911,7 @@ class Thread(_Verbose): - if 'dummy_threading' not in _sys.modules: - raise - -- def join(self, timeout=None): -+ def join(self, timeout=None, balancing=True): - """Wait until the thread terminates. - - This blocks the calling thread until the thread whose join() method is -@@ -957,7 +960,7 @@ class Thread(_Verbose): - if __debug__: - self._note("%s.join(): timed out", self) - break -- self.__block.wait(delay) -+ self.__block.wait(delay, balancing) - else: - if __debug__: - self._note("%s.join(): thread stopped", self) -@@ -1143,7 +1146,7 @@ class _DummyThread(Thread): - def _set_daemon(self): - return True - -- def join(self, timeout=None): -+ def join(self, timeout=None, balancing=True): - assert False, "cannot join a dummy thread" - - diff --git a/00177-python-add-support-for-ppc64p7.patch b/00177-python-add-support-for-ppc64p7.patch deleted file mode 100644 index 022944a..0000000 --- a/00177-python-add-support-for-ppc64p7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -r de35eae9048a config.sub ---- a/config.sub Wed Apr 24 23:33:20 2013 +0200 -+++ b/config.sub Thu Apr 25 08:51:00 2013 +0200 -@@ -1008,7 +1008,7 @@ - ;; - ppc64) basic_machine=powerpc64-unknown - ;; -- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown diff --git a/00180-python-add-support-for-ppc64p7.patch b/00180-python-add-support-for-ppc64p7.patch new file mode 100644 index 0000000..022944a --- /dev/null +++ b/00180-python-add-support-for-ppc64p7.patch @@ -0,0 +1,12 @@ +diff -r de35eae9048a config.sub +--- a/config.sub Wed Apr 24 23:33:20 2013 +0200 ++++ b/config.sub Thu Apr 25 08:51:00 2013 +0200 +@@ -1008,7 +1008,7 @@ + ;; + ppc64) basic_machine=powerpc64-unknown + ;; +- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown diff --git a/00181-allow-arbitrary-timeout-in-condition-wait.patch b/00181-allow-arbitrary-timeout-in-condition-wait.patch new file mode 100644 index 0000000..665965d --- /dev/null +++ b/00181-allow-arbitrary-timeout-in-condition-wait.patch @@ -0,0 +1,70 @@ +diff --git a/Lib/threading.py b/Lib/threading.py +index cb49c4a..c9795a5 100644 +--- a/Lib/threading.py ++++ b/Lib/threading.py +@@ -305,7 +305,7 @@ class _Condition(_Verbose): + else: + return True + +- def wait(self, timeout=None): ++ def wait(self, timeout=None, balancing=True): + """Wait until notified or until a timeout occurs. + + If the calling thread has not acquired the lock when this method is +@@ -354,7 +354,10 @@ class _Condition(_Verbose): + remaining = endtime - _time() + if remaining <= 0: + break +- delay = min(delay * 2, remaining, .05) ++ if balancing: ++ delay = min(delay * 2, remaining, 0.05) ++ else: ++ delay = remaining + _sleep(delay) + if not gotit: + if __debug__: +@@ -599,7 +602,7 @@ class _Event(_Verbose): + finally: + self.__cond.release() + +- def wait(self, timeout=None): ++ def wait(self, timeout=None, balancing=True): + """Block until the internal flag is true. + + If the internal flag is true on entry, return immediately. Otherwise, +@@ -617,7 +620,7 @@ class _Event(_Verbose): + self.__cond.acquire() + try: + if not self.__flag: +- self.__cond.wait(timeout) ++ self.__cond.wait(timeout, balancing) + return self.__flag + finally: + self.__cond.release() +@@ -908,7 +911,7 @@ class Thread(_Verbose): + if 'dummy_threading' not in _sys.modules: + raise + +- def join(self, timeout=None): ++ def join(self, timeout=None, balancing=True): + """Wait until the thread terminates. + + This blocks the calling thread until the thread whose join() method is +@@ -957,7 +960,7 @@ class Thread(_Verbose): + if __debug__: + self._note("%s.join(): timed out", self) + break +- self.__block.wait(delay) ++ self.__block.wait(delay, balancing) + else: + if __debug__: + self._note("%s.join(): thread stopped", self) +@@ -1143,7 +1146,7 @@ class _DummyThread(Thread): + def _set_daemon(self): + return True + +- def join(self, timeout=None): ++ def join(self, timeout=None, balancing=True): + assert False, "cannot join a dummy thread" + + diff --git a/05000-autotool-intermediates.patch b/05000-autotool-intermediates.patch index 4a40a56..cfedc25 100644 --- a/05000-autotool-intermediates.patch +++ b/05000-autotool-intermediates.patch @@ -87,15 +87,6 @@ diff -up ./configure.autotool-intermediates ./configure # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be # merged with this chunk of code? -@@ -6253,7 +6271,7 @@ then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5 - $as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } - save_CFLAGS=$CFLAGS -- CFLAGS="$CFLAGS -Werror" -+ CFLAGS="$CFLAGS -Werror -Wformat" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - @@ -9958,6 +9976,50 @@ $as_echo "no" >&6; } fi diff --git a/python-2.7.1-config.patch b/python-2.7.1-config.patch index 7815d15..6976d5c 100644 --- a/python-2.7.1-config.patch +++ b/python-2.7.1-config.patch @@ -9,7 +9,7 @@ # GNU readline. Unlike previous Python incarnations, GNU readline is # now incorporated in an optional module, configured in the Setup file -@@ -163,74 +163,74 @@ GLHACK=-Dclear=__GLclear +@@ -163,77 +163,77 @@ GLHACK=-Dclear=__GLclear # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. @@ -57,6 +57,9 @@ -#_locale _localemodule.c # -lintl +_locale _localemodule.c # -lintl + # Standard I/O baseline + #_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c + # Modules with some UNIX dependencies -- on by default: # (If you have a really backward UNIX, select and socket may not be @@ -80,7 +83,7 @@ +_csv _csv.c # Socket module helper for socket(2) --#_socket socketmodule.c +-#_socket socketmodule.c timemodule.c +_socket socketmodule.c timemodule.c # Socket module helper for SSL support; you must comment out the other diff --git a/python-2.7.3-lib64.patch b/python-2.7.3-lib64.patch index 9578b7f..71f32c5 100644 --- a/python-2.7.3-lib64.patch +++ b/python-2.7.3-lib64.patch @@ -167,8 +167,8 @@ diff -up Python-2.7.3/setup.py.lib64 Python-2.7.3/setup.py - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + self.add_gcc_paths() self.add_multiarch_paths() - @@ -677,11 +677,11 @@ class PyBuildExt(build_ext): elif curses_library: readline_libs.append(curses_library) diff --git a/python.spec b/python.spec index d8cad9a..c80aefc 100644 --- a/python.spec +++ b/python.spec @@ -105,8 +105,8 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python-docs when changing this: -Version: 2.7.4 -Release: 5%{?dist} +Version: 2.7.5 +Release: 1%{?dist} License: Python Group: Development/Languages Requires: %{python}-libs%{?_isa} = %{version}-%{release} @@ -459,9 +459,8 @@ Patch114: 00114-statvfs-f_flag-constants.patch # File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/struct.py", line 1, in # from _struct import * # ImportError: No module named _struct -# -# For now, revert this patch: -Patch121: 00121-revert-r79310.patch +# This patch adds the build Modules directory to build path. +Patch121: 00121-add-Modules-to-build-path.patch # 00125 # # COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always @@ -471,13 +470,11 @@ Patch121: 00121-revert-r79310.patch # Not yet sent upstream Patch125: 00125-less-verbose-COUNT_ALLOCS.patch -# Fix dbm module on big-endian 64-bit -# Sent upstream as http://bugs.python.org/issue9687 (rhbz#626756) -Patch126: fix-dbm_contains-on-64bit-bigendian.patch +# Upstream as of Python 2.7.5 +# Patch126: fix-dbm_contains-on-64bit-bigendian.patch -# Fix test_structmember on big-endian 64-bit -# Sent upstream as http://bugs.python.org/issue9960 -Patch127: fix-test_structmember-on-64bit-bigendian.patch +# Upstream as of Python 2.7.5 +# Patch127: fix-test_structmember-on-64bit-bigendian.patch # 2.7.1 (in r84230) added a test to test_abc which fails if python is # configured with COUNT_ALLOCS, which is the case for our debug build @@ -772,27 +769,42 @@ Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch Patch174: 00174-fix-for-usr-move.patch # 00175 # -# Fix for configure.ac mistakenly detecting -# checking whether gcc supports ParseTuple __format__... yes -# when it doesn't, when compiling with gcc 4.8 -# -# Sent upstream as http://bugs.python.org/issue17547 -# (rhbz#927358) -Patch175: 00175-fix-configure-Wformat.patch +# Upstream as of Python 2.7.5 +# Patch175: 00175-fix-configure-Wformat.patch # 00176 # +# python3.spec had: +# Patch176: 00176-upstream-issue16754-so-extension.patch +# doesn't affect python2 + +# 00177 # +# python3.spec has +# Patch177: 00177-platform-unicode.patch +# Does not affect python2 + +# 00178 # +# python3.spec has +# Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch +# Does not affect python2 AFAICS (different sysconfig values initialization) + +# 00179 # +# python3.spec has +# Patch179: 00179-dont-raise-error-on-gdb-corrupted-frames-in-backtrace.patch +# Doesn't seem to affect python2 + +# 00180 # +# Enable building on ppc64p7 +# Not appropriate for upstream, Fedora-specific naming +Patch180: 00180-python-add-support-for-ppc64p7.patch + +# 00181 # # Allow arbitrary timeout for Condition.wait, as reported in # https://bugzilla.redhat.com/show_bug.cgi?id=917709 # Upstream doesn't want this: http://bugs.python.org/issue17748 # But we have no better solution downstream yet, and since there is # no API breakage, we apply this patch. # Doesn't apply to Python 3, where this is fixed otherwise and works. -Patch176: 00176-allow-arbitrary-timeout-in-condition-wait.patch - -# 00177 # -# Enable building on ppc64p7 -# Not appropriate for upstream, Fedora-specific naming -Patch177: 00177-python-add-support-for-ppc64p7.patch +Patch181: 00181-allow-arbitrary-timeout-in-condition-wait.patch # (New patches go here ^^^) @@ -1074,8 +1086,8 @@ done %patch121 -p1 %patch125 -p1 -b .less-verbose-COUNT_ALLOCS -%patch126 -p0 -b .fix-dbm_contains-on-64bit-bigendian -%patch127 -p1 -b .fix-test_structmember-on-64bit-bigendian +# 00126: upstream as of Python 2.7.5 +# 00127: upstream as of Python 2.7.5 %patch128 -p1 %patch130 -p1 @@ -1133,9 +1145,13 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c # 00171: upstream as of Python 2.7.4 %patch173 -p1 %patch174 -p1 -b .fix-for-usr-move -%patch175 -p1 -b .fix-configure-Wformat -%patch176 -p1 -%patch177 -p1 +# 00175: upstream as of Python 2.7.5 +# 00176: not for python 2 +# 00177: not for python 2 +# 00178: not for python 2 +# 00179: not for python 2 +%patch180 -p1 +%patch181 -p1 # This shouldn't be necesarry, but is right now (2.2a3) @@ -1965,6 +1981,14 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Thu May 16 2013 Bohuslav Kabrda - 2.7.5-1 +- Updated to Python 2.7.5. +- Refreshed patches: 0 (config), 102 (lib64), 121 (add Modules to build path), +153 (gdb test noise) +- Dropped patches: 126, 127 (big endian issues, both fixed upstream), +175 (configure -Wformat, fixed upstream) +- Synced patch numbers with python3.spec. + * Tue May 14 2013 David Malcolm - 2.7.4-5 - fix multilib issue in python-tools due to /usr/bin/pynche (source 7; rhbz#831437) diff --git a/sources b/sources index 5359ae4..ac5febc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -86909785aa1ff13b49d87737b75b5f54 Python-2.7.4.tar.xz +5eea8462f69ab1369d32f9c4cd6272ab Python-2.7.5.tar.xz