cryptsetup: Build with an lvm2 that’s built with udev#97002
Closed
andersk wants to merge 1 commit intoNixOS:stagingfrom
Closed
cryptsetup: Build with an lvm2 that’s built with udev#97002andersk wants to merge 1 commit intoNixOS:stagingfrom
andersk wants to merge 1 commit intoNixOS:stagingfrom
Conversation
Apparently, taking one more step along the systemd → cryptsetup → lvm2 → udev=systemd dependency cycle before breaking the chain allows the installer.luksroot test to pass. This is a bit ridiculous because we end up with this even stupider chain in the runtime closure of lvm2: lvm2 → systemd → cryptsetup → different lvm2 → different systemd But it’s better than leaving nixos-unstable blocked forever while we look for a better solution. Fixes NixOS#96479. Signed-off-by: Anders Kaseorg <[email protected]>
Member
|
@GrahamcOfBorg test installer.luksroot |
Member
|
@GrahamcOfBorg test installer.luksroot (Again; nix-build threw some internal error) |
lheckemann
approved these changes
Sep 3, 2020
Member
|
As borg isn't working; i'm running the test now locally (on nixbuild). Once the test is green on my box I'll merge! |
Contributor
Author
|
This slightly less convoluted alternative patch, which breaks the cycle at the same inner point but builds one fewer outer --- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17234,11 +17234,7 @@ in
criu = callPackage ../os-specific/linux/criu { };
- cryptsetup = callPackage ../os-specific/linux/cryptsetup {
- # cryptsetup only really needs the devmapper component of cryptsetup
- # but itself is used as a library in systemd (=udev)
- lvm2 = lvm2.override { udev = null; };
- };
+ cryptsetup = callPackage ../os-specific/linux/cryptsetup { };
cramfsprogs = callPackage ../os-specific/linux/cramfsprogs { };
@@ -17994,7 +17990,12 @@ in
lsscsi = callPackage ../os-specific/linux/lsscsi { };
- lvm2 = callPackage ../os-specific/linux/lvm2 { };
+ lvm2 = callPackage ../os-specific/linux/lvm2 {
+ # udev is the same package as systemd which depends on cryptsetup
+ # which depends on lvm2 again. But we only need the libudev part
+ # which does not depend on cryptsetup.
+ udev = udev.override { cryptsetup = null; };
+ };
lvm2_dmeventd = callPackage ../os-specific/linux/lvm2 {
enableDmeventd = true;
enableCmdlib = true; |
10 tasks
Contributor
Author
|
Submitted this alternative as #97008. |
Contributor
Author
|
Closing in favor of #97008 (we can reopen if someone disagrees). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Apparently, taking one more step along the systemd → cryptsetup → lvm2 → udev=systemd dependency cycle before breaking the chain allows the installer.luksroot test to pass.
This is a bit ridiculous because we end up with this even stupider chain in the runtime closure of lvm2:
lvm2 → systemd → cryptsetup → different lvm2 → different systemd
But it’s better than leaving nixos-unstable blocked forever while we look for a better solution. Fixes #96479.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)