dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug #382555
authorFabio Erculiani <lxnay@sabayon.org>
Tue, 13 Sep 2011 09:16:17 +0000 (11:16 +0200)
committerFabio Erculiani <lxnay@sabayon.org>
Tue, 13 Sep 2011 09:16:17 +0000 (11:16 +0200)
ChangeLog
gen_compile.sh
gen_initramfs.sh

index fbc14182563d835ebdc08723873711a698a30114..3814ba6d3be8a9497a127b34af55b54ad722a009 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@
 # Distributed under the GPL v2
 # $Id$
 
+  13 Sep 2011; Fabio Erculiani <lxnay@gentoo.org> gen_compile.sh,
+  gen_initramfs.sh:
+  dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug
+  #382555
+
   11 Sep 2011; Fabio Erculiani <lxnay@gentoo.org> defaults/initrd.scripts,
   defaults/linuxrc:
   drop parse_opt usage and crufty, deprecated subshelling through 
index 2f8a71acfd2d52957b8f6db807b49f913bbb6562..045ca8f3bc01f082328f8629c9169028f7445fba 100755 (executable)
@@ -451,7 +451,10 @@ compile_lvm() {
                print_info 1 '      >> Copying to bincache...'
                strip "sbin/lvm.static" ||
                        gen_die 'Could not strip lvm.static!'
-               /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static ||
+               # See bug 382555
+               strip "sbin/dmsetup.static" ||
+                       gen_die 'Could not strip dmsetup.static'
+               /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static sbin/dmsetup.static ||
                        gen_die 'Could not create binary cache'
 
                cd "${TEMP}"
index 5c47fd7634a266679ff75003efaa885e7f5768b5..50ddbe584b14b52f29dbccada120207e90a23835 100755 (executable)
@@ -247,11 +247,21 @@ append_lvm(){
                print_info 1 '          LVM: Adding support (using local static binary /sbin/lvm.static)...'
                cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
                        gen_die 'Could not copy over lvm!'
+               # See bug 382555
+               if [ -e '/sbin/dmsetup.static' ]
+               then
+                       cp /sbin/dmsetup.static "${TEMP}/initramfs-lvm-temp/bin/dmsetup"
+               fi
        elif [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable'
        then
                print_info 1 '          LVM: Adding support (using local static binary /sbin/lvm)...'
                cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
                        gen_die 'Could not copy over lvm!'
+               # See bug 382555
+               if [ -e '/sbin/dmsetup' ] && LC_ALL="C" ldd /sbin/dmsetup | grep -q 'not a dynamic executable'
+               then
+                       cp /sbin/dmsetup "${TEMP}/initramfs-lvm-temp/bin/dmsetup"
+               fi
        else
                print_info 1 '          LVM: Adding support (compiling binaries)...'
                compile_lvm
@@ -259,6 +269,9 @@ append_lvm(){
                        gen_die "Could not extract lvm binary cache!";
                mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm ||
                        gen_die 'LVM error: Could not move lvm.static to lvm!'
+               # See bug 382555
+               mv ${TEMP}/initramfs-lvm-temp/sbin/dmsetup.static ${TEMP}/initramfs-lvm-temp/bin/dmsetup ||
+                       gen_die 'LVM error: Could not move dmsetup.static to dmsetup!'
        fi
        if [ -x /sbin/lvm ]
        then