Skip to content

versionCheckHook: use current coreutils env#474203

Merged
mdaniels5757 merged 1 commit intoNixOS:stagingfrom
mdaniels5757:versionCheckHook-bootstrap-fix
Dec 28, 2025
Merged

versionCheckHook: use current coreutils env#474203
mdaniels5757 merged 1 commit intoNixOS:stagingfrom
mdaniels5757:versionCheckHook-bootstrap-fix

Conversation

@mdaniels5757
Copy link
Member

I was getting an "env: unrecognized option '--argv0=less'" error when using a package that used this hook in the bootstrap sequence.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

I was getting an "env: unrecognized option '--argv0=less'"
error when using a package that used this hook in the bootstrap sequence.
@mdaniels5757 mdaniels5757 force-pushed the versionCheckHook-bootstrap-fix branch from e794cb3 to 6939271 Compare December 25, 2025 22:13
@mdaniels5757 mdaniels5757 changed the base branch from master to staging December 25, 2025 22:13
@nixpkgs-ci nixpkgs-ci bot closed this Dec 25, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Dec 25, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". label Dec 25, 2025
@mdaniels5757
Copy link
Member Author

mdaniels5757 commented Dec 25, 2025

Tested (on x86_64-linux) both the modified package that I noticed the issue on (uncommitted passthru.tests for gzip), and normal less (which worked before). Both now work.

@nixpkgs-ci nixpkgs-ci bot requested a review from doronbehar December 25, 2025 22:22
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Dec 25, 2025
@doronbehar
Copy link
Contributor

I was getting an "env: unrecognized option '--argv0=less'" error when using a package that used this hook in the bootstrap sequence.

Could you give an example for a package in the bootstrap sequence that would not fail thanks to the changes here? Will you be using a different env implementation or something?

@mdaniels5757
Copy link
Member Author

mdaniels5757 commented Dec 26, 2025

The only example I'm aware of is that, in #474210, versionCheckHook fails for less while building gzip.passthru.tests. (You can also see the ofborg logs on that PR.) versionCheckHook succeeds when building gzip.passthru.tests if I cherry-pick this PR's commit to #474210's branch.

@mdaniels5757
Copy link
Member Author

mdaniels5757 commented Dec 26, 2025

It looks like the root cause is that the bootstrap tools use coreutils 9.4, and --argv0 was added in coreutils 9.5 (coreutils/coreutils@193449b). Maybe the better solution is to update the bootstrap tarballs, in that case?

@doronbehar
Copy link
Contributor

It looks like the root cause is that the bootstrap tools use coreutils 9.4, and --argv0 was added in coreutils 9.5 (coreutils/coreutils@193449b). Maybe the better solution is to update the bootstrap tarballs, in that case?

OK thanks for explaining. I'm still a bit confused though as for gzip.passthru.tests because I don't see them in branch master, and in #474210 I don't see anything related to versionCheckHook. Maybe you could cherry pick the commit here to #474210 and then it'll be easier to see the changes? I won't mind reviewing the rest of #474210 which looks good on first sight :).

@mdaniels5757
Copy link
Member Author

See #474625

@mdaniels5757 mdaniels5757 changed the title versionCheckHook: use coreutils env versionCheckHook: use current coreutils env Dec 27, 2025
@mdaniels5757
Copy link
Member Author

mdaniels5757 commented Dec 28, 2025

This commit was approved by doronbehar in #474625, but I will merge this PR separately from the gzip change to avoid merge conflicts with #474210.

@mdaniels5757 mdaniels5757 added this pull request to the merge queue Dec 28, 2025
Merged via the queue into NixOS:staging with commit 6a67bdf Dec 28, 2025
39 of 41 checks passed
@mdaniels5757 mdaniels5757 deleted the versionCheckHook-bootstrap-fix branch December 28, 2025 15:03
@mdaniels5757 mdaniels5757 mentioned this pull request Dec 28, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants