Skip to content

Conversation

@alyssais
Copy link
Member

@alyssais alyssais commented Oct 2, 2023

Description of changes

This is a fresh attempt at #169793, done in a way that should make @Ericson2314 happier — i.e., all bootstrapTools jobs are switched to use config triples.

This will allow us to regenerate our woefully out-of-date aarch64-unknown-linux-gnu musl bootstrap tools, which can't compile lots of modern code.

We could technically also do i686-unknown-linux-musl bootstrap tools, but I don't know if there's demand for that, so it's best to wait and see if somebody asks for it before we commit Hydra to it.

I've tested the switch to triples by running

nix-eval-jobs --force-recurse pkgs/top-level/release.nix

both before and after this change, and diffing the results to verify that no new errors are introduced, the derivations for all bootstrap tools are the same, and that the only changes aside from the bootstrap tool jobs being renamed are to derivations that include the Nixpkgs source tree.

Closes #169793.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: stdenv Standard environment labels Oct 2, 2023
@alyssais alyssais added the 6.topic: musl Running or building packages with musl libc label Oct 2, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Oct 2, 2023
@RaitoBezarius RaitoBezarius requested a review from vcunat October 3, 2023 12:26
Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are reasonable, checked with a character diff before and after using nix-eval-jobs as suggested.

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 3, 2023
Ericson2314

This comment was marked as outdated.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very excited about this! Just a few small questions to try to make sure no one ends up trying to revert it later :)

This will allow buliding bootstrap tools for platforms with
non-default libcs, like *-unknown-linux-musl.

This gets rid of limitedSupportSystems/systemsWithAnySupport.  There
was no need to use systemsWithAnySupport for supportDarwin, because it
was always equivalent to supportedSystems for that purpose, and the
only other way it was used was for determining which platforms to
build the bootstrap tools for, so we might as well use a more explicit
parameter for that, and then we can change how it works without
affecting the rest of the Hydra jobs.

Not affecting the rest of the Hydra jobs is important, because if we
changed all jobs to use config triples, we'd end up renaming every
Hydra job.  That might still be worth thinking about at some point,
but it's unnecessary at this point (and would be a lot of work).

I've checked by running

    nix-eval-jobs --force-recurse pkgs/top-level/release.nix

that the actual bootstrap tools derivations are unaffected by this
change, and that the only other jobs that change are ones that depend
on the hash of all of Nixpkgs.  Of the other jobset entrypoints that
end up importing pkgs/top-level/release.nix, none used the
limitedSupportedSystems parameter, so they should all be unaffected as
well.
This will allow us to regenerate our woefully out-of-date
aarch64-unknown-linux-gnu musl bootstrap tools, which can't compile
lots of modern code.

We could technically also do i686-unknown-linux-musl bootstrap tools,
but I don't know if there's demand for that, so it's best to wait and
see if somebody asks for it before we commit Hydra to it.
@alyssais
Copy link
Member Author

alyssais commented Oct 7, 2023

I've now pushed a third attempt at this, that avoids the complexity the second attempt still hadn't figured out.

The problem in both previous attempts has been that converting everything to use config triples is a huge job, with various side effects like renaming almost every single Hydra job.

This new attempt recognises that the list of platforms with bootstrap tools built on Hydra was already distinct from the list of platforms everything else was built for, so it just makes that a bit clearer, and then changes just that list to config triples. This way, we can achieve the goal of musl bootstrap tools built by Hydra, without doing a total overhaul of Hydra job generation in Nixpkgs.

More info in commit messages.

@github-actions github-actions bot removed the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Oct 7, 2023
@ofborg ofborg bot added 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Oct 7, 2023
@delroth delroth removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 7, 2023
@alyssais alyssais requested a review from Ericson2314 October 8, 2023 13:21
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK great, that's do this!

@Ericson2314 Ericson2314 merged commit 014559e into NixOS:master Oct 8, 2023
@alyssais alyssais mentioned this pull request Jan 25, 2024
13 tasks
@alyssais alyssais deleted the release-config branch May 15, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: musl Running or building packages with musl libc 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants