00ac4bfa02
git-svn-id: http://svn.sabayonlinux.org/overlay@737 d7aec97c-591d-0410-af39-a8856400b30a
85 lines
3.1 KiB
Diff
85 lines
3.1 KiB
Diff
--- gen_compile.sh 2006-10-16 01:06:39.000000000 +0200
|
|
+++ gen_compile.sh.new 2006-10-27 08:19:24.000000000 +0200
|
|
@@ -324,9 +324,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!'
|
|
@@ -335,6 +335,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
|
|
@@ -347,11 +348,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
|
|
@@ -383,7 +386,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!'
|
|
@@ -391,16 +394,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'
|
|
|
|
diff -Nurp generic/linuxrc generic/linuxrc.new
|
|
--- generic/linuxrc
|
|
+++ generic/linuxrc.new
|
|
@@ -557,6 +557,9 @@ then
|
|
then
|
|
union_insert_dir ${UNION} ${NEW_ROOT}/${FS_LOCATION}
|
|
|
|
+ mkdir ${UNION}/mnt/livecd
|
|
+ mount --bind ${NEW_ROOT}/${FS_LOCATION} ${UNION}/mnt/livecd
|
|
+
|
|
# Make sure fstab notes livecd is mounted ro. Makes system skip remount which fails on unionfs dirs.
|
|
sed -e 's|\(.*\s/\s*tmpfs\s*\)defaults\(.*\)|\1defaults,ro\2|' /${UNION}/etc/fstab > /${UNION}/etc/fstab.new
|
|
mv /${UNION}/etc/fstab.new /${UNION}/etc/fstab
|