[oe-commits] [openembedded-core] 08/09: python3-native: Avoid use of getentropy/getrandom

git at git.openembedded.org git at git.openembedded.org
Tue Aug 15 09:19:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 262a26b34bab1e88a1d738bb58d12d282eb34c2e
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Aug 14 14:00:21 2017 +0100

    python3-native: Avoid use of getentropy/getrandom
    
    getentropy/random() is only available in glibc 2.25+ and uninative may relocate
    binaries onto systems that don't have this function. For now, force the code to
    the older codepaths until we can come up with a better solution for this kind of
    issue.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/python/python3-native_3.5.3.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3-native_3.5.3.bb b/meta/recipes-devtools/python/python3-native_3.5.3.bb
index 3467d29..db0e7b9 100644
--- a/meta/recipes-devtools/python/python3-native_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.5.3.bb
@@ -44,7 +44,8 @@ inherit native
 
 require python-native-${PYTHON_MAJMIN}-manifest.inc
 
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
+# uninative may be used on pre glibc 2.25 systems which don't have getentropy
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no"
 
 EXTRA_OEMAKE = '\
   LIBC="" \
@@ -59,6 +60,7 @@ PYTHONLSBOPTS = ""
 
 do_configure_append() {
 	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+	sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
 }
 
 do_install() {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list