diff -Naur genkernel-3.4.9_pre10.orig/gen_cmdline.sh genkernel-3.4.9_pre10/gen_cmdline.sh --- genkernel-3.4.9_pre10.orig/gen_cmdline.sh 2007-11-28 21:43:17.000000000 +0000 +++ genkernel-3.4.9_pre10/gen_cmdline.sh 2007-12-02 22:16:48.000000000 +0000 @@ -210,11 +210,11 @@ echo print_warning 1 "Please use --evms, as --evms2 is deprecated." ;; - --unionfs) - CMD_UNIONFS=1 - print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}" + --aufs) + CMD_AUFS=1 + print_info 2 "CMD_AUFS: ${CMD_AUFS}" echo - print_warning 1 "WARNING: unionfs support is in active development and is not meant for general" + print_warning 1 "WARNING: aufs support is in active development and is not meant for general" print_warning 1 "use." print_warning 1 "Bug Reports without patches/fixes will be ignored." print_warning 1 "Use at your own risk as this could blow up your system." diff -Naur genkernel-3.4.9_pre10.orig/gen_compile.sh genkernel-3.4.9_pre10/gen_compile.sh --- genkernel-3.4.9_pre10.orig/gen_compile.sh 2007-11-28 21:43:19.000000000 +0000 +++ genkernel-3.4.9_pre10/gen_compile.sh 2007-12-02 22:16:48.000000000 +0000 @@ -324,103 +324,69 @@ fi } -compile_unionfs_modules() { - if [ ! -f "${UNIONFS_MODULES_BINCACHE}" ] +compile_aufs_modules() { + if [ ! -f "${AUFS_MODULES_BINCACHE}" ] then - [ -f "${UNIONFS_SRCTAR}" ] || - gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!" + [ -f "${AUFS_SRCTAR}" ] || + gen_die "Could not find aufs source tarball: ${AUFS_SRCTAR}!" cd "${TEMP}" - rm -rf ${UNIONFS_DIR} > /dev/null - 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!' - 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 "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 - 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 - # 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 - print_info 1 'unionfs: >> Copying to cache...' + rm -rf ${AUFS_DIR} > /dev/null + rm -rf aufs* > /dev/null + mkdir aufs + /bin/tar xjpf ${AUFS_SRCTAR} || + gen_die 'Could not extract aufs source tarball!' + [ -d "${AUFS_DIR}" ] || + gen_die 'Unionfs directory ${AUFS_DIR} is invalid!' + cd "${AUFS_DIR}" + print_info 1 'aufs modules: >> Compiling...' + make KDIR="${KERNEL_DIR}" -f local.mk aufs.ko + print_info 1 'aufs: >> Copying to cache...' - mkdir -p ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs + mkdir -p ${TEMP}/aufs/lib/modules/${KV}/kernel/fs/aufs + cp -f fs/aufs/aufs.ko ${TEMP}/aufs/lib/modules/${KV}/kernel/fs/aufs - 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}/aufs + /bin/tar -cjf "${AUFS_MODULES_BINCACHE}" . || + gen_die 'Could not create aufs modules binary cache' cd "${TEMP}" - rm -rf "${UNIONFS_DIR}" > /dev/null - rm -rf unionfs > /dev/null + rm -rf "${AUFS_DIR}" > /dev/null + rm -rf aufs > /dev/null fi } -compile_unionfs_utils() { - if [ ! -f "${UNIONFS_BINCACHE}" ] +compile_aufs_utils() { + if [ ! -f "${AUFS_BINCACHE}" ] then - [ -f "${UNIONFS_SRCTAR}" ] || - gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!" + [ -f "${AUFS_SRCTAR}" ] || + gen_die "Could not find aufs source tarball: ${AUFS_SRCTAR}!" cd "${TEMP}" - rm -rf ${UNIONFS_DIR} > /dev/null - rm -rf unionfs* > /dev/null - mkdir -p unionfs/sbin - /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 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 - /bin/tar -cjf "${UNIONFS_BINCACHE}" . || - gen_die 'Could not create unionfs tools binary cache' + rm -rf ${AUFS_DIR} > /dev/null + rm -rf aufs* > /dev/null + mkdir -p aufs/sbin + /bin/tar -jxpf ${AUFS_SRCTAR} || + gen_die 'Could not extract aufs source tarball!' + [ -d "${AUFS_DIR}" ] || + gen_die 'Unionfs directory ${AUFS_DIR} is invalid!' + cd "${AUFS_DIR}" + # Patching MAkefile for static compiling + sed -i util/Makefile -e 's|-O2 -Wall|-O2 -Wall -static|g' + + print_info 1 'aufs tools: >> Compiling...' + make -j1 -f local.mk mount.aufs auplink aulchown umount.aufs + cd util + + print_info 1 'aufs: >> Copying to cache...' + cp mount.aufs auplink aulchown umount.aufs ${TEMP}/aufs/sbin/ || + gen_die 'Could not copy the aufs binary to the tmp directory' + cd ${TEMP}/aufs + /bin/tar -cjf "${AUFS_BINCACHE}" . || + gen_die 'Could not create aufs tools binary cache' cd "${TEMP}" - rm -rf "${UNIONFS_DIR}" > /dev/null - rm -rf unionfs > /dev/null + rm -rf "${AUFS_DIR}" > /dev/null + rm -rf aufs > /dev/null fi } diff -Naur genkernel-3.4.9_pre10.orig/gen_determineargs.sh genkernel-3.4.9_pre10/gen_determineargs.sh --- genkernel-3.4.9_pre10.orig/gen_determineargs.sh 2007-11-28 21:43:17.000000000 +0000 +++ genkernel-3.4.9_pre10/gen_determineargs.sh 2007-12-03 00:58:27.000000000 +0000 @@ -109,7 +109,7 @@ set_config_with_override 1 OLDCONFIG CMD_OLDCONFIG set_config_with_override 1 LVM CMD_LVM set_config_with_override 1 EVMS CMD_EVMS - set_config_with_override 1 UNIONFS CMD_UNIONFS + set_config_with_override 1 AUFS CMD_AUFS set_config_with_override 1 DMRAID CMD_DMRAID set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes" set_config_with_override 1 DEVFS CMD_UNDEFINED_CMD "no" @@ -128,8 +128,8 @@ DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"` LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"` DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"` - UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"` - UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"` + AUFS_BINCACHE=`cache_replace "${AUFS_BINCACHE}"` + AUFS_MODULES_BINCACHE=`cache_replace "${AUFS_MODULES_BINCACHE}"` BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"` DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` @@ -138,8 +138,8 @@ DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"` LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"` DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"` - UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"` - UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"` + AUFS_BINCACHE=`arch_replace "${AUFS_BINCACHE}"` + AUFS_MODULES_BINCACHE=`arch_replace "${AUFS_MODULES_BINCACHE}"` BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"` @@ -205,5 +205,5 @@ fi get_KV - UNIONFS_MODULES_BINCACHE=`kv_replace "${UNIONFS_MODULES_BINCACHE}"` + AUFS_MODULES_BINCACHE=`kv_replace "${AUFS_MODULES_BINCACHE}"` } diff -Naur genkernel-3.4.9_pre10.orig/gen_initramfs.sh genkernel-3.4.9_pre10/gen_initramfs.sh --- genkernel-3.4.9_pre10.orig/gen_initramfs.sh 2007-11-28 21:43:19.000000000 +0000 +++ genkernel-3.4.9_pre10/gen_initramfs.sh 2007-12-02 23:19:10.000000000 +0000 @@ -74,34 +74,34 @@ rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null } -append_unionfs_modules(){ - if [ -d "${TEMP}/initramfs-unionfs-modules-temp" ] +append_aufs_modules(){ + if [ -d "${TEMP}/initramfs-aufs-modules-temp" ] then - rm -r "${TEMP}/initramfs-unionfs-modules-temp/" + rm -r "${TEMP}/initramfs-aufs-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/" + print_info 1 'AUFS MODULES: Adding support (compiling)...' + compile_aufs_modules + mkdir -p "${TEMP}/initramfs-aufs-modules-temp/" + /bin/tar -jxpf "${AUFS_MODULES_BINCACHE}" -C "${TEMP}/initramfs-aufs-modules-temp" || + gen_die "Could not extract aufs modules binary cache!"; + cd "${TEMP}/initramfs-aufs-modules-temp/" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" - rm -r "${TEMP}/initramfs-unionfs-modules-temp/" + rm -r "${TEMP}/initramfs-aufs-modules-temp/" } -append_unionfs_tools(){ - if [ -d "${TEMP}/initramfs-unionfs-tools-temp" ] +append_aufs_tools(){ + if [ -d "${TEMP}/initramfs-aufs-tools-temp" ] then - rm -r "${TEMP}/initramfs-unionfs-tools-temp/" + rm -r "${TEMP}/initramfs-aufs-tools-temp/" fi - print_info 1 'UNIONFS TOOLS: Adding support (compiling)...' - compile_unionfs_utils - mkdir -p "${TEMP}/initramfs-unionfs-tools-temp/bin/" - /bin/tar -jxpf "${UNIONFS_BINCACHE}" -C "${TEMP}/initramfs-unionfs-tools-temp" || - gen_die "Could not extract unionfs tools binary cache!"; - cd "${TEMP}/initramfs-unionfs-tools-temp/" + print_info 1 'AUFS TOOLS: Adding support (compiling)...' + compile_aufs_utils + mkdir -p "${TEMP}/initramfs-aufs-tools-temp/bin/" + /bin/tar -jxpf "${AUFS_BINCACHE}" -C "${TEMP}/initramfs-aufs-tools-temp" || + gen_die "Could not extract aufs tools binary cache!"; + cd "${TEMP}/initramfs-aufs-tools-temp/" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" - rm -r "${TEMP}/initramfs-unionfs-tools-temp/" + rm -r "${TEMP}/initramfs-aufs-tools-temp/" } #append_suspend(){ @@ -408,7 +408,7 @@ rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup" - elsif is_static /sbin/cryptsetup + elif is_static /sbin/cryptsetup then print_info 1 "Including LUKS support" rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup @@ -456,8 +456,8 @@ append_data 'auxilary' append_data 'busybox' "${BUSYBOX}" # append_data 'devfs' "${DEVFS}" - append_data 'unionfs_modules' "${UNIONFS}" - append_data 'unionfs_tools' "${UNIONFS}" + append_data 'aufs_modules' "${AUFS}" + append_data 'aufs_tools' "${AUFS}" append_data 'lvm' "${LVM}" append_data 'dmraid' "${DMRAID}" append_data 'evms' "${EVMS}" diff -Naur genkernel-3.4.9_pre10.orig/gen_initrd.sh genkernel-3.4.9_pre10/gen_initrd.sh --- genkernel-3.4.9_pre10.orig/gen_initrd.sh 2007-11-28 21:43:16.000000000 +0000 +++ genkernel-3.4.9_pre10/gen_initrd.sh 2007-12-02 23:18:29.000000000 +0000 @@ -92,22 +92,22 @@ chmod +x "${TEMP}/initrd-temp/bin/devfsd" fi - #unionfs modules - if [ "${UNIONFS}" -eq '1' ] + #aufs modules + if [ "${AUFS}" -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!"; + print_info 1 'AUFS MODULES: Adding support (compiling)...' + compile_aufs_modules + /bin/tar -jxpf "${AUFS_MODULES_BINCACHE}" -C "${TEMP}/initrd-temp" || + gen_die "Could not extract aufs modules binary cache!"; fi - #unionfs utils - if [ "${UNIONFS}" -eq '1' ] + #aufs utils + if [ "${AUFS}" -eq '1' ] then - print_info 1 'UNIONFS TOOLS: Adding support (compiling)...' - compile_unionfs_utils - /bin/tar -jxpf "${UNIONFS_BINCACHE}" -C "${TEMP}/initrd-temp" || - gen_die "Could not extract unionfs tools binary cache!"; + print_info 1 'AUFS TOOLS: Adding support (compiling)...' + compile_aufs_utils + /bin/tar -jxpf "${AUFS_BINCACHE}" -C "${TEMP}/initrd-temp" || + gen_die "Could not extract aufs tools binary cache!"; fi # DMRAID @@ -216,7 +216,7 @@ rm -f ${TEMP}/initrd-temp/sbin/cryptsetup cp /bin/cryptsetup ${TEMP}/initrd-temp/sbin/cryptsetup chmod +x "${TEMP}/initrd-temp/sbin/cryptsetup" - elsif is_static /sbin/cryptsetup + elif is_static /sbin/cryptsetup then print_info 1 "Including LUKS support" rm -f ${TEMP}/initrd-temp/sbin/cryptsetup diff -Naur genkernel-3.4.9_pre10.orig/generic/initrd.scripts genkernel-3.4.9_pre10/generic/initrd.scripts --- genkernel-3.4.9_pre10.orig/generic/initrd.scripts 2007-11-28 21:43:19.000000000 +0000 +++ genkernel-3.4.9_pre10/generic/initrd.scripts 2007-12-02 23:12:22.000000000 +0000 @@ -187,12 +187,10 @@ # $2 = path to data directory # union_insert_dir() { - # detect branch 0 because newer unionfs doesn't support "0,1,2" - BRANCH_0="/"$(/sbin/unionctl $1 --list | cut -d/ -f2- | cut -d'(' -f1) - /sbin/unionctl $1 --add --after $BRANCH_0 --mode ro $2 + mount -n -o remount,append:$2=rr aufs $1 if [ $? = '0' ] then - good_msg "Addition of $2 to $1 after branch $BRANCH_0 successful" + good_msg "Addition of $2 to $1 successful" fi } @@ -801,59 +799,59 @@ fi } -setup_unionfs() { - if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] +setup_aufs() { + if [ "${USE_AUFS_NORMAL}" -eq '1' ] then # Directory used for rw changes in union mount filesystem UNION=/union MEMORY=/memory if [ -z "$UID" ] then - CHANGES=$MEMORY/unionfs_changes/default + CHANGES=$MEMORY/aufs_changes/default else - CHANGES=$MEMORY/unionfs_changes/$UID + CHANGES=$MEMORY/aufs_changes/$UID fi mkdir -p ${MEMORY} mkdir -p ${UNION} - good_msg "Loading unionfs module" - modprobe unionfs > /dev/null 2>&1 - if [ -n "${UNIONFS}" ] + good_msg "Loading aufs module" + modprobe aufs > /dev/null 2>&1 + if [ -n "${AUFS}" ] then - CHANGESDEV=${UNIONFS} - good_msg "mounting $CHANGESDEV to $MEMORY for unionfs support" + CHANGESDEV=${AUFS} + good_msg "mounting $CHANGESDEV to $MEMORY for aufs support" mount -t auto $CHANGESDEV $MEMORY # mount tmpfs only in the case when changes= boot parameter was # empty or we were not able to mount the storage device ret=$? if [ "${ret}" -ne 0 ] then - bad_msg "mount of $CHANGESDEV failed falling back to ramdisk based unionfs" + bad_msg "mount of $CHANGESDEV failed falling back to ramdisk based aufs" mount -t tmpfs tmpfs $MEMORY fi - if [ "${CDROOT}" -eq '1' -a ! -f ${MEMORY}/livecd.unionfs ] + if [ "${CDROOT}" -eq '1' -a ! -f ${MEMORY}/livecd.aufs ] then umount $MEMORY - bad_msg "failed to find livecd.unionfs file on $CHANGESDEV" - bad_msg "create a livecd.unionfs file on this device if you wish to use it for unionfs" - bad_msg "falling back to ramdisk based unionfs for safety" + bad_msg "failed to find livecd.aufs file on $CHANGESDEV" + bad_msg "create a livecd.aufs file on this device if you wish to use it for aufs" + bad_msg "falling back to ramdisk based aufs for safety" mount -t tmpfs tmpfs $MEMORY fi else - good_msg "Mounting ramdisk to $MEMORY for unionfs support..." + good_msg "Mounting ramdisk to $MEMORY for aufs support..." mount -t tmpfs tmpfs $MEMORY fi mkdir -p $CHANGES - mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION} + mount -t aufs -n -o br:$CHANGES=rw aufs ${UNION} ret=$? if [ "${ret}" -ne 0 ] then bad_msg "Can't setup union ${UNION} in directory!" - USE_UNIONFS_NORMAL=0 + USE_AUFS_NORMAL=0 fi else - USE_UNIONFS_NORMAL=0 + USE_AUFS_NORMAL=0 fi } diff -Naur genkernel-3.4.9_pre10.orig/generic/linuxrc genkernel-3.4.9_pre10/generic/linuxrc --- genkernel-3.4.9_pre10.orig/generic/linuxrc 2007-11-28 21:43:19.000000000 +0000 +++ genkernel-3.4.9_pre10/generic/linuxrc 2007-12-02 23:12:22.000000000 +0000 @@ -77,30 +77,30 @@ looptype\=*) LOOPTYPE=`parse_opt "${x}"` ;; - unionfs) - if [ ! -x /sbin/unionctl ] + aufs) + if [ ! -x /sbin/aulchown ] then - USE_UNIONFS_NORMAL=0 - bad_msg 'Unionctl not found: aborting use of unionfs!' + USE_AUFS_NORMAL=0 + bad_msg 'aulchown not found: aborting use of aufs!' else - USE_UNIONFS_NORMAL=1 + USE_AUFS_NORMAL=1 fi ;; - unionfs\=*) - if [ ! -x /sbin/unionctl ] + aufs\=*) + if [ ! -x /sbin/aulchown ] then - USE_UNIONFS_NORMAL=0 - bad_msg 'Unionctl not found: aborting use of unionfs!' + USE_AUFS_NORMAL=0 + bad_msg 'aulchown not found: aborting use of aufs!' else - USE_UNIONFS_NORMAL=1 - CMD_UNIONFS=`parse_opt "${x}"` - echo ${CMD_UNIONFS}|grep , >/dev/null 2>&1 + USE_AUFS_NORMAL=1 + CMD_AUFS=`parse_opt "${x}"` + echo ${CMD_AUFS}|grep , >/dev/null 2>&1 if [ "$?" -eq '0' ] then - UID=`echo ${CMD_UNIONFS#*,}` - UNIONFS=`echo ${CMD_UNIONFS%,*}` + UID=`echo ${CMD_AUFS#*,}` + AUFS=`echo ${CMD_AUFS%,*}` else - UNIONFS=${CMD_UNIONFS} + AUFS=${CMD_AUFS} fi fi ;; @@ -242,11 +242,11 @@ startLUKS fi -# Set up unionfs +# Set up aufs mkdir -p ${NEW_ROOT} -setup_unionfs +setup_aufs -if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] +if [ "${USE_AUFS_NORMAL}" -eq '1' ] then CHROOT=${UNION} else @@ -260,7 +260,7 @@ if [ "${CDROOT}" -eq '1' ] then - if [ ! "${USE_UNIONFS_NORMAL}" -eq '1' ] + if [ ! "${USE_AUFS_NORMAL}" -eq '1' ] then good_msg "Making tmpfs for ${NEW_ROOT}" mount -t tmpfs tmpfs ${NEW_ROOT} @@ -601,11 +601,11 @@ # End cdrom looptype determination and mounting if necessary # - if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] + if [ "${USE_AUFS_NORMAL}" -eq '1' ] then union_insert_dir ${UNION} ${NEW_ROOT}/${FS_LOCATION} - # Make sure fstab notes livecd is mounted ro. Makes system skip remount which fails on unionfs dirs. + # Make sure fstab notes livecd is mounted ro. Makes system skip remount which fails on aufs 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 fi @@ -627,7 +627,7 @@ fi - if [ ! "${USE_UNIONFS_NORMAL}" -eq '1' ] + if [ ! "${USE_AUFS_NORMAL}" -eq '1' ] then good_msg "Copying read-write image contents to tmpfs" # Copy over stuff that should be writable @@ -695,7 +695,7 @@ sleep 10 fi else - if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] + if [ "${USE_AUFS_NORMAL}" -eq '1' ] then union_insert_dir ${UNION} ${NEW_ROOT} mkdir -p ${UNION}/tmp/.initrd @@ -717,10 +717,10 @@ # init scripts will be able to unmount it properly at next reboot # # Eventually, all "unions over /" mounts should go in that /.unions/ -if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] +if [ "${USE_AUFS_NORMAL}" -eq '1' ] then mkdir -p /${CHROOT}/.unions/memory 2>/dev/null - mount -o move /memory /${CHROOT}/.unions/memory || echo '*: Failed to move unionfs /memory into the system root!' + mount -o move /memory /${CHROOT}/.unions/memory || echo '*: Failed to move aufs /memory into the system root!' fi if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ] diff -Naur genkernel-3.4.9_pre10.orig/genkernel genkernel-3.4.9_pre10/genkernel --- genkernel-3.4.9_pre10.orig/genkernel 2007-11-28 21:43:17.000000000 +0000 +++ genkernel-3.4.9_pre10/genkernel 2007-12-02 22:16:48.000000000 +0000 @@ -395,8 +395,8 @@ [ "${EVMS}" -eq '1' ] && print_info 1 'add "doevms" for evms support' [ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support' [ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid="' - [ "${UNIONFS}" -eq '1' ] && print_info 1 'add "unionfs" for unionfs support' - [ "${UNIONFS}" -eq '1' ] && print_info 1 ' or "unionfs="' + [ "${AUFS}" -eq '1' ] && print_info 1 'add "aufs" for aufs support' + [ "${AUFS}" -eq '1' ] && print_info 1 ' or "aufs="' fi [ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR} diff -Naur genkernel-3.4.9_pre10.orig/genkernel.conf genkernel-3.4.9_pre10/genkernel.conf --- genkernel-3.4.9_pre10.orig/genkernel.conf 2007-11-28 21:43:13.000000000 +0000 +++ genkernel-3.4.9_pre10/genkernel.conf 2007-12-03 00:26:51.000000000 +0000 @@ -61,9 +61,9 @@ # should run "emerge evms" first. # EVMS="no" -# UnionFS support. Under active development. Do not use unless you are working +# AUFS support. Under active development. Do not use unless you are working # on developing this feature. -# UNIONFS="no" +# AUFS="no" # Add DMRAID support. # DMRAID="no" @@ -149,30 +149,28 @@ DEVFSD_BINCACHE="%%CACHE%%/devfsd-${DEVFSD_VER}-%%ARCH%%.bz2" DEVFSD_CONF_BINCACHE="%%CACHE%%/devfsd-conf-${DIETLIBC_VER}-%%ARCH%%.bz2" -DEVICE_MAPPER_VER="VERSION_DMAP" +DEVICE_MAPPER_VER="1.02.22" DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}" DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz" DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2" -LVM_VER="VERSION_LVM" +LVM_VER="2.02.28" LVM_DIR="LVM2.${LVM_VER}" LVM_SRCTAR="${GK_SHARE}/pkg/LVM2.${LVM_VER}.tgz" LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2" -DMRAID_VER="VERSION_DMRAID" +DMRAID_VER="1.0.0.rc14" 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) -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" +AUFS_VER="20071126" +AUFS_DIR="aufs" +AUFS_SRCTAR="${GK_SHARE}/pkg/aufs-${AUFS_VER}.tar.bz2" +AUFS_BINCACHE="%%CACHE%%/aufs-${AUFS_VER}-tools-%%ARCH%%.tar.bz2" +AUFS_MODULES_BINCACHE="%%CACHE%%/aufs-${AUFS_VER}-modules-%%KV%%-%%ARCH%%.tar.bz2" -E2FSPROGS_VER="VERSION_E2FSPROGS" +E2FSPROGS_VER="1.39" E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}" E2FSPROGS_SRCTAR="${GK_SHARE}/pkg/e2fsprogs-${E2FSPROGS_VER}.tar.gz" BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"