summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2019-10-14 19:38:45 +0000
committerGitHub <noreply@github.com>2019-10-14 19:38:45 +0000
commitbd58bdcf5fd1de0f4193882c6c304b092601fc99 (patch)
tree66ca93317ca2acadc6e915b7a53269c913caea8f /pkgs/os-specific
parent67effde499ffb60da484ebbbd643c6dc69f8eb77 (diff)
parentecd693153f2b7e42e2e6a8d5916e86749a490a5c (diff)
downloadnixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.tar
nixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.tar.gz
nixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.tar.bz2
nixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.tar.lz
nixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.tar.xz
nixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.tar.zst
nixpkgs-bd58bdcf5fd1de0f4193882c6c304b092601fc99.zip
Merge pull request #62660 from joachifm/feat/lvm2-nonSystemd
lvm2: cleanup & fix eval error when systemd=null
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/lvm2/default.nix13
-rw-r--r--pkgs/os-specific/linux/lvm2/purity.patch44
2 files changed, 5 insertions, 52 deletions
diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix
index 9944250bf30..d5b45117732 100644
--- a/pkgs/os-specific/linux/lvm2/default.nix
+++ b/pkgs/os-specific/linux/lvm2/default.nix
@@ -21,7 +21,6 @@ stdenv.mkDerivation {
     "--enable-udev_rules"
     "--enable-udev_sync"
     "--enable-pkgconfig"
-    "--enable-applib"
     "--enable-cmdlib"
   ] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd"
   ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
@@ -34,17 +33,15 @@ stdenv.mkDerivation {
 
   preConfigure =
     ''
-      substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
-        --replace /usr/bin/udevadm ${systemd}/bin/udevadm
-
       sed -i /DEFAULT_SYS_DIR/d Makefile.in
       sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
+    '' + stdenv.lib.optionalString (systemd != null) ''
+      substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
+        --replace /usr/bin/udevadm ${systemd}/bin/udevadm
     '';
 
-  # gcc: error: ../../device_mapper/libdevice-mapper.a: No such file or directory
-  enableParallelBuilding = false;
+  enableParallelBuilding = true;
 
-  #patches = [ ./purity.patch ];
   patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
     (fetchpatch {
       name = "fix-stdio-usage.patch";
@@ -75,7 +72,7 @@ stdenv.mkDerivation {
     ''
       substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \
         --replace $out/sbin/blkid ${utillinux}/sbin/blkid
-
+    '' + stdenv.lib.optionalString (systemd != null) ''
       # Systemd stuff
       mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators
       cp scripts/blk_availability_systemd_red_hat.service $out/etc/systemd/system
diff --git a/pkgs/os-specific/linux/lvm2/purity.patch b/pkgs/os-specific/linux/lvm2/purity.patch
deleted file mode 100644
index d6990dd9caa..00000000000
--- a/pkgs/os-specific/linux/lvm2/purity.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -ru LVM2.2.02.95-orig/udev/10-dm.rules.in LVM2.2.02.95/udev/10-dm.rules.in
---- LVM2.2.02.95-orig/udev/10-dm.rules.in	2011-08-11 19:55:29.000000000 +0200
-+++ LVM2.2.02.95/udev/10-dm.rules.in	2012-03-19 20:12:35.000000000 +0100
-@@ -19,9 +19,8 @@
- SUBSYSTEM!="block", GOTO="dm_end"
- KERNEL!="dm-[0-9]*", GOTO="dm_end"
- 
--# Set proper sbin path, /sbin has higher priority than /usr/sbin.
--ENV{DM_SBIN_PATH}="/sbin"
--TEST!="$env{DM_SBIN_PATH}/dmsetup", ENV{DM_SBIN_PATH}="/usr/sbin"
-+# Set proper sbin path. Exit if dmsetup is not present.
-+ENV{DM_SBIN_PATH}="(sbindir)"
- TEST!="$env{DM_SBIN_PATH}/dmsetup", GOTO="dm_end"
- 
- # Device created, major and minor number assigned - "add" event generated.
-diff -ru LVM2.2.02.95-orig/udev/Makefile.in LVM2.2.02.95/udev/Makefile.in
---- LVM2.2.02.95-orig/udev/Makefile.in	2012-02-24 10:53:12.000000000 +0100
-+++ LVM2.2.02.95/udev/Makefile.in	2012-03-19 20:16:09.000000000 +0100
-@@ -12,6 +12,7 @@
- # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- 
- srcdir = @srcdir@
-+sbindir = @sbindir@
- top_srcdir = @top_srcdir@
- top_builddir = @top_builddir@
- 
-@@ -26,7 +27,7 @@
- ifeq ("@UDEV_HAS_BUILTIN_BLKID@", "yes")
- 	BLKID_RULE=IMPORT{builtin}=\"blkid\"
- else
--	BLKID_RULE=IMPORT{program}=\"\$$env{DM_SBIN_PATH}\/blkid -o udev -p \$$tempnode\"
-+	BLKID_RULE=IMPORT{program}=\"\/sbin\/blkid -o udev -p \$$tempnode\"
- endif
- 
- CLEAN_TARGETS = 10-dm.rules 13-dm-disk.rules
-@@ -36,7 +37,7 @@
- vpath %.rules $(srcdir)
- 
- %.rules: %.rules.in
--	$(SED) -e "s/(DM_DIR)/$(DM_DIR)/" -e "s/(BLKID_RULE)/$(BLKID_RULE)/" $< >$@
-+	$(SED) -e "s/(DM_DIR)/$(DM_DIR)/" -e "s/(BLKID_RULE)/$(BLKID_RULE)/" -e "s|(sbindir)|$(sbindir)|" $< >$@
- 
- %_install: %.rules
- 	$(INSTALL_DATA) -D $< $(udevdir)/$(<F)