core/libdevmapper: 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 dmsetup's command line 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 - example users' file is installed in /etc/udev/rules.d (not active) - configure is now consistent with lvm2 (they can be trivially merged into single package now) - minor adjustment to .pc Signed-off-by: Michal Soltys <soltys@ziu.info>
This commit is contained in:
parent
f9dbb7a481
commit
26e7b49782
@ -1,5 +1,14 @@
|
|||||||
|
drwxr-xr-x root/root etc/
|
||||||
|
drwxr-xr-x root/root etc/udev/
|
||||||
|
drwxr-xr-x root/root etc/udev/rules.d/
|
||||||
|
-rw-r--r-- root/root etc/udev/rules.d/12-dm-permissions.rules.example
|
||||||
drwxr-xr-x root/root lib/
|
drwxr-xr-x root/root lib/
|
||||||
-r-xr-xr-x root/root lib/libdevmapper.so.1.02
|
-r-xr-xr-x root/root lib/libdevmapper.so.1.02
|
||||||
|
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/10-dm.rules
|
||||||
|
-r--r--r-- root/root lib/udev/rules.d/13-dm-disk.rules
|
||||||
|
-r--r--r-- root/root lib/udev/rules.d/95-dm-notify.rules
|
||||||
drwxr-xr-x root/root sbin/
|
drwxr-xr-x root/root sbin/
|
||||||
-r-xr-xr-x root/root sbin/dmsetup
|
-r-xr-xr-x root/root sbin/dmsetup
|
||||||
-r-xr-xr-x root/root sbin/dmsetup.static
|
-r-xr-xr-x root/root sbin/dmsetup.static
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
8b4e0897ee48f02c0dff11940e44e23b LVM2.2.02.84.tgz
|
8b4e0897ee48f02c0dff11940e44e23b LVM2.2.02.84.tgz
|
||||||
fe77537669f1aa73c1c4bcfe13036961 lvm2-static_build.patch
|
fe77537669f1aa73c1c4bcfe13036961 lvm2-static_build.patch
|
||||||
|
642f6be3c88a78aa2f57c8c46a678995 lvm2-static_udev_rt.patch
|
||||||
|
@ -4,26 +4,34 @@
|
|||||||
|
|
||||||
name=libdevmapper
|
name=libdevmapper
|
||||||
version=1.02.63
|
version=1.02.63
|
||||||
release=1
|
release=2
|
||||||
source=(ftp://sources.redhat.com/pub/lvm2/releases/LVM2.2.02.84.tgz
|
source=(ftp://sources.redhat.com/pub/lvm2/releases/LVM2.2.02.84.tgz
|
||||||
lvm2-static_build.patch)
|
lvm2-static_udev_rt.patch
|
||||||
|
lvm2-static_build.patch)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd LVM2.2.02.84
|
cd LVM2.2.02.84
|
||||||
|
|
||||||
patch -p1 -i $SRC/lvm2-static_build.patch
|
patch -p1 -i $SRC/lvm2-static_build.patch
|
||||||
|
patch -p1 -i $SRC/lvm2-static_udev_rt.patch
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
./configure --prefix=/usr \
|
||||||
--sbindir=/sbin \
|
--exec-prefix= \
|
||||||
--libdir=/lib \
|
--datarootdir=/usr \
|
||||||
--datarootdir=/usr \
|
--with-udev-prefix= \
|
||||||
--with-staticdir=/sbin \
|
--disable-readline \
|
||||||
--with-usrlibdir=/usr/lib \
|
--enable-pkgconfig \
|
||||||
--disable-readline \
|
--enable-static_link \
|
||||||
--enable-pkgconfig \
|
--enable-udev_sync \
|
||||||
--enable-static_link \
|
--enable-udev_rules \
|
||||||
--with-{user,group}=root
|
--with-{user,group}=root
|
||||||
|
|
||||||
make device-mapper
|
make device-mapper
|
||||||
make DESTDIR=$PKG install_device-mapper
|
make DESTDIR=$PKG install_device-mapper
|
||||||
|
install -m0644 -D udev/12-dm-permissions.rules $PKG/etc/udev/rules.d/12-dm-permissions.rules.example
|
||||||
|
|
||||||
|
#pkgconfig insists on /lib one or the other way...
|
||||||
|
sed -i '/^libdir=/s|${exec_prefix}|/usr|' $PKG/usr/lib/pkgconfig/devmapper.pc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: sts=4 sw=4 ts=8 noet ft=sh:
|
||||||
|
24
libdevmapper/lvm2-static_udev_rt.patch
Normal file
24
libdevmapper/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