summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.14.bb (renamed from meta/recipes-devtools/python/python-native_2.7.13.bb)6
-rw-r--r--meta/recipes-devtools/python/python.inc6
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch17
-rw-r--r--meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch41
-rw-r--r--meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch6
-rw-r--r--meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch12
-rw-r--r--meta/recipes-devtools/python/python_2.7.14.bb (renamed from meta/recipes-devtools/python/python_2.7.13.bb)1
7 files changed, 28 insertions, 61 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb b/meta/recipes-devtools/python/python-native_2.7.14.bb
index 7edf153489..8fe4bcac16 100644
--- a/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -39,6 +39,12 @@ do_configure_append() {
39 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi 39 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
40} 40}
41 41
42# Regenerate all of the generated files
43# This ensures that pgen and friends get created during the compile phase
44do_compile_prepend() {
45 oe_runmake regen-all
46}
47
42do_install() { 48do_install() {
43 oe_runmake 'DESTDIR=${D}' install 49 oe_runmake 'DESTDIR=${D}' install
44 install -d ${D}${bindir}/${PN} 50 install -d ${D}${bindir}/${PN}
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index b40f551ab3..979b601bf1 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=6b60258130e4ed10d3101517eb5b9385" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"
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] = "53b43534153bb2a0363f08bae8b9d990" 12SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b"
13SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731" 13SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66"
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 366ce3e400..e795a74b91 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,6 +9,9 @@ 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
12Rebased for python-2.7.14
13Signed-off-by: Derek Straka <derek@asterius.io>
14
12Index: Python-2.7.13/Makefile.pre.in 15Index: Python-2.7.13/Makefile.pre.in
13=================================================================== 16===================================================================
14--- Python-2.7.13.orig/Makefile.pre.in 17--- Python-2.7.13.orig/Makefile.pre.in
@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in
30 33
31 # Create build directory and generate the sysconfig build-time data there. 34 # 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 35 # pybuilddir.txt contains the name of the build dir and is used for
33@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p 36@@ -663,7 +663,7 @@
34 37 # Regenerate Include/graminit.h and Python/graminit.c
35 $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) 38 # from Grammar/Grammar using pgen
36 @$(MKDIR_P) Include 39 @$(MKDIR_P) Include
37- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) 40- $(PGEN) $(srcdir)/Grammar/Grammar \
38+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) 41+ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
39 $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) 42 $(srcdir)/Include/graminit.h \
40 touch $(GRAMMAR_C) 43 $(srcdir)/Python/graminit.c
41 44
42@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL 45@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
43 $(DESTDIR)$(LIBDEST)/distutils/tests ; \ 46 $(DESTDIR)$(LIBDEST)/distutils/tests ; \
diff --git a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch b/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
deleted file mode 100644
index 38e53778dc..0000000000
--- a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1Upstream-Status: Backport
2
3Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
4
5From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001
6From: Victor Stinner <victor.stinner@gmail.com>
7Date: Mon, 9 Jan 2017 11:10:41 +0100
8Subject: [PATCH] Don't use getentropy() on Linux
9
10Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
11read from /dev/urandom to get random bytes, for example in os.urandom(). On
12Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
13os.urandom() should not block.
14
15(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227)
16---
17 Python/random.c | 11 +++++++++--
18 1 file changed, 9 insertions(+), 2 deletions(-)
19
20diff --git a/Python/random.c b/Python/random.c
21index b4bc1f3..f3f5d14 100644
22--- a/Python/random.c
23+++ b/Python/random.c
24@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
25 }
26
27 /* Issue #25003: Don't use getentropy() on Solaris (available since
28- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
29-#elif defined(HAVE_GETENTROPY) && !defined(sun)
30+ Solaris 11.3), it is blocking whereas os.urandom() should not block.
31+
32+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
33+ implements it with the getrandom() syscall which can fail with ENOSYS,
34+ and this error is not supported in py_getentropy() and getrandom() is called
35+ with flags=0 which blocks until system urandom is initialized, which is not
36+ the desired behaviour to seed the Python hash secret nor for os.urandom():
37+ see the PEP 524 which was only implemented in Python 3.6. */
38+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
39 #define PY_GETENTROPY 1
40
41 /* Fill buffer with size pseudo-random bytes generated by getentropy().
diff --git a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
index 669112dab0..90dcd57c04 100644
--- a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in
15+TESTOPTS= -l -v $(EXTRATESTOPTS) 15+TESTOPTS= -l -v $(EXTRATESTOPTS)
16 TESTPROG= $(srcdir)/Lib/test/regrtest.py 16 TESTPROG= $(srcdir)/Lib/test/regrtest.py
17-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) 17-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
18-test: all platform 18-test: @DEF_MAKE_RULE@ platform
19- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f 19- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
20+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) 20+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
21+test: build-test 21+test: build-test
@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in
26 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) 26 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
27 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) 27 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
28 28
29+build-test: all platform 29+build-test: @DEF_MAKE_RULE@ platform
30+ 30+
31 testall: all platform 31 testall: @DEF_MAKE_RULE@ platform
32 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f 32 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
33 $(TESTPYTHON) $(srcdir)/Lib/compileall.py 33 $(TESTPYTHON) $(srcdir)/Lib/compileall.py
diff --git a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
index 951cb466ff..abab41e957 100644
--- a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
@@ -8,12 +8,12 @@ Upstream-Status: Pending
8 8
9--- Python-2.7.3.orig/Makefile.pre.in 9--- Python-2.7.3.orig/Makefile.pre.in
10+++ Python-2.7.3/Makefile.pre.in 10+++ Python-2.7.3/Makefile.pre.in
11@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config 11@@ -1187,7 +1187,7 @@
12 LIBPC= $(LIBDIR)/pkgconfig 12 LIBPC= $(LIBDIR)/pkgconfig
13 13
14 libainstall: all python-config 14 libainstall: @DEF_MAKE_RULE@ python-config
15- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ 15- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
16+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ 16+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
17 do \ 17 do \
18 if test ! -d $(DESTDIR)$$i; then \ 18 if test ! -d $(DESTDIR)$$i; then \
19 echo "Creating directory $$i"; \ 19 echo "Creating directory $$i"; \
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.14.bb
index 754c029097..e814ff74f7 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.14.bb
@@ -26,7 +26,6 @@ SRC_URI += "\
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://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ 28 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
29 file://Don-t-use-getentropy-on-Linux.patch \
30 file://pass-missing-libraries-to-Extension-for-mul.patch \ 29 file://pass-missing-libraries-to-Extension-for-mul.patch \
31 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ 30 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
32" 31"