summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2020-02-24 10:32:47 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2020-03-01 17:33:27 -0500
commit6740593bdd1738aa9771990f88655becc4dc343e (patch)
tree1febe5967a8d681ab0b56bd347f3f3226b29d04d /pkgs/development/libraries/glibc
parent2cb48bb1c6facec6020703a98766147011eabc50 (diff)
downloadnixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.tar
nixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.tar.gz
nixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.tar.bz2
nixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.tar.lz
nixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.tar.xz
nixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.tar.zst
nixpkgs-6740593bdd1738aa9771990f88655becc4dc343e.zip
glibc: provide fallback for kernels with missing prlimit64
The current version of glibc implements support for kernels down to
3.2.0 (and we make sure to enable such support with apporopriate
--enable-kernel setting). The current RHEL6 operating system is based on
a maintained kernel based on 2.6.32 with lots of backports. We provide
basic support for this specific kernel by patching glibc to provide an
exception for this specific version of kernel. This allows for nixpkgs
software distribution to work on RHEL6 and it does so quite well with
almost no problems. There are, however, a few syscalls that are missing
in the 2.6.32 kernel, one of which is prlimit64. This commit provides a
fallback that uses an older {get,set}rlimit syscalls in cases when
prlimit64 is not available. This should streamline the experience for
nixpkgs users wanting to run it on RHEL6, namely, this fixes one of the
tests in findutils.

See also discussion in guix:
https://lists.gnu.org/archive/html/guix-devel/2018-03/msg00356.html
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r--pkgs/development/libraries/glibc/common.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index d1ff681097d..50ee5097d1b 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -89,6 +89,18 @@ stdenv.mkDerivation ({
         less linux-*?/arch/x86/kernel/syscall_table_32.S
        */
       ./allow-kernel-2.6.32.patch
+
+      /* Provide a fallback for missing prlimit64 syscall on RHEL 6 -like
+         kernels.
+
+         This patch is maintained by @veprbl. If it gives you trouble, feel
+         free to ping me, I'd be happy to help.
+       */
+      (fetchurl {
+        url = "https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/patches/glibc-reinstate-prlimit64-fallback.patch?id=eab07e78b691ae7866267fc04d31c7c3ad6b0eeb";
+        sha256 = "091bk3kyrx1gc380gryrxjzgcmh1ajcj8s2rjhp2d2yzd5mpd5ps";
+      })
+
       /* Provide utf-8 locales by default, so we can use it in stdenv without depending on our large locale-archive. */
       (fetchurl {
         url = "https://salsa.debian.org/glibc-team/glibc/raw/49767c9f7de4828220b691b29de0baf60d8a54ec/debian/patches/localedata/locale-C.diff";