From 3ccc692acd6162071950bfbba8230fa8c16dbe839243a78d7d0cb6d38f37af08 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Mon, 8 Aug 2011 17:58:02 +0000 Subject: [PATCH 1/3] - strip whitespace from NO_PROXY entries (bnc#710736) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=104 --- python-2.7.1-urllib-noproxy.patch | 12 ++++++++++++ python-base.changes | 5 +++++ python-base.spec | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 python-2.7.1-urllib-noproxy.patch diff --git a/python-2.7.1-urllib-noproxy.patch b/python-2.7.1-urllib-noproxy.patch new file mode 100644 index 0000000..e104c8a --- /dev/null +++ b/python-2.7.1-urllib-noproxy.patch @@ -0,0 +1,12 @@ +Index: Python-2.7.1/Lib/urllib.py +=================================================================== +--- Python-2.7.1.orig/Lib/urllib.py ++++ Python-2.7.1/Lib/urllib.py +@@ -1350,6 +1350,7 @@ def proxy_bypass_environment(host): + hostonly, port = splitport(host) + # check if the host ends with any of the DNS suffixes + for name in no_proxy.split(','): ++ name = name.strip() + if name and (hostonly.endswith(name) or host.endswith(name)): + return 1 + # otherwise, don't bypass diff --git a/python-base.changes b/python-base.changes index db9b46d..5e480f7 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 8 17:03:03 UTC 2011 - jmatejek@novell.com + +- strip whitespace from NO_PROXY entries (bnc#710736) + ------------------------------------------------------------------- Fri Jul 22 13:03:49 UTC 2011 - idonmez@novell.com diff --git a/python-base.spec b/python-base.spec index 5dd9871..9a6ce4b 100644 --- a/python-base.spec +++ b/python-base.spec @@ -53,6 +53,7 @@ Patch13: python-2.7.1-fix_date_time_compiler.patch Patch14: python-2.7-CVE-2011-1521-fileurl.patch Patch15: python-2.7-fix-parallel-make.patch Patch16: python-2.7.1-linux3.patch +Patch17: python-2.7.1-urllib-noproxy.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define python_version %(echo %{version} | head -c 3) Provides: %{name} = %{python_version} @@ -150,6 +151,7 @@ Authors: %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.in From fa7d63a2ee938476a30d3d716ede3cdde97ad75a9801faf5bef3c1da9169a096 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Wed, 24 Aug 2011 13:28:09 +0000 Subject: [PATCH 2/3] Accepting request 79616 from home:dirkmueller:branches:devel:languages:python:Factory - update to 2.7.2: * Bug fix only release, see http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS for details - introduce a pre_checkin.sh file that synchronizes patches between python and python-base - rediff patches for 2.7.2 - replace kernel3 patch with the upstream solution - update to 2.7.2: * Bug fix only release, see http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS for details - introduce a pre_checkin.sh file that synchronizes patches between python and python-base - rediff patches for 2.7.2 - replace kernel3 patch with the upstream solution OBS-URL: https://build.opensuse.org/request/show/79616 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=105 --- Python-2.7.1.tar.bz2 | 3 - Python-2.7.2.tar.bz2 | 3 + pre_checkin.sh | 11 + python-2.7-CVE-2011-1521-fileurl.patch | 106 ---- python-2.7-fix-parallel-make.patch | 37 -- python-2.7.1-fix_date_time_compiler.patch | 21 - python-2.7.1-linux3.patch | 20 - python-2.7.2-fix_date_time_compiler.patch | 18 + python-2.7.2-linux3.patch | 21 + ...tilib.patch => python-2.7.2-multilib.patch | 564 +++++++++--------- python-base.changes | 11 +- python-base.spec | 50 +- python-doc.spec | 2 +- python.changes | 10 +- python.spec | 54 +- 15 files changed, 390 insertions(+), 541 deletions(-) delete mode 100644 Python-2.7.1.tar.bz2 create mode 100644 Python-2.7.2.tar.bz2 create mode 100644 pre_checkin.sh delete mode 100644 python-2.7-CVE-2011-1521-fileurl.patch delete mode 100644 python-2.7-fix-parallel-make.patch delete mode 100644 python-2.7.1-fix_date_time_compiler.patch delete mode 100644 python-2.7.1-linux3.patch create mode 100644 python-2.7.2-fix_date_time_compiler.patch create mode 100644 python-2.7.2-linux3.patch rename python-2.7.1-multilib.patch => python-2.7.2-multilib.patch (75%) diff --git a/Python-2.7.1.tar.bz2 b/Python-2.7.1.tar.bz2 deleted file mode 100644 index 0af9ea3..0000000 --- a/Python-2.7.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80e387bcf57eae8ce26726753584fd63e060ec11682d1145af921e85fd612292 -size 11722546 diff --git a/Python-2.7.2.tar.bz2 b/Python-2.7.2.tar.bz2 new file mode 100644 index 0000000..ea229aa --- /dev/null +++ b/Python-2.7.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5057eb067eb5b5a6040dbd0e889e06550bde9ec041dadaa855ee9490034cbdab +size 11754834 diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..3a1ec4c --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# This script is called automatically during autobuild checkin. + +for spec in python.spec; do +{ sed -n -e '1,/COMMON-PATCH-BEGIN/p' $spec + sed -n -e '/COMMON-PATCH-BEGIN/,/COMMON-PATCH-END/p' python-base.spec + sed -n -e '/COMMON-PATCH-END/,/COMMON-PREP-BEGIN/p' $spec + sed -n -e '/COMMON-PREP-BEGIN/,/COMMON-PREP-END/p' python-base.spec + sed -n -e '/COMMON-PREP-END/,$p' $spec; + } | uniq > $spec.tmp && mv $spec.tmp $spec +done diff --git a/python-2.7-CVE-2011-1521-fileurl.patch b/python-2.7-CVE-2011-1521-fileurl.patch deleted file mode 100644 index 2feae1a..0000000 --- a/python-2.7-CVE-2011-1521-fileurl.patch +++ /dev/null @@ -1,106 +0,0 @@ - -# HG changeset patch -# User Guido van Rossum -# Date 1301428435 25200 -# Node ID b2934d98dac1f7b13cc6cc280f06d1aec3f6e80d -# Parent 1a5aab273332a7a379e35ed6f88400a110b5de0c# Parent 9eeda8e3a13f107a698f10b0a45ffc2c6bd710fb -Merge issue 11662 from 2.6. - -diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py ---- a/Lib/test/test_urllib.py -+++ b/Lib/test/test_urllib.py -@@ -161,6 +161,20 @@ Content-Type: text/html; charset=iso-885 - finally: - self.unfakehttp() - -+ def test_invalid_redirect(self): -+ # urlopen() should raise IOError for many error codes. -+ self.fakehttp("""HTTP/1.1 302 Found -+Date: Wed, 02 Jan 2008 03:03:54 GMT -+Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e -+Location: file:README -+Connection: close -+Content-Type: text/html; charset=iso-8859-1 -+""") -+ try: -+ self.assertRaises(IOError, urllib.urlopen, "http://python.org/") -+ finally: -+ self.unfakehttp() -+ - def test_empty_socket(self): - # urlopen() raises IOError if the underlying socket does not send any - # data. (#1680230) -diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py ---- a/Lib/test/test_urllib2.py -+++ b/Lib/test/test_urllib2.py -@@ -969,6 +969,27 @@ class HandlerTests(unittest.TestCase): - self.assertEqual(count, - urllib2.HTTPRedirectHandler.max_redirections) - -+ def test_invalid_redirect(self): -+ from_url = "http://example.com/a.html" -+ valid_schemes = ['http', 'https', 'ftp'] -+ invalid_schemes = ['file', 'imap', 'ldap'] -+ schemeless_url = "example.com/b.html" -+ h = urllib2.HTTPRedirectHandler() -+ o = h.parent = MockOpener() -+ req = Request(from_url) -+ -+ for scheme in invalid_schemes: -+ invalid_url = scheme + '://' + schemeless_url -+ self.assertRaises(urllib2.HTTPError, h.http_error_302, -+ req, MockFile(), 302, "Security Loophole", -+ MockHeaders({"location": invalid_url})) -+ -+ for scheme in valid_schemes: -+ valid_url = scheme + '://' + schemeless_url -+ h.http_error_302(req, MockFile(), 302, "That's fine", -+ MockHeaders({"location": valid_url})) -+ self.assertEqual(o.req.get_full_url(), valid_url) -+ - def test_cookie_redirect(self): - # cookies shouldn't leak into redirected requests - from cookielib import CookieJar -diff --git a/Lib/urllib.py b/Lib/urllib.py ---- a/Lib/urllib.py -+++ b/Lib/urllib.py -@@ -644,6 +644,18 @@ class FancyURLopener(URLopener): - fp.close() - # In case the server sent a relative URL, join with original: - newurl = basejoin(self.type + ":" + url, newurl) -+ -+ # For security reasons we do not allow redirects to protocols -+ # other than HTTP, HTTPS or FTP. -+ newurl_lower = newurl.lower() -+ if not (newurl_lower.startswith('http://') or -+ newurl_lower.startswith('https://') or -+ newurl_lower.startswith('ftp://')): -+ raise IOError('redirect error', errcode, -+ errmsg + " - Redirection to url '%s' is not allowed" % -+ newurl, -+ headers) -+ - return self.open(newurl) - - def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): -diff --git a/Lib/urllib2.py b/Lib/urllib2.py ---- a/Lib/urllib2.py -+++ b/Lib/urllib2.py -@@ -578,6 +578,17 @@ class HTTPRedirectHandler(BaseHandler): - - newurl = urlparse.urljoin(req.get_full_url(), newurl) - -+ # For security reasons we do not allow redirects to protocols -+ # other than HTTP, HTTPS or FTP. -+ newurl_lower = newurl.lower() -+ if not (newurl_lower.startswith('http://') or -+ newurl_lower.startswith('https://') or -+ newurl_lower.startswith('ftp://')): -+ raise HTTPError(newurl, code, -+ msg + " - Redirection to url '%s' is not allowed" % -+ newurl, -+ headers, fp) -+ - # XXX Probably want to forget about the state of the current - # request, although that might interact poorly with other - # handlers that also use handler-specific request attributes diff --git a/python-2.7-fix-parallel-make.patch b/python-2.7-fix-parallel-make.patch deleted file mode 100644 index d0f485b..0000000 --- a/python-2.7-fix-parallel-make.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up Python-2.7/Makefile.pre.in.fix-parallel-make Python-2.7/Makefile.pre.in ---- Python-2.7/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400 -+++ Python-2.7/Makefile.pre.in 2010-07-22 15:47:02.437998509 -0400 -@@ -207,6 +207,7 @@ SIGNAL_OBJS= @SIGNAL_OBJS@ - - ########################################################################## - # Grammar -+GRAMMAR_STAMP= $(srcdir)/grammar-stamp - GRAMMAR_H= $(srcdir)/Include/graminit.h - GRAMMAR_C= $(srcdir)/Python/graminit.c - GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar -@@ -530,10 +531,24 @@ Modules/getpath.o: $(srcdir)/Modules/get - Modules/python.o: $(srcdir)/Modules/python.c - $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c - -+# GNU "make" interprets rules with two dependents as two copies of the rule. -+# -+# In a parallel build this can lead to pgen being run twice, once for each of -+# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler -+# reads a partially-overwritten copy of one of these files, leading to syntax -+# errors (or linker errors if the fragment happens to be syntactically valid C) -+# -+# See http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html -+# for more information -+# -+# Introduce ".grammar-stamp" as a contrived single output from PGEN to avoid -+# this: -+$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP) - --$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) -+$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT) - -@$(INSTALL) -d Include - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ touch $(GRAMMAR_STAMP) - - $(PGEN): $(PGENOBJS) - $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) diff --git a/python-2.7.1-fix_date_time_compiler.patch b/python-2.7.1-fix_date_time_compiler.patch deleted file mode 100644 index 17f64ab..0000000 --- a/python-2.7.1-fix_date_time_compiler.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: Python-3.2/Makefile.pre.in -=================================================================== ---- Python-3.2.orig/Makefile.pre.in -+++ Python-3.2/Makefile.pre.in -@@ -554,7 +554,15 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ - $(SIGNAL_OBJS) \ - $(MODOBJS) \ - $(srcdir)/Modules/getbuildinfo.c -- $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c -+ $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" \ -+ -DDATE="\"`LC_ALL=C date -u -r Makefile.pre.in +"%b %d %Y"`\"" \ -+ -DTIME="\"`LC_ALL=C date -u -r Makefile.pre.in +"%T"`\"" \ -+ -o $@ $(srcdir)/Modules/getbuildinfo.c -+ -+Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile -+ $(CC) -c $(PY_CFLAGS) \ -+ -DCOMPILER='"[GCC]"' \ -+ -o $@ $(srcdir)/Python/getcompiler.c - - Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile - $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ diff --git a/python-2.7.1-linux3.patch b/python-2.7.1-linux3.patch deleted file mode 100644 index f1f4447..0000000 --- a/python-2.7.1-linux3.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Python-2.7.1/setup.py 2011/07/10 23:56:34 1.1 -+++ Python-2.7.1/setup.py 2011/07/10 23:57:47 -@@ -1454,14 +1454,14 @@ - - - # Platform-specific libraries -- if platform == 'linux2': -+ if (platform in ('linux2', 'linux3')): - # Linux-specific modules - exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) - else: - missing.append('linuxaudiodev') - -- if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', -- 'freebsd7', 'freebsd8') -+ if (platform in ('linux2', 'linux3', 'freebsd4', 'freebsd5', -+ 'freebsd6', 'freebsd7', 'freebsd8') - or platform.startswith("gnukfreebsd")): - exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) - else: diff --git a/python-2.7.2-fix_date_time_compiler.patch b/python-2.7.2-fix_date_time_compiler.patch new file mode 100644 index 0000000..9722dd3 --- /dev/null +++ b/python-2.7.2-fix_date_time_compiler.patch @@ -0,0 +1,18 @@ +--- Makefile.pre.in ++++ Makefile.pre.in +@@ -524,8 +524,15 @@ + -DHGVERSION="\"`LC_ALL=C $(HGVERSION)`\"" \ + -DHGTAG="\"`LC_ALL=C $(HGTAG)`\"" \ + -DHGBRANCH="\"`LC_ALL=C $(HGBRANCH)`\"" \ ++ -DDATE="\"`LC_ALL=C date -u -r Makefile.pre.in +"%b %d %Y"`\"" \ ++ -DTIME="\"`LC_ALL=C date -u -r Makefile.pre.in +"%T"`\"" \ + -o $@ $(srcdir)/Modules/getbuildinfo.c + ++Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile ++ $(CC) -c $(PY_CFLAGS) \ ++ -DCOMPILER='"[GCC]"' \ ++ -o $@ $(srcdir)/Python/getcompiler.c ++ + Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile + $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ + -DPREFIX='"$(prefix)"' \ diff --git a/python-2.7.2-linux3.patch b/python-2.7.2-linux3.patch new file mode 100644 index 0000000..fa2a7a8 --- /dev/null +++ b/python-2.7.2-linux3.patch @@ -0,0 +1,21 @@ +--- configure.in ++++ configure.in +@@ -293,6 +293,7 @@ + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; +--- Misc/NEWS ++++ Misc/NEWS +@@ -1,6 +1,8 @@ + Python News + +++++++++++ + ++- Issue #12326: sys.platform is now always 'linux2' on Linux, even if Python ++ is compiled on Linux 3. + + What's New in Python 2.7.2? + =========================== diff --git a/python-2.7.1-multilib.patch b/python-2.7.2-multilib.patch similarity index 75% rename from python-2.7.1-multilib.patch rename to python-2.7.2-multilib.patch index 8701d55..bc86cbf 100644 --- a/python-2.7.1-multilib.patch +++ b/python-2.7.2-multilib.patch @@ -1,235 +1,6 @@ -Index: Python-2.7.1/Include/pythonrun.h -=================================================================== ---- Python-2.7.1.orig/Include/pythonrun.h -+++ Python-2.7.1/Include/pythonrun.h -@@ -108,6 +108,8 @@ PyAPI_FUNC(char *) Py_GetPath(void); - /* In their own files */ - PyAPI_FUNC(const char *) Py_GetVersion(void); - PyAPI_FUNC(const char *) Py_GetPlatform(void); -+PyAPI_FUNC(const char *) Py_GetArch(void); -+PyAPI_FUNC(const char *) Py_GetLib(void); - PyAPI_FUNC(const char *) Py_GetCopyright(void); - PyAPI_FUNC(const char *) Py_GetCompiler(void); - PyAPI_FUNC(const char *) Py_GetBuildInfo(void); -Index: Python-2.7.1/Lib/distutils/command/install.py -=================================================================== ---- Python-2.7.1.orig/Lib/distutils/command/install.py -+++ Python-2.7.1/Lib/distutils/command/install.py -@@ -22,6 +22,8 @@ from site import USER_BASE - from site import USER_SITE - - -+libname = sys.lib -+ - if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', -@@ -42,7 +44,7 @@ else: - INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/python$py_version_short/site-packages', -+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -Index: Python-2.7.1/Lib/distutils/sysconfig.py -=================================================================== ---- Python-2.7.1.orig/Lib/distutils/sysconfig.py -+++ Python-2.7.1/Lib/distutils/sysconfig.py -@@ -114,8 +114,11 @@ def get_python_lib(plat_specific=0, stan - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ if plat_specific or standard_lib: -+ lib = sys.lib -+ else: -+ lib = "lib" -+ libpython = os.path.join(prefix, lib, "python" + get_python_version()) - if standard_lib: - return libpython - else: -Index: Python-2.7.1/Lib/pydoc.py -=================================================================== ---- Python-2.7.1.orig/Lib/pydoc.py -+++ Python-2.7.1/Lib/pydoc.py -@@ -349,7 +349,7 @@ class Doc: - - docloc = os.environ.get("PYTHONDOCS", - "http://docs.python.org/library") -- basedir = os.path.join(sys.exec_prefix, "lib", -+ basedir = os.path.join(sys.exec_prefix, sys.lib, - "python"+sys.version[0:3]) - if (isinstance(object, type(os)) and - (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', -Index: Python-2.7.1/Lib/site.py -=================================================================== ---- Python-2.7.1.orig/Lib/site.py -+++ Python-2.7.1/Lib/site.py -@@ -290,13 +290,18 @@ def getsitepackages(): - if sys.platform in ('os2emx', 'riscos'): - sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) - elif os.sep == '/': -- sitepackages.append(os.path.join(prefix, "lib", -+ sitepackages.append(os.path.join(prefix, sys.lib, - "python" + sys.version[:3], - "site-packages")) -- sitepackages.append(os.path.join(prefix, "lib", "site-python")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) -+ if sys.lib != "lib": -+ sitepackages.append(os.path.join(prefix, "lib", -+ "python" + sys.version[:3], -+ "site-packages")) -+ sitepackages.append(os.path.join(prefix, "lib", "site-python")) - else: - sitepackages.append(prefix) -- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) - if sys.platform == "darwin": - # for framework builds *only* we add the standard Apple - # locations. -Index: Python-2.7.1/Lib/test/test_dl.py -=================================================================== ---- Python-2.7.1.orig/Lib/test/test_dl.py -+++ Python-2.7.1/Lib/test/test_dl.py -@@ -5,10 +5,11 @@ - import unittest - from test.test_support import verbose, import_module - dl = import_module('dl', deprecated=True) -+import sys - - sharedlibs = [ -- ('/usr/lib/libc.so', 'getpid'), -- ('/lib/libc.so.6', 'getpid'), -+ ('/usr/'+sys.lib+'/libc.so', 'getpid'), -+ ('/'+sys.lib+'/libc.so.6', 'getpid'), - ('/usr/bin/cygwin1.dll', 'getpid'), - ('/usr/lib/libc.dylib', 'getpid'), - ] -Index: Python-2.7.1/Lib/trace.py -=================================================================== ---- Python-2.7.1.orig/Lib/trace.py -+++ Python-2.7.1/Lib/trace.py -@@ -762,10 +762,10 @@ def main(argv=None): - # should I also call expanduser? (after all, could use $HOME) - - s = s.replace("$prefix", -- os.path.join(sys.prefix, "lib", -+ os.path.join(sys.prefix, sys.lib, - "python" + sys.version[:3])) - s = s.replace("$exec_prefix", -- os.path.join(sys.exec_prefix, "lib", -+ os.path.join(sys.exec_prefix, sys.lib, - "python" + sys.version[:3])) - s = os.path.normpath(s) - ignore_dirs.append(s) -Index: Python-2.7.1/Makefile.pre.in -=================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -78,6 +78,8 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG - - # Machine-dependent subdirectories - MACHDEP= @MACHDEP@ -+LIB= @LIB@ -+ARCH= @ARCH@ - - # Install prefix for architecture-independent files - prefix= @prefix@ -@@ -530,6 +532,7 @@ Modules/getpath.o: $(srcdir)/Modules/get - -DEXEC_PREFIX='"$(exec_prefix)"' \ - -DVERSION='"$(VERSION)"' \ - -DVPATH='"$(VPATH)"' \ -+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \ - -o $@ $(srcdir)/Modules/getpath.c - - Modules/python.o: $(srcdir)/Modules/python.c -@@ -561,7 +564,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) - Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) - - Python/getplatform.o: $(srcdir)/Python/getplatform.c -- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c -+ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c - - Python/importdl.o: $(srcdir)/Python/importdl.c - $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c -Index: Python-2.7.1/Modules/getpath.c -=================================================================== ---- Python-2.7.1.orig/Modules/getpath.c -+++ Python-2.7.1/Modules/getpath.c -@@ -116,9 +116,11 @@ - #define EXEC_PREFIX PREFIX - #endif - -+#define LIB_PYTHON LIB "/python" VERSION -+ - #ifndef PYTHONPATH --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" -+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ -+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" - #endif - - #ifndef LANDMARK -@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1]; - static char exec_prefix[MAXPATHLEN+1]; - static char progpath[MAXPATHLEN+1]; - static char *module_search_path = NULL; --static char lib_python[] = "lib/python" VERSION; -+static char lib_python[] = LIB_PYTHON; - - static void - reduce(char *dir) -Index: Python-2.7.1/Python/getplatform.c -=================================================================== ---- Python-2.7.1.orig/Python/getplatform.c -+++ Python-2.7.1/Python/getplatform.c -@@ -10,3 +10,23 @@ Py_GetPlatform(void) - { - return PLATFORM; - } -+ -+#ifndef ARCH -+#define ARCH "unknown" -+#endif -+ -+const char * -+Py_GetArch(void) -+{ -+ return ARCH; -+} -+ -+#ifndef LIB -+#define LIB "lib" -+#endif -+ -+const char * -+Py_GetLib(void) -+{ -+ return LIB; -+} -Index: Python-2.7.1/Python/sysmodule.c -=================================================================== ---- Python-2.7.1.orig/Python/sysmodule.c -+++ Python-2.7.1/Python/sysmodule.c -@@ -1470,6 +1470,10 @@ _PySys_Init(void) - PyString_FromString(Py_GetCopyright())); - SET_SYS_FROM_STRING("platform", - PyString_FromString(Py_GetPlatform())); -+ SET_SYS_FROM_STRING("arch", -+ PyString_FromString(Py_GetArch())); -+ SET_SYS_FROM_STRING("lib", -+ PyString_FromString(Py_GetLib())); - SET_SYS_FROM_STRING("executable", - PyString_FromString(Py_GetProgramFullPath())); - SET_SYS_FROM_STRING("prefix", -Index: Python-2.7.1/configure.in -=================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -636,6 +636,41 @@ SunOS*) +--- configure.in ++++ configure.in +@@ -629,6 +629,41 @@ ;; esac @@ -271,20 +42,275 @@ Index: Python-2.7.1/configure.in AC_SUBST(LIBRARY) AC_MSG_CHECKING(LIBRARY) -Index: Python-2.7.1/setup.py -=================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -347,7 +347,7 @@ class PyBuildExt(build_ext): +--- Include/pythonrun.h ++++ Include/pythonrun.h +@@ -108,6 +108,8 @@ + /* In their own files */ + PyAPI_FUNC(const char *) Py_GetVersion(void); + PyAPI_FUNC(const char *) Py_GetPlatform(void); ++PyAPI_FUNC(const char *) Py_GetArch(void); ++PyAPI_FUNC(const char *) Py_GetLib(void); + PyAPI_FUNC(const char *) Py_GetCopyright(void); + PyAPI_FUNC(const char *) Py_GetCompiler(void); + PyAPI_FUNC(const char *) Py_GetBuildInfo(void); +--- Lib/distutils/command/install.py ++++ Lib/distutils/command/install.py +@@ -22,6 +22,8 @@ + from site import USER_SITE + + ++libname = sys.lib ++ + if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', +@@ -42,7 +44,7 @@ + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +--- Lib/distutils/sysconfig.py ++++ Lib/distutils/sysconfig.py +@@ -114,8 +114,11 @@ + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": +- libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ if plat_specific or standard_lib: ++ lib = sys.lib ++ else: ++ lib = "lib" ++ libpython = os.path.join(prefix, lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +--- Lib/pydoc.py ++++ Lib/pydoc.py +@@ -352,7 +352,7 @@ + + docloc = os.environ.get("PYTHONDOCS", + "http://docs.python.org/library") +- basedir = os.path.join(sys.exec_prefix, "lib", ++ basedir = os.path.join(sys.exec_prefix, sys.lib, + "python"+sys.version[0:3]) + if (isinstance(object, type(os)) and + (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', +--- Lib/site.py ++++ Lib/site.py +@@ -300,13 +300,18 @@ + if sys.platform in ('os2emx', 'riscos'): + sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) + elif os.sep == '/': +- sitepackages.append(os.path.join(prefix, "lib", ++ sitepackages.append(os.path.join(prefix, sys.lib, + "python" + sys.version[:3], + "site-packages")) +- sitepackages.append(os.path.join(prefix, "lib", "site-python")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) ++ if sys.lib != "lib": ++ sitepackages.append(os.path.join(prefix, "lib", ++ "python" + sys.version[:3], ++ "site-packages")) ++ sitepackages.append(os.path.join(prefix, "lib", "site-python")) + else: + sitepackages.append(prefix) +- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) ++ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple + # locations. +--- Lib/sysconfig.py ++++ Lib/sysconfig.py +@@ -7,10 +7,10 @@ + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{base}/lib/python{py_version_short}', +- 'platstdlib': '{platbase}/lib/python{py_version_short}', ++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', + 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{base}/include/python{py_version_short}', + 'platinclude': '{platbase}/include/python{py_version_short}', + 'scripts': '{base}/bin', +@@ -65,10 +65,10 @@ + 'data' : '{userbase}', + }, + 'posix_user': { +- 'stdlib': '{userbase}/lib/python{py_version_short}', +- 'platstdlib': '{userbase}/lib/python{py_version_short}', ++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', + 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data' : '{userbase}', +--- Lib/test/test_dl.py ++++ Lib/test/test_dl.py +@@ -5,10 +5,11 @@ + import unittest + from test.test_support import verbose, import_module + dl = import_module('dl', deprecated=True) ++import sys + + sharedlibs = [ +- ('/usr/lib/libc.so', 'getpid'), +- ('/lib/libc.so.6', 'getpid'), ++ ('/usr/'+sys.lib+'/libc.so', 'getpid'), ++ ('/'+sys.lib+'/libc.so.6', 'getpid'), + ('/usr/bin/cygwin1.dll', 'getpid'), + ('/usr/lib/libc.dylib', 'getpid'), + ] +--- Lib/test/test_site.py ++++ Lib/test/test_site.py +@@ -227,12 +227,16 @@ + wanted = os.path.join('xoxo', 'Lib', 'site-packages') + self.assertEqual(dirs[0], wanted) + elif os.sep == '/': +- self.assertEqual(len(dirs), 2) + wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], + 'site-packages') +- self.assertEqual(dirs[0], wanted) ++ self.assertTrue(wanted in dirs) + wanted = os.path.join('xoxo', 'lib', 'site-python') +- self.assertEqual(dirs[1], wanted) ++ self.assertTrue(wanted in dirs) ++ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3], ++ 'site-packages') ++ self.assertTrue(wanted in dirs) ++ wanted = os.path.join('xoxo', sys.lib, 'site-python') ++ self.assertTrue(wanted in dirs) + else: + self.assertEqual(len(dirs), 2) + self.assertEqual(dirs[0], 'xoxo') +--- Lib/trace.py ++++ Lib/trace.py +@@ -762,10 +762,10 @@ + # should I also call expanduser? (after all, could use $HOME) + + s = s.replace("$prefix", +- os.path.join(sys.prefix, "lib", ++ os.path.join(sys.prefix, sys.lib, + "python" + sys.version[:3])) + s = s.replace("$exec_prefix", +- os.path.join(sys.exec_prefix, "lib", ++ os.path.join(sys.exec_prefix, sys.lib, + "python" + sys.version[:3])) + s = os.path.normpath(s) + ignore_dirs.append(s) +--- Makefile.pre.in ++++ Makefile.pre.in +@@ -81,6 +81,8 @@ + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ ++LIB= @LIB@ ++ARCH= @ARCH@ + + # Install prefix for architecture-independent files + prefix= @prefix@ +@@ -532,6 +534,7 @@ + -DEXEC_PREFIX='"$(exec_prefix)"' \ + -DVERSION='"$(VERSION)"' \ + -DVPATH='"$(VPATH)"' \ ++ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \ + -o $@ $(srcdir)/Modules/getpath.c + + Modules/python.o: $(srcdir)/Modules/python.c +@@ -566,7 +569,7 @@ + Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) + + Python/getplatform.o: $(srcdir)/Python/getplatform.c +- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c ++ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c + + Python/importdl.o: $(srcdir)/Python/importdl.c + $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c +--- Modules/getpath.c ++++ Modules/getpath.c +@@ -116,9 +116,11 @@ + #define EXEC_PREFIX PREFIX + #endif + ++#define LIB_PYTHON LIB "/python" VERSION ++ + #ifndef PYTHONPATH +-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ ++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -129,7 +131,7 @@ + static char exec_prefix[MAXPATHLEN+1]; + static char progpath[MAXPATHLEN+1]; + static char *module_search_path = NULL; +-static char lib_python[] = "lib/python" VERSION; ++static char lib_python[] = LIB_PYTHON; + + static void + reduce(char *dir) +--- Python/getplatform.c ++++ Python/getplatform.c +@@ -10,3 +10,23 @@ + { + return PLATFORM; + } ++ ++#ifndef ARCH ++#define ARCH "unknown" ++#endif ++ ++const char * ++Py_GetArch(void) ++{ ++ return ARCH; ++} ++ ++#ifndef LIB ++#define LIB "lib" ++#endif ++ ++const char * ++Py_GetLib(void) ++{ ++ return LIB; ++} +--- Python/sysmodule.c ++++ Python/sysmodule.c +@@ -1416,6 +1416,10 @@ + PyString_FromString(Py_GetCopyright())); + SET_SYS_FROM_STRING("platform", + PyString_FromString(Py_GetPlatform())); ++ SET_SYS_FROM_STRING("arch", ++ PyString_FromString(Py_GetArch())); ++ SET_SYS_FROM_STRING("lib", ++ PyString_FromString(Py_GetLib())); + SET_SYS_FROM_STRING("executable", + PyString_FromString(Py_GetProgramFullPath())); + SET_SYS_FROM_STRING("prefix", +--- setup.py ++++ setup.py +@@ -369,7 +369,7 @@ def detect_modules(self): # Ensure that /usr/local is always used - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.library_dirs, '/usr/local/' + sys.lib) add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + self.add_multiarch_paths() - # Add paths specified in the environment variables LDFLAGS and -@@ -404,8 +404,7 @@ class PyBuildExt(build_ext): +@@ -427,8 +427,7 @@ # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. lib_dirs = self.compiler.library_dirs + [ @@ -294,7 +320,7 @@ Index: Python-2.7.1/setup.py ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] exts = [] -@@ -654,11 +653,11 @@ class PyBuildExt(build_ext): +@@ -677,11 +676,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + @@ -308,7 +334,7 @@ Index: Python-2.7.1/setup.py extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: -@@ -1730,18 +1729,17 @@ class PyBuildExt(build_ext): +@@ -1753,18 +1752,17 @@ # Check for various platform-specific directories if platform == 'sunos5': include_dirs.append('/usr/openwin/include') @@ -331,59 +357,3 @@ Index: Python-2.7.1/setup.py # If Cygwin, then verify that X is installed before proceeding if platform == 'cygwin': -Index: Python-2.7.1/Lib/test/test_site.py -=================================================================== ---- Python-2.7.1.orig/Lib/test/test_site.py -+++ Python-2.7.1/Lib/test/test_site.py -@@ -169,12 +169,16 @@ class HelperFunctionsTests(unittest.Test - wanted = os.path.join('xoxo', 'Lib', 'site-packages') - self.assertEqual(dirs[0], wanted) - elif os.sep == '/': -- self.assertEqual(len(dirs), 2) - wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], - 'site-packages') -- self.assertEqual(dirs[0], wanted) -+ self.assertTrue(wanted in dirs) - wanted = os.path.join('xoxo', 'lib', 'site-python') -- self.assertEqual(dirs[1], wanted) -+ self.assertTrue(wanted in dirs) -+ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3], -+ 'site-packages') -+ self.assertTrue(wanted in dirs) -+ wanted = os.path.join('xoxo', sys.lib, 'site-python') -+ self.assertTrue(wanted in dirs) - else: - self.assertEqual(len(dirs), 2) - self.assertEqual(dirs[0], 'xoxo') -Index: Python-2.7.1/Lib/sysconfig.py -=================================================================== ---- Python-2.7.1.orig/Lib/sysconfig.py -+++ Python-2.7.1/Lib/sysconfig.py -@@ -7,10 +7,10 @@ from os.path import pardir, realpath - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', -+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', -+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', - 'include': '{base}/include/python{py_version_short}', - 'platinclude': '{platbase}/include/python{py_version_short}', - 'scripts': '{base}/bin', -@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { - 'data' : '{userbase}', - }, - 'posix_user': { -- 'stdlib': '{userbase}/lib/python{py_version_short}', -- 'platstdlib': '{userbase}/lib/python{py_version_short}', -+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', -+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', - 'data' : '{userbase}', diff --git a/python-base.changes b/python-base.changes index 5e480f7..0b927ff 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,7 +1,14 @@ ------------------------------------------------------------------- -Mon Aug 8 17:03:03 UTC 2011 - jmatejek@novell.com +Fri Aug 19 22:37:42 CEST 2011 - dmueller@suse.de -- strip whitespace from NO_PROXY entries (bnc#710736) +- update to 2.7.2: + * Bug fix only release, see + http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS + for details +- introduce a pre_checkin.sh file that synchronizes + patches between python and python-base +- rediff patches for 2.7.2 +- replace kernel3 patch with the upstream solution ------------------------------------------------------------------- Fri Jul 22 13:03:49 UTC 2011 - idonmez@novell.com diff --git a/python-base.spec b/python-base.spec index 9a6ce4b..669df9e 100644 --- a/python-base.spec +++ b/python-base.spec @@ -29,8 +29,8 @@ Obsoletes: python-64bit %endif # Summary: Python Interpreter base package -Version: 2.7.1 -Release: 5 +Version: 2.7.2 +Release: 1 %define tarversion %{version} %define tarname Python-%{tarversion} Source0: %{tarname}.tar.bz2 @@ -39,21 +39,22 @@ Source2: baselibs.conf Source3: README.SUSE Source4: distutils.cfg Source5: _local.pth - +# COMMON-PATCH-BEGIN Patch1: python-2.7-dirs.patch Patch2: python-distutils-rpm-8.patch -Patch3: python-2.7.1-multilib.patch -Patch4: python-2.7rc2-canonicalize2.patch -Patch5: python-2.7rc2-configure.patch -Patch6: python-2.6-gettext-plurals.patch -Patch7: python-2.7.1-distutils_test_path.patch -Patch8: sparc_longdouble.patch +Patch3: python-2.7.2-multilib.patch +Patch4: python-2.5.1-sqlite.patch +Patch5: python-2.7rc2-canonicalize2.patch +Patch6: python-2.7rc2-configure.patch +Patch7: python-2.6-gettext-plurals.patch +Patch8: python-2.6b3-curses-panel.patch +Patch9: python-2.7.1-distutils_test_path.patch +Patch10: sparc_longdouble.patch +Patch11: python-2.7.2-linux3.patch Patch12: http://psf.upfronthosting.co.za/roundup/tracker/file19029/python-test_structmembers.patch -Patch13: python-2.7.1-fix_date_time_compiler.patch -Patch14: python-2.7-CVE-2011-1521-fileurl.patch -Patch15: python-2.7-fix-parallel-make.patch -Patch16: python-2.7.1-linux3.patch -Patch17: python-2.7.1-urllib-noproxy.patch +Patch13: python-2.7.2-fix_date_time_compiler.patch +Patch14: python-2.7.1-urllib-noproxy.patch +# COMMON-PATCH-END BuildRoot: %{_tmppath}/%{name}-%{version}-build %define python_version %(echo %{version} | head -c 3) Provides: %{name} = %{python_version} @@ -138,20 +139,22 @@ Authors: %prep %setup -q -n %{tarname} # patching +# COMMON-PREP-BEGIN %patch1 -p1 %patch2 -p1 -%patch3 -p1 +%patch3 %patch4 %patch5 %patch6 -%patch7 -p1 -%patch8 -p1 +%patch7 +%patch8 +%patch9 -p1 +%patch10 -p1 +%patch11 %patch12 -%patch13 -p1 +%patch13 %patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 +# COMMON-PREP-END # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.in @@ -164,9 +167,6 @@ autoreconf -f -i . # Modules/_ctypes/libffi # provide a stable timestamp touch -r %{S:0} Makefile.pre.in -# Cheat for kernel 3.0 -cp -r Lib/plat-linux2 Lib/plat-linux3 - # prevent make from trying to rebuild asdl stuff, which requires existing # python installation touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h @@ -248,7 +248,7 @@ rm -f $CLEANUP_DIR/lib-dynload/imageop.so rm -f $CLEANUP_DIR/lib-dynload/audioop.so # remove various things that don't need to be in python-base rm $RPM_BUILD_ROOT%{_bindir}/idle -rm -r $CLEANUP_DIR/{curses,bsddb,idlelib,lib-tk,sqlite3} +rm -rf $CLEANUP_DIR/{curses,bsddb,idlelib,lib-tk,sqlite3} rm $CLEANUP_DIR/ssl.py* # does not work without _ssl.so anyway # replace duplicate .pyo/.pyc with hardlinks diff --git a/python-doc.spec b/python-doc.spec index f8f0203..3193e42 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Additional Package Documentation for Python. Version: 2.7 Release: 5 -%define pyver 2.7.1 +%define pyver 2.7.2 BuildArch: noarch %define tarname Python-%{pyver} %define pyname python diff --git a/python.changes b/python.changes index 344c64d..755321f 100644 --- a/python.changes +++ b/python.changes @@ -1,8 +1,14 @@ ------------------------------------------------------------------- Mon Jul 11 01:59:56 CEST 2011 - ro@suse.de -- fix build on factory: setup reports linux3 not linux2 now, - adapt checks +- update to 2.7.2: + * Bug fix only release, see + http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS + for details +- introduce a pre_checkin.sh file that synchronizes + patches between python and python-base +- rediff patches for 2.7.2 +- replace kernel3 patch with the upstream solution ------------------------------------------------------------------- Tue May 24 14:30:10 UTC 2011 - jmatejek@novell.com diff --git a/python.spec b/python.spec index 2f46fc4..00bfe7e 100644 --- a/python.spec +++ b/python.spec @@ -15,8 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: python BuildRequires: db-devel fdupes gdbm-devel gmp-devel libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel #Requires: openssl >= 0.9.8e @@ -31,7 +29,7 @@ Obsoletes: python-64bit # Obsoletes: python-nothreads python21 python-elementtree python-sqlite Summary: Python Interpreter -Version: 2.7.1 +Version: 2.7.2 Release: 5 Requires: python-base = %{version} %define tarversion %{version} @@ -43,18 +41,27 @@ Source3: python.sh Source4: python.csh #Source11: testfiles.tar.bz2 # issues with copyrighted Unicode testing files +# !!!!!!!!!!!!!! +# do not add or edit patches here. please edit python-base.spec +# instead and run pre_checkin.sh +# !!!!!!!!!!!!!! +# COMMON-PATCH-BEGIN Patch1: python-2.7-dirs.patch -Patch2: python-2.7.1-multilib.patch -Patch3: python-2.7rc2-canonicalize2.patch +Patch2: python-distutils-rpm-8.patch +Patch3: python-2.7.2-multilib.patch Patch4: python-2.5.1-sqlite.patch -Patch5: python-2.7rc2-configure.patch -Patch6: python-2.6b3-curses-panel.patch -Patch7: sparc_longdouble.patch -Patch9: python-2.7.1-fix_date_time_compiler.patch -Patch10: python-2.7-fix-parallel-make.patch -Patch11: python-2.7.1-linux3.patch +Patch5: python-2.7rc2-canonicalize2.patch +Patch6: python-2.7rc2-configure.patch +Patch7: python-2.6-gettext-plurals.patch +Patch8: python-2.6b3-curses-panel.patch +Patch9: python-2.7.1-distutils_test_path.patch +Patch10: sparc_longdouble.patch +Patch11: python-2.7.2-linux3.patch +Patch12: http://psf.upfronthosting.co.za/roundup/tracker/file19029/python-test_structmembers.patch +Patch13: python-2.7.2-fix_date_time_compiler.patch +Patch14: python-2.7.1-urllib-noproxy.patch +# COMMON-PATCH-END BuildRoot: %{_tmppath}/%{name}-%{version}-build - %define python_version %(echo %{version} | head -c 3) %define idle_name idle Provides: %{name} = %{python_version} @@ -68,8 +75,6 @@ of Python in the documentation and tutorials included in the python-doc If you want to install third party modules using distutils, you need to install python-devel package. - - Authors: -------- Guido van Rossum @@ -87,8 +92,6 @@ It features a multi-window text editor with multiple undo, Python colorizing, and many other things, as well as a Python shell window and a debugger. - - Authors: -------- Guido van Rossum @@ -106,8 +109,6 @@ AutoReqProv: on Various demonstrations of what you can do with Python and a number of programs that are useful for building or extending Python. - - Authors: -------- Guido van Rossum @@ -128,8 +129,6 @@ AutoReqProv: on Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The "xrpm" package uses this Python interface. - - Authors: -------- Guido van Rossum @@ -147,8 +146,6 @@ AutoReqProv: on An easy to use interface to the (n)curses CUI library. CUI stands for Console User Interface. - - Authors: -------- Guido van Rossum @@ -166,25 +163,28 @@ AutoReqProv: on An easy to use interface for GDBM databases. GDBM is the GNU implementation of the standard Unix DBM databases. - - Authors: -------- Guido van Rossum %prep %setup -q -n %{tarname} -# patching +# COMMON-PREP-BEGIN %patch1 -p1 %patch2 -p1 %patch3 %patch4 %patch5 %patch6 -%patch7 -p1 +%patch7 +%patch8 %patch9 -p1 %patch10 -p1 -%patch11 -p1 +%patch11 +%patch12 +%patch13 +%patch14 -p1 +# COMMON-PREP-END # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.in From 204a9fcb53935795c847aa54aafbad6142fd1e97ae99c5ac76fa59f61eb5b9e8 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 16 Sep 2011 16:22:41 +0000 Subject: [PATCH 3/3] - dropped newslist.py from demos because of bad license (bnc#718009) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=106 --- python.changes | 6 ++++++ python.spec | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/python.changes b/python.changes index 755321f..e0944cf 100644 --- a/python.changes +++ b/python.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 16 16:21:44 UTC 2011 - jmatejek@suse.com + +- dropped newslist.py from demos because of bad license + (bnc#718009) + ------------------------------------------------------------------- Mon Jul 11 01:59:56 CEST 2011 - ro@suse.de diff --git a/python.spec b/python.spec index 00bfe7e..63e2c0f 100644 --- a/python.spec +++ b/python.spec @@ -41,6 +41,7 @@ Source3: python.sh Source4: python.csh #Source11: testfiles.tar.bz2 # issues with copyrighted Unicode testing files + # !!!!!!!!!!!!!! # do not add or edit patches here. please edit python-base.spec # instead and run pre_checkin.sh @@ -189,6 +190,9 @@ Authors: # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.in +# remove newslist.py because of bad license +rm Demo/scripts/newslist.* + %build # necessary for correct linking with GDBM: export SUSE_ASNEEDED=0