Drop support for unionfs, broken and broken

cleanup-cruft
Fabio Erculiani 12 years ago
parent 009f481e7b
commit f1487fa8b6

@ -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 '

@ -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

@ -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}"

@ -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).

@ -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=<foo> 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}"

@ -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

@ -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}" ]

@ -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'

@ -297,11 +297,6 @@ then
compile_busybox
fi
if isTrue "${UNIONFS}"
then
compile_unionfs_fuse
fi
# Compile initramfs
create_initramfs
else

@ -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

@ -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)

Loading…
Cancel
Save