Merge pull request #62660 from joachifm/feat/lvm2-nonSystemd
lvm2: cleanup & fix eval error when systemd=null
This commit is contained in:
commit
bd58bdcf5f
@ -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
|
||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user