glibc: maintenance update and support RHEL 6 -like kernels#32954
glibc: maintenance update and support RHEL 6 -like kernels#32954vcunat merged 2 commits intoNixOS:stagingfrom
Conversation
We lost the support with 2.25 -> 2.26
|
@yegortimoshenko: I patch both |
|
@vcunat Oh, correct. Then another nitpick: patch would be easier to read if hunks were separated with an empty line :-) |
|
I just ran |
| On major glibc updates we should check that the patched kernel supports | ||
| all the required features. ATM it's verified up to glibc-2.26-115. | ||
| # HOWTO: check glibc sources for changes in kernel requirements | ||
| git log -p glibc-2.25.. sysdeps/unix/sysv/linux/x86_64/kernel-features.h sysdeps/unix/sysv/linux/kernel-features.h |
There was a problem hiding this comment.
Did you do git checkout release/2.26/master before git log? Is 115 the number of commits in that branch since glibc-2.26 tag? Shouldn't git log -p be called with glibc-2.26..?
There was a problem hiding this comment.
I checked out the version I updated to:
$ git describe
glibc-2.26-115-g633e2f7f3d
I wanted to re-check since 2.25, as the kernel support was bumped between 2.25 and 2.26 (and on 2.26.. they probably wouldn't do such large changes anyway). EDIT: of course, in future it's enough to check since the last checked commit.
|
BTW, you may test with a few tools that are in binary cache already: https://hydra.nixos.org/build/66404678#tabs-buildsteps – just |
|
/cc @grahamc for ^^ |
| for glibc to accept 2.6.32 and to tag the ELFs as 2.6.32-compatible | ||
| (otherwise the loader would refuse libc). | ||
| Note that glibc will fully work only on their heavily patched kernels | ||
| and we lose early mismatch detection on 2.6.32. |
There was a problem hiding this comment.
What does it mean to "lose early mismtach detection"?
There was a problem hiding this comment.
@edolstra: when glibc detects an old kernel, it dies with a readable message (kernel too old). That gets disabled for 2.6.32 in this PR, so if someone used that version without the RHEL patches, it would be hard to debug – she wouldn't get any readable message and instead, some glibc functions would be failing (ENOSYS etc.)
There was a problem hiding this comment.
I didn't want to make the in-source comment too long, but perhaps I've cut it down too much.
|
Adding gzipped patch files to the Nixpkgs tree doesn't seem very nice. Can't that patch be fetched from somewhere else? |
|
@edolstra: I would be very grateful if a better solution was found – I had spent quite a lot of time on it and only came with this. Upstream doesn't make maintenance releases (i.e. tarballs), fetching a hundred patches from git is cumbersome, and all is further hindered by glibc taking part in bootstrapping. |
|
If you prefer using |
|
@vcunat: could you perhaps use this script? It generates list of patches, fetched via You can also set glibc patch prefix just by counting these patches. |
|
I had tried that approach first (generate |
|
It is enough to just remove the last line of every patch (it points to git version). This could be done via |
|
Yes, I suppose that should cover almost all the changes cheaply. I've seen also the |
|
I think so, perhaps then we'll have proper |
|
At least on GitHub it's possible to have a range of commits squashed into one diff: https://github.com/NixOS/nixpkgs/compare/master...dezgeg:arm-work.diff so there's no need to generate dozens of fetchpatch invocations. It doesn't solve the patch nondeterminism problem though. |
|
@dezgeg: 115 |
|
Can't we just push this version of Glibc to GitHub and use fetchFromGitHub? I think that should work during stdenv bootstrap but I'm not sure. |
|
@edolstra That incurs additional maintenance, with |
|
How does it incur more maintenance? It's less work to just update a commit hash. |
|
I suspect he meant you have to update the repo as well, but what about this GitLab auto-updating mirror? The source would be obtainable through |
|
Yes, that and also origin would have to be manually checked out anyway to determine the new patchlevel, which also has to be updated. |
|
Number of patches with overview: https://gitlab.com/vcunat/glibc/compare/glibc-2.26...release/2.26/master (EDITed to beautify the URL) |
|
It shows one patch more (116) than the actual patchlevel (115) and the number that I get when I checkout locally. Strange... |
|
One patch was pushed very recently upstream. |
|
BTW, glibc derivation can only fetch using built-in Nix Great that GitLab supports auto-updating mirrors! ( |
|
Let's try this again: |
|
I've had great success with this so far (using 87acb2b) on my RHEL6-esque machine, thank you! I know there are some details to be sorted but thought I'd let you know it's working great so far functionality-wise 👍 |
|
Right, now I remember why I dropped the attempts. In bootstrapping, at the point when I now tried also I assumed the update part would be the clear one and we may focus on the RHEL patch, but it's the other way. Unless you bring any idea how to do this without |
|
Right, that's what I've thought, the only fetcher available (one built into Nix) doesn't support I don't think that Travis CI supports GitLab releases, but GitLab has its own CI: https://docs.gitlab.com/ce/ci/ |
|
@vcunat: do you think .tar archives without compression could be more deterministic? https://gitlab.com/vcunat/glibc/repository/5da0de4de5e8b9576475432b94fa0a486fd9389f/archive.tar |
|
I don't know how these are created exactly, but |
Things done
Tested building simple packages and running them on a CentOS 6.9 VM.
Tested using sandboxing (nix.useSandbox on NixOS, or option
build-use-sandboxinnix.confon non-NixOS)Built on platform(s)
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 nox --run "nox-review wip"Tested execution of all binary files (usually in
./result/bin/)Fits CONTRIBUTING.md.
I plan to merge in a few days.