Skip to content

Comments

{k3s,nixos/kubernetes}: use util-linux.withPatches#409332

Merged
numinit merged 3 commits intoNixOS:masterfrom
numinit:util-linux/withPatches
May 29, 2025
Merged

{k3s,nixos/kubernetes}: use util-linux.withPatches#409332
numinit merged 3 commits intoNixOS:masterfrom
numinit:util-linux/withPatches

Conversation

@numinit
Copy link
Contributor

@numinit numinit commented May 21, 2025

As documented:

TODO (#409339): Remove this hack. We had to add it to avoid a mass rebuild for the 25.05 release to fix Kubernetes. Once the staging cycle referenced in the above PR completes, this passthru and all consumers of it should go away.

Should fix #408044 which affected both k3s and kubernetes, without a mass rebuild.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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.

Add a 👍 reaction to pull requests you find important.

@numinit numinit requested review from DerRockWolf, Mic92 and alyssais May 21, 2025 08:33
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: k3s Kubernates distribution (https://k3s.io/) labels May 21, 2025
@numinit numinit mentioned this pull request May 21, 2025
3 tasks
@numinit
Copy link
Contributor Author

numinit commented May 21, 2025

Adapted from @DerRockWolf's #405952 and should work without the world rebuild.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this lib.unique is written in a way where, after the staging merge, withPatches and normal util-linux will eval to the same outpath.

@github-actions github-actions 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 May 21, 2025
@numinit numinit force-pushed the util-linux/withPatches branch from 2f1b60e to ff18672 Compare May 21, 2025 08:53
@numinit
Copy link
Contributor Author

numinit commented May 21, 2025

Simply corrected the issue number referenced in comments, no functional differences. kubernetes tests still pass.

@numinit numinit force-pushed the util-linux/withPatches branch from ff18672 to cf33e5b Compare May 21, 2025 09:41
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure whether to switch this to minimal (there is gitMinimal, above). I guess it could make sense, but I'm also afraid of breaking kubernetes somehow by doing that, and we can now build a patched util-linux (not minimal) without rebuilding the world anyway.

@numinit
Copy link
Contributor Author

numinit commented May 21, 2025

One more cc to @NixOS/k3s, and thank you for your patience with this annoying regression.

Copy link
Member

Choose a reason for hiding this comment

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

This seems pretty overcomplicated for me for something that I don't remember having come up very much before…

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you think we should just do overrides in two places then? I was split between both approaches but could see merits to either because it's a oneoff.

Copy link
Member

Choose a reason for hiding this comment

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

I think having the passthru is fine but I'd remove it again once we don't need it any more.

Copy link
Contributor Author

@numinit numinit May 21, 2025

Choose a reason for hiding this comment

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

OK, yeah, completely fair. People should not rely on this. I'll update the tracking issue and fix the comment to indicate that this is a temporary hack.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be good now.

numinit added 3 commits May 21, 2025 12:51
TODO (NixOS#409339): Remove this hack. We had to add it to avoid a mass rebuild
for the 25.05 release to fix Kubernetes. Once the staging cycle referenced
in the above PR completes, this passthru and all consumers of it should go away.
@numinit numinit force-pushed the util-linux/withPatches branch from cf33e5b to e14de85 Compare May 21, 2025 19:52
@numinit numinit requested a review from alyssais May 21, 2025 20:02
@numinit numinit merged commit 79aa28e into NixOS:master May 29, 2025
32 of 33 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented May 29, 2025

Successfully created backport PR for release-25.05:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label May 29, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/downgrade-dependency-to-util-linux-in-a-remote-flake/65132/2

plaflamme added a commit to plaflamme/k0s-nix that referenced this pull request Jun 6, 2025
plaflamme added a commit to plaflamme/k0s-nix that referenced this pull request Jun 6, 2025
plaflamme added a commit to plaflamme/k0s-nix that referenced this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: k3s Kubernates distribution (https://k3s.io/) 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: port to stable This PR already has a backport to the stable release. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k3s: failed to prepare subPath

4 participants