aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2007-02-12 18:32:45 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2007-02-12 18:32:45 +0000
commit01a16e0aa25c1a2d5ac568067487239874ad40cb (patch)
tree43a8561e5ffbae00feffdb7f84afb16c43eca8db /gen_compile.sh
parentAdded patch from Martin Parm <parmus@diku.dk> to fix the --no-color option. ... (diff)
downloadgenkernel-01a16e0aa25c1a2d5ac568067487239874ad40cb.tar.gz
genkernel-01a16e0aa25c1a2d5ac568067487239874ad40cb.tar.bz2
genkernel-01a16e0aa25c1a2d5ac568067487239874ad40cb.zip
Added patch from Fabio Erculiani <lxnay@lxnaydesign.net> to fix unionfs compilation. This is for bug #152945.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@481 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_compile.sh')
-rw-r--r--gen_compile.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/gen_compile.sh b/gen_compile.sh
index 85743802..4dabc146 100644
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -327,9 +327,9 @@ compile_unionfs_modules() {
gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!"
cd "${TEMP}"
rm -rf ${UNIONFS_DIR} > /dev/null
- rm -rf unionfs > /dev/null
- mkdir -p unionfs
- /bin/tar -zxpf ${UNIONFS_SRCTAR} ||
+ rm -rf unionfs* > /dev/null
+ mkdir unionfs
+ /bin/tar xzpf ${UNIONFS_SRCTAR} ||
gen_die 'Could not extract unionfs source tarball!'
[ -d "${UNIONFS_DIR}" ] ||
gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!'
@@ -338,6 +338,7 @@ compile_unionfs_modules() {
echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk
echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk
echo "MODDIR= /lib/modules/${KV}" >> fistdev.mk
+ echo "KVERS=${KV}" >> fistdev.mk
echo "KERNELVERSION=${KV}" >> fistdev.mk
# Fix for hardened/selinux systems to have extened attributes
# per r2d2's request. Also add -DUNIONFS_UNSUPPORTED for 2.6.16
@@ -350,11 +351,13 @@ compile_unionfs_modules() {
if [ "${PAT}" -ge '6' ]
then
- cd "${TEMP}"
- cd "${UNIONFS_DIR}"
+ # ARCH is used by unionfs - and conflicts with genkernel
+ ARCH_PUSH=${ARCH}
+ unset ARCH
# Compile unionfs module within the unionfs
# environment not within the kernelsrc dir
make unionfs.ko || gen_die 'failed to compile unionfs'
+ ARCH=${ARCH_PUSH}
else
gen_die 'unionfs is only supported on 2.6 targets'
fi
@@ -386,7 +389,7 @@ compile_unionfs_utils() {
gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!"
cd "${TEMP}"
rm -rf ${UNIONFS_DIR} > /dev/null
- rm -rf unionfs > /dev/null
+ rm -rf unionfs* > /dev/null
mkdir -p unionfs/sbin
/bin/tar -zxpf ${UNIONFS_SRCTAR} ||
gen_die 'Could not extract unionfs source tarball!'
@@ -394,16 +397,20 @@ compile_unionfs_utils() {
gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!'
cd "${UNIONFS_DIR}"
print_info 1 'unionfs tools: >> Compiling...'
+ sed -i utils/Makefile -e 's|${CC} -o|${CC} -static -o|g'
sed -i Makefile -e 's|${CC} -o|${CC} -static -o|g'
compile_generic utils utils
-
+
+ if [ ! -e "uniondbg" ]; then
+ cd utils
+ fi
print_info 1 'unionfs: >> Copying to cache...'
strip uniondbg unionctl
cp uniondbg ${TEMP}/unionfs/sbin/ ||
gen_die 'Could not copy the uniondbg binary to the tmp directory'
cp unionctl ${TEMP}/unionfs/sbin/ ||
gen_die 'Could not copy the unionctl binary to the tmp directory'
- cd ${TEMP}/unionfs
+ cd ${TEMP}/unionfs
/bin/tar -cjf "${UNIONFS_BINCACHE}" . ||
gen_die 'Could not create unionfs tools binary cache'