r470 - in multipath-tools/trunk/debian: . patches

Guido Guenther agx at alioth.debian.org
Sat Jun 16 12:13:27 UTC 2007


Author: agx
Date: Sat Jun 16 12:13:27 2007
New Revision: 470

Log:
use dh_installudev
add debian specific udev rules for that


Added:
   multipath-tools/trunk/debian/kpartx.udev
   multipath-tools/trunk/debian/multipath.udev
Removed:
   multipath-tools/trunk/debian/kpartx.postinst
   multipath-tools/trunk/debian/multipath-tools.postinst
Modified:
   multipath-tools/trunk/debian/kpartx.install
   multipath-tools/trunk/debian/multipath-tools.install
   multipath-tools/trunk/debian/patches/Makefile-cleanups.diff
   multipath-tools/trunk/debian/rules

Modified: multipath-tools/trunk/debian/kpartx.install
==============================================================================
--- multipath-tools/trunk/debian/kpartx.install	(original)
+++ multipath-tools/trunk/debian/kpartx.install	Sat Jun 16 12:13:27 2007
@@ -1,3 +1,2 @@
 /usr/share/man/man8/kpartx.8.gz
-/etc/udev/kpartx.rules
 /sbin/kpartx

Added: multipath-tools/trunk/debian/kpartx.udev
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/kpartx.udev	Sat Jun 16 12:13:27 2007
@@ -0,0 +1,36 @@
+#
+# persistent links for device-mapper devices
+# only hardware-backed device-mapper devices (ie multipath, dmraid,
+# and kpartx) have meaningful persistent device names
+#
+
+KERNEL!="dm-*", GOTO="kpartx_end"
+ACTION=="remove", GOTO="kpartx_end"
+
+ENV{DM_TABLE_STATE}!="LIVE", GOTO="kpartx_end"
+
+ENV{DM_UUID}=="?*", IMPORT{program}=="/sbin/kpartx_id %M %m $env{DM_UUID}"
+
+OPTIONS="link_priority=50"
+
+# Create persistent links for multipath tables
+ENV{DM_UUID}=="mpath-*", \
+	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
+
+# Create persistent links for dmraid tables
+ENV{DM_UUID}=="mpath-*", \
+        SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
+
+# Create persistent links for partitions
+ENV{DM_PART}=="?*", \
+        SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"
+
+# Create dm tables for partitions
+ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \
+        RUN+="/sbin/kpartx -a -p -part /dev/$kernel"
+ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \
+        RUN+="/sbin/kpartx -a -p -part /dev/$kernel"
+
+LABEL="kpartx_end"
+
+

Modified: multipath-tools/trunk/debian/multipath-tools.install
==============================================================================
--- multipath-tools/trunk/debian/multipath-tools.install	(original)
+++ multipath-tools/trunk/debian/multipath-tools.install	Sat Jun 16 12:13:27 2007
@@ -1,4 +1,3 @@
-/etc/udev/multipath.rules
 /sbin/multi*
 /sbin/mpath_*
 /sbin/devmap_name

Added: multipath-tools/trunk/debian/multipath.udev
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath.udev	Sat Jun 16 12:13:27 2007
@@ -0,0 +1,7 @@
+#
+# udev rules for multipathing.
+# The persistent symlinks are created with the kpartx rules
+#
+
+# socket for uevents
+RUN+="socket:/org/kernel/dm/multipath_event"

Modified: multipath-tools/trunk/debian/patches/Makefile-cleanups.diff
==============================================================================
--- multipath-tools/trunk/debian/patches/Makefile-cleanups.diff	(original)
+++ multipath-tools/trunk/debian/patches/Makefile-cleanups.diff	Sat Jun 16 12:13:27 2007
@@ -3,8 +3,8 @@
 
 Index: multipath-tools.debian-git/path_priority/pp_random/Makefile
 ===================================================================
