diff -Nurp genkernel-3.4.6.orig/gen_compile.sh genkernel-3.4.6/gen_compile.sh --- genkernel-3.4.6.orig/gen_compile.sh 2006-12-27 20:07:30.000000000 +0100 +++ genkernel-3.4.6/gen_compile.sh 2007-02-08 03:41:25.000000000 +0100 @@ -320,65 +320,6 @@ compile_kernel() { fi } -compile_unionfs_modules() { - if [ ! -f "${UNIONFS_MODULES_BINCACHE}" ] - then - [ -f "${UNIONFS_SRCTAR}" ] || - 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} || - gen_die 'Could not extract unionfs source tarball!' - [ -d "${UNIONFS_DIR}" ] || - gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!' - cd "${UNIONFS_DIR}" - print_info 1 'unionfs modules: >> Compiling...' - echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk - echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk - echo "MODDIR= /lib/modules/${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 - echo "EXTRACFLAGS=-DUNIONFS_XATTR -DFIST_SETXATTR_CONSTVOID -DUNIONFS_UNSUPPORTED" \ - >> fistdev.mk - # Here we do something really nasty and disable debugging, along with - # change our default CFLAGS - echo "UNIONFS_DEBUG_CFLAG=-DUNIONFS_NDEBUG" >> fistdev.mk - echo "UNIONFS_OPT_CFLAG= -O2 -pipe" >> fistdev.mk - - if [ "${PAT}" -ge '6' ] - then - cd "${TEMP}" - cd "${UNIONFS_DIR}" - # Compile unionfs module within the unionfs - # environment not within the kernelsrc dir - make unionfs.ko || gen_die 'failed to compile unionfs' - else - gen_die 'unionfs is only supported on 2.6 targets' - fi - print_info 1 'unionfs: >> Copying to cache...' - - mkdir -p ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs - - if [ -f unionfs.ko ] - then - cp -f unionfs.ko ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs - else - cp -f unionfs.o ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs - fi - - cd ${TEMP}/unionfs - /bin/tar -cjf "${UNIONFS_MODULES_BINCACHE}" . || - gen_die 'Could not create unionfs modules binary cache' - - cd "${TEMP}" - rm -rf "${UNIONFS_DIR}" > /dev/null - rm -rf unionfs > /dev/null - fi -} - compile_unionfs_utils() { if [ ! -f "${UNIONFS_BINCACHE}" ] then @@ -388,15 +329,16 @@ compile_unionfs_utils() { rm -rf ${UNIONFS_DIR} > /dev/null rm -rf unionfs > /dev/null mkdir -p unionfs/sbin + rm -rf ${UNIONFS_DIR} > /dev/null /bin/tar -zxpf ${UNIONFS_SRCTAR} || gen_die 'Could not extract unionfs source tarball!' [ -d "${UNIONFS_DIR}" ] || gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!' cd "${UNIONFS_DIR}" print_info 1 'unionfs tools: >> Compiling...' - sed -i Makefile -e 's|${CC} -o|${CC} -static -o|g' - compile_generic utils utils - + ./bootstrap &> /dev/null + ./configure >> ${DEBUGFILE} 2>&1 || gen_die 'Configuring unionfs-utils failed!' + compile_generic '' utils print_info 1 'unionfs: >> Copying to cache...' strip uniondbg unionctl cp uniondbg ${TEMP}/unionfs/sbin/ || @@ -408,7 +350,6 @@ compile_unionfs_utils() { gen_die 'Could not create unionfs tools binary cache' cd "${TEMP}" - rm -rf "${UNIONFS_DIR}" > /dev/null rm -rf unionfs > /dev/null fi } diff -Nurp genkernel-3.4.6.orig/generic/linuxrc genkernel-3.4.6/generic/linuxrc --- genkernel-3.4.6.orig/generic/linuxrc 2007-02-08 03:38:55.000000000 +0100 +++ genkernel-3.4.6/generic/linuxrc 2007-02-08 03:39:35.000000000 +0100 @@ -561,6 +561,10 @@ then if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] 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 diff -Nurp genkernel-3.4.6.orig/gen_initramfs.sh genkernel-3.4.6/gen_initramfs.sh --- genkernel-3.4.6.orig/gen_initramfs.sh 2006-12-27 20:07:30.000000000 +0100 +++ genkernel-3.4.6/gen_initramfs.sh 2007-02-08 03:39:35.000000000 +0100 @@ -137,21 +137,6 @@ append_devfs(){ rm -rf "${TEMP}/initramfs-devfs-temp" > /dev/null } -append_unionfs_modules(){ - if [ -d "${TEMP}/initramfs-unionfs-modules-temp" ] - then - rm -r "${TEMP}/initramfs-unionfs-modules-temp/" - fi - print_info 1 'UNIONFS MODULES: Adding support (compiling)...' - compile_unionfs_modules - mkdir -p "${TEMP}/initramfs-unionfs-modules-temp/" - /bin/tar -jxpf "${UNIONFS_MODULES_BINCACHE}" -C "${TEMP}/initramfs-unionfs-modules-temp" || - gen_die "Could not extract unionfs modules binary cache!"; - cd "${TEMP}/initramfs-unionfs-modules-temp/" - find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" - rm -r "${TEMP}/initramfs-unionfs-modules-temp/" -} - append_unionfs_tools(){ if [ -d "${TEMP}/initramfs-unionfs-tools-temp" ] then diff -Nurp genkernel-3.4.6.orig/gen_initrd.sh genkernel-3.4.6/gen_initrd.sh --- genkernel-3.4.6.orig/gen_initrd.sh 2006-12-27 20:07:29.000000000 +0100 +++ genkernel-3.4.6/gen_initrd.sh 2007-02-08 03:39:35.000000000 +0100 @@ -126,15 +126,6 @@ create_base_initrd_sys() { # fi # fi - #unionfs modules - if [ "${UNIONFS}" -eq '1' ] - then - print_info 1 'UNIONFS MODULES: Adding support (compiling)...' - compile_unionfs_modules - /bin/tar -jxpf "${UNIONFS_MODULES_BINCACHE}" -C "${TEMP}/initrd-temp" || - gen_die "Could not extract unionfs modules binary cache!"; - fi - #unionfs utils if [ "${UNIONFS}" -eq '1' ] then diff -Nurp genkernel-3.4.6.orig/genkernel.conf genkernel-3.4.6/genkernel.conf --- genkernel-3.4.6.orig/genkernel.conf 2006-12-27 20:07:28.000000000 +0100 +++ genkernel-3.4.6/genkernel.conf 2007-02-08 03:39:35.000000000 +0100 @@ -122,18 +122,10 @@ DMRAID_DIR="dmraid/${DMRAID_VER}" DMRAID_SRCTAR="${GK_SHARE}/pkg/dmraid-${DMRAID_VER}.tar.bz2" DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2" -# Kernel Version Compatibility -# (from http://www.am-utils.org/project-unionfs.html) - -# 2.6.9 - 2.6.15 1.1.5 -# 2.6.16 1.2 -# 2.6.17 1.3 - UNIONFS_VER="VERSION_UNIONFS" -UNIONFS_DIR="unionfs-${UNIONFS_VER}" -UNIONFS_SRCTAR="${GK_SHARE}/pkg/unionfs-${UNIONFS_VER}.tar.gz" -UNIONFS_BINCACHE="%%CACHE%%/unionfs-${UNIONFS_VER}-tools-%%ARCH%%.tar.bz2" -UNIONFS_MODULES_BINCACHE="%%CACHE%%/unionfs-${UNIONFS_VER}-modules-%%KV%%-%%ARCH%%.tar.bz2" +UNIONFS_DIR="unionfs-utils" +UNIONFS_SRCTAR="${GK_SHARE}/pkg/unionfs-utils-${UNIONFS_VER}.tar.gz" +UNIONFS_BINCACHE="%%CACHE%%/unionfs-utils-${UNIONFS_VER}-%%ARCH%%.tar.bz2" E2FSPROGS_VER="VERSION_E2FSPROGS" E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}" diff -Nurp genkernel-3.4.6.orig/gen_initramfs.sh genkernel-3.4.6/gen_initramfs.sh --- genkernel-3.4.6.orig/gen_initramfs.sh 2007-02-08 03:42:56.000000000 +0100 +++ genkernel-3.4.6/gen_initramfs.sh 2007-02-08 03:48:12.000000000 +0100 @@ -469,7 +469,6 @@ create_initramfs() { append_data 'busybox' "${BUSYBOX}" append_data 'devfs' "${DEVFS}" # append_data 'udev' "${UDEV}" - append_data 'unionfs_modules' "${UNIONFS}" append_data 'unionfs_tools' "${UNIONFS}" append_data 'suspend' "${SUSPEND}" append_data 'lvm2' "${LVM2}"