From dbfe7b10d78d8a71ee404af0d3952af48eeb4d1d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 18 Feb 2013 13:56:07 +0100 Subject: Removing incomplete support for fakeroot. --- scripts/build/binary_chroot | 23 ++------------------- scripts/build/bootstrap_debootstrap | 6 ------ scripts/build/chroot_devpts | 22 ++++++++------------ scripts/build/chroot_proc | 41 +++++++++++++------------------------ scripts/build/chroot_selinuxfs | 32 ++++++++--------------------- scripts/build/chroot_sysfs | 29 ++++++++------------------ scripts/build/config | 12 +---------- 7 files changed, 41 insertions(+), 124 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/binary_chroot b/scripts/build/binary_chroot index fb7c7546a..947e55b65 100755 --- a/scripts/build/binary_chroot +++ b/scripts/build/binary_chroot @@ -41,31 +41,12 @@ Create_lockfile .lock # Normally, virtual filesystems are not mounted here, but people tend to be lazy if [ -f chroot/proc/version ] then - if [ "${LB_USE_FAKEROOT}" != "true" ] - then - umount chroot/proc - else - rm -rf chroot/proc - mkdir -p chroot/proc - fi + umount chroot/proc fi if [ -d chroot/sys/kernel ] then - if [ "${LB_USE_FAKEROOT}" != "true" ] - then - umount chroot/sys - else - rm -rf chroot/sys - mkdir -p chroot/sys - fi -fi - -# Copying /dev if using fakeroot -if [ "${LB_USE_FAKEROOT}" = "true" ] -then - rm -rf chroot/dev - find /dev | cpio -dmpu chroot + umount chroot/sys fi if [ "${LB_BUILD_WITH_CHROOT}" = "false" ] diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap index 5f7df4b09..029b59df0 100755 --- a/scripts/build/bootstrap_debootstrap +++ b/scripts/build/bootstrap_debootstrap @@ -72,12 +72,6 @@ then DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --components=$(echo ${LIVE_IMAGE_ARCHIVE_AREAS} | sed -e 's| |,|g')" fi -case "${LB_USE_FAKEROOT}" in - true) - DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --variant=fakechroot" - ;; -esac - if [ "${_VERBOSE}" = "true" ] then DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --verbose" diff --git a/scripts/build/chroot_devpts b/scripts/build/chroot_devpts index 6b1a348a0..6075544c1 100755 --- a/scripts/build/chroot_devpts +++ b/scripts/build/chroot_devpts @@ -43,14 +43,11 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] - then - # Creating mountpoint - mkdir -p chroot/dev/pts + # Creating mountpoint + mkdir -p chroot/dev/pts - # Mounting /dev/pts - mount devpts-live -t devpts chroot/dev/pts || true - fi + # Mounting /dev/pts + mount devpts-live -t devpts chroot/dev/pts || true # Creating stage file Create_stagefile .build/chroot_devpts @@ -66,14 +63,11 @@ case "${1}" in Create_lockfile .lock # Unmounting /dev/pts - if [ "${LB_USE_FAKEROOT}" != "true" ] + if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/* then - if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/* - then - umount chroot/dev/pts - else - umount -f chroot/dev/pts > /dev/null 2>&1 || true - fi + umount chroot/dev/pts + else + umount -f chroot/dev/pts > /dev/null 2>&1 || true fi # Removing stage file diff --git a/scripts/build/chroot_proc b/scripts/build/chroot_proc index 99dd81178..ba564e3fb 100755 --- a/scripts/build/chroot_proc +++ b/scripts/build/chroot_proc @@ -43,17 +43,11 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] - then - # Creating mountpoint - mkdir -p chroot/proc - - # Mounting /proc - mount proc-live -t proc chroot/proc - else - rm -rf chroot/proc - ln -s /proc chroot/ - fi + # Creating mountpoint + mkdir -p chroot/proc + + # Mounting /proc + mount proc-live -t proc chroot/proc # Creating stage file Create_stagefile .build/chroot_proc @@ -68,23 +62,16 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] + # Workaround binfmt-support /proc locking + if [ -e chroot/proc/sys/fs/binfmt_misc/status ] + then + umount chroot/proc/sys/fs/binfmt_misc + fi + + # Unmounting /proc + if [ -e chroot/proc/version ] then - # Workaround binfmt-support /proc locking - if [ -e chroot/proc/sys/fs/binfmt_misc/status ] - then - umount chroot/proc/sys/fs/binfmt_misc - fi - - # Unmounting /proc - #fuser -km chroot/proc - if [ -e chroot/proc/version ] - then - umount chroot/proc - fi - else - rm -rf chroot/proc - mkdir -p chroot/proc + umount chroot/proc fi # Removing stage file diff --git a/scripts/build/chroot_selinuxfs b/scripts/build/chroot_selinuxfs index 23c2ae4e5..55b3e0ce1 100755 --- a/scripts/build/chroot_selinuxfs +++ b/scripts/build/chroot_selinuxfs @@ -45,17 +45,11 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] - then - # Create mountpoint - mkdir -p chroot/selinux - - # Mounting /selinux - mount selinuxfs-live -t selinuxfs chroot/selinux - else - rm -rf chroot/selinux - ln -s /selinux chroot/ - fi + # Create mountpoint + mkdir -p chroot/selinux + + # Mounting /selinux + mount selinuxfs-live -t selinuxfs chroot/selinux # Creating stage file Create_stagefile .build/chroot_selinuxfs @@ -71,20 +65,10 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] + # Unmounting /selinux + if [ -e chroot/selinux/enforce ] then - # Unmounting /selinux - #fuser -km chroot/selinux - if [ -e chroot/selinux/enforce ] - then - umount chroot/selinux - fi - else - if [ -e chroot/selinux ] - then - rm -rf chroot/selinux - mkdir -p chroot/selinux - fi + umount chroot/selinux fi # Removing stage file diff --git a/scripts/build/chroot_sysfs b/scripts/build/chroot_sysfs index a40078f30..4dab358db 100755 --- a/scripts/build/chroot_sysfs +++ b/scripts/build/chroot_sysfs @@ -43,17 +43,11 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] - then - # Create mountpoint - mkdir -p chroot/sys - - # Mounting /sys - mount sysfs-live -t sysfs chroot/sys - else - rm -rf chroot/sys - ln -s /sys chroot/ - fi + # Create mountpoint + mkdir -p chroot/sys + + # Mounting /sys + mount sysfs-live -t sysfs chroot/sys # Creating stage file Create_stagefile .build/chroot_sysfs @@ -68,17 +62,10 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ "${LB_USE_FAKEROOT}" != "true" ] + # Unmounting /sys + if [ -e chroot/sys/class ] then - # Unmounting /sys - #fuser -km chroot/sys - if [ -e chroot/sys/class ] - then - umount chroot/sys - fi - else - rm -rf chroot/sys - mkdir -p chroot/sys + umount chroot/sys fi # Removing stage file diff --git a/scripts/build/config b/scripts/build/config index 75c7b127a..55fa26be1 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -113,7 +113,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--net-cow-server IP|HOSTNAME]\n\ \t [--net-tarball true|false]\n\ \t [--quiet]\n\ -\t [--use-fakeroot true|false]\n\ \t [--archives ARCHIVE|\"ARCHIVES\"]\n\ \t [--archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\ \t [--parent-archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\ @@ -142,7 +141,7 @@ Local_arguments () LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,cdebootstrap-options:, apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:, cache-stages:,debconf-frontend:,debconf-priority:,dump, - initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,use-fakeroot:,tasksel:, + initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:, templates:,architectures:,clean, distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-chroot-updates:,parent-mirror-chroot-backports:,parent-mirror-binary:, parent-mirror-binary-security:,parent-mirror-binary-updates:,parent-mirror-binary-backports:,parent-mirror-debian-installer:, @@ -347,11 +346,6 @@ Local_arguments () shift 2 ;; - --use-fakeroot) - LB_USE_FAKEROOT="${2}" - shift 2 - ;; - --tasksel) LB_TASKSEL="${2}" shift 2 @@ -1047,10 +1041,6 @@ LB_MODE="${LB_MODE}" # (Default: ${LB_SYSTEM}) LB_SYSTEM="${LB_SYSTEM}" -# \$LB_USE_FAKEROOT: use fakeroot/fakechroot -# (Default: ${LB_USE_FAKEROOT}) -LB_USE_FAKEROOT="${LB_USE_FAKEROOT}" - # \$LB_TASKSEL: set tasksel program # (Default: ${LB_TASKSEL}) LB_TASKSEL="${LB_TASKSEL}" -- cgit v1.2.3