---- multipath-tools.debian-git.orig/path_priority/pp_random/Makefile	2007-06-08 12:03:28.000000000 +0200
-+++ multipath-tools.debian-git/path_priority/pp_random/Makefile	2007-06-08 12:05:12.000000000 +0200
+--- multipath-tools.debian-git.orig/path_priority/pp_random/Makefile	2007-06-10 21:21:08.000000000 +0200
++++ multipath-tools.debian-git/path_priority/pp_random/Makefile	2007-06-10 21:22:25.000000000 +0200
 @@ -14,7 +14,8 @@
  	$(CC) -static -o $(EXEC) $(OBJS)
  
@@ -17,8 +17,8 @@
  	rm $(DESTDIR)$(bindir)/$(EXEC)
 Index: multipath-tools.debian-git/path_priority/pp_alua/Makefile
 ===================================================================
---- multipath-tools.debian-git.orig/path_priority/pp_alua/Makefile	2007-06-08 12:05:00.000000000 +0200
-+++ multipath-tools.debian-git/path_priority/pp_alua/Makefile	2007-06-08 12:05:12.000000000 +0200
+--- multipath-tools.debian-git.orig/path_priority/pp_alua/Makefile	2007-06-10 21:22:18.000000000 +0200
++++ multipath-tools.debian-git/path_priority/pp_alua/Makefile	2007-06-10 21:22:25.000000000 +0200
 @@ -36,7 +36,7 @@
  	$(CC) -static -o $(EXEC) $(OBJS)
  
@@ -30,33 +30,16 @@
  uninstall:
 Index: multipath-tools.debian-git/multipath/Makefile
 ===================================================================
---- multipath-tools.debian-git.orig/multipath/Makefile	2007-06-08 12:05:00.000000000 +0200
-+++ multipath-tools.debian-git/multipath/Makefile	2007-06-08 12:05:12.000000000 +0200
-@@ -39,9 +39,9 @@
+--- multipath-tools.debian-git.orig/multipath/Makefile	2007-06-10 21:22:18.000000000 +0200
++++ multipath-tools.debian-git/multipath/Makefile	2007-06-10 21:22:48.000000000 +0200
+@@ -39,8 +39,8 @@
  
  install:
  	install -d $(DESTDIR)$(bindir)
 -	install -s -m 755 $(EXEC) $(DESTDIR)$(bindir)/
 -	install -d $(DESTDIR)/etc/udev/rules.d
--	install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
 +	install -m 755 $(EXEC) $(DESTDIR)$(bindir)/
 +	install -d $(DESTDIR)/etc/udev
-+	install -m 644 multipath.rules $(DESTDIR)/etc/udev/
+ 	install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
  	install -d $(DESTDIR)$(mandir)
  	install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
- 	install -d $(DESTDIR)$(man5dir)
-Index: multipath-tools.debian-git/kpartx/Makefile
-===================================================================
---- multipath-tools.debian-git.orig/kpartx/Makefile	2007-06-08 12:05:21.000000000 +0200
-+++ multipath-tools.debian-git/kpartx/Makefile	2007-06-08 12:05:34.000000000 +0200
-@@ -40,8 +40,8 @@
- 	install -d $(DESTDIR)$(bindir)
- 	install -s -m 755 $(EXEC) $(DESTDIR)$(bindir)
- 	install -m 755 kpartx_id $(DESTDIR)$(bindir)
--	install -d $(DESTDIR)/etc/udev/rules.d
--	install -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
-+	install -d $(DESTDIR)/etc/udev/
-+	install -m 644 kpartx.rules $(DESTDIR)/etc/udev/
- 	install -d $(DESTDIR)$(mandir)
- 	install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
- 

Modified: multipath-tools/trunk/debian/rules
==============================================================================
--- multipath-tools/trunk/debian/rules	(original)
+++ multipath-tools/trunk/debian/rules	Sat Jun 16 12:13:27 2007
@@ -44,6 +44,8 @@
 	dh_installexamples
 	dh_installinit -pmultipath-tools
 	dh_installinit -pmultipath-tools --name=multipath-tools-boot --no-start -- start 04 S .
+	dh_installudev -pkpartx
+	dh_installudev -pmultipath-tools --name=multipath
 	dh_installman
 	dh_link
 	dh_strip



More information about the pkg-lvm-commits mailing list