/bin/tar -jxpf ${BUSYBOX_SRCTAR} ||
gen_die 'Could not extract busybox source tarball!'
[ -d "${BUSYBOX_DIR}" ] ||
- gen_die 'Busybox directory ${BUSYBOX_DIR} is invalid!'
+ gen_die "Busybox directory ${BUSYBOX_DIR} is invalid!"
cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config"
cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config.gk_orig"
cd "${BUSYBOX_DIR}"
/bin/tar -zxpf ${LVM_SRCTAR} ||
gen_die 'Could not extract LVM source tarball!'
[ -d "${LVM_DIR}" ] ||
- gen_die 'LVM directory ${LVM_DIR} is invalid!'
+ gen_die "LVM directory ${LVM_DIR} is invalid!"
cd "${LVM_DIR}"
apply_patches lvm ${LVM_VER}
print_info 1 'lvm: >> Configuring...'
CFLAGS="-fPIC" \
- ./configure --enable-static_link --prefix=${TEMP}/lvm \
+ ./configure --enable-static_link --prefix=/ \
--with-lvm1=internal --with-clvmd=none --with-cluster=none \
--disable-readline --disable-selinux --with-mirrors=internal \
- --with-snapshots=internal --with-pool=internal >> ${LOGFILE} 2>&1 || \
+ --with-snapshots=internal --with-pool=internal \
+ >> ${LOGFILE} 2>&1 || \
gen_die 'Configure of lvm failed!'
print_info 1 'lvm: >> Compiling...'
- compile_generic '' utils
- compile_generic 'install' utils
+ compile_generic '' utils
+ compile_generic "install DESTDIR=${TEMP}/lvm/" utils
cd "${TEMP}/lvm"
print_info 1 ' >> Copying to bincache...'
# See bug 382555
${UTILS_CROSS_COMPILE}strip "sbin/dmsetup.static" ||
gen_die 'Could not strip dmsetup.static'
- /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static sbin/dmsetup.static ||
+ /bin/tar -cjf "${LVM_BINCACHE}" . ||
gen_die 'Could not create binary cache'
cd "${TEMP}"
- rm -rf "${TEMP}/device-mapper" > /dev/null
+ rm -rf "${TEMP}/lvm" > /dev/null
rm -rf "${LVM_DIR}" lvm
fi
}
/bin/tar -jxpf "${MDADM_SRCTAR}" ||
gen_die 'Could not extract MDADM source tarball!'
[ -d "${MDADM_DIR}" ] ||
- gen_die 'MDADM directory ${MDADM_DIR} is invalid!'
+ gen_die "MDADM directory ${MDADM_DIR} is invalid!"
cd "${MDADM_DIR}"
apply_patches mdadm ${MDADM_VER}
/bin/tar -jxpf ${DMRAID_SRCTAR} ||
gen_die 'Could not extract DMRAID source tarball!'
[ -d "${DMRAID_DIR}" ] ||
- gen_die 'DMRAID directory ${DMRAID_DIR} is invalid!'
- rm -rf "${TEMP}/device-mapper" > /dev/null
- /bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
- gen_die "Could not extract device-mapper binary cache!";
+ gen_die "DMRAID directory ${DMRAID_DIR} is invalid!"
+ rm -rf "${TEMP}/lvm" > /dev/null
+ mkdir -p "${TEMP}/lvm"
+ /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/lvm" ||
+ gen_die "Could not extract LVM2 binary cache!";
cd "${DMRAID_DIR}"
apply_patches dmraid ${DMRAID_VER}
print_info 1 'dmraid: >> Configuring...'
- LDFLAGS="-L${TEMP}/device-mapper/lib" \
- CFLAGS="-I${TEMP}/device-mapper/include" \
- CPPFLAGS="-I${TEMP}/device-mapper/include" \
+ LDFLAGS="-L${TEMP}/lvm/lib" \
+ CFLAGS="-I${TEMP}/lvm/include" \
+ CPPFLAGS="-I${TEMP}/lvm/include" \
+ LIBS="-ldevmapper" \
./configure --enable-static_link --prefix=${TEMP}/dmraid >> ${LOGFILE} 2>&1 ||
gen_die 'Configure of dmraid failed!'
# We dont necessarily have selinux installed yet... look into
# selinux global support in the future.
- sed -i tools/Makefile -e "s|DMRAIDLIBS += -lselinux||g"
+ sed -i tools/Makefile -e "/DMRAID_LIBS +=/s|-lselinux||g"
###echo "DMRAIDLIBS += -lselinux -lsepol" >> tools/Makefile
mkdir -p "${TEMP}/dmraid"
print_info 1 'dmraid: >> Compiling...'
gen_die 'Could not create binary cache'
cd "${TEMP}"
- rm -rf "${TEMP}/device-mapper" > /dev/null
+ rm -rf "${TEMP}/lvm" > /dev/null
rm -rf "${DMRAID_DIR}" dmraid
fi
}
cd ${TEMP}
mkdir -p "${TEMP}/initramfs-lvm-temp/bin/"
mkdir -p "${TEMP}/initramfs-lvm-temp/etc/lvm/"
- if [ -e '/sbin/lvm.static' ]
+ if false && [ -e '/sbin/lvm.static' ]
then
print_info 1 ' LVM: Adding support (using local static binary /sbin/lvm.static)...'
cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
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'
+ elif false && [ -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" ||
# 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!'
+ rm -rf ${TEMP}/initramfs-lvm-temp/{lib,share,man,include,sbin/{lvm,dmsetup}}
fi
if [ -x /sbin/lvm ]
then