-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
gnupatch: 2.7.6 -> 2.7.6-unstable-2024-08-25 #337961
base: staging
Are you sure you want to change the base?
Conversation
Thanks! I don’t feel entirely confident to review this gnarly stdenv bootstrap stuff but I’ll try to take a closer look soon. Could we avoid some of the bootstrapping issues by just using |
If Git tarballs generated by Cgit are reproducible, then yes. Otherwise we can’t use |
This changes openssl to use makeBinaryWrapper since makeWrapper uses non-overridable runtimeShell that causes infinite recursion. That is, fetchurl in pkgs/top-level/all-packages.nix is bootstrapped by overriding dependencies to use stdenv.fetchurlBoot. This change potentially allows us to drop curl from bootstrap files for other platforms.
This change bootstraps fetchurl earlier in the pkgs/stdenv/linux stages for use with other fetchers like fetchzip.
gnulibBootstrapHook = callPackage ( | ||
{ | ||
makeSetupHook, | ||
gnulib, | ||
autoconf, | ||
automake, | ||
}: | ||
makeSetupHook { | ||
name = "gnulib-bootstrap-hook"; | ||
propagatedBuildInputs = [ | ||
autoconf | ||
automake | ||
]; | ||
substitutions = { | ||
inherit gnulib; | ||
}; | ||
} ../build-support/setup-hooks/gnulib-bootstrap.sh | ||
) { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be in pkgs/by-name/gn/gnulibBootstrapHook
. I'd prefer that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I’d at least expect pkgs/by-name to be case-insensitive (or rather forcing all package names to be lower-case and erroring otherwise) since that’s a reasonable behavior given that macOS and Windows use case-insensitive filesystems by default. I’m not sure if that’s the case though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a check in nixpkgs-vet
that names can't differ by case -- food
and FooD
are rejected. macOS and Windows are case insensitive but case-preserving, so we can use the filesystem for determining attrset names as pkgs/by-name
does.
@@ -624,7 +633,7 @@ in | |||
|
|||
shell = cc.shell; | |||
|
|||
inherit (prevStage.stdenv) fetchurlBoot; | |||
inherit fetchurlBoot; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this need to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason in particular, it was easier to remove all fetchurl/fetchurlBoot instances in stdenv/linux and rewrite it from scratch to when working on this PR, and I haven’t minimized the diff yet because some commits should be split into separate PRs (e.g. openssl stuff).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge this separate from this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was planning to do this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge this separate from this PR, and since it's a version bump, I'd prefer that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we? I thought the change to python3Minimal
would be load‐bearing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not really sure if gnulib even uses/needs python3, i.e. by default gnulib-tool does a PATH lookup before using Python implementation (unless GNULIB_TOOL_IMPL
is explicitly set).
https://github.com/coreutils/gnulib/blob/6e95321249ae6986c3df764a6e539f8b5be13948/gnulib-tool#L161
https://github.com/NixOS/nixpkgs/actions/runs/10648732824/job/29518094549?pr=337961 This |
I think the check was broken at some point? It might need a rebase. |
The error is misleading, but the underlying problem seems to be that
Not entirely sure why that happens, because both nixpkgs/pkgs/top-level/stage.nix Lines 348 to 355 in 3c799ef
|
@infinisil, I assume this is because of the nixpkgs/pkgs/stdenv/linux/default.nix Lines 667 to 701 in c2090cb
nixpkgs/pkgs/top-level/stage.nix Lines 161 to 165 in c2090cb
nixpkgs/pkgs/top-level/stage.nix Lines 352 to 363 in c2090cb
This feels really weird to me, especially since the inherited (g)libc depends on $ nix path-info --recursive $(nix build --no-link --print-out-paths --file . bash^out) | fgrep libgcc
/nix/store/3kghvsns26scklmgi2f14787lzwrvqnf-xgcc-13.3.0-libgcc nix path-info --recursive $(nix build --no-link --print-out-paths --file . coreutils^out) | fgrep libgcc
/nix/store/3kghvsns26scklmgi2f14787lzwrvqnf-xgcc-13.3.0-libgcc
/nix/store/vxk9halw286r11jabdyni93kkghhb9f5-gcc-13.3.0-libgcc But perhaps that is a separate issue. |
Description of changes
This change updates
gnupatch
to the latest Git commit.Note that stdenv/linux uses fetchurlBoot as fetchurl for bootstrap and we need fetchFromSavannah (or rather fetchzip) that is not compatible with fetchurlBoot, so we override fetchzip to use fetchurl from the current package set instead of using fetchurlBoot. This shouldn’t be an issue on Darwin because curl is included in bootstrap files. FreeBSD stdenv seems to have curl in bootstrap files as well.
References:
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.