summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorDerek Straka <derek@asterius.io>2018-01-26 14:25:31 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-29 08:49:50 +0000
commit7ef064e80ccd6f7cf8df58e836d244e910c99270 (patch)
tree29fa1614c7e792ee7e3a06ca37f0bcef88fec9d5 /meta/recipes-devtools
parentcb61f997c06213c8fc69491b2e456a6d0b61ce26 (diff)
downloadpoky-7ef064e80ccd6f7cf8df58e836d244e910c99270.tar.gz
python: Upgrade both python and python-native to 2.7.14
Rebased: - python/01-use-proper-tools-for-cross-build.patch - python/fix-makefile-for-ptest.patch - python/parallel-makeinst-create-bindir.patch Removed Upstreamed Patch: - python/Don-t-use-getentropy-on-Linux.patch Updated license checksum for changes in the copyright date. The license terms remain unchanged Added an extra do_compile item to create the native pgen that no longer gets compiled by default (From OE-Core rev: 9f2de4f9cf1eb6de75dc789bd0549f45c7a68c55) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-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 2b74003c79..622cb38881 100644
--- a/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -36,6 +36,12 @@ do_configure_append() {
36 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi 36 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
37} 37}
38 38
39# Regenerate all of the generated files
40# This ensures that pgen and friends get created during the compile phase
41do_compile_prepend() {
42 oe_runmake regen-all
43}
44
39do_install() { 45do_install() {
40 oe_runmake 'DESTDIR=${D}' install 46 oe_runmake 'DESTDIR=${D}' install
41 install -d ${D}${bindir}/${PN} 47 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 337c7447bb..7d03bc8a64 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.14.bb
@@ -28,7 +28,6 @@ SRC_URI += "\
28 file://parallel-makeinst-create-bindir.patch \ 28 file://parallel-makeinst-create-bindir.patch \
29 file://use_sysroot_ncurses_instead_of_host.patch \ 29 file://use_sysroot_ncurses_instead_of_host.patch \
30 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ 30 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
31 file://Don-t-use-getentropy-on-Linux.patch \
32 file://pass-missing-libraries-to-Extension-for-mul.patch \ 31 file://pass-missing-libraries-to-Extension-for-mul.patch \
33 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ 32 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
34" 33"