Skip to content

Commit

Permalink
extra-utils: build a full lvm2 without udev support, fixes NixOS#96197
Browse files Browse the repository at this point in the history
dmsetup was missing symbols.
NixOS#96290 (comment)
  • Loading branch information
FRidh committed Aug 26, 2020
1 parent ff92674 commit f6286de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nixos/modules/system/boot/stage-1.nix
Expand Up @@ -87,7 +87,9 @@ 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 = pkgs.runCommandCC "extra-utils"
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"
{ nativeBuildInputs = [pkgs.buildPackages.nukeReferences];
allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd
}
Expand All @@ -111,8 +113,8 @@ let
copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid
# Copy dmsetup and lvm.
copy_bin_and_libs ${getBin pkgs.lvm2}/bin/dmsetup
copy_bin_and_libs ${getBin pkgs.lvm2}/bin/lvm
copy_bin_and_libs ${getBin lvm2}/bin/dmsetup
copy_bin_and_libs ${getBin lvm2}/bin/lvm
# Add RAID mdadm tool.
copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm
Expand Down

0 comments on commit f6286de

Please sign in to comment.