summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python')
-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
4 files changed, 19 insertions, 57 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 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"; \