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
wip/yesman
Dmitry Kalinkin 4 years ago
parent 2cb48bb1c6
commit 6740593bdd
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
  1. 12
      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";

Loading…
Cancel
Save