Skip to content

Comments

util-linux: fix mount regression#405952

Merged
alyssais merged 1 commit intoNixOS:stagingfrom
DerRockWolf:fix/util-linux
May 17, 2025
Merged

util-linux: fix mount regression#405952
alyssais merged 1 commit intoNixOS:stagingfrom
DerRockWolf:fix/util-linux

Conversation

@DerRockWolf
Copy link
Contributor

@DerRockWolf DerRockWolf commented May 10, 2025

Add patch of util-linux/util-linux@7dbfe31

This fixes the issues mentioned here:

Note: For k3s it should be possible to work around the issue by running k3s with --prefer-bundled-bin. But I was unable to get it working with nixpkgs revision dda3dcd.
Edit: actually quite obvious why --prefer-bundled-bin does not work. The k3s nix package does not copy over the auxiliary binaries from https://github.com/k3s-io/k3s-root/releases/download/v0.14.1/k3s-root-amd64.tar to the location where the build expects them.

CC: @numinit @NixOS/k3s

Things done

I did not yet have enough time to rebuild every package depending on util-linux.

  • 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels May 10, 2025
@nix-owners nix-owners bot requested a review from numinit May 10, 2025 18:16
@mweinelt mweinelt marked this pull request as draft May 10, 2025 19:03
@mweinelt
Copy link
Member

Too many builds for master. Rebase onto and retarget for staging instead.

@numinit
Copy link
Contributor

numinit commented May 10, 2025

This PR should probably be against staging (given the rebuild count) so we pick it up in the next cycle.

(e: posted at the same time as the above)

@github-actions github-actions bot added 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: kernel The Linux kernel 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 8.has: documentation This PR adds or changes documentation labels May 10, 2025
@DerRockWolf DerRockWolf changed the base branch from master to staging May 10, 2025 21:31
@github-actions github-actions bot removed 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: GNOME GNOME desktop environment and its underlying platform labels May 10, 2025
@DerRockWolf
Copy link
Contributor Author

Too many builds for master. Rebase onto and retarget for staging instead.

Done (hopefully everything is now correct^^)

@numinit numinit self-requested a review May 11, 2025 06:21
@numinit numinit marked this pull request as ready for review May 11, 2025 06:21
@numinit
Copy link
Contributor

numinit commented May 11, 2025

util-linuxMinimal builds just fine. util-linux is going now, but I assume it'll be fine too.

Edit: indeed it was.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels May 11, 2025
@numinit numinit requested a review from alyssais May 11, 2025 20:54
@numinit
Copy link
Contributor

numinit commented May 13, 2025

@alyssais Should this be OK to merge to staging? Just want to make sure it won't affect anything for release given the number of builds.

@ar3s3ru
Copy link

ar3s3ru commented May 14, 2025

Just ran into this issue while updating my servers. Is there a workaround while waiting for this PR to be merged?

Thanks!

@DerRockWolf
Copy link
Contributor Author

Just ran into this issue while updating my servers. Is there a workaround while waiting for this PR to be merged?

Thanks!

The only way would be to apply the patch yourself. The --prefer-bundled-bin flag does not work, see #406570

@ar3s3ru
Copy link

ar3s3ru commented May 14, 2025

The only way would be to apply the patch yourself.

Is there a way to do that on current nixos-unstable without pinning the PR latest commit?

@DerRockWolf
Copy link
Contributor Author

The only way would be to apply the patch yourself.

Is there a way to do that on current nixos-unstable without pinning the PR latest commit?

You would either need to create an overlay or fork nixpkgs and cherry-pick this commit to nixos-unstable. Keep in mind that you must rebuild a bunch of packages when changing util-linux.

@numinit
Copy link
Contributor

numinit commented May 15, 2025

In case anyone was wondering why this is in limbo: this was reported mid-25.05 stabilization staging cycle and would require a mass rebuild of everything, so we'll get it into the cycle after release.

If this issue affects you, give k3s.override { util-linux = util-linuxMinimal.overrideAttrs (prev: { patches = prev.patches or [] ++ [./fix-mount-regression.patch]; }); } a shot. Note that util-linuxMinimal is much faster to compile than util-linux because util-linux transitively depends on util-linuxMinimal.

If this ends up working for people, we can PR it to k3s instead as a short term fix, which will not cause a mass rebuild. Please let me know if you try it!

Edit: #407810

@ar3s3ru
Copy link

ar3s3ru commented May 16, 2025

If this ends up working for people, we can PR it to k3s instead as a short term fix, which will not cause a mass rebuild. Please let me know if you try it!

Worked perfectly for me, and recompilation was really quick. Thanks for the fix!

@herobrauni
Copy link
Contributor

In case anyone was wondering why this is in limbo: this was reported mid-25.05 stabilization staging cycle and would require a mass rebuild of everything, so we'll get it into the cycle after release.

If this issue affects you, give k3s.override { util-linux = util-linuxMinimal.overrideAttrs (prev: { patches = prev.patches or [] ++ [./fix-mount-regression.patch]; }); } a shot. Note that util-linuxMinimal is much faster to compile than util-linux because util-linux transitively depends on util-linuxMinimal.

If this ends up working for people, we can PR it to k3s instead as a short term fix, which will not cause a mass rebuild. Please let me know if you try it!

Can confirm this fixed it for me.

@numinit
Copy link
Contributor

numinit commented May 16, 2025

Excellent!

numinit added a commit to numinit/nixpkgs that referenced this pull request May 17, 2025
Until NixOS#405952 is fixed, we can use our own util-linux to avoid breaking
k3s in the release. Revert this commit when that happens.
@numinit numinit mentioned this pull request May 17, 2025
13 tasks
@alyssais alyssais merged commit 97e21e3 into NixOS:staging May 17, 2025
67 checks passed
@DerRockWolf DerRockWolf deleted the fix/util-linux branch May 17, 2025 15:32
@rorosen rorosen mentioned this pull request May 17, 2025
3 tasks
nixpkgs-ci bot pushed a commit that referenced this pull request May 20, 2025
Until #405952 is fixed, we can use our own util-linux to avoid breaking
k3s in the release. Revert this commit when that happens.

(cherry picked from commit 4cf4aca)
@nixos-discourse
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 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. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants