Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20.03] glibc: provide fallback for kernels with missing prlimit64 #82065

Merged
merged 1 commit into from Mar 22, 2020

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Mar 8, 2020

Motivation for this change

#80961 has landed on master. This provides its backport to 20.03.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
      • RHEL6-like
      • RHEL7-like
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

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

(cherry picked from commit 6740593)
@ofborg ofborg bot requested a review from edolstra March 8, 2020 17:46
@veprbl veprbl added this to WIP in Staging (stable) Mar 8, 2020
@veprbl veprbl moved this from WIP to Ready in Staging (stable) Mar 8, 2020
@veprbl veprbl merged commit 1332522 into NixOS:staging-20.03 Mar 22, 2020
Staging (stable) automation moved this from Ready to Done Mar 22, 2020
@veprbl veprbl deleted the pr/glibc_prlimit64_20.03 branch March 22, 2020 18:24
@veprbl veprbl removed this from Done in Staging (stable) Mar 27, 2020
@veprbl veprbl restored the pr/glibc_prlimit64_20.03 branch December 1, 2020 16:47
@veprbl veprbl deleted the pr/glibc_prlimit64_20.03 branch December 1, 2020 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant