Package: src:multipath-tools
Version: 0.5.0-1
Tags: patch

Two years ago we made some changes to dmraid and multipath-tools in Ubuntu and 
I'd like to get them merged upstream.  The changes involve having dmraid 
disable its internal partition detection code, and rely instead on kpartx to 
activate partitions, since it understands gpt, but dmraid does not.  In the 
process of this, I noticed that there was a multipath-tools-boot package that 
you could use if you require the ability to boot from multipath, but there was 
no similar package for kpartx.  The attached patch creates a kpartx-boot and 
similar udeb packages so that those needing to boot from dmraid can install 
just kpartx without pulling in multipath-tools along with it.
=== modified file 'debian/changelog'
--- debian/changelog    2014-03-09 16:52:09 +0000
+++ debian/changelog    2014-06-09 17:10:19 +0000
@@ -1,3 +1,11 @@
+multipath-tools (0.5.0-2) unstable; urgency=low
+
+  * Split kpartx initramfs bits part of multipath-tools-boot
+    into kpartx-boot for dmraid
+  * Split kpartx out of multipth-tools-udeb into kpartx-udeb
+
+ -- Phillip Susi <ps...@ubuntu.com>  Mon, 09 Jun 2014 11:45:08 -0400
+
 multipath-tools (0.5.0-1) unstable; urgency=low
 
   * [955018b] Imported Upstream version 0.5.0

=== modified file 'debian/control'
--- debian/control      2014-03-09 16:52:09 +0000
+++ debian/control      2014-06-09 17:06:36 +0000
@@ -44,10 +44,16 @@
  Kpartx can be used to set up device mappings for the partitions of any
  partitioned block device. It is part of the Linux multipath-tools.
 
+Package: kpartx-boot
+Architecture: all
+Depends: ${misc:Depends}, initramfs-tools, kpartx (= ${source:Version})
+Description: Provides kpartx during boot
+ This package makes kpartx availible during boot to activate partitions
+
 Package: multipath-tools-boot
 Architecture: all
 Depends: ${misc:Depends}, initramfs-tools, 
- multipath-tools (>= ${source:Version}), multipath-tools (<< 
${source:Version}.1~)
+ multipath-tools (= ${source:Version}), kpartx-boot (= ${source:Version})
 Replaces: multipath-tools-initramfs (<< 1.0.1+nmu1)
 Breaks: multipath-tools-initramfs (<< 1.0.1+nmu1)
 Description: Support booting from multipath devices
@@ -63,7 +69,7 @@
 Package: multipath-udeb
 Package-Type: udeb
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, multipath-modules
+Depends: ${shlibs:Depends}, ${misc:Depends}, multipath-modules, kpartx-udeb
 Section: debian-installer
 Description: maintain multipath block device access - udeb package
  This is a udeb, or a microdeb, for the debian-installer.
@@ -71,3 +77,14 @@
  These tools are in charge of maintaining the disk multipath device maps and
  react to path and map events.
 
+Package: kpartx-udeb
+Package-Type: udeb
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: debian-installer
+Description: create device mappings for partitions - udeb package
+ This is a udeb, or a microdeb, for the debian-installer.
+ .
+Kpartx can be used to set up device mappings for the partitions of any
+partitioned block device. It is part of the Linux multipath-tools.
+

=== modified file 'debian/initramfs/hooks'
--- debian/initramfs/hooks      2011-03-05 03:22:32 +0000
+++ debian/initramfs/hooks      2014-06-09 15:57:28 +0000
@@ -27,7 +27,7 @@
 
 add_udev_rules()
 {
-  for rules in 60-multipath.rules 60-kpartx.rules; do
+  for rules in 60-multipath.rules; do
     if [ -e /lib/udev/rules.d/$rules ]; then
       cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
     fi
@@ -35,10 +35,6 @@
 }
 
 copy_exec /sbin/multipath              /sbin
-copy_exec /sbin/kpartx                 /sbin
-copy_exec /sbin/dmsetup                        /sbin
-copy_exec /lib/udev/dmsetup_env                /lib/udev
-copy_exec /lib/udev/kpartx_id          /lib/udev
 mkdir -p $DESTDIR/lib/multipath/
 for x in /lib/multipath/*; do
     copy_exec $x /lib/multipath/

=== added file 'debian/initramfs/kpartx.hook'
--- debian/initramfs/kpartx.hook        1970-01-01 00:00:00 +0000
+++ debian/initramfs/kpartx.hook        2014-06-09 15:59:55 +0000
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+PREREQS="udev"
+
+prereqs() { echo "$PREREQS"; }
+
+case $1 in
+prereqs)
+        prereqs
+        exit 0
+        ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+copy_exec /sbin/kpartx /sbin
+copy_exec /sbin/dmsetup                 /sbin
+copy_exec /lib/udev/dmsetup_env         /lib/udev
+copy_exec /lib/udev/kpartx_id           /lib/udev
+cp -p /lib/udev/rules.d/60-kpartx.rules $DESTDIR/lib/udev/rules.d/

=== added file 'debian/kpartx-boot.postinst'
--- debian/kpartx-boot.postinst 1970-01-01 00:00:00 +0000
+++ debian/kpartx-boot.postinst 2014-06-09 16:00:48 +0000
@@ -0,0 +1,34 @@
+#!/bin/sh
+# postinst script for kpartx-boot
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure)
+       if [ -x /usr/sbin/update-initramfs -a -e 
/etc/initramfs-tools/initramfs.conf ]; then
+               update-initramfs -u
+       fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

=== added file 'debian/kpartx-boot.postrm'
--- debian/kpartx-boot.postrm   1970-01-01 00:00:00 +0000
+++ debian/kpartx-boot.postrm   2014-06-09 16:00:48 +0000
@@ -0,0 +1,45 @@
+#!/bin/sh
+# postrm script for kpartx-boot
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove)
+       if [ -x /usr/sbin/update-initramfs -a -e 
/etc/initramfs-tools/initramfs.conf ]; then
+               update-initramfs -u
+       fi
+    ;;
+
+    purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

=== added file 'debian/kpartx-udeb.install'
--- debian/kpartx-udeb.install  1970-01-01 00:00:00 +0000
+++ debian/kpartx-udeb.install  2014-06-09 17:07:15 +0000
@@ -0,0 +1,1 @@
+/sbin/kpartx

=== modified file 'debian/multipath-udeb.install'
--- debian/multipath-udeb.install       2010-01-23 00:14:04 +0000
+++ debian/multipath-udeb.install       2014-06-09 17:07:25 +0000
@@ -1,4 +1,3 @@
 /sbin/multipath
 /lib/multipath/
 /lib/libmultipath.so.*
-/sbin/kpartx

=== modified file 'debian/rules'
--- debian/rules        2013-11-05 12:38:57 +0000
+++ debian/rules        2014-06-09 16:02:16 +0000
@@ -60,6 +60,7 @@
        dh_install -X.rules --fail-missing --sourcedir=$(CURDIR)/debian/tmp
        # initramfs stuff:
        install -D -m 755 debian/initramfs/hooks $(INITRAMFS)/hooks/multipath
+       install -D -m 755 debian/initramfs/kpartx.hook 
$(CURDIR)/debian/kpartx-boot/usr/share/initramfs-tools/hooks/kpartx
        install -D -m 755 debian/initramfs/local-top \
                $(INITRAMFS)/scripts/local-top/multipath
        install -D -m 755 debian/initramfs/init-top \

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to