systemd: build with cryptsetup and cryptsetup-generators

There's a circular dependency to systemd via cryptsetup and lvm2
(systemd -> cryptsetup -> lvm2 -> udev=systemd).

However, cryptsetup only really needs the devmapper component shipped
with lvm2. So build `pkgs.cryptsetup` with a lvm2 that doesn't come with
udev.
This commit is contained in:
Florian Klink 2019-08-19 02:08:46 +02:00
parent b5f7ed6846
commit 72c8ed0389
3 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,7 @@ let
"nss-lookup.target" "nss-lookup.target"
"nss-user-lookup.target" "nss-user-lookup.target"
"time-sync.target" "time-sync.target"
#"cryptsetup.target" "cryptsetup.target"
"sigpwr.target" "sigpwr.target"
"timers.target" "timers.target"
"paths.target" "paths.target"

View File

@ -9,6 +9,7 @@
, patchelf , patchelf
, substituteAll , substituteAll
, getent , getent
, cryptsetup, lvm2
, buildPackages , buildPackages
, perl , perl
, withSelinux ? false, libselinux , withSelinux ? false, libselinux
@ -30,6 +31,7 @@ let gnupg-minimal = gnupg.override {
zlib = null; zlib = null;
bzip2 = null; bzip2 = null;
}; };
in stdenv.mkDerivation { in stdenv.mkDerivation {
version = "245.6"; version = "245.6";
pname = "systemd"; pname = "systemd";
@ -89,7 +91,7 @@ in stdenv.mkDerivation {
]; ];
buildInputs = buildInputs =
[ linuxHeaders libcap curl.dev kmod xz pam acl [ linuxHeaders libcap curl.dev kmod xz pam acl
/* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2 cryptsetup libuuid glib libgcrypt libgpgerror libidn2
pcre2 ] ++ pcre2 ] ++
stdenv.lib.optional withKexectools kexectools ++ stdenv.lib.optional withKexectools kexectools ++
stdenv.lib.optional withLibseccomp libseccomp ++ stdenv.lib.optional withLibseccomp libseccomp ++

View File

@ -16931,7 +16931,11 @@ in
criu = callPackage ../os-specific/linux/criu { }; criu = callPackage ../os-specific/linux/criu { };
cryptsetup = callPackage ../os-specific/linux/cryptsetup { }; 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; };
};
cramfsswap = callPackage ../os-specific/linux/cramfsswap { }; cramfsswap = callPackage ../os-specific/linux/cramfsswap { };