python*: upstream patches to fix with glibc-2.25
https://bugs.python.org/issue29157 The 3.6 release already contains the fix (from 3.5); the branches in-between are claimed to be unaffected. /cc #22874.
This commit is contained in:
@@ -66,6 +66,8 @@ let
|
|||||||
# libuuid, slowing down program startup a lot).
|
# libuuid, slowing down program startup a lot).
|
||||||
./no-ldconfig.patch
|
./no-ldconfig.patch
|
||||||
|
|
||||||
|
./glibc-2.25-enosys.patch
|
||||||
|
|
||||||
] ++ optionals stdenv.isCygwin [
|
] ++ optionals stdenv.isCygwin [
|
||||||
./2.5.2-ctypes-util-find_library.patch
|
./2.5.2-ctypes-util-find_library.patch
|
||||||
./2.5.2-tkinter-x11.patch
|
./2.5.2-tkinter-x11.patch
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
https://bugs.python.org/issue29157
|
||||||
|
https://github.com/python/cpython/commit/01bdbad3e951
|
||||||
|
diff --git a/Python/random.c b/Python/random.c
|
||||||
|
index 2f83b5d..0b775ec 100644
|
||||||
|
--- a/Python/random.c
|
||||||
|
+++ b/Python/random.c
|
||||||
|
@@ -98,7 +98,7 @@ 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)
|
||||||
|
+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
|
||||||
|
#define PY_GETENTROPY 1
|
||||||
|
|
||||||
|
/* Fill buffer with size pseudo-random bytes generated by getentropy().
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl
|
{ stdenv, fetchurl, fetchpatch
|
||||||
, bzip2
|
, bzip2
|
||||||
, gdbm
|
, gdbm
|
||||||
, lzma
|
, lzma
|
||||||
@@ -55,6 +55,14 @@ in stdenv.mkDerivation {
|
|||||||
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "glibc-2.25-enosys.patch";
|
||||||
|
url = https://github.com/python/cpython/commit/035ba5da3e53e.patch;
|
||||||
|
sha256 = "1y74ir1w5cq542w27rgzgp70chhq2x047db9911mihpab8p2nj71";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = optionalString (x11Support && (tix != null)) ''
|
postPatch = optionalString (x11Support && (tix != null)) ''
|
||||||
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user