python: Upgrade both python and python-native to 2.7.14
PATCH 1/1 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
---
...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++
meta/recipes-devtools/python/python.inc | 6 ++--
.../01-use-proper-tools-for-cross-build.patch | 17 +++++----
.../python/Don-t-use-getentropy-on-Linux.patch | 41 ----------------------
.../python/python/fix-makefile-for-ptest.patch | 6 ++--
.../python/parallel-makeinst-create-bindir.patch | 12 +++----
.../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 -
7 files changed, 28 insertions(+), 61 deletions(-)
rename meta/recipes-devtools/python/{python-native_2.7.13.bb => python-native_2.7.14.bb} (94%)
delete mode 100644 meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
rename meta/recipes-devtools/python/{python_2.7.13.bb => python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +6 -0
@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi } +# Regenerate all of the generated files +# This ensures that pgen and friends get created during the compile phase +do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}
meta/recipes-devtools/python/python.inc +3 -3
@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manifest-2.7.py INC_PR = "r1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" -SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990" -SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731" +SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66" # python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.x
meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +10 -7
@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]> Rebased for python-2.7.9 Signed-off-by: Alejandro Hernandez <[email protected]> +Rebased for python-2.7.14 +Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in
@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-time data there. # pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p - - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL $(DESTDIR)$(LIBDEST)/distutils/tests ; \
meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch deleted +0 -41
41 lines not on this page · raw message
meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +3 -3
@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) +test: build-test
@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) $(srcdir)/Lib/compileall.py
meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +6 -6
@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \
meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0 -1
@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "
Signature · 1 line
2.7.4
Hey Derek,
Just a quick question, did you run the create manifest task along with the upgrade?
Cheers,
Alejandro
Quoted 213 lines · Derek Straka
Rebased:
-python/01-use-proper-tools-for-cross-build.patch
-python/fix-makefile-for-ptest.patch
-python/parallel-makeinst-create-bindir.patchRemoved Upstreamed Patch:
-python/Don-t-use-getentropy-on-Linux.patchUpdated license checksum for changes in the copyright date. The license terms remain unchanged
Added an extra
do_compileitem to create the native pgen that no longer gets compiled by defaultSigned-off-by Derek Straka <[email protected]>--- ...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-)rename meta/recipes-devtools/python/{python-native_2.7.13.bb => python-native_2.7.14.bb} (94%) delete mode 100644
meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patchrename meta/recipes-devtools/python/{python_2.7.13.bb => python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +6
-0@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi } +# Regenerate all of the generated files +# This ensures that pgen and friends get created during the compile phase +do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}meta/recipes-devtools/python/python.inc +3
-3@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manifest-2.7.py INC_PR = "r1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" -SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990" -SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731" +SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66" # python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.xmeta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +10
-7@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]> Rebased for python-2.7.9 Signed-off-by: Alejandro Hernandez <[email protected]> +Rebased for python-2.7.14 +Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-time data there. # pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p - - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL $(DESTDIR)$(LIBDEST)/distutils/tests ; \meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch deleted +0
-41@@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected]> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <[email protected]> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but -read from /dev/urandom to get random bytes, for example in os.urandom(). On -Linux, getentropy() is implemented which getrandom() is blocking mode, whereas -os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) - } - - /* Issue #25003: Don't use getentropy() on Solaris (available since -- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */ --#elif defined(HAVE_GETENTROPY) && !defined(sun) -+ Solaris 11.3), it is blocking whereas os.urandom() should not block. -+ -+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24 -+ implements it with the getrandom() syscall which can fail with ENOSYS, -+ and this error is not supported in py_getentropy() and getrandom() is called -+ with flags=0 which blocks until system urandom is initialized, which is not -+ the desired behaviour to seed the Python hash secret nor for os.urandom(): -+ see the PEP 524 which was only implemented in Python 3.6. */ -+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux) - #define PY_GETENTROPY 1 - - /* Fill buffer with size pseudo-random bytes generated by getentropy().meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +3
-3@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) +test: build-test@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) $(srcdir)/Lib/compileall.pymeta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +6
-6@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0
-1@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "
Oh no, I did not. I will send a v2 with an updated manifest. Thanks for catching that.
-Derek
Quoted 259 lines · Alejandro Enedino Hernandez Samaniego
Hey Derek,
Just a quick question, did you run the create manifest task along with the upgrade?
Cheers,
Alejandro
Quoted 242 lines · Derek Straka
Rebased:
-python/01-use-proper-tools-for-cross-build.patch
-python/fix-makefile-for-ptest.patch
-python/parallel-makeinst-create-bindir.patchRemoved Upstreamed Patch:
-python/Don-t-use-getentropy-on-Linux.patchUpdated license checksum for changes in the copyright date. The license terms remain unchanged
Added an extra
do_compileitem to create the native pgen that no longer gets compiled by defaultSigned-off-by Derek Straka <[email protected]>--- ...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-)rename meta/recipes-devtools/python/{python-native_2.7.13.bb =>
python-native_2.7.14.bb} (94%)
delete mode 100644 meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
rename meta/recipes-devtools/python/{python_2.7.13.bb =>
python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +0
-0@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint../Python-${PV}/Modules/_ctypes/libffi
}
+# Regenerate all of the generated filesmeta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +5
-0+# This ensures that pgen and friends get created during the compile phase +do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}meta/recipes-devtools/python/python.inc +0
-0@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manifest-2.7.py INC_PR = "r1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130
e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"meta/recipes-devtools/python/python.inc +2
-0+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457
b9c912ac216576e6bd9e7d204ed03296a66"# python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.xmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0for-cross-build.patch
index 366ce3e..e795a74 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.patchmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]>
Rebased for python-2.7.9Signed-off-by Alejandro Hernandez <[email protected]Quoted 1 line
+Rebased for python-2.7.14
meta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +2
-0+Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-time datathere.
# pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +7
-6- - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all$(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch deleted +0
-1--- a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
+++/dev/nullmeta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch deleted +0
-10@@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected]> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <[email protected]> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy()function but
-read from/dev/urandomto get random bytes, for example inos.urandom(). On
-Linux,getentropy()is implemented whichgetrandom()is blocking mode, whereasmeta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch deleted +0
-12-os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size,int raise)
- }
-
- /* Issue #25003: Don't usegetentropy()on Solaris (available since -- * Solaris 11.3), it is blocking whereasos.urandom()should not block. */
--#elifdefined(HAVE_GETENTROPY)&& !defined(sun)
-+ Solaris 11.3), it is blocking whereasos.urandom()should not block.
-+
-+ Issue #29188: Don't usegetentropy()on Linux since the glibc 2.24
-+ implements it with thegetrandom()syscall which can fail with
ENOSYS,
-+ and this error is not supported inpy_getentropy()andgetrandom()
is called
-+ with flags=0 which blocks until system urandom is initialized, which
is not
-+ the desired behaviour to seed the Python hash secret nor foros.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elifdefined(HAVE_GETENTROPY)&& !defined(sun) && !defined(linux)
- #definePY_GETENTROPY1meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch deleted +0
-2- - /* Fill buffer with size pseudo-random bytes generated by getentropy().meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +1
-1@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt$(TESTPYTHONOPTS)
+test: build-testmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +2
-1@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) $(srcdir)/Lib/compileall.pymeta/recipes-devtools/python/python/parallel-makeinst- renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +0
-0create-bindir.patch
index 951cb46..abab41e 100644
--- a/meta/recipes-devtools/python/python/parallel-makeinst- create-bindir.patch
+++ b/meta/recipes-devtools/python/python/parallel-makeinst- create-bindir.patchmeta/recipes-devtools/python/python/parallel-makeinst- renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +6
-6@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0
-1@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "
It looks like the .so files (specifically gdbm and bsddb) are getting dropped from the manifest when I run the create manifest task. I'll have to take a look at why those aren't getting pulled into the dependency list.
Quoted 271 lines · Derek Straka
Oh no, I did not. I will send a v2 with an updated manifest. Thanks for catching that.
-Derek
Quoted 262 lines · Alejandro Enedino Hernandez Samaniego
Hey Derek,
Just a quick question, did you run the create manifest task along with the upgrade?
Cheers,
Alejandro
Quoted 245 lines · Derek Straka
Rebased:
-python/01-use-proper-tools-for-cross-build.patch
-python/fix-makefile-for-ptest.patch
-python/parallel-makeinst-create-bindir.patchRemoved Upstreamed Patch:
-python/Don-t-use-getentropy-on-Linux.patchUpdated license checksum for changes in the copyright date. The license terms remain unchanged
Added an extra
do_compileitem to create the native pgen that no longer gets compiled by defaultSigned-off-by Derek Straka <[email protected]>--- ...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-)rename meta/recipes-devtools/python/{python-native_2.7.13.bb =>
python-native_2.7.14.bb} (94%)
delete mode 100644 meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
rename meta/recipes-devtools/python/{python_2.7.13.bb =>
python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +0
-0@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint../Python-${PV}/Modules/_ctypes/libffi
}
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phasemeta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +4
-0+do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}meta/recipes-devtools/python/python.inc +0
-0@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manifest-2.7.py INC_PR = "r1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130
e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"
SRC_URI= "http://www.python.org/ftp/pyt
hon/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"meta/recipes-devtools/python/python.inc +2
-0+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457
b9c912ac216576e6bd9e7d204ed03296a66"# python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.xmeta/recipes-devtools/python/python/01-use-proper-tools-fo renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0r-cross-build.patch
index 366ce3e..e795a74 100644
--- a/meta/recipes-devtools/python/python/01-use-proper-tools-fo r-cross-build.patch
+++ b/meta/recipes-devtools/python/python/01-use-proper-tools-fo r-cross-build.patchmeta/recipes-devtools/python/python/01-use-proper-tools-fo renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]>
Rebased for python-2.7.9Signed-off-by Alejandro Hernandez <[email protected]el.com>
+Rebased for python-2.7.14meta/recipes-devtools/python/python/01-use-proper-tools-fo renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +2
-0+Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-timedata there.
# pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pmeta/recipes-devtools/python/python/01-use-proper-tools-fo renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +7
-6- - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all$(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \meta/recipes-devtools/python/python/Don-t-use-getentropy-o renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-0n-Linux.patch
deleted file mode 100644
index 38e5377..0000000
--- a/meta/recipes-devtools/python/python/Don-t-use-getentropy-o n-Linux.patch
+++/dev/nullmeta/recipes-devtools/python/python/Don-t-use-getentropy-o renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-10@@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected]> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <[email protected]> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy()function but
-read from/dev/urandomto get random bytes, for example inos.urandom(). On
-Linux,getentropy()is implemented whichgetrandom()is blocking mode, whereasmeta/recipes-devtools/python/python/Don-t-use-getentropy-o renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-12-os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_tsize, int raise)
- }
-
- /* Issue #25003: Don't usegetentropy()on Solaris (available since -- * Solaris 11.3), it is blocking whereasos.urandom()should not block. */
--#elifdefined(HAVE_GETENTROPY)&& !defined(sun)
-+ Solaris 11.3), it is blocking whereasos.urandom()should not block.
-+
-+ Issue #29188: Don't usegetentropy()on Linux since the glibc 2.24
-+ implements it with thegetrandom()syscall which can fail with
ENOSYS,
-+ and this error is not supported inpy_getentropy()andgetrandom()
is called
-+ with flags=0 which blocks until system urandom is initialized,
which is not
-+ the desired behaviour to seed the Python hash secret nor foros.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elifdefined(HAVE_GETENTROPY)&& !defined(sun) && !defined(linux)
- #definePY_GETENTROPY1meta/recipes-devtools/python/python/Don-t-use-getentropy-o renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-2- - /* Fill buffer with size pseudo-random bytes generated by getentropy().meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +1
-1@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt$(TESTPYTHONOPTS)
+test: build-testmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +2
-1@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) $(srcdir)/Lib/compileall.pymeta/recipes-devtools/python/python/parallel-makeinst-crea renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +0
-0te-bindir.patch
index 951cb46..abab41e 100644
--- a/meta/recipes-devtools/python/python/parallel-makeinst-crea te-bindir.patch
+++ b/meta/recipes-devtools/python/python/parallel-makeinst-crea te-bindir.patchmeta/recipes-devtools/python/python/parallel-makeinst-crea renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +6
-6@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0
-1@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "
Quoted 4 lines · Derek Straka
It looks like the .so files (specifically gdbm and bsddb) are getting dropped from the manifest when I run the create manifest task. I'll have to take a look at why those aren't getting pulled into the dependency list.
Are you on Fedora-27 by any chance? It broke for me. Worked on Fedora-26.
Quoted 286 lines · Derek Straka
Quoted 278 lines
Oh no, I did not. I will send a v2 with an updated manifest. Thanks for catching that.
-Derek
Quoted 268 lines · Alejandro Enedino Hernandez Samaniego
Hey Derek,
Just a quick question, did you run the create manifest task along with the upgrade?
Cheers,
Alejandro
Quoted 251 lines · Derek Straka
Rebased:
-python/01-use-proper-tools-for-cross-build.patch
-python/fix-makefile-for-ptest.patch
-python/parallel-makeinst-create-bindir.patchRemoved Upstreamed Patch:
-python/Don-t-use-getentropy-on-Linux.patchUpdated license checksum for changes in the copyright date. The license terms remain unchanged
Added an extra
do_compileitem to create the native pgen that no longer gets compiled by defaultSigned-off-by Derek Straka <[email protected]>--- ...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-)rename meta/recipes-devtools/python/{python-native_2.7.13.bb =>
python-native_2.7.14.bb} (94%)
delete mode 100644meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
rename meta/recipes-devtools/python/{python_2.7.13.bb =>
python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +0
-0@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint../Python-${PV}/Modules/_ctypes/libffi
}
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phasemeta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +4
-0+do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}meta/recipes-devtools/python/python.inc +0
-0@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/
generate-manifest-2.7.py
INC_PR= "r1"
-LIC_FILES_CHKSUM =
"file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"meta/recipes-devtools/python/python.inc +2
-0+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] ="
71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66"# python recipe is actually python 2.x # 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 366ce3e..e795a74 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.patchmeta/recipes-devtools/python/python.inc +0
-0@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]>
Rebased for python-2.7.9
Signed-off-by: Alejandro Hernandez <
[email protected]>
+Rebased for python-2.7.14meta/recipes-devtools/python/python.inc +2
-0+Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-timedata there.
# pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pmeta/recipes-devtools/python/python.inc +7
-6- - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all$(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \diff --git
a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patchb/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patchdeleted file mode 100644
index 38e5377..0000000
---a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch+++/dev/nullmeta/recipes-devtools/python/python.inc +0
-10@@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected]> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <[email protected]> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy()function but
-read from/dev/urandomto get random bytes, for example inos.urandom(). On
-Linux,getentropy()is implemented whichgetrandom()is blocking mode, whereasmeta/recipes-devtools/python/python.inc +0
-12-os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_tsize, int raise)
- }
-
- /* Issue #25003: Don't usegetentropy()on Solaris (available since -- * Solaris 11.3), it is blocking whereasos.urandom()should not block. */
--#elifdefined(HAVE_GETENTROPY)&& !defined(sun)
-+ Solaris 11.3), it is blocking whereasos.urandom()should not
block.
-+
-+ Issue #29188: Don't usegetentropy()on Linux since the glibc 2.24
-+ implements it with thegetrandom()syscall which can fail with
ENOSYS,
-+ and this error is not supported inpy_getentropy()andgetrandom()
is called
-+ with flags=0 which blocks until system urandom is initialized,
which is not
-+ the desired behaviour to seed the Python hash secret nor foros.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elifdefined(HAVE_GETENTROPY)&& !defined(sun) && !defined(linux)
- #definePY_GETENTROPY1
-
- /* Fill buffer with size pseudo-random bytes generated bygetentropy().
diff --gita/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patchb/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patchindex 669112d..90dcd57 100644meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +1
-2@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt$(TESTPYTHONOPTS)
+test: build-testmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +2
-2@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) $(srcdir)/Lib/compileall.pydiff --git
a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patchb/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patchindex 951cb46..abab41e 100644
---a/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++b/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patchmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +6
-6@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0
-1@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Nope. I'm using Ubuntu 16.04.
Quoted 298 lines · Tim Orling
Quoted 4 lines · Derek Straka
It looks like the .so files (specifically gdbm and bsddb) are getting dropped from the manifest when I run the create manifest task. I'll have to take a look at why those aren't getting pulled into the dependency list.
Are you on Fedora-27 by any chance? It broke for me. Worked on Fedora-26.
Quoted 287 lines · Derek Straka
Quoted 279 lines
Oh no, I did not. I will send a v2 with an updated manifest. Thanks for catching that.
-Derek
Quoted 269 lines · Alejandro Enedino Hernandez Samaniego
Hey Derek,
Just a quick question, did you run the create manifest task along with the upgrade?
Cheers,
Alejandro
Quoted 252 lines · Derek Straka
Rebased:
-python/01-use-proper-tools-for-cross-build.patch
-python/fix-makefile-for-ptest.patch
-python/parallel-makeinst-create-bindir.patchRemoved Upstreamed Patch:
-python/Don-t-use-getentropy-on-Linux.patchUpdated license checksum for changes in the copyright date. The license
terms remain unchangedAdded an extra
do_compileitem to create the native pgen that no longer gets compiled by defaultSigned-off-by Derek Straka <[email protected]>--- ...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-)rename meta/recipes-devtools/python/{python-native_2.7.13.bb =>
python-native_2.7.14.bb} (94%)
delete mode 100644 meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
rename meta/recipes-devtools/python/{python_2.7.13.bb =>
python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +0
-0@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint../Python-${PV}/Modules/_ctypes/libffi
}
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phasemeta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +4
-0+do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}meta/recipes-devtools/python/python.inc +0
-0@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-
manifest-2.7.py
INC_PR= "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa6 9d"SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"meta/recipes-devtools/python/python.inc +2
-0+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b
9c912ac216576e6bd9e7d204ed03296a66"# python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.xmeta/recipes-devtools/python/python/01-use-proper- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0tools-for-cross-build.patch
index 366ce3e..e795a74 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.patchmeta/recipes-devtools/python/python/01-use-proper- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]>
Rebased for python-2.7.9Signed-off-by Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Rebased for python-2.7.14meta/recipes-devtools/python/python/01-use-proper- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +2
-0+Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-timedata there.
# pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pmeta/recipes-devtools/python/python/01-use-proper- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +7
-6- - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all$(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \meta/recipes-devtools/python/python/Don-t-use- renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-0getentropy-on-Linux.patch
deleted file mode 100644
index 38e5377..0000000
--- a/meta/recipes-devtools/python/python/Don-t-use- getentropy-on-Linux.patch
+++/dev/nullmeta/recipes-devtools/python/python/Don-t-use- renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-5@@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected]> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:002001
meta/recipes-devtools/python/python/Don-t-use- renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-5-From: Victor Stinner <[email protected]> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy()function but
-read from/dev/urandomto get random bytes, for example inos.urandom(). On
-Linux,getentropy()is implemented whichgetrandom()is blocking mode, whereasmeta/recipes-devtools/python/python/Don-t-use- renamed from meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +0
-12-os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_tsize, int raise)
- }
-
- /* Issue #25003: Don't usegetentropy()on Solaris (available since -- * Solaris 11.3), it is blocking whereasos.urandom()should not block. */
--#elifdefined(HAVE_GETENTROPY)&& !defined(sun)
-+ Solaris 11.3), it is blocking whereasos.urandom()should not
block.
-+
-+ Issue #29188: Don't usegetentropy()on Linux since the glibc 2.24
-+ implements it with thegetrandom()syscall which can fail with
ENOSYS,
-+ and this error is not supported inpy_getentropy()andgetrandom()is called
-+ with flags=0 which blocks until system urandom is initialized,
which is not
-+ the desired behaviour to seed the Python hash secret nor foros.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elifdefined(HAVE_GETENTROPY)&& !defined(sun) && !defined(linux)
- #definePY_GETENTROPY1
-
- /* Fill buffer with size pseudo-random bytes generated bygetentropy().meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +1
-2@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt$(TESTPYTHONOPTS)
+test: build-testmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +2
-2@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(TESTPYTHON) $(srcdir)/Lib/compileall.pymeta/recipes-devtools/python/python/parallel- renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +0
-0makeinst-create-bindir.patch
index 951cb46..abab41e 100644
--- a/meta/recipes-devtools/python/python/parallel- makeinst-create-bindir.patch
+++ b/meta/recipes-devtools/python/python/parallel- makeinst-create-bindir.patchmeta/recipes-devtools/python/python/parallel- renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +6
-6@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0
-1@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hey Derek,
Likely caused by an incomplete python-native build:
I did a quick build for python-native (2.7.14) and looking at do_compile I get:
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _tkinter bsddb185 dbm dl imageop
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
gdbm
So whats happening is that python-native does not contain those files, and the script to create the manifest runs against python-native, hence why its dropping the files (it assumes they were dropped from the python release).
So we just need to make sure we have a complete python-native build and the script should run fine, the same goes for python3.
In gdbm's case, we had the same error for python3 and it was fixed here:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2afde7e7bd866c4d3d059229c3c2201b7096e5e6
Cheers,
Alejandro
Quoted 392 lines · Derek Straka
Nope. I'm using Ubuntu 16.04.
On Mon, Jan 29, 2018 at 3:17 PM, Tim Orling <[email protected] <mailto:[email protected]>> wrote:
On Mon, Jan 29, 2018 at 12:02 PM Derek Straka <[email protected] <mailto:[email protected]>> wrote: It looks like the .so files (specifically gdbm and bsddb) are getting dropped from the manifest when I run the create manifest task. I'll have to take a look at why those aren't getting pulled into the dependency list. Are you on Fedora-27 by any chance? It broke for me. Worked on Fedora-26. On Mon, Jan 29, 2018 at 2:49 PM, Derek Straka <[email protected] <mailto:[email protected]>> wrote: Oh no, I did not. I will send a v2 with an updated manifest. Thanks for catching that. -Derek On Mon, Jan 29, 2018 at 2:23 PM, Alejandro Enedino Hernandez Samaniego <[email protected] <mailto:[email protected]>> wrote: Hey Derek, Just a quick question, did you run the create manifest task along with the upgrade? Cheers, Alejandro On 01/26/2018 11:25 AM, Derek Straka wrote: 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 Signed-off-by: Derek Straka <[email protected] <mailto:[email protected]>> --- ...on-native_2.7.13.bb <http://on-native_2.7.13.bb> => python-native_2.7.14.bb <http://python-native_2.7.14.bb>} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb <http://python_2.7.13.bb> => python_2.7.14.bb <http://python_2.7.14.bb>} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-) rename meta/recipes-devtools/python/{python-native_2.7.13.bb <http://python-native_2.7.13.bb> => python-native_2.7.14.bb <http://python-native_2.7.14.bb>} (94%) delete mode 100644 meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch rename meta/recipes-devtools/python/{python_2.7.13.bb <http://python_2.7.13.bb> => python_2.7.14.bb <http://python_2.7.14.bb>} (99%) diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb <http://python-native_2.7.13.bb> b/meta/recipes-devtools/python/python-native_2.7.14.bb <http://python-native_2.7.14.bb> similarity index 94% rename from meta/recipes-devtools/python/python-native_2.7.13.bb <http://python-native_2.7.13.bb> rename to meta/recipes-devtools/python/python-native_2.7.14.bb <http://python-native_2.7.14.bb> index 2b74003..622cb38 100644 --- a/meta/recipes-devtools/python/python-native_2.7.13.bb <http://python-native_2.7.13.bb> +++ b/meta/recipes-devtools/python/python-native_2.7.14.bb <http://python-native_2.7.14.bb> @@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi } +# Regenerate all of the generated files +# This ensures that pgen and friends get created during the compile phase +do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN} diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc index b40f551..979b601 100644 --- a/meta/recipes-devtools/python/python.inc +++ b/meta/recipes-devtools/python/python.inc @@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manifest-2.7.py <http://generate-manifest-2.7.py> INC_PR = "r1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz <http://www.python.org/ftp/python/$%7BPV%7D/Python-$%7BPV%7D.tar.xz>" -SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990" -SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731" +SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66" # python recipe is actually python 2.x # 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 366ce3e..e795a74 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 <[email protected] <mailto:[email protected]>> Rebased for python-2.7.9 Signed-off-by: Alejandro Hernandez <[email protected] <mailto:[email protected]>> +Rebased for python-2.7.14 +Signed-off-by: Derek Straka <[email protected] <mailto:[email protected]>> + Index: Python-2.7.13/Makefile.pre.in <http://Makefile.pre.in> =================================================================== --- Python-2.7.13.orig/Makefile.pre.in <http://Makefile.pre.in> @@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in <http://Makefile.pre.in> # Create build directory and generate the sysconfig build-time data there. # pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p - - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL $(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 38e5377..0000000 --- a/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch +++ /dev/null @@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected] <mailto:[email protected]>> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <[email protected] <mailto:[email protected]>> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but -read from /dev/urandom to get random bytes, for example in os.urandom(). On -Linux, getentropy() is implemented which getrandom() is blocking mode, whereas -os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) - } - - /* Issue #25003: Don't use getentropy() on Solaris (available since -- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */ --#elif defined(HAVE_GETENTROPY) && !defined(sun) -+ Solaris 11.3), it is blocking whereas os.urandom() should not block. -+ -+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24 -+ implements it with the getrandom() syscall which can fail with ENOSYS, -+ and this error is not supported in py_getentropy() and getrandom() is called -+ with flags=0 which blocks until system urandom is initialized, which is not -+ the desired behaviour to seed the Python hash secret nor for os.urandom(): -+ see the PEP 524 which was only implemented in Python 3.6. */ -+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux) - #define PY_GETENTROPY 1 - - /* 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 669112d..90dcd57 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 <http://Makefile.pre.in> b/Makefile.pre.in <http://Makefile.pre.in> +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) +test: build-test @@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in <http://Makefile.pre.in> b/Makefile.pre.in <http://Makefile.pre.in> -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f $(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 951cb46..abab41e 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 --- Python-2.7.3.orig/Makefile.pre.in <http://Makefile.pre.in> +++ Python-2.7.3/Makefile.pre.in <http://Makefile.pre.in> -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \ diff --git a/meta/recipes-devtools/python/python_2.7.13.bb <http://python_2.7.13.bb> b/meta/recipes-devtools/python/python_2.7.14.bb <http://python_2.7.14.bb> similarity index 99% rename from meta/recipes-devtools/python/python_2.7.13.bb <http://python_2.7.13.bb> rename to meta/recipes-devtools/python/python_2.7.14.bb <http://python_2.7.14.bb> index dbafb95..13455ff 100644 --- a/meta/recipes-devtools/python/python_2.7.13.bb <http://python_2.7.13.bb> +++ b/meta/recipes-devtools/python/python_2.7.14.bb <http://python_2.7.14.bb> @@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ " -- _______________________________________________ Openembedded-core mailing list [email protected] <mailto:[email protected]> http://lists.openembedded.org/mailman/listinfo/openembedded-core <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
Awesome. Thanks for the help. I added the missing dependencies and sent another patchset.
Quoted 355 lines · Alejandro Enedino Hernandez Samaniego
Hey Derek,
Likely caused by an incomplete python-native build:
I did a quick build for python-native (2.7.14) and looking at
do_compileI get:Python build finished, but the necessary bits to build these modules were not found:
_bsddb _tkinter bsddb185 dbm dl imageopsunaudiodev
To find the necessary bits, look insetup.pyindetect_modules()for the module's name.Failed to build these modules:
gdbmSo whats happening is that python-native does not contain those files, and the script to create the manifest runs against python-native, hence why its dropping the files (it assumes they were dropped from the python release).
So we just need to make sure we have a complete python-native build and the script should run fine, the same goes for python3.
In gdbm's case, we had the same error for python3 and it was fixed here:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=
2afde7e7bd866c4d3d059229c3c2201b7096e5e6Cheers,
Alejandro
On 01/29/2018 12:32 PM, Derek Straka wrote:
Nope. I'm using Ubuntu 16.04.
Quoted 303 lines · Tim Orling
Quoted 4 lines · Derek Straka
It looks like the .so files (specifically gdbm and bsddb) are getting dropped from the manifest when I run the create manifest task. I'll have to take a look at why those aren't getting pulled into the dependency list.
Are you on Fedora-27 by any chance? It broke for me. Worked on Fedora-26.
Quoted 292 lines · Derek Straka
Quoted 284 lines
Oh no, I did not. I will send a v2 with an updated manifest. Thanks for catching that.
-Derek
Quoted 274 lines · Alejandro Enedino Hernandez Samaniego
Hey Derek,
Just a quick question, did you run the create manifest task along with the upgrade?
Cheers,
Alejandro
Quoted 257 lines · Derek Straka
Rebased:
-python/01-use-proper-tools-for-cross-build.patch
-python/fix-makefile-for-ptest.patch
-python/parallel-makeinst-create-bindir.patchRemoved Upstreamed Patch:
-python/Don-t-use-getentropy-on-Linux.patchUpdated license checksum for changes in the copyright date. The license
terms remain unchangedAdded an extra
do_compileitem to create the native pgen that no longer
gets compiled by defaultSigned-off-by Derek Straka <[email protected]>--- ...on-native_2.7.13.bb => python-native_2.7.14.bb} | 6 ++++ meta/recipes-devtools/python/python.inc | 6 ++-- .../01-use-proper-tools-for-cross-build.patch | 17 +++++---- .../python/Don-t-use-getentropy-on-Linux.patch | 41 ---------------------- .../python/python/fix-makefile-for-ptest.patch | 6 ++-- .../python/parallel-makeinst-create-bindir.patch | 12 +++---- .../python/{python_2.7.13.bb => python_2.7.14.bb} | 1 - 7 files changed, 28 insertions(+), 61 deletions(-)rename meta/recipes-devtools/python/{python-native_2.7.13.bb =>
python-native_2.7.14.bb} (94%)
delete mode 100644 meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
rename meta/recipes-devtools/python/{python_2.7.13.bb =>
python_2.7.14.bb} (99%)meta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +0
-0@@ -36,6 +36,12 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint../Python-${PV}/Modules/_ctypes/libffi
}
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phasemeta/recipes-devtools/python/python-native_2.7.14.bb renamed from meta/recipes-devtools/python/python-native_2.7.13.bb +4
-0+do_compile_prepend() { + oe_runmake regen-all +} + do_install() { oe_runmake 'DESTDIR=${D}' install install -d ${D}${bindir}/${PN}meta/recipes-devtools/python/python.inc +0
-0@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manife
st-2.7.py
INC_PR= "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"
SRC_URI= "http://www.python.org/ftp/pyt
hon/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"meta/recipes-devtools/python/python.inc +2
-0+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b" +SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457
b9c912ac216576e6bd9e7d204ed03296a66"# python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.xmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0for-cross-build.patch
index 366ce3e..e795a74 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.patchmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-0@@ -9,6 +9,9 @@ Signed-off-by: Paul Eggleton <[email protected]>
Rebased for python-2.7.9Signed-off-by Alejandro Hernandez <[email protected]el.com>
+Rebased for python-2.7.14meta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +2
-0+Signed-off-by: Derek Straka <[email protected]> + Index: Python-2.7.13/Makefile.pre.in =================================================================== --- Python-2.7.13.orig/Makefile.pre.in@@ -30,14 +33,14 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-timedata there.
# pybuilddir.txt contains the name of the build dir and is used for -@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +7
-6- - $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN) +@@ -663,7 +663,7 @@ + # Regenerate Include/graminit.h and Python/graminit.c + # from Grammar/Grammar using pgen @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H) - touch $(GRAMMAR_C) +- $(PGEN) $(srcdir)/Grammar/Grammar \ ++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ + $(srcdir)/Include/graminit.h \ + $(srcdir)/Python/graminit.c @@ -1121,27 +1122,27 @@ libinstall: build_all$(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \(quoted diff) +0
-0/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 38e5377..0000000
--- a/meta/recipes-devtools/python/python/Don-t-use-getentropy- on-Linux.patch
+++/dev/nullmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-5@@ -1,41 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Andreas Oberritter <[email protected]> - -From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:002001
meta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-5-From: Victor Stinner <[email protected]> -Date: Mon, 9 Jan 2017 11:10:41 +0100 -Subject: [PATCH] Don't use getentropy() on Linux - -Issue #29188: Support glibc 2.24 on Linux: don't use getentropy()function but
-read from/dev/urandomto get random bytes, for example inos.urandom(). On
-Linux,getentropy()is implemented whichgetrandom()is blocking mode, whereasmeta/recipes-devtools/python/python/01-use-proper-tools- renamed from meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +0
-12-os.urandom() should not block. - -(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227) ---- - Python/random.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Python/random.c b/Python/random.c -index b4bc1f3..f3f5d14 100644 ---- a/Python/random.c -+++ b/Python/random.c -@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_tsize, int raise)
- }
-
- /* Issue #25003: Don't usegetentropy()on Solaris (available since -- * Solaris 11.3), it is blocking whereasos.urandom()should not block. */
--#elifdefined(HAVE_GETENTROPY)&& !defined(sun)
-+ Solaris 11.3), it is blocking whereasos.urandom()should not
block.
-+
-+ Issue #29188: Don't usegetentropy()on Linux since the glibc
2.24
-+ implements it with thegetrandom()syscall which can fail with
ENOSYS,
-+ and this error is not supported inpy_getentropy()andgetrandom()is called
-+ with flags=0 which blocks until system urandom is initialized,
which is not
-+ the desired behaviour to seed the Python hash secret nor foros.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elifdefined(HAVE_GETENTROPY)&& !defined(sun) && !defined(linux)
- #definePY_GETENTROPY1
-
- /* Fill buffer with size pseudo-random bytes generated bygetentropy().meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +0
-1--- a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ b/meta/recipes-devtools/python/python/fix-makefile-for- ptest.patchmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +1
-1@@ -15,7 +15,7 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in +TESTOPTS= -l -v $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) --test: all platform +-test: @DEF_MAKE_RULE@ platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargsrm -f
+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt
$(TESTPYTHONOPTS)
+test: build-testmeta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +2
-1@@ -26,8 +26,8 @@ diff -ruN a/Makefile.pre.in b/Makefile.pre.in -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -+build-test: all platform ++build-test: @DEF_MAKE_RULE@ platform + - testall: all platform + testall: @DEF_MAKE_RULE@ platform -find $(srcdir)/Lib -name '*.py[co]' -print | xargsrm -f
$(TESTPYTHON) $(srcdir)/Lib/compileall.pymeta/recipes-devtools/python/python/parallel-makeinst- renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +0
-0create-bindir.patch
index 951cb46..abab41e 100644
--- a/meta/recipes-devtools/python/python/parallel-makeinst- create-bindir.patch
+++ b/meta/recipes-devtools/python/python/parallel-makeinst- create-bindir.patchmeta/recipes-devtools/python/python/parallel-makeinst- renamed from meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch +6
-6@@ -8,12 +8,12 @@ Upstream-Status: Pending --- Python-2.7.3.orig/Makefile.pre.in +++ Python-2.7.3/Makefile.pre.in -@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config +@@ -1187,7 +1187,7 @@ LIBPC= $(LIBDIR)/pkgconfig - - libainstall: all python-config + + libainstall: @DEF_MAKE_RULE@ python-config - @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \ - do \ - if test ! -d $(DESTDIR)$$i; then \ - echo "Creating directory $$i"; \ + do \ + if test ! -d $(DESTDIR)$$i; then \ + echo "Creating directory $$i"; \meta/recipes-devtools/python/python_2.7.14.bb renamed from meta/recipes-devtools/python/python_2.7.13.bb +0
-1@@ -28,7 +28,6 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ - file://Don-t-use-getentropy-on-Linux.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ "--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core