From: Fabio Erculiani Date: Tue, 13 Sep 2011 09:16:17 +0000 (+0200) Subject: dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug #382555 X-Git-Tag: v3.4.19~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7fef86581a32cc6684f4faf7b174d3f39cec89ee;p=genkernel.git dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug #382555 --- diff --git a/ChangeLog b/ChangeLog index fbc1418..3814ba6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ # Distributed under the GPL v2 # $Id$ + 13 Sep 2011; Fabio Erculiani gen_compile.sh, + gen_initramfs.sh: + dmraid requires dmsetup to assign UUID to discovered RAID volumes, close bug + #382555 + 11 Sep 2011; Fabio Erculiani defaults/initrd.scripts, defaults/linuxrc: drop parse_opt usage and crufty, deprecated subshelling through diff --git a/gen_compile.sh b/gen_compile.sh index 2f8a71a..045ca8f 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -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}" diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 5c47fd7..50ddbe5 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -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