diff options
Diffstat (limited to 'meta/recipes-devtools/python/python')
4 files changed, 152 insertions, 167 deletions
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch index 1257ca6557..235484709a 100644 --- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch | |||
@@ -9,11 +9,13 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | |||
9 | Rebased for python-2.7.9 | 9 | Rebased for python-2.7.9 |
10 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 10 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> |
11 | 11 | ||
12 | Index: Python-2.7.9/Makefile.pre.in | 12 | Rebased for python-2.7.12 |
13 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
14 | Index: Python-2.7.12/Makefile.pre.in | ||
13 | =================================================================== | 15 | =================================================================== |
14 | --- Python-2.7.9.orig/Makefile.pre.in | 16 | --- Python-2.7.12.orig/Makefile.pre.in |
15 | +++ Python-2.7.9/Makefile.pre.in | 17 | +++ Python-2.7.12/Makefile.pre.in |
16 | @@ -234,6 +234,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ | 18 | @@ -246,6 +246,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ |
17 | ########################################################################## | 19 | ########################################################################## |
18 | # Parser | 20 | # Parser |
19 | PGEN= Parser/pgen$(EXE) | 21 | PGEN= Parser/pgen$(EXE) |
@@ -21,7 +23,7 @@ Index: Python-2.7.9/Makefile.pre.in | |||
21 | 23 | ||
22 | PSRCS= \ | 24 | PSRCS= \ |
23 | Parser/acceler.c \ | 25 | Parser/acceler.c \ |
24 | @@ -445,7 +446,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA | 26 | @@ -513,7 +514,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA |
25 | $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) | 27 | $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) |
26 | 28 | ||
27 | platform: $(BUILDPYTHON) pybuilddir.txt | 29 | platform: $(BUILDPYTHON) pybuilddir.txt |
@@ -30,16 +32,16 @@ Index: Python-2.7.9/Makefile.pre.in | |||
30 | 32 | ||
31 | # Create build directory and generate the sysconfig build-time data there. | 33 | # Create build directory and generate the sysconfig build-time data there. |
32 | # pybuilddir.txt contains the name of the build dir and is used for | 34 | # pybuilddir.txt contains the name of the build dir and is used for |
33 | @@ -611,7 +612,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p | 35 | @@ -684,7 +685,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) |
34 | $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) | 36 | @$(MKDIR_P) Include |
35 | @$(MKDIR_P) Include | 37 | # Avoid copying the file onto itself for an in-tree build |
36 | $(MAKE) $(PGEN) | 38 | if test "$(cross_compiling)" != "yes"; then \ |
37 | - $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | 39 | - $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ |
38 | + $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | 40 | + $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ |
39 | $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) | 41 | else \ |
40 | $(MAKE) $(GRAMMAR_H) | 42 | cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \ |
41 | touch $(GRAMMAR_C) | 43 | mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \ |
42 | @@ -1043,27 +1044,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL | 44 | @@ -1133,27 +1134,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL |
43 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ | 45 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ |
44 | fi | 46 | fi |
45 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 47 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
@@ -73,11 +75,11 @@ Index: Python-2.7.9/Makefile.pre.in | |||
73 | 75 | ||
74 | # Create the PLATDIR source directory, if one wasn't distributed.. | 76 | # Create the PLATDIR source directory, if one wasn't distributed.. |
75 | $(srcdir)/Lib/$(PLATDIR): | 77 | $(srcdir)/Lib/$(PLATDIR): |
76 | Index: Python-2.7.9/setup.py | 78 | Index: Python-2.7.12/setup.py |
77 | =================================================================== | 79 | =================================================================== |
78 | --- Python-2.7.9.orig/setup.py | 80 | --- Python-2.7.12.orig/setup.py |
79 | +++ Python-2.7.9/setup.py | 81 | +++ Python-2.7.12/setup.py |
80 | @@ -334,6 +334,7 @@ class PyBuildExt(build_ext): | 82 | @@ -350,6 +350,7 @@ class PyBuildExt(build_ext): |
81 | self.failed.append(ext.name) | 83 | self.failed.append(ext.name) |
82 | self.announce('*** WARNING: renaming "%s" since importing it' | 84 | self.announce('*** WARNING: renaming "%s" since importing it' |
83 | ' failed: %s' % (ext.name, why), level=3) | 85 | ' failed: %s' % (ext.name, why), level=3) |
@@ -85,7 +87,7 @@ Index: Python-2.7.9/setup.py | |||
85 | assert not self.inplace | 87 | assert not self.inplace |
86 | basename, tail = os.path.splitext(ext_filename) | 88 | basename, tail = os.path.splitext(ext_filename) |
87 | newname = basename + "_failed" + tail | 89 | newname = basename + "_failed" + tail |
88 | @@ -558,6 +559,9 @@ class PyBuildExt(build_ext): | 90 | @@ -574,6 +575,9 @@ class PyBuildExt(build_ext): |
89 | 91 | ||
90 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules | 92 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules |
91 | 93 | ||
diff --git a/meta/recipes-devtools/python/python/CVE-2016-1000110.patch b/meta/recipes-devtools/python/python/CVE-2016-1000110.patch index 071175acec..71e00e752e 100644 --- a/meta/recipes-devtools/python/python/CVE-2016-1000110.patch +++ b/meta/recipes-devtools/python/python/CVE-2016-1000110.patch | |||
@@ -1,21 +1,26 @@ | |||
1 | From 5be8d3e97b1d2e526548cb346fd5f8980d31616a Mon Sep 17 00:00:00 2001 | 1 | From cb25fbd5abc0f4eb07dbb8ea819e9c26bda4fc99 Mon Sep 17 00:00:00 2001 |
2 | From: Senthil Kumaran <senthil@uthcode.com> | 2 | From: Senthil Kumaran <senthil@uthcode.com> |
3 | Date: Sat, 30 Jul 2016 05:49:53 -0700 | 3 | Date: Sat, 30 Jul 2016 05:49:53 -0700 |
4 | Subject: [PATCH] Prevent HTTPoxy attack (CVE-2016-1000110) | 4 | Subject: [PATCH] python: fix CVE-2016-1000110 |
5 | MIME-Version: 1.0 | 5 | MIME-Version: 1.0 |
6 | Content-Type: text/plain; charset=UTF-8 | 6 | Content-Type: text/plain; charset=UTF-8 |
7 | Content-Transfer-Encoding: 8bit | 7 | Content-Transfer-Encoding: 8bit |
8 | 8 | ||
9 | Prevent HTTPoxy attack (CVE-2016-1000110) | ||
10 | |||
9 | Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which | 11 | Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which |
10 | indicates that the script is in CGI mode. | 12 | indicates that the script is in CGI mode. |
11 | 13 | ||
12 | Issue reported and patch contributed by Rémi Rampin. | 14 | Issue reported and patch contributed by Rémi Rampin. |
13 | 15 | ||
16 | Backport patch from https://hg.python.org/cpython/rev/ba915d561667/ | ||
17 | |||
14 | Upstream-Status: Backport | 18 | Upstream-Status: Backport |
15 | CVE: CVE-2016-1000110 | 19 | CVE: CVE-2016-1000110 |
20 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
16 | 21 | ||
17 | Signed-off-by: Armin Kuster <akuster@mvista.com> | 22 | Copied this file from morty since the old one didn't apply to python 2.7.12. |
18 | 23 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | |
19 | --- | 24 | --- |
20 | Doc/howto/urllib2.rst | 5 +++++ | 25 | Doc/howto/urllib2.rst | 5 +++++ |
21 | Doc/library/urllib.rst | 10 ++++++++++ | 26 | Doc/library/urllib.rst | 10 ++++++++++ |
@@ -26,11 +31,11 @@ Signed-off-by: Armin Kuster <akuster@mvista.com> | |||
26 | Misc/NEWS | 4 ++++ | 31 | Misc/NEWS | 4 ++++ |
27 | 7 files changed, 46 insertions(+) | 32 | 7 files changed, 46 insertions(+) |
28 | 33 | ||
29 | Index: Python-2.7.11/Doc/howto/urllib2.rst | 34 | diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst |
30 | =================================================================== | 35 | index 6bb06d4..5cf2c0c 100644 |
31 | --- Python-2.7.11.orig/Doc/howto/urllib2.rst | 36 | --- a/Doc/howto/urllib2.rst |
32 | +++ Python-2.7.11/Doc/howto/urllib2.rst | 37 | +++ b/Doc/howto/urllib2.rst |
33 | @@ -523,6 +523,11 @@ setting up a `Basic Authentication`_ han | 38 | @@ -525,6 +525,11 @@ setting up a `Basic Authentication`_ handler: :: |
34 | through a proxy. However, this can be enabled by extending urllib2 as | 39 | through a proxy. However, this can be enabled by extending urllib2 as |
35 | shown in the recipe [#]_. | 40 | shown in the recipe [#]_. |
36 | 41 | ||
@@ -42,13 +47,13 @@ Index: Python-2.7.11/Doc/howto/urllib2.rst | |||
42 | 47 | ||
43 | Sockets and Layers | 48 | Sockets and Layers |
44 | ================== | 49 | ================== |
45 | Index: Python-2.7.11/Doc/library/urllib.rst | 50 | diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst |
46 | =================================================================== | 51 | index 3b5dc16..bddcba9 100644 |
47 | --- Python-2.7.11.orig/Doc/library/urllib.rst | 52 | --- a/Doc/library/urllib.rst |
48 | +++ Python-2.7.11/Doc/library/urllib.rst | 53 | +++ b/Doc/library/urllib.rst |
49 | @@ -293,6 +293,16 @@ Utility functions | 54 | @@ -295,6 +295,16 @@ Utility functions |
50 | find it, looks for proxy information from Mac OSX System Configuration for | 55 | If both lowercase and uppercase environment variables exist (and disagree), |
51 | Mac OS X and Windows Systems Registry for Windows. | 56 | lowercase is preferred. |
52 | 57 | ||
53 | + .. note:: | 58 | + .. note:: |
54 | + | 59 | + |
@@ -62,11 +67,11 @@ Index: Python-2.7.11/Doc/library/urllib.rst | |||
62 | + | 67 | + |
63 | .. note:: | 68 | .. note:: |
64 | urllib also exposes certain utility functions like splittype, splithost and | 69 | urllib also exposes certain utility functions like splittype, splithost and |
65 | others parsing url into various components. But it is recommended to use | 70 | others parsing URL into various components. But it is recommended to use |
66 | Index: Python-2.7.11/Doc/library/urllib2.rst | 71 | diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst |
67 | =================================================================== | 72 | index 8a4c80e..b808b98 100644 |
68 | --- Python-2.7.11.orig/Doc/library/urllib2.rst | 73 | --- a/Doc/library/urllib2.rst |
69 | +++ Python-2.7.11/Doc/library/urllib2.rst | 74 | +++ b/Doc/library/urllib2.rst |
70 | @@ -229,6 +229,11 @@ The following classes are provided: | 75 | @@ -229,6 +229,11 @@ The following classes are provided: |
71 | 76 | ||
72 | To disable autodetected proxy pass an empty dictionary. | 77 | To disable autodetected proxy pass an empty dictionary. |
@@ -79,25 +84,13 @@ Index: Python-2.7.11/Doc/library/urllib2.rst | |||
79 | 84 | ||
80 | .. class:: HTTPPasswordMgr() | 85 | .. class:: HTTPPasswordMgr() |
81 | 86 | ||
82 | Index: Python-2.7.11/Misc/ACKS | 87 | diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py |
83 | =================================================================== | 88 | index 434d533..27a1d38 100644 |
84 | --- Python-2.7.11.orig/Misc/ACKS | 89 | --- a/Lib/test/test_urllib.py |
85 | +++ Python-2.7.11/Misc/ACKS | 90 | +++ b/Lib/test/test_urllib.py |
86 | @@ -1110,6 +1110,7 @@ Jérôme Radix | 91 | @@ -170,6 +170,18 @@ class ProxyTests(unittest.TestCase): |
87 | Burton Radons | 92 | self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com:8888')) |
88 | Jeff Ramnani | 93 | self.assertTrue(urllib.proxy_bypass_environment('newdomain.com:1234')) |
89 | Brodie Rao | ||
90 | +Rémi Rampin | ||
91 | Senko Rasic | ||
92 | Antti Rasinen | ||
93 | Nikolaus Rath | ||
94 | Index: Python-2.7.11/Lib/test/test_urllib.py | ||
95 | =================================================================== | ||
96 | --- Python-2.7.11.orig/Lib/test/test_urllib.py | ||
97 | +++ Python-2.7.11/Lib/test/test_urllib.py | ||
98 | @@ -162,6 +162,18 @@ class ProxyTests(unittest.TestCase): | ||
99 | self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com')) | ||
100 | |||
101 | 94 | ||
102 | + def test_proxy_cgi_ignore(self): | 95 | + def test_proxy_cgi_ignore(self): |
103 | + try: | 96 | + try: |
@@ -111,16 +104,16 @@ Index: Python-2.7.11/Lib/test/test_urllib.py | |||
111 | + self.env.unset('REQUEST_METHOD') | 104 | + self.env.unset('REQUEST_METHOD') |
112 | + self.env.unset('HTTP_PROXY') | 105 | + self.env.unset('HTTP_PROXY') |
113 | + | 106 | + |
114 | class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin): | 107 | def test_proxy_bypass_environment_host_match(self): |
115 | """Test urlopen() opening a fake http connection.""" | 108 | bypass = urllib.proxy_bypass_environment |
116 | 109 | self.env.set('NO_PROXY', | |
117 | Index: Python-2.7.11/Lib/urllib.py | 110 | diff --git a/Lib/urllib.py b/Lib/urllib.py |
118 | =================================================================== | 111 | index 139fab9..c3ba2c9 100644 |
119 | --- Python-2.7.11.orig/Lib/urllib.py | 112 | --- a/Lib/urllib.py |
120 | +++ Python-2.7.11/Lib/urllib.py | 113 | +++ b/Lib/urllib.py |
121 | @@ -1382,11 +1382,21 @@ def getproxies_environment(): | 114 | @@ -1380,12 +1380,21 @@ def getproxies_environment(): |
115 | If you need a different way, you can pass a proxies dictionary to the | ||
122 | [Fancy]URLopener constructor. | 116 | [Fancy]URLopener constructor. |
123 | |||
124 | """ | 117 | """ |
125 | + # Get all variables | 118 | + # Get all variables |
126 | proxies = {} | 119 | proxies = {} |
@@ -128,7 +121,7 @@ Index: Python-2.7.11/Lib/urllib.py | |||
128 | name = name.lower() | 121 | name = name.lower() |
129 | if value and name[-6:] == '_proxy': | 122 | if value and name[-6:] == '_proxy': |
130 | proxies[name[:-6]] = value | 123 | proxies[name[:-6]] = value |
131 | + | 124 | |
132 | + # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY | 125 | + # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY |
133 | + # (non-all-lowercase) as it may be set from the web server by a "Proxy:" | 126 | + # (non-all-lowercase) as it may be set from the web server by a "Proxy:" |
134 | + # header from the client | 127 | + # header from the client |
@@ -137,21 +130,36 @@ Index: Python-2.7.11/Lib/urllib.py | |||
137 | + proxies.pop('http', None) | 130 | + proxies.pop('http', None) |
138 | + | 131 | + |
139 | + # Get lowercase variables | 132 | + # Get lowercase variables |
140 | return proxies | 133 | for name, value in os.environ.items(): |
141 | 134 | if name[-6:] == '_proxy': | |
142 | def proxy_bypass_environment(host): | 135 | name = name.lower() |
143 | Index: Python-2.7.11/Misc/NEWS | 136 | diff --git a/Misc/ACKS b/Misc/ACKS |
144 | =================================================================== | 137 | index ee3a465..9c374b7 100644 |
145 | --- Python-2.7.11.orig/Misc/NEWS | 138 | --- a/Misc/ACKS |
146 | +++ Python-2.7.11/Misc/NEWS | 139 | +++ b/Misc/ACKS |
147 | @@ -10,6 +10,10 @@ What's New in Python 2.7.11? | 140 | @@ -1121,6 +1121,7 @@ Burton Radons |
148 | Library | 141 | Jeff Ramnani |
149 | ------- | 142 | Varpu Rantala |
143 | Brodie Rao | ||
144 | +Rémi Rampin | ||
145 | Senko Rasic | ||
146 | Antti Rasinen | ||
147 | Nikolaus Rath | ||
148 | diff --git a/Misc/NEWS b/Misc/NEWS | ||
149 | index 4ab3a70..cc2f65b 100644 | ||
150 | --- a/Misc/NEWS | ||
151 | +++ b/Misc/NEWS | ||
152 | @@ -187,6 +187,10 @@ Library | ||
153 | - Issue #26644: Raise ValueError rather than SystemError when a negative | ||
154 | length is passed to SSLSocket.recv() or read(). | ||
150 | 155 | ||
151 | +- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the | 156 | +- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the |
152 | + HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates | 157 | + HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates |
153 | + that the script is in CGI mode. | 158 | + that the script is in CGI mode. |
154 | + | 159 | + |
155 | - Issue #25624: ZipFile now always writes a ZIP_STORED header for directory | 160 | - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes |
156 | entries. Patch by Dingyuan Wang. | 161 | instead of up to 1024. |
157 | 162 | ||
163 | -- | ||
164 | 2.8.1 | ||
165 | |||
diff --git a/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch b/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch deleted file mode 100644 index e9bae324f7..0000000000 --- a/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Avoids parallel make races linking errors when making Parser/PGEN | ||
4 | |||
5 | - Implements Richard Purdie's idea | ||
6 | |||
7 | Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
8 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
9 | |||
10 | Index: Python-2.7.9/Makefile.pre.in | ||
11 | =================================================================== | ||
12 | --- Python-2.7.9.orig/Makefile.pre.in | ||
13 | +++ Python-2.7.9/Makefile.pre.in | ||
14 | @@ -611,12 +611,10 @@ Modules/grpmodule.o: $(srcdir)/Modules/g | ||
15 | |||
16 | Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h | ||
17 | |||
18 | -$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) | ||
19 | +$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN) | ||
20 | @$(MKDIR_P) Include | ||
21 | - $(MAKE) $(PGEN) | ||
22 | $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | ||
23 | $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) | ||
24 | - $(MAKE) $(GRAMMAR_H) | ||
25 | touch $(GRAMMAR_C) | ||
26 | |||
27 | $(PGEN): $(PGENOBJS) | ||
diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch index 0bfa0d2cf4..5360226980 100644 --- a/meta/recipes-devtools/python/python/multilib.patch +++ b/meta/recipes-devtools/python/python/multilib.patch | |||
@@ -1,11 +1,13 @@ | |||
1 | Rebased for python-2.7.9 | 1 | Rebased for python-2.7.9 |
2 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> |
3 | 3 | ||
4 | Index: Python-2.7.9/configure.ac | 4 | Rebased for python-2.7.12 |
5 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
6 | Index: Python-2.7.12/configure.ac | ||
5 | =================================================================== | 7 | =================================================================== |
6 | --- Python-2.7.9.orig/configure.ac | 8 | --- Python-2.7.12.orig/configure.ac |
7 | +++ Python-2.7.9/configure.ac | 9 | +++ Python-2.7.12/configure.ac |
8 | @@ -736,6 +736,10 @@ SunOS*) | 10 | @@ -756,6 +756,10 @@ SunOS*) |
9 | ;; | 11 | ;; |
10 | esac | 12 | esac |
11 | 13 | ||
@@ -16,10 +18,10 @@ Index: Python-2.7.9/configure.ac | |||
16 | 18 | ||
17 | AC_SUBST(LIBRARY) | 19 | AC_SUBST(LIBRARY) |
18 | AC_MSG_CHECKING(LIBRARY) | 20 | AC_MSG_CHECKING(LIBRARY) |
19 | Index: Python-2.7.9/Include/pythonrun.h | 21 | Index: Python-2.7.12/Include/pythonrun.h |
20 | =================================================================== | 22 | =================================================================== |
21 | --- Python-2.7.9.orig/Include/pythonrun.h | 23 | --- Python-2.7.12.orig/Include/pythonrun.h |
22 | +++ Python-2.7.9/Include/pythonrun.h | 24 | +++ Python-2.7.12/Include/pythonrun.h |
23 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | 25 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); |
24 | /* In their own files */ | 26 | /* In their own files */ |
25 | PyAPI_FUNC(const char *) Py_GetVersion(void); | 27 | PyAPI_FUNC(const char *) Py_GetVersion(void); |
@@ -28,10 +30,10 @@ Index: Python-2.7.9/Include/pythonrun.h | |||
28 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | 30 | PyAPI_FUNC(const char *) Py_GetCopyright(void); |
29 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | 31 | PyAPI_FUNC(const char *) Py_GetCompiler(void); |
30 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | 32 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); |
31 | Index: Python-2.7.9/Lib/distutils/command/install.py | 33 | Index: Python-2.7.12/Lib/distutils/command/install.py |
32 | =================================================================== | 34 | =================================================================== |
33 | --- Python-2.7.9.orig/Lib/distutils/command/install.py | 35 | --- Python-2.7.12.orig/Lib/distutils/command/install.py |
34 | +++ Python-2.7.9/Lib/distutils/command/install.py | 36 | +++ Python-2.7.12/Lib/distutils/command/install.py |
35 | @@ -22,6 +22,8 @@ from site import USER_BASE | 37 | @@ -22,6 +22,8 @@ from site import USER_BASE |
36 | from site import USER_SITE | 38 | from site import USER_SITE |
37 | 39 | ||
@@ -50,10 +52,10 @@ Index: Python-2.7.9/Lib/distutils/command/install.py | |||
50 | 'headers': '$base/include/python$py_version_short/$dist_name', | 52 | 'headers': '$base/include/python$py_version_short/$dist_name', |
51 | 'scripts': '$base/bin', | 53 | 'scripts': '$base/bin', |
52 | 'data' : '$base', | 54 | 'data' : '$base', |
53 | Index: Python-2.7.9/Lib/distutils/sysconfig.py | 55 | Index: Python-2.7.12/Lib/distutils/sysconfig.py |
54 | =================================================================== | 56 | =================================================================== |
55 | --- Python-2.7.9.orig/Lib/distutils/sysconfig.py | 57 | --- Python-2.7.12.orig/Lib/distutils/sysconfig.py |
56 | +++ Python-2.7.9/Lib/distutils/sysconfig.py | 58 | +++ Python-2.7.12/Lib/distutils/sysconfig.py |
57 | @@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan | 59 | @@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan |
58 | prefix = plat_specific and EXEC_PREFIX or PREFIX | 60 | prefix = plat_specific and EXEC_PREFIX or PREFIX |
59 | 61 | ||
@@ -68,11 +70,11 @@ Index: Python-2.7.9/Lib/distutils/sysconfig.py | |||
68 | if standard_lib: | 70 | if standard_lib: |
69 | return libpython | 71 | return libpython |
70 | else: | 72 | else: |
71 | Index: Python-2.7.9/Lib/pydoc.py | 73 | Index: Python-2.7.12/Lib/pydoc.py |
72 | =================================================================== | 74 | =================================================================== |
73 | --- Python-2.7.9.orig/Lib/pydoc.py | 75 | --- Python-2.7.12.orig/Lib/pydoc.py |
74 | +++ Python-2.7.9/Lib/pydoc.py | 76 | +++ Python-2.7.12/Lib/pydoc.py |
75 | @@ -383,7 +383,7 @@ class Doc: | 77 | @@ -384,7 +384,7 @@ class Doc: |
76 | 78 | ||
77 | docloc = os.environ.get("PYTHONDOCS", | 79 | docloc = os.environ.get("PYTHONDOCS", |
78 | "http://docs.python.org/library") | 80 | "http://docs.python.org/library") |
@@ -81,10 +83,10 @@ Index: Python-2.7.9/Lib/pydoc.py | |||
81 | "python"+sys.version[0:3]) | 83 | "python"+sys.version[0:3]) |
82 | if (isinstance(object, type(os)) and | 84 | if (isinstance(object, type(os)) and |
83 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', | 85 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', |
84 | Index: Python-2.7.9/Lib/site.py | 86 | Index: Python-2.7.12/Lib/site.py |
85 | =================================================================== | 87 | =================================================================== |
86 | --- Python-2.7.9.orig/Lib/site.py | 88 | --- Python-2.7.12.orig/Lib/site.py |
87 | +++ Python-2.7.9/Lib/site.py | 89 | +++ Python-2.7.12/Lib/site.py |
88 | @@ -288,13 +288,18 @@ def getsitepackages(): | 90 | @@ -288,13 +288,18 @@ def getsitepackages(): |
89 | if sys.platform in ('os2emx', 'riscos'): | 91 | if sys.platform in ('os2emx', 'riscos'): |
90 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | 92 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) |
@@ -107,10 +109,10 @@ Index: Python-2.7.9/Lib/site.py | |||
107 | if sys.platform == "darwin": | 109 | if sys.platform == "darwin": |
108 | # for framework builds *only* we add the standard Apple | 110 | # for framework builds *only* we add the standard Apple |
109 | # locations. | 111 | # locations. |
110 | Index: Python-2.7.9/Lib/sysconfig.py | 112 | Index: Python-2.7.12/Lib/sysconfig.py |
111 | =================================================================== | 113 | =================================================================== |
112 | --- Python-2.7.9.orig/Lib/sysconfig.py | 114 | --- Python-2.7.12.orig/Lib/sysconfig.py |
113 | +++ Python-2.7.9/Lib/sysconfig.py | 115 | +++ Python-2.7.12/Lib/sysconfig.py |
114 | @@ -7,10 +7,10 @@ from os.path import pardir, realpath | 116 | @@ -7,10 +7,10 @@ from os.path import pardir, realpath |
115 | 117 | ||
116 | _INSTALL_SCHEMES = { | 118 | _INSTALL_SCHEMES = { |
@@ -139,10 +141,10 @@ Index: Python-2.7.9/Lib/sysconfig.py | |||
139 | 'include': '{userbase}/include/python{py_version_short}', | 141 | 'include': '{userbase}/include/python{py_version_short}', |
140 | 'scripts': '{userbase}/bin', | 142 | 'scripts': '{userbase}/bin', |
141 | 'data' : '{userbase}', | 143 | 'data' : '{userbase}', |
142 | Index: Python-2.7.9/Lib/test/test_dl.py | 144 | Index: Python-2.7.12/Lib/test/test_dl.py |
143 | =================================================================== | 145 | =================================================================== |
144 | --- Python-2.7.9.orig/Lib/test/test_dl.py | 146 | --- Python-2.7.12.orig/Lib/test/test_dl.py |
145 | +++ Python-2.7.9/Lib/test/test_dl.py | 147 | +++ Python-2.7.12/Lib/test/test_dl.py |
146 | @@ -4,10 +4,11 @@ | 148 | @@ -4,10 +4,11 @@ |
147 | import unittest | 149 | import unittest |
148 | from test.test_support import verbose, import_module | 150 | from test.test_support import verbose, import_module |
@@ -157,11 +159,11 @@ Index: Python-2.7.9/Lib/test/test_dl.py | |||
157 | ('/usr/bin/cygwin1.dll', 'getpid'), | 159 | ('/usr/bin/cygwin1.dll', 'getpid'), |
158 | ('/usr/lib/libc.dylib', 'getpid'), | 160 | ('/usr/lib/libc.dylib', 'getpid'), |
159 | ] | 161 | ] |
160 | Index: Python-2.7.9/Lib/test/test_site.py | 162 | Index: Python-2.7.12/Lib/test/test_site.py |
161 | =================================================================== | 163 | =================================================================== |
162 | --- Python-2.7.9.orig/Lib/test/test_site.py | 164 | --- Python-2.7.12.orig/Lib/test/test_site.py |
163 | +++ Python-2.7.9/Lib/test/test_site.py | 165 | +++ Python-2.7.12/Lib/test/test_site.py |
164 | @@ -241,12 +241,16 @@ class HelperFunctionsTests(unittest.Test | 166 | @@ -246,12 +246,16 @@ class HelperFunctionsTests(unittest.Test |
165 | self.assertEqual(dirs[2], wanted) | 167 | self.assertEqual(dirs[2], wanted) |
166 | elif os.sep == '/': | 168 | elif os.sep == '/': |
167 | # OS X non-framwework builds, Linux, FreeBSD, etc | 169 | # OS X non-framwework builds, Linux, FreeBSD, etc |
@@ -181,10 +183,10 @@ Index: Python-2.7.9/Lib/test/test_site.py | |||
181 | else: | 183 | else: |
182 | # other platforms | 184 | # other platforms |
183 | self.assertEqual(len(dirs), 2) | 185 | self.assertEqual(len(dirs), 2) |
184 | Index: Python-2.7.9/Lib/trace.py | 186 | Index: Python-2.7.12/Lib/trace.py |
185 | =================================================================== | 187 | =================================================================== |
186 | --- Python-2.7.9.orig/Lib/trace.py | 188 | --- Python-2.7.12.orig/Lib/trace.py |
187 | +++ Python-2.7.9/Lib/trace.py | 189 | +++ Python-2.7.12/Lib/trace.py |
188 | @@ -754,10 +754,10 @@ def main(argv=None): | 190 | @@ -754,10 +754,10 @@ def main(argv=None): |
189 | # should I also call expanduser? (after all, could use $HOME) | 191 | # should I also call expanduser? (after all, could use $HOME) |
190 | 192 | ||
@@ -198,11 +200,11 @@ Index: Python-2.7.9/Lib/trace.py | |||
198 | "python" + sys.version[:3])) | 200 | "python" + sys.version[:3])) |
199 | s = os.path.normpath(s) | 201 | s = os.path.normpath(s) |
200 | ignore_dirs.append(s) | 202 | ignore_dirs.append(s) |
201 | Index: Python-2.7.9/Makefile.pre.in | 203 | Index: Python-2.7.12/Makefile.pre.in |
202 | =================================================================== | 204 | =================================================================== |
203 | --- Python-2.7.9.orig/Makefile.pre.in | 205 | --- Python-2.7.12.orig/Makefile.pre.in |
204 | +++ Python-2.7.9/Makefile.pre.in | 206 | +++ Python-2.7.12/Makefile.pre.in |
205 | @@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | 207 | @@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG |
206 | 208 | ||
207 | # Machine-dependent subdirectories | 209 | # Machine-dependent subdirectories |
208 | MACHDEP= @MACHDEP@ | 210 | MACHDEP= @MACHDEP@ |
@@ -210,7 +212,7 @@ Index: Python-2.7.9/Makefile.pre.in | |||
210 | 212 | ||
211 | # Multiarch directory (may be empty) | 213 | # Multiarch directory (may be empty) |
212 | MULTIARCH= @MULTIARCH@ | 214 | MULTIARCH= @MULTIARCH@ |
213 | @@ -106,7 +107,7 @@ LIBDIR= @libdir@ | 215 | @@ -111,7 +112,7 @@ LIBDIR= @libdir@ |
214 | MANDIR= @mandir@ | 216 | MANDIR= @mandir@ |
215 | INCLUDEDIR= @includedir@ | 217 | INCLUDEDIR= @includedir@ |
216 | CONFINCLUDEDIR= $(exec_prefix)/include | 218 | CONFINCLUDEDIR= $(exec_prefix)/include |
@@ -219,7 +221,7 @@ Index: Python-2.7.9/Makefile.pre.in | |||
219 | 221 | ||
220 | # Detailed destination directories | 222 | # Detailed destination directories |
221 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | 223 | BINLIBDEST= $(LIBDIR)/python$(VERSION) |
222 | @@ -598,6 +599,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | 224 | @@ -670,6 +671,7 @@ Modules/getpath.o: $(srcdir)/Modules/get |
223 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | 225 | -DEXEC_PREFIX='"$(exec_prefix)"' \ |
224 | -DVERSION='"$(VERSION)"' \ | 226 | -DVERSION='"$(VERSION)"' \ |
225 | -DVPATH='"$(VPATH)"' \ | 227 | -DVPATH='"$(VPATH)"' \ |
@@ -227,7 +229,7 @@ Index: Python-2.7.9/Makefile.pre.in | |||
227 | -o $@ $(srcdir)/Modules/getpath.c | 229 | -o $@ $(srcdir)/Modules/getpath.c |
228 | 230 | ||
229 | Modules/python.o: $(srcdir)/Modules/python.c | 231 | Modules/python.o: $(srcdir)/Modules/python.c |
230 | @@ -640,7 +642,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) | 232 | @@ -721,7 +723,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) |
231 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) | 233 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) |
232 | 234 | ||
233 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | 235 | Python/getplatform.o: $(srcdir)/Python/getplatform.c |
@@ -236,25 +238,25 @@ Index: Python-2.7.9/Makefile.pre.in | |||
236 | 238 | ||
237 | Python/importdl.o: $(srcdir)/Python/importdl.c | 239 | Python/importdl.o: $(srcdir)/Python/importdl.c |
238 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | 240 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c |
239 | Index: Python-2.7.9/Modules/getpath.c | 241 | Index: Python-2.7.12/Modules/getpath.c |
240 | =================================================================== | 242 | =================================================================== |
241 | --- Python-2.7.9.orig/Modules/getpath.c | 243 | --- Python-2.7.12.orig/Modules/getpath.c |
242 | +++ Python-2.7.9/Modules/getpath.c | 244 | +++ Python-2.7.12/Modules/getpath.c |
243 | @@ -116,9 +116,11 @@ | 245 | @@ -100,6 +100,13 @@ |
244 | #define EXEC_PREFIX PREFIX | 246 | #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" |
245 | #endif | 247 | #endif |
246 | 248 | ||
247 | +#define LIB_PYTHON LIB "/python" VERSION | 249 | +#define LIB_PYTHON LIB "/python" VERSION |
248 | + | 250 | + |
249 | #ifndef PYTHONPATH | 251 | +#ifndef PYTHONPATH |
250 | -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ | ||
251 | - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" | ||
252 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ | 252 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ |
253 | + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" | 253 | + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" |
254 | #endif | 254 | +#endif |
255 | 255 | + | |
256 | #ifndef LANDMARK | 256 | #ifndef LANDMARK |
257 | @@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1]; | 257 | #define LANDMARK "os.py" |
258 | #endif | ||
259 | @@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1]; | ||
258 | static char exec_prefix[MAXPATHLEN+1]; | 260 | static char exec_prefix[MAXPATHLEN+1]; |
259 | static char progpath[MAXPATHLEN+1]; | 261 | static char progpath[MAXPATHLEN+1]; |
260 | static char *module_search_path = NULL; | 262 | static char *module_search_path = NULL; |
@@ -263,10 +265,10 @@ Index: Python-2.7.9/Modules/getpath.c | |||
263 | 265 | ||
264 | static void | 266 | static void |
265 | reduce(char *dir) | 267 | reduce(char *dir) |
266 | Index: Python-2.7.9/Python/getplatform.c | 268 | Index: Python-2.7.12/Python/getplatform.c |
267 | =================================================================== | 269 | =================================================================== |
268 | --- Python-2.7.9.orig/Python/getplatform.c | 270 | --- Python-2.7.12.orig/Python/getplatform.c |
269 | +++ Python-2.7.9/Python/getplatform.c | 271 | +++ Python-2.7.12/Python/getplatform.c |
270 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | 272 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) |
271 | { | 273 | { |
272 | return PLATFORM; | 274 | return PLATFORM; |
@@ -281,10 +283,10 @@ Index: Python-2.7.9/Python/getplatform.c | |||
281 | +{ | 283 | +{ |
282 | + return LIB; | 284 | + return LIB; |
283 | +} | 285 | +} |
284 | Index: Python-2.7.9/Python/sysmodule.c | 286 | Index: Python-2.7.12/Python/sysmodule.c |
285 | =================================================================== | 287 | =================================================================== |
286 | --- Python-2.7.9.orig/Python/sysmodule.c | 288 | --- Python-2.7.12.orig/Python/sysmodule.c |
287 | +++ Python-2.7.9/Python/sysmodule.c | 289 | +++ Python-2.7.12/Python/sysmodule.c |
288 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) | 290 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) |
289 | PyString_FromString(Py_GetCopyright())); | 291 | PyString_FromString(Py_GetCopyright())); |
290 | SET_SYS_FROM_STRING("platform", | 292 | SET_SYS_FROM_STRING("platform", |