lvm-2.02.87, patch udev rules
svn path=/nixpkgs/branches/udev-173/; revision=28661
This commit is contained in:
parent
69f13c4922
commit
8e35598f6b
@ -1,27 +1,30 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, udev }:
|
{ stdenv, fetchurl, pkgconfig, udev }:
|
||||||
|
|
||||||
let
|
let
|
||||||
v = "2.02.86";
|
v = "2.02.87";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "lvm2-${v}";
|
name = "lvm2-${v}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${v}.tgz";
|
url = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${v}.tgz";
|
||||||
sha256 = "0bam8ampdqn4xx2agrvh5vn4xdi0gb9lmfsm31fm302y52jsyz2m";
|
sha256 = "04d605dac9r0yz9khx9pq6a8jdsf9arda2rz1a2d1qr3jhlw4kvg";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
"--disable-readline --enable-udev_rules --enable-udev_sync --enable-pkgconfig --enable-applib";
|
"--disable-readline --enable-udev_rules --enable-udev_sync --enable-pkgconfig --enable-applib";
|
||||||
|
|
||||||
buildInputs = [ pkgconfig udev ];
|
buildInputs = [ pkgconfig udev ];
|
||||||
|
|
||||||
|
patches = [ ./purity.patch ];
|
||||||
|
|
||||||
# To prevent make install from failing.
|
# To prevent make install from failing.
|
||||||
preInstall = "installFlags=\"OWNER= GROUP= confdir=$out/etc\"";
|
preInstall = "installFlags=\"OWNER= GROUP= confdir=$out/etc\"";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://sourceware.org/lvm2/;
|
homepage = http://sourceware.org/lvm2/;
|
||||||
descriptions = "Tools to support Logical Volume Management (LVM) on Linux";
|
descriptions = "Tools to support Logical Volume Management (LVM) on Linux";
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
55
pkgs/os-specific/linux/lvm2/purity.patch
Normal file
55
pkgs/os-specific/linux/lvm2/purity.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
TODO: fix path to blkid as well.
|
||||||
|
|
||||||
|
Currently we set it to /sbin/blkid because in nixos we fix a lot of references
|
||||||
|
to /sbin/blkid anyway.
|
||||||
|
|
||||||
|
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
|
||||||
|
index 605e088..8865d54 100644
|
||||||
|
--- a/udev/10-dm.rules.in
|
||||||
|
+++ b/udev/10-dm.rules.in
|
||||||
|
@@ -19,9 +19,8 @@ KERNEL=="device-mapper", NAME="(DM_DIR)/control"
|
||||||
|
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 --git a/udev/13-dm-disk.rules b/udev/13-dm-disk.rules
|
||||||
|
index 271ca22..cdc583f 100644
|
||||||
|
--- a/udev/13-dm-disk.rules
|
||||||
|
+++ b/udev/13-dm-disk.rules
|
||||||
|
@@ -19,7 +19,7 @@ ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
|
||||||
|
|
||||||
|
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
|
||||||
|
|
||||||
|
-IMPORT{program}="$env{DM_SBIN_PATH}/blkid -o udev -p $tempnode"
|
||||||
|
+IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
|
||||||
|
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
|
||||||
|
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
||||||
|
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
|
||||||
|
diff --git a/udev/Makefile.in b/udev/Makefile.in
|
||||||
|
index 11635bb..49cf732 100644
|
||||||
|
--- a/udev/Makefile.in
|
||||||
|
+++ b/udev/Makefile.in
|
||||||
|
@@ -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 @@ include $(top_builddir)/make.tmpl
|
||||||
|
vpath %.rules $(srcdir)
|
||||||
|
|
||||||
|
%.rules: %.rules.in
|
||||||
|
- $(SED) -e "s/(DM_DIR)/$(DM_DIR)/" $< >$@
|
||||||
|
+ $(SED) -e "s/(DM_DIR)/$(DM_DIR)/" -e "s|(sbindir)|$(sbindir)|" $< >$@
|
||||||
|
|
||||||
|
%_install: %.rules
|
||||||
|
$(INSTALL_DATA) -D $< $(udevdir)/$(<F)
|
Loading…
x
Reference in New Issue
Block a user