From: Michael Tremer Date: Fri, 28 Apr 2017 11:10:41 +0000 (+0200) Subject: python: Update to 2.7.13 X-Git-Tag: v2.19-core112~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66f3b51d6d98dde3614c68a23ee23662e932a1f9;p=ipfire-2.x.git python: Update to 2.7.13 Signed-off-by: Michael Tremer --- diff --git a/lfs/python b/lfs/python index 013f9c1a8a..14ccb690c9 100644 --- a/lfs/python +++ b/lfs/python @@ -24,7 +24,7 @@ include Config -VER = 2.7.10 +VER = 2.7.13 THISAPP = Python-$(VER) DL_FILE = $(THISAPP).tar.xz @@ -40,7 +40,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = c685ef0b8e9f27b5e3db5db12b268ac6 +$(DL_FILE)_MD5 = 53b43534153bb2a0363f08bae8b9d990 install : $(TARGET) @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE) rm -rf $(DIR_APP)/Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx} + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/python-2.7.13-getentropy.patch cd $(DIR_APP) && OPT="$(CFLAGS)" ./configure \ --prefix=/usr --enable-shared --with-system-ffi cd $(DIR_APP) && make $(MAKETUNING) diff --git a/src/patches/python-2.7.13-getentropy.patch b/src/patches/python-2.7.13-getentropy.patch new file mode 100644 index 0000000000..7e00061c19 --- /dev/null +++ b/src/patches/python-2.7.13-getentropy.patch @@ -0,0 +1,22 @@ +diff --git a/Python/random.c b/Python/random.c +index 2f83b5d..4cae217 100644 +--- a/Python/random.c ++++ b/Python/random.c +@@ -97,8 +97,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().