From f1487fa8b6836588fc730d04f246d359e1dc04fc Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 5 May 2013 22:27:16 +0200 Subject: [PATCH] Drop support for unionfs, broken and broken --- defaults/initrd.scripts | 64 --------------------------------------- defaults/linuxrc | 26 +--------------- defaults/software.sh | 5 --- doc/genkernel.8.txt | 7 ----- gen_cmdline.sh | 6 ---- gen_compile.sh | 35 --------------------- gen_determineargs.sh | 3 -- gen_initramfs.sh | 20 ------------ genkernel | 5 --- genkernel.conf | 3 -- maintenance/docmatcher.py | 2 +- 11 files changed, 2 insertions(+), 174 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index ea48fb0..b283815 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1200,70 +1200,6 @@ setup_squashfs_aufs() { ) } -setup_unionfs() { - local rw_dir=$1 - local ro_dir=$2 - if [ "${USE_UNIONFS_NORMAL}" = '1' ] - then - # Directory used for rw changes in union mount filesystem - UNION=/union -# MEMORY=/memory -# if [ -z "$UID" ] -# then -# CHANGES=$MEMORY/unionfs_changes/default -# else -# CHANGES=$MEMORY/unionfs_changes/$UID -# fi - -# mkdir -p ${MEMORY} - mkdir -p ${UNION} - good_msg "Loading fuse module" - modprobe fuse > /dev/null 2>&1 -# if [ -n "${UNIONFS}" ] -# then -# CHANGESDEV=${UNIONFS} -# good_msg "mounting $CHANGESDEV to $MEMORY for unionfs 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" -# mount -t tmpfs tmpfs $MEMORY -# fi -# if [ "${CDROOT}" -eq '1' -a ! -f ${MEMORY}/livecd.unionfs ] -# 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" -# mount -t tmpfs tmpfs $MEMORY -# fi -# else -# good_msg "Mounting ramdisk to $MEMORY for unionfs support..." -# mount -t tmpfs tmpfs $MEMORY -# fi - - mkdir /tmp - mkdir -p ${UNION} -# mkdir -p $CHANGES -# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION} - good_msg "Creating union mount" - unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null - ret=$? - if [ ${ret} -ne 0 ] - then - bad_msg "Can't setup union mount!" - USE_UNIONFS_NORMAL=0 - fi - [ ! -d "${NEW_ROOT}${CDROOT_PATH}" ] && mkdir -p "${NEW_ROOT}${CDROOT_PATH}" - mount --bind "${CDROOT_PATH}" "${NEW_ROOT}${CDROOT_PATH}" - else - USE_UNIONFS_NORMAL=0 - fi -} - get_mounts_list() { awk ' diff --git a/defaults/linuxrc b/defaults/linuxrc index 1d5cf8a..52dc629 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -254,18 +254,6 @@ do aufs) USE_AUFS_NORMAL=1 ;; - unionfs) - if [ ! -x /sbin/unionfs ] - then - USE_UNIONFS_NORMAL=0 - bad_msg 'unionfs binary not found: aborting use of unionfs!' - else - USE_UNIONFS_NORMAL=1 - fi - ;; - nounionfs) - USE_UNIONFS_NORMAL=0 - ;; *=*) case "${x%%=*}" in *.*) @@ -801,11 +789,7 @@ then fi - if [ "${USE_UNIONFS_NORMAL}" = '1' ] - then - setup_unionfs ${NEW_ROOT} /${FS_LOCATION} - CHROOT=/union - elif [ "${USE_AUFS_NORMAL}" != '1' ]; then + if [ "${USE_AUFS_NORMAL}" != '1' ]; then good_msg "Copying read-write image contents to tmpfs" # Copy over stuff that should be writable @@ -873,14 +857,6 @@ then # Let Init scripts know that we booted from CD export CDBOOT CDBOOT=1 -else - if [ "${USE_UNIONFS_NORMAL}" = '1' ] - then - mkdir /union_changes - mount -t tmpfs tmpfs /union_changes - setup_unionfs /union_changes ${NEW_ROOT} - mkdir -p ${UNION}/tmp/.initrd - fi fi # Mount the additional things as required by udev & systemd diff --git a/defaults/software.sh b/defaults/software.sh index f242b5b..7df937e 100644 --- a/defaults/software.sh +++ b/defaults/software.sh @@ -24,11 +24,6 @@ FUSE_DIR="${FUSE_DIR:-fuse-${FUSE_VER}}" FUSE_SRCTAR="${FUSE_SRCTAR:-${DISTDIR}/fuse-${FUSE_VER}.tar.gz}" FUSE_BINCACHE="${FUSE_BINCACHE:-%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2}" -UNIONFS_FUSE_VER="${UNIONFS_FUSE_VER:-VERSION_UNIONFS_FUSE}" -UNIONFS_FUSE_DIR="${UNIONFS_FUSE_DIR:-unionfs-fuse-${UNIONFS_FUSE_VER}}" -UNIONFS_FUSE_SRCTAR="${UNIONFS_FUSE_SRCTAR:-${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2}" -UNIONFS_FUSE_BINCACHE="${UNIONFS_FUSE_BINCACHE:-%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2}" - GPG_VER="${GPG_VER:-VERSION_GPG}" GPG_DIR="${GPG_DIR:-gnupg-${GPG_VER}}" GPG_SRCTAR="${GPG_SRCTAR:-${DISTDIR}/gnupg-${GPG_VER}.tar.bz2}" diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index d5afd2e..61edda4 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -301,9 +301,6 @@ INITIALIZATION *--*[*no-*]*busybox*:: Includes or excludes busybox in the initrd or initramfs. -*--*[*no-*]*unionfs*:: - Includes or excludes support for unionfs - *--*[*no-*]*netboot*:: Creates or does not create a self-contained env in the initramfs @@ -535,10 +532,6 @@ which the ramdisk scripts would recognize. *iscsi_noibft*:: Specify iSCSI parameters. -*unionfs*:: -*nounionfs*:: - Enables/disables UnionFS. - *aufs*:: Enables support for AUFS2 (if available in the kernel). diff --git a/gen_cmdline.sh b/gen_cmdline.sh index cef291b..b992730 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -114,8 +114,6 @@ longusage() { echo " --no-gpg Exclude GPG-armored LUKS key support" echo " --busybox Include busybox" echo " --no-busybox Exclude busybox" - echo " --unionfs Include support for unionfs" - echo " --no-unionfs Exclude support for unionfs" echo " --netboot Create a self-contained env in the initramfs" echo " --no-netboot Exclude --netboot env" echo " --real-root= Specify a default for real_root=" @@ -286,10 +284,6 @@ parse_cmdline() { CMD_BUSYBOX=`parse_optbool "$*"` print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}" ;; - --unionfs|--no-unionfs) - CMD_UNIONFS=`parse_optbool "$*"` - print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}" - ;; --netboot|--no-netboot) CMD_NETBOOT=`parse_optbool "$*"` print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}" diff --git a/gen_compile.sh b/gen_compile.sh index 28ca3ef..c8f0c2e 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -434,41 +434,6 @@ compile_fuse() { fi } -compile_unionfs_fuse() { - if [ ! -f "${UNIONFS_FUSE_BINCACHE}" ] - then - - # We'll call compile_fuse() from here, since it's not needed directly by anything else - compile_fuse - - [ ! -f "${UNIONFS_FUSE_SRCTAR}" ] && - gen_die "Could not find unionfs-fuse source tarball: ${UNIONFS_FUSE_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" - cd "${TEMP}" - rm -rf "${UNIONFS_FUSE_DIR}" - tar -jxpf "${UNIONFS_FUSE_SRCTAR}" - [ ! -d "${UNIONFS_FUSE_DIR}" ] && - gen_die "unionfs-fuse directory ${UNIONFS_FUSE_DIR} invalid" - cd "${UNIONFS_FUSE_DIR}" - apply_patches unionfs-fuse ${UNIONFS_FUSE_VER} - print_info 1 'unionfs-fuse: >> Compiling...' - sed -i "/^\(CFLAGS\|CPPFLAGS\)/s:^\\(.*\\)$:\\1 -static -I${TEMP}/${FUSE_DIR}/include -L${TEMP}/${FUSE_DIR}/lib/.libs:" Makefile src/Makefile - sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lpthread -lrt:" Makefile src/Makefile - MAKE=${UTILS_MAKE} compile_generic "" "" - print_info 1 'unionfs-fuse: >> Copying to cache...' - [ -f "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ] || - gen_die 'unionfs binary does not exist!' - strip "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" || - gen_die 'Could not strip unionfs binary!' - bzip2 "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" || - gen_die 'bzip2 compression of unionfs binary failed!' - mv "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs.bz2" "${UNIONFS_FUSE_BINCACHE}" || - gen_die 'Could not copy the unionfs binary to the package directory, does the directory exist?' - - cd "${TEMP}" - rm -rf "${UNIONFS_FUSE_DIR}" > /dev/null - fi -} - compile_iscsi() { if [ ! -f "${ISCSI_BINCACHE}" ] then diff --git a/gen_determineargs.sh b/gen_determineargs.sh index b2b850a..bd1e4ed 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -114,7 +114,6 @@ determine_real_args() { set_config_with_override BOOL DMRAID CMD_DMRAID set_config_with_override BOOL ISCSI CMD_ISCSI set_config_with_override BOOL BUSYBOX CMD_BUSYBOX "yes" - set_config_with_override BOOL UNIONFS CMD_UNIONFS set_config_with_override BOOL NETBOOT CMD_NETBOOT set_config_with_override STRING REAL_ROOT CMD_REAL_ROOT set_config_with_override BOOL DISKLABEL CMD_DISKLABEL @@ -145,7 +144,6 @@ determine_real_args() { ISCSI_BINCACHE=`cache_replace "${ISCSI_BINCACHE}"` BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"` FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"` - UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"` GPG_BINCACHE=`cache_replace "${GPG_BINCACHE}"` DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` @@ -154,7 +152,6 @@ determine_real_args() { ISCSI_BINCACHE=`arch_replace "${ISCSI_BINCACHE}"` BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"` FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"` - UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"` GPG_BINCACHE=`arch_replace "${GPG_BINCACHE}"` if [ -n "${CMD_BOOTLOADER}" ] diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 1bf7f35..8894d75 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -199,24 +199,6 @@ append_blkid(){ # rm -rf "${TEMP}/initramfs-fuse-temp" > /dev/null #} -append_unionfs_fuse() { - if [ -d "${TEMP}/initramfs-unionfs-fuse-temp" ] - then - rm -r "${TEMP}/initramfs-unionfs-fuse-temp" - fi - cd ${TEMP} - mkdir -p "${TEMP}/initramfs-unionfs-fuse-temp/sbin/" - bzip2 -dc "${UNIONFS_FUSE_BINCACHE}" > "${TEMP}/initramfs-unionfs-fuse-temp/sbin/unionfs" || - gen_die 'Could not extract unionfs-fuse binary cache!' - chmod a+x "${TEMP}/initramfs-unionfs-fuse-temp/sbin/unionfs" - cd "${TEMP}/initramfs-unionfs-fuse-temp/" - log_future_cpio_content - find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ - || gen_die "compressing unionfs fuse cpio" - cd "${TEMP}" - rm -rf "${TEMP}/initramfs-unionfs-fuse-temp" > /dev/null -} - #append_suspend(){ # if [ -d "${TEMP}/initramfs-suspend-temp" ]; # then @@ -802,8 +784,6 @@ create_initramfs() { append_data 'blkid' "${DISKLABEL}" - append_data 'unionfs_fuse' "${UNIONFS}" - append_data 'splash' "${SPLASH}" append_data 'modprobed' diff --git a/genkernel b/genkernel index 83fbb51..9cdb92b 100755 --- a/genkernel +++ b/genkernel @@ -297,11 +297,6 @@ then compile_busybox fi - if isTrue "${UNIONFS}" - then - compile_unionfs_fuse - fi - # Compile initramfs create_initramfs else diff --git a/genkernel.conf b/genkernel.conf index 81e4cf3..0d7d3a9 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -90,9 +90,6 @@ USECOLOR="yes" # Add e2fsprogs support. #E2FSPROGS="no" -# Include support for unionfs -#UNIONFS="1" - # Enable copying of firmware into initramfs #FIRMWARE="no" # Specify directory to pull from diff --git a/maintenance/docmatcher.py b/maintenance/docmatcher.py index 6ba2cf9..2802e9e 100644 --- a/maintenance/docmatcher.py +++ b/maintenance/docmatcher.py @@ -19,7 +19,7 @@ NON_CONFIG_VARIABLES = ('BUILD_KERNEL', 'BUILD_MODULES', 'BUILD_RAMDISK', EXTRA_VARIABLES = ['ARCH_OVERRIDE', 'BOOTLOADER', 'CLEAR_CACHE_DIR', 'DEFAULT_KERNEL_SOURCE', 'DISTDIR', 'GK_SHARE', 'BUSYBOX_APPLETS'] -for app in ('DEVICE_MAPPER', 'UNIONFS_FUSE', 'BUSYBOX', 'DMRAID', 'LVM', 'ISCSI', 'FUSE', 'GPG', 'MDADM'): +for app in ('DEVICE_MAPPER', 'BUSYBOX', 'DMRAID', 'LVM', 'ISCSI', 'FUSE', 'GPG', 'MDADM'): for prop in ('DIR', 'SRCTAR', 'VER'): EXTRA_VARIABLES.append('%s_%s' % (app, prop)) EXTRA_VARIABLES = tuple(EXTRA_VARIABLES)