diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-02-16 23:10:42 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-02-16 23:13:38 +0100 |
commit | 110f136dc26902b4d985179117d5761c14280080 (patch) | |
tree | 9a63849450227ea39451ced2993e8ba4805bef6b /pkgs/development/interpreters/python/cpython | |
parent | 6c1ba728789073f182a9d30d061ceb962fbdb1ee (diff) | |
download | nixlib-110f136dc26902b4d985179117d5761c14280080.tar nixlib-110f136dc26902b4d985179117d5761c14280080.tar.gz nixlib-110f136dc26902b4d985179117d5761c14280080.tar.bz2 nixlib-110f136dc26902b4d985179117d5761c14280080.tar.lz nixlib-110f136dc26902b4d985179117d5761c14280080.tar.xz nixlib-110f136dc26902b4d985179117d5761c14280080.tar.zst nixlib-110f136dc26902b4d985179117d5761c14280080.zip |
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.
Diffstat (limited to 'pkgs/development/interpreters/python/cpython')
3 files changed, 26 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 15b21b5bed9b..ccf9296e0bcb 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -66,6 +66,8 @@ let # libuuid, slowing down program startup a lot). ./no-ldconfig.patch + ./glibc-2.25-enosys.patch + ] ++ optionals stdenv.isCygwin [ ./2.5.2-ctypes-util-find_library.patch ./2.5.2-tkinter-x11.patch diff --git a/pkgs/development/interpreters/python/cpython/2.7/glibc-2.25-enosys.patch b/pkgs/development/interpreters/python/cpython/2.7/glibc-2.25-enosys.patch new file mode 100644 index 000000000000..31da78e35f1c --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/2.7/glibc-2.25-enosys.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(). diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 6e0b7614c7cb..215229086b75 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, fetchpatch , bzip2 , gdbm , lzma @@ -55,6 +55,14 @@ in stdenv.mkDerivation { 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)) '' substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" ''; |