cryptsetup, lvm2, systemd: Break cyclic dependency at a different point
The cyclic dependency of systemd → cryptsetup → lvm2 → udev=systemd needs to be broken somewhere. The previous strategy of building cryptsetup with an lvm2 built without udev (#66856) caused the installer.luksroot test to fail. Instead, build lvm2 with a udev built without cryptsetup. Fixes #96479. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
@@ -87,9 +87,7 @@ let
|
||||
# copy what we need. Instead of using statically linked binaries,
|
||||
# we just copy what we need from Glibc and use patchelf to make it
|
||||
# work.
|
||||
extraUtils = let
|
||||
# Use lvm2 without udev support, which is the same lvm2 we already have in the closure anyways
|
||||
lvm2 = pkgs.lvm2.override { udev = null; }; in pkgs.runCommandCC "extra-utils"
|
||||
extraUtils = pkgs.runCommandCC "extra-utils"
|
||||
{ nativeBuildInputs = [pkgs.buildPackages.nukeReferences];
|
||||
allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd
|
||||
}
|
||||
@@ -113,8 +111,8 @@ let
|
||||
copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid
|
||||
|
||||
# Copy dmsetup and lvm.
|
||||
copy_bin_and_libs ${getBin lvm2}/bin/dmsetup
|
||||
copy_bin_and_libs ${getBin lvm2}/bin/lvm
|
||||
copy_bin_and_libs ${getBin pkgs.lvm2}/bin/dmsetup
|
||||
copy_bin_and_libs ${getBin pkgs.lvm2}/bin/lvm
|
||||
|
||||
# Add RAID mdadm tool.
|
||||
copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm
|
||||
|
||||
Reference in New Issue
Block a user