opt/lvm2: update to use udev
This delegates node creation to udev. Among other things, the important advantage of this approach is population of all the related stuff in /dev/disk/by-* ; relying on udev can also be controlled through lvm.conf and some commands' options. Comments related to this version: - another minor patch for static build scenario had to be applied; hopefully it will be fixed in upstream one day - configure is now consistent with libdevmapper (they can be trivially merged into single package now) - if you ran vgchange initially without udevd active (e.g. in initramfs), you will likely need vgchange --refresh (vgmknodes --refresh could work too, not tested though); this is important if you expect /dev/disk/by-* to be filled with lvm stuff after handover from udevless initramfs (fstab, mount, etc.). Signed-off-by: Michal Soltys <soltys@ziu.info>
This commit is contained in:
parent
d7ae48c06f
commit
706b21c2c4
@ -3,6 +3,10 @@ drwxr-xr-x root/root etc/lvm/
|
||||
drwx------ root/root etc/lvm/archive/
|
||||
drwx------ root/root etc/lvm/backup/
|
||||
-rw-r--r-- root/root etc/lvm/lvm.conf
|
||||
drwxr-xr-x root/root lib/
|
||||
drwxr-xr-x root/root lib/udev/
|
||||
drwxr-xr-x root/root lib/udev/rules.d/
|
||||
-r--r--r-- root/root lib/udev/rules.d/11-dm-lvm.rules
|
||||
drwxr-xr-x root/root sbin/
|
||||
-r-xr-xr-x root/root sbin/fsadm
|
||||
lrwxrwxrwx root/root sbin/lvchange -> lvm
|
||||
|
@ -1,2 +1,3 @@
|
||||
8b4e0897ee48f02c0dff11940e44e23b LVM2.2.02.84.tgz
|
||||
fe77537669f1aa73c1c4bcfe13036961 lvm2-static_build.patch
|
||||
642f6be3c88a78aa2f57c8c46a678995 lvm2-static_udev_rt.patch
|
||||
|
21
lvm2/Pkgfile
21
lvm2/Pkgfile
@ -5,21 +5,28 @@
|
||||
|
||||
name=lvm2
|
||||
version=2.02.84
|
||||
release=1
|
||||
release=2
|
||||
source=(ftp://sources.redhat.com/pub/lvm2/releases/LVM2.$version.tgz
|
||||
lvm2-static_build.patch)
|
||||
lvm2-static_udev_rt.patch
|
||||
lvm2-static_build.patch)
|
||||
|
||||
build() {
|
||||
cd LVM2.$version
|
||||
|
||||
patch -p1 -i $SRC/lvm2-static_build.patch
|
||||
patch -p1 -i $SRC/lvm2-static_udev_rt.patch
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--exec_prefix= \
|
||||
--datarootdir=/usr \
|
||||
--disable-readline \
|
||||
--enable-static_link \
|
||||
--with-{user,group}=root
|
||||
--exec-prefix= \
|
||||
--datarootdir=/usr \
|
||||
--with-udev-prefix= \
|
||||
--disable-readline \
|
||||
--enable-pkgconfig \
|
||||
--enable-static_link \
|
||||
--enable-udev_sync \
|
||||
--enable-udev_rules \
|
||||
--with-{user,group}=root
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install_lvm2
|
||||
|
||||
|
24
lvm2/lvm2-static_udev_rt.patch
Normal file
24
lvm2/lvm2-static_udev_rt.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -ur LVM2.2.02.84.orig/configure LVM2.2.02.84/configure
|
||||
--- LVM2.2.02.84.orig/configure 2011-02-17 13:52:46.028748001 +0100
|
||||
+++ LVM2.2.02.84/configure 2011-02-19 23:40:55.753991226 +0100
|
||||
@@ -8799,7 +8799,7 @@
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_udev_queue_get_udev_is_active" >&5
|
||||
$as_echo "$ac_cv_lib_udev_udev_queue_get_udev_is_active" >&6; }
|
||||
if test "x$ac_cv_lib_udev_udev_queue_get_udev_is_active" = x""yes; then :
|
||||
- UDEV_PC="libudev"; UDEV_LIBS="-ludev"
|
||||
+ UDEV_PC="libudev"; UDEV_LIBS="-ludev -lrt"
|
||||
else
|
||||
as_fn_error $? "bailing out... libudev library is required" "$LINENO" 5
|
||||
fi
|
||||
diff -ur LVM2.2.02.84.orig/configure.in LVM2.2.02.84/configure.in
|
||||
--- LVM2.2.02.84.orig/configure.in 2011-02-17 13:52:46.026748001 +0100
|
||||
+++ LVM2.2.02.84/configure.in 2011-02-19 23:41:42.625996529 +0100
|
||||
@@ -804,7 +804,7 @@
|
||||
|
||||
if test x$UDEV_SYNC = xyes; then
|
||||
AC_CHECK_LIB(udev, udev_queue_get_udev_is_active,
|
||||
- [UDEV_PC="libudev"; UDEV_LIBS="-ludev"],
|
||||
+ [UDEV_PC="libudev"; UDEV_LIBS="-ludev -lrt"],
|
||||
[AC_MSG_ERROR([bailing out... libudev library is required])])
|
||||
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
|
||||
fi
|
Loading…
Reference in New Issue
Block a user