summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/conf/distro/include/default-versions.inc4
-rw-r--r--meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch27
-rw-r--r--meta/recipes-devtools/python/python-native/debug.patch19
-rw-r--r--meta/recipes-devtools/python/python-native/multilib.patch102
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.12.bb (renamed from meta/recipes-devtools/python/python-native_2.7.11.bb)1
-rw-r--r--meta/recipes-devtools/python/python.inc6
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch42
-rw-r--r--meta/recipes-devtools/python/python/CVE-2016-1000110.patch132
-rw-r--r--meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch27
-rw-r--r--meta/recipes-devtools/python/python/multilib.patch118
-rw-r--r--meta/recipes-devtools/python/python_2.7.12.bb (renamed from meta/recipes-devtools/python/python_2.7.11.bb)4
11 files changed, 221 insertions, 261 deletions
diff --git a/meta/conf/distro/include/default-versions.inc b/meta/conf/distro/include/default-versions.inc
index a04ea718bd..aacb7280ff 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -4,8 +4,8 @@
4 4
5# Force the python versions in one place 5# Force the python versions in one place
6PYTHON_BASEVERSION ?= "2.7" 6PYTHON_BASEVERSION ?= "2.7"
7PREFERRED_VERSION_python ?= "2.7.11" 7PREFERRED_VERSION_python ?= "2.7.12"
8PREFERRED_VERSION_python-native ?= "2.7.11" 8PREFERRED_VERSION_python-native ?= "2.7.12"
9 9
10# Force the older version of liberation-fonts until we fix the fontforge issue 10# Force the older version of liberation-fonts until we fix the fontforge issue
11PREFERRED_VERSION_liberation-fonts ?= "1.04" 11PREFERRED_VERSION_liberation-fonts ?= "1.04"
diff --git a/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch b/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
deleted file mode 100644
index 5279e7c3b4..0000000000
--- a/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Upstream-Status: Pending
2
3Avoids parallel make races linking errors when making Parser/PGEN
4
5- Implements Richard Purdie's idea
6
7Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
8Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
9
10Index: 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@@ -610,12 +610,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 $(PGEN) $(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-native/debug.patch b/meta/recipes-devtools/python/python-native/debug.patch
index 5ec10d6b20..c2b20e0a6e 100644
--- a/meta/recipes-devtools/python/python-native/debug.patch
+++ b/meta/recipes-devtools/python/python-native/debug.patch
@@ -1,24 +1,29 @@
1Upstream-Status: Pending 1Upstream-Status: Pending
2 2
3Index: Python-2.6.1/Lib/distutils/unixccompiler.py 3Rebased for python-2.7.12
4Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
5Index: Python-2.7.12/Lib/distutils/unixccompiler.py
4=================================================================== 6===================================================================
5--- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000 7--- Python-2.7.12.orig/Lib/distutils/unixccompiler.py
6+++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000 8+++ Python-2.7.12/Lib/distutils/unixccompiler.py
7@@ -300,6 +300,8 @@ 9@@ -278,6 +278,8 @@ class UnixCCompiler(CCompiler):
8 dylib_f = self.library_filename(lib, lib_type='dylib') 10
9 static_f = self.library_filename(lib, lib_type='static') 11
10 12
11+ print "Looking in %s for %s" % (lib, dirs) 13+ print "Looking in %s for %s" % (lib, dirs)
12+ 14+
13 for dir in dirs: 15 for dir in dirs:
14 shared = os.path.join(dir, shared_f) 16 shared = os.path.join(dir, shared_f)
15 dylib = os.path.join(dir, dylib_f) 17 dylib = os.path.join(dir, dylib_f)
16@@ -309,10 +311,13 @@ 18@@ -298,12 +300,16 @@ class UnixCCompiler(CCompiler):
17 # assuming that *all* Unix C compilers do. And of course I'm 19 # assuming that *all* Unix C compilers do. And of course I'm
18 # ignoring even GCC's "-static" option. So sue me. 20 # ignoring even GCC's "-static" option. So sue me.
19 if os.path.exists(dylib): 21 if os.path.exists(dylib):
20+ print "Found %s" % (dylib) 22+ print "Found %s" % (dylib)
21 return dylib 23 return dylib
24 elif os.path.exists(xcode_stub):
25+ print "Found %s" % (xcode_stub)
26 return xcode_stub
22 elif os.path.exists(shared): 27 elif os.path.exists(shared):
23+ print "Found %s" % (shared) 28+ print "Found %s" % (shared)
24 return shared 29 return shared
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch
index 8ca89e7c51..fa123c56bc 100644
--- a/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/meta/recipes-devtools/python/python-native/multilib.patch
@@ -1,6 +1,6 @@
1Rebased for Python 2.7.9 1Rebased for Python 2.7.9
2 2
3Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 3Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
4 4
52011/09/29 52011/09/29
6The python recipe building was failing because python-native 6The python recipe building was failing because python-native
@@ -10,12 +10,14 @@ recipe.
10 10
11Upstream-Status: Inappropriate [oe-specific] 11Upstream-Status: Inappropriate [oe-specific]
12 12
13Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 13Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
14 14
15Index: Python-2.7.9/Include/pythonrun.h 15Rebased for python-2.7.12
16Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
17Index: Python-2.7.12/Include/pythonrun.h
16=================================================================== 18===================================================================
17--- Python-2.7.9.orig/Include/pythonrun.h 19--- Python-2.7.12.orig/Include/pythonrun.h
18+++ Python-2.7.9/Include/pythonrun.h 20+++ Python-2.7.12/Include/pythonrun.h
19@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); 21@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
20 /* In their own files */ 22 /* In their own files */
21 PyAPI_FUNC(const char *) Py_GetVersion(void); 23 PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +26,10 @@ Index: Python-2.7.9/Include/pythonrun.h
24 PyAPI_FUNC(const char *) Py_GetCopyright(void); 26 PyAPI_FUNC(const char *) Py_GetCopyright(void);
25 PyAPI_FUNC(const char *) Py_GetCompiler(void); 27 PyAPI_FUNC(const char *) Py_GetCompiler(void);
26 PyAPI_FUNC(const char *) Py_GetBuildInfo(void); 28 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
27Index: Python-2.7.9/Lib/distutils/command/install.py 29Index: Python-2.7.12/Lib/distutils/command/install.py
28=================================================================== 30===================================================================
29--- Python-2.7.9.orig/Lib/distutils/command/install.py 31--- Python-2.7.12.orig/Lib/distutils/command/install.py
30+++ Python-2.7.9/Lib/distutils/command/install.py 32+++ Python-2.7.12/Lib/distutils/command/install.py
31@@ -22,6 +22,8 @@ from site import USER_BASE 33@@ -22,6 +22,8 @@ from site import USER_BASE
32 from site import USER_SITE 34 from site import USER_SITE
33 35
@@ -46,11 +48,11 @@ Index: Python-2.7.9/Lib/distutils/command/install.py
46 'headers': '$base/include/python$py_version_short/$dist_name', 48 'headers': '$base/include/python$py_version_short/$dist_name',
47 'scripts': '$base/bin', 49 'scripts': '$base/bin',
48 'data' : '$base', 50 'data' : '$base',
49Index: Python-2.7.9/Lib/pydoc.py 51Index: Python-2.7.12/Lib/pydoc.py
50=================================================================== 52===================================================================
51--- Python-2.7.9.orig/Lib/pydoc.py 53--- Python-2.7.12.orig/Lib/pydoc.py
52+++ Python-2.7.9/Lib/pydoc.py 54+++ Python-2.7.12/Lib/pydoc.py
53@@ -383,7 +383,7 @@ class Doc: 55@@ -384,7 +384,7 @@ class Doc:
54 56
55 docloc = os.environ.get("PYTHONDOCS", 57 docloc = os.environ.get("PYTHONDOCS",
56 "http://docs.python.org/library") 58 "http://docs.python.org/library")
@@ -59,10 +61,10 @@ Index: Python-2.7.9/Lib/pydoc.py
59 "python"+sys.version[0:3]) 61 "python"+sys.version[0:3])
60 if (isinstance(object, type(os)) and 62 if (isinstance(object, type(os)) and
61 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', 63 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
62Index: Python-2.7.9/Lib/site.py 64Index: Python-2.7.12/Lib/site.py
63=================================================================== 65===================================================================
64--- Python-2.7.9.orig/Lib/site.py 66--- Python-2.7.12.orig/Lib/site.py
65+++ Python-2.7.9/Lib/site.py 67+++ Python-2.7.12/Lib/site.py
66@@ -288,13 +288,19 @@ def getsitepackages(): 68@@ -288,13 +288,19 @@ def getsitepackages():
67 if sys.platform in ('os2emx', 'riscos'): 69 if sys.platform in ('os2emx', 'riscos'):
68 sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) 70 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -86,10 +88,10 @@ Index: Python-2.7.9/Lib/site.py
86 if sys.platform == "darwin": 88 if sys.platform == "darwin":
87 # for framework builds *only* we add the standard Apple 89 # for framework builds *only* we add the standard Apple
88 # locations. 90 # locations.
89Index: Python-2.7.9/Lib/test/test_dl.py 91Index: Python-2.7.12/Lib/test/test_dl.py
90=================================================================== 92===================================================================
91--- Python-2.7.9.orig/Lib/test/test_dl.py 93--- Python-2.7.12.orig/Lib/test/test_dl.py
92+++ Python-2.7.9/Lib/test/test_dl.py 94+++ Python-2.7.12/Lib/test/test_dl.py
93@@ -4,10 +4,11 @@ 95@@ -4,10 +4,11 @@
94 import unittest 96 import unittest
95 from test.test_support import verbose, import_module 97 from test.test_support import verbose, import_module
@@ -104,10 +106,10 @@ Index: Python-2.7.9/Lib/test/test_dl.py
104 ('/usr/bin/cygwin1.dll', 'getpid'), 106 ('/usr/bin/cygwin1.dll', 'getpid'),
105 ('/usr/lib/libc.dylib', 'getpid'), 107 ('/usr/lib/libc.dylib', 'getpid'),
106 ] 108 ]
107Index: Python-2.7.9/Lib/trace.py 109Index: Python-2.7.12/Lib/trace.py
108=================================================================== 110===================================================================
109--- Python-2.7.9.orig/Lib/trace.py 111--- Python-2.7.12.orig/Lib/trace.py
110+++ Python-2.7.9/Lib/trace.py 112+++ Python-2.7.12/Lib/trace.py
111@@ -754,10 +754,10 @@ def main(argv=None): 113@@ -754,10 +754,10 @@ def main(argv=None):
112 # should I also call expanduser? (after all, could use $HOME) 114 # should I also call expanduser? (after all, could use $HOME)
113 115
@@ -121,11 +123,11 @@ Index: Python-2.7.9/Lib/trace.py
121 "python" + sys.version[:3])) 123 "python" + sys.version[:3]))
122 s = os.path.normpath(s) 124 s = os.path.normpath(s)
123 ignore_dirs.append(s) 125 ignore_dirs.append(s)
124Index: Python-2.7.9/Makefile.pre.in 126Index: Python-2.7.12/Makefile.pre.in
125=================================================================== 127===================================================================
126--- Python-2.7.9.orig/Makefile.pre.in 128--- Python-2.7.12.orig/Makefile.pre.in
127+++ Python-2.7.9/Makefile.pre.in 129+++ Python-2.7.12/Makefile.pre.in
128@@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG 130@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
129 131
130 # Machine-dependent subdirectories 132 # Machine-dependent subdirectories
131 MACHDEP= @MACHDEP@ 133 MACHDEP= @MACHDEP@
@@ -133,7 +135,7 @@ Index: Python-2.7.9/Makefile.pre.in
133 135
134 # Multiarch directory (may be empty) 136 # Multiarch directory (may be empty)
135 MULTIARCH= @MULTIARCH@ 137 MULTIARCH= @MULTIARCH@
136@@ -106,7 +107,7 @@ LIBDIR= @libdir@ 138@@ -111,7 +112,7 @@ LIBDIR= @libdir@
137 MANDIR= @mandir@ 139 MANDIR= @mandir@
138 INCLUDEDIR= @includedir@ 140 INCLUDEDIR= @includedir@
139 CONFINCLUDEDIR= $(exec_prefix)/include 141 CONFINCLUDEDIR= $(exec_prefix)/include
@@ -142,7 +144,7 @@ Index: Python-2.7.9/Makefile.pre.in
142 144
143 # Detailed destination directories 145 # Detailed destination directories
144 BINLIBDEST= $(LIBDIR)/python$(VERSION) 146 BINLIBDEST= $(LIBDIR)/python$(VERSION)
145@@ -597,6 +598,7 @@ Modules/getpath.o: $(srcdir)/Modules/get 147@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
146 -DEXEC_PREFIX='"$(exec_prefix)"' \ 148 -DEXEC_PREFIX='"$(exec_prefix)"' \
147 -DVERSION='"$(VERSION)"' \ 149 -DVERSION='"$(VERSION)"' \
148 -DVPATH='"$(VPATH)"' \ 150 -DVPATH='"$(VPATH)"' \
@@ -150,7 +152,7 @@ Index: Python-2.7.9/Makefile.pre.in
150 -o $@ $(srcdir)/Modules/getpath.c 152 -o $@ $(srcdir)/Modules/getpath.c
151 153
152 Modules/python.o: $(srcdir)/Modules/python.c 154 Modules/python.o: $(srcdir)/Modules/python.c
153@@ -639,7 +641,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) 155@@ -720,7 +722,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
154 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) 156 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
155 157
156 Python/getplatform.o: $(srcdir)/Python/getplatform.c 158 Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -159,25 +161,25 @@ Index: Python-2.7.9/Makefile.pre.in
159 161
160 Python/importdl.o: $(srcdir)/Python/importdl.c 162 Python/importdl.o: $(srcdir)/Python/importdl.c
161 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c 163 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
162Index: Python-2.7.9/Modules/getpath.c 164Index: Python-2.7.12/Modules/getpath.c
163=================================================================== 165===================================================================
164--- Python-2.7.9.orig/Modules/getpath.c 166--- Python-2.7.12.orig/Modules/getpath.c
165+++ Python-2.7.9/Modules/getpath.c 167+++ Python-2.7.12/Modules/getpath.c
166@@ -116,9 +116,11 @@ 168@@ -100,6 +100,13 @@
167 #define EXEC_PREFIX PREFIX 169 #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
168 #endif 170 #endif
169 171
170+#define LIB_PYTHON LIB "/python" VERSION 172+#define LIB_PYTHON LIB "/python" VERSION
171+ 173+
172 #ifndef PYTHONPATH 174+#ifndef PYTHONPATH
173-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
174- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
175+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ 175+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
176+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" 176+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
177 #endif 177+#endif
178 178+
179 #ifndef LANDMARK 179 #ifndef LANDMARK
180@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1]; 180 #define LANDMARK "os.py"
181 #endif
182@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
181 static char exec_prefix[MAXPATHLEN+1]; 183 static char exec_prefix[MAXPATHLEN+1];
182 static char progpath[MAXPATHLEN+1]; 184 static char progpath[MAXPATHLEN+1];
183 static char *module_search_path = NULL; 185 static char *module_search_path = NULL;
@@ -186,10 +188,10 @@ Index: Python-2.7.9/Modules/getpath.c
186 188
187 static void 189 static void
188 reduce(char *dir) 190 reduce(char *dir)
189Index: Python-2.7.9/Python/getplatform.c 191Index: Python-2.7.12/Python/getplatform.c
190=================================================================== 192===================================================================
191--- Python-2.7.9.orig/Python/getplatform.c 193--- Python-2.7.12.orig/Python/getplatform.c
192+++ Python-2.7.9/Python/getplatform.c 194+++ Python-2.7.12/Python/getplatform.c
193@@ -10,3 +10,13 @@ Py_GetPlatform(void) 195@@ -10,3 +10,13 @@ Py_GetPlatform(void)
194 { 196 {
195 return PLATFORM; 197 return PLATFORM;
@@ -204,10 +206,10 @@ Index: Python-2.7.9/Python/getplatform.c
204+{ 206+{
205+ return LIB; 207+ return LIB;
206+} 208+}
207Index: Python-2.7.9/Python/sysmodule.c 209Index: Python-2.7.12/Python/sysmodule.c
208=================================================================== 210===================================================================
209--- Python-2.7.9.orig/Python/sysmodule.c 211--- Python-2.7.12.orig/Python/sysmodule.c
210+++ Python-2.7.9/Python/sysmodule.c 212+++ Python-2.7.12/Python/sysmodule.c
211@@ -1437,6 +1437,8 @@ _PySys_Init(void) 213@@ -1437,6 +1437,8 @@ _PySys_Init(void)
212 PyString_FromString(Py_GetCopyright())); 214 PyString_FromString(Py_GetCopyright()));
213 SET_SYS_FROM_STRING("platform", 215 SET_SYS_FROM_STRING("platform",
@@ -217,11 +219,11 @@ Index: Python-2.7.9/Python/sysmodule.c
217 SET_SYS_FROM_STRING("executable", 219 SET_SYS_FROM_STRING("executable",
218 PyString_FromString(Py_GetProgramFullPath())); 220 PyString_FromString(Py_GetProgramFullPath()));
219 SET_SYS_FROM_STRING("prefix", 221 SET_SYS_FROM_STRING("prefix",
220Index: Python-2.7.9/configure.ac 222Index: Python-2.7.12/configure.ac
221=================================================================== 223===================================================================
222--- Python-2.7.9.orig/configure.ac 224--- Python-2.7.12.orig/configure.ac
223+++ Python-2.7.9/configure.ac 225+++ Python-2.7.12/configure.ac
224@@ -736,6 +736,11 @@ SunOS*) 226@@ -756,6 +756,11 @@ SunOS*)
225 ;; 227 ;;
226 esac 228 esac
227 229
diff --git a/meta/recipes-devtools/python/python-native_2.7.11.bb b/meta/recipes-devtools/python/python-native_2.7.12.bb
index 4c204a4f0f..d41c69e19e 100644
--- a/meta/recipes-devtools/python/python-native_2.7.11.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.12.bb
@@ -17,7 +17,6 @@ SRC_URI += "\
17 file://builddir.patch \ 17 file://builddir.patch \
18 file://parallel-makeinst-create-bindir.patch \ 18 file://parallel-makeinst-create-bindir.patch \
19 file://revert_use_of_sysconfigdata.patch \ 19 file://revert_use_of_sysconfigdata.patch \
20 file://avoid_parallel_make_races_on_pgen.patch \
21 " 20 "
22S = "${WORKDIR}/Python-${PV}" 21S = "${WORKDIR}/Python-${PV}"
23 22
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index f4818c6a87..79a431c7ea 100644
--- a/meta/recipes-devtools/python/python.inc
+++ b/meta/recipes-devtools/python/python.inc
@@ -5,12 +5,12 @@ SECTION = "devel/python"
5# bump this on every change in contrib/python/generate-manifest-2.7.py 5# bump this on every change in contrib/python/generate-manifest-2.7.py
6INC_PR = "r1" 6INC_PR = "r1"
7 7
8LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
9 9
10SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" 10SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
11 11
12SRC_URI[md5sum] = "1dbcc848b4cd8399a8199d000f9f823c" 12SRC_URI[md5sum] = "57dffcee9cee8bb2ab5f82af1d8e9a69"
13SRC_URI[sha256sum] = "962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46" 13SRC_URI[sha256sum] = "d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978"
14 14
15# python recipe is actually python 2.x 15# python recipe is actually python 2.x
16# also, exclude pre-releases for both python 2.x and 3.x 16# also, exclude pre-releases for both python 2.x and 3.x
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>
9Rebased for python-2.7.9 9Rebased for python-2.7.9
10Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 10Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
11 11
12Index: Python-2.7.9/Makefile.pre.in 12Rebased for python-2.7.12
13Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
14Index: 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):
76Index: Python-2.7.9/setup.py 78Index: 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 @@
1From 5be8d3e97b1d2e526548cb346fd5f8980d31616a Mon Sep 17 00:00:00 2001 1From cb25fbd5abc0f4eb07dbb8ea819e9c26bda4fc99 Mon Sep 17 00:00:00 2001
2From: Senthil Kumaran <senthil@uthcode.com> 2From: Senthil Kumaran <senthil@uthcode.com>
3Date: Sat, 30 Jul 2016 05:49:53 -0700 3Date: Sat, 30 Jul 2016 05:49:53 -0700
4Subject: [PATCH] Prevent HTTPoxy attack (CVE-2016-1000110) 4Subject: [PATCH] python: fix CVE-2016-1000110
5MIME-Version: 1.0 5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8 6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit 7Content-Transfer-Encoding: 8bit
8 8
9Prevent HTTPoxy attack (CVE-2016-1000110)
10
9Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which 11Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
10indicates that the script is in CGI mode. 12indicates that the script is in CGI mode.
11 13
12Issue reported and patch contributed by Rémi Rampin. 14Issue reported and patch contributed by Rémi Rampin.
13 15
16Backport patch from https://hg.python.org/cpython/rev/ba915d561667/
17
14Upstream-Status: Backport 18Upstream-Status: Backport
15CVE: CVE-2016-1000110 19CVE: CVE-2016-1000110
20Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
16 21
17Signed-off-by: Armin Kuster <akuster@mvista.com> 22Copied this file from morty since the old one didn't apply to python 2.7.12.
18 23Signed-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
29Index: Python-2.7.11/Doc/howto/urllib2.rst 34diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
30=================================================================== 35index 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 ==================
45Index: Python-2.7.11/Doc/library/urllib.rst 50diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
46=================================================================== 51index 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
66Index: Python-2.7.11/Doc/library/urllib2.rst 71diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
67=================================================================== 72index 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
82Index: Python-2.7.11/Misc/ACKS 87diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
83=================================================================== 88index 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
94Index: 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',
117Index: Python-2.7.11/Lib/urllib.py 110diff --git a/Lib/urllib.py b/Lib/urllib.py
118=================================================================== 111index 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()
143Index: Python-2.7.11/Misc/NEWS 136diff --git a/Misc/ACKS b/Misc/ACKS
144=================================================================== 137index 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
148diff --git a/Misc/NEWS b/Misc/NEWS
149index 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--
1642.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 @@
1Upstream-Status: Pending
2
3Avoids parallel make races linking errors when making Parser/PGEN
4
5- Implements Richard Purdie's idea
6
7Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
8Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
9
10Index: 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 @@
1Rebased for python-2.7.9 1Rebased for python-2.7.9
2Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 2Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
3 3
4Index: Python-2.7.9/configure.ac 4Rebased for python-2.7.12
5Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
6Index: 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)
19Index: Python-2.7.9/Include/pythonrun.h 21Index: 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);
31Index: Python-2.7.9/Lib/distutils/command/install.py 33Index: 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',
53Index: Python-2.7.9/Lib/distutils/sysconfig.py 55Index: 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:
71Index: Python-2.7.9/Lib/pydoc.py 73Index: 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',
84Index: Python-2.7.9/Lib/site.py 86Index: 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.
110Index: Python-2.7.9/Lib/sysconfig.py 112Index: 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}',
142Index: Python-2.7.9/Lib/test/test_dl.py 144Index: 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 ]
160Index: Python-2.7.9/Lib/test/test_site.py 162Index: 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)
184Index: Python-2.7.9/Lib/trace.py 186Index: 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)
201Index: Python-2.7.9/Makefile.pre.in 203Index: 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
239Index: Python-2.7.9/Modules/getpath.c 241Index: 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)
266Index: Python-2.7.9/Python/getplatform.c 268Index: 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+}
284Index: Python-2.7.9/Python/sysmodule.c 286Index: 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",
diff --git a/meta/recipes-devtools/python/python_2.7.11.bb b/meta/recipes-devtools/python/python_2.7.12.bb
index 9697c1bf0b..22b91d4d30 100644
--- a/meta/recipes-devtools/python/python_2.7.11.bb
+++ b/meta/recipes-devtools/python/python_2.7.12.bb
@@ -25,7 +25,6 @@ SRC_URI += "\
25 file://run-ptest \ 25 file://run-ptest \
26 file://parallel-makeinst-create-bindir.patch \ 26 file://parallel-makeinst-create-bindir.patch \
27 file://use_sysroot_ncurses_instead_of_host.patch \ 27 file://use_sysroot_ncurses_instead_of_host.patch \
28 file://avoid_parallel_make_races_on_pgen.patch \
29 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ 28 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
30 file://CVE-2016-1000110.patch \ 29 file://CVE-2016-1000110.patch \
31" 30"
@@ -81,7 +80,6 @@ do_compile() {
81 STAGING_LIBDIR=${STAGING_LIBDIR} \ 80 STAGING_LIBDIR=${STAGING_LIBDIR} \
82 STAGING_INCDIR=${STAGING_INCDIR} \ 81 STAGING_INCDIR=${STAGING_INCDIR} \
83 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ 82 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
84 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
85 OPT="${CFLAGS}" 83 OPT="${CFLAGS}"
86} 84}
87 85
@@ -101,7 +99,6 @@ do_install() {
101 STAGING_LIBDIR=${STAGING_LIBDIR} \ 99 STAGING_LIBDIR=${STAGING_LIBDIR} \
102 STAGING_INCDIR=${STAGING_INCDIR} \ 100 STAGING_INCDIR=${STAGING_INCDIR} \
103 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ 101 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
104 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
105 DESTDIR=${D} LIBDIR=${libdir} 102 DESTDIR=${D} LIBDIR=${libdir}
106 103
107 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ 104 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
@@ -110,7 +107,6 @@ do_install() {
110 STAGING_LIBDIR=${STAGING_LIBDIR} \ 107 STAGING_LIBDIR=${STAGING_LIBDIR} \
111 STAGING_INCDIR=${STAGING_INCDIR} \ 108 STAGING_INCDIR=${STAGING_INCDIR} \
112 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ 109 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
113 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
114 DESTDIR=${D} LIBDIR=${libdir} install 110 DESTDIR=${D} LIBDIR=${libdir} install
115 111
116 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile 112 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile