summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-02-20 21:18:48 +0100
committerVladimír Čunát <vcunat@gmail.com>2017-02-20 21:18:48 +0100
commit2cb76ff1ff3f90a82156f6a742374d975fe06a31 (patch)
tree21198b026d6848f5f010ee31e6e3540f67c75a22 /pkgs/development/interpreters
parent429add6541423fc0352e370e55cde7c600fdbda2 (diff)
parent09d02f72f6dc9201fbfce631cb1155d295350176 (diff)
downloadnixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.tar
nixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.tar.gz
nixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.tar.bz2
nixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.tar.lz
nixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.tar.xz
nixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.tar.zst
nixlib-2cb76ff1ff3f90a82156f6a742374d975fe06a31.zip
Merge branch 'glibc-2.25' into staging
The largest problem-causers should be fixed now (within).
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/default.nix2
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/glibc-2.25-enosys.patch15
-rw-r--r--pkgs/development/interpreters/python/cpython/3.5/default.nix10
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'"
   '';