Commit af92cc7c authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 4.0~alpha28.

parent e422a68c
#!/usr/bin/python
#!/usr/bin/python3
## live-build(7) - Live System Build Components
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
......
......@@ -47,7 +47,7 @@ case "${1}" in
mkdir -p chroot/dev/pts
# Mounting /dev/pts
mount devpts-live -t devpts chroot/dev/pts || true
mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
# Creating stage file
Create_stagefile .build/chroot_devpts
......
......@@ -126,47 +126,6 @@ then
touch chroot/etc/fstab
fi
if [ "${LB_EXPOSED_ROOT}" = "true" ]
then
# Make sure RW dirs exist so that the initramfs script has
# a directory in which to bind the tmpfs filesystems
COW_DIRECTORIES="/home /live /tmp /var/lib/live /var/lock /var/log /var/run /var/tmp /var/spool"
for DIRECTORY in ${COW_DIRECTORIES}
do
mkdir -p chroot/"${DIRECTORY}"
done
# Config files which need to be RW
COW_FILES="/etc/adjtime /etc/fstab /etc/hostname /etc/hosts /etc/live.conf /etc/network/interfaces /etc/resolv.conf /etc/udev/rules.d/*persistent-net.rules /etc/udev/rules.d/*persistent-cd.rules /etc/X11/xorg.conf"
# Where we will store RW config files
RW_DIRECTORY="/var/lib/live"
for FILE in ${COW_FILES}
do
DIRECTORY="$(dirname ${FILE})"
FILE="$(basename ${FILE})"
RELATIVE_PATH="$(echo ${DIRECTORY} | sed 's|[^/]\+|..|g; s|^/||g')"
# Touch files in case they don't yet exist
mkdir -p chroot/${DIRECTORY}
touch chroot/${DIRECTORY}/${FILE}
# Move files to the read-write directory
mkdir -p chroot/${RW_DIRECTORY}/${DIRECTORY}
mv chroot/${DIRECTORY}/${FILE} chroot/${RW_DIRECTORY}/${DIRECTORY}
# Create a symbolic link to RW config file
ln -s ${RELATIVE_PATH}/${RW_DIRECTORY}/${DIRECTORY}/${FILE} chroot/${DIRECTORY}/${FILE}
done
# Mount doesn't write to a symlink so use /proc/mounts instead,
# see debian bug #154438 for more info
rm -f chroot/etc/mtab
ln -s /proc/mounts chroot/etc/mtab
fi
if [ "${LB_SWAP_FILE_PATH}" ]; then
dd if=/dev/zero of="chroot/${LB_SWAP_FILE_PATH}" bs=1024k count="${LB_SWAP_FILE_SIZE}"
mkswap "chroot/${LB_SWAP_FILE_PATH}"
......
......@@ -83,8 +83,7 @@ EOF
# Restore hosts file
mv chroot/etc/hosts.orig chroot/etc/hosts
else
# Blank out hosts file, don't remove in case
# its a symlink, as in the case of exposedroot mode
# Blank out hosts file, don't remove in case its a symlink
Truncate chroot/etc/hosts
fi
......
......@@ -118,7 +118,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--templates PATH]\n\
\t [--updates true|false]\n\
\t [--backports true|false]\n\
\t [--exposed-root true|false]\n\
\t [--verbose]\n\
\t [--loadlin true|false]\n\
\t [--win32-loader true|false]\n\
......@@ -138,7 +137,7 @@ Local_arguments ()
parent-mirror-binary-security:,parent-mirror-debian-installer:,
mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
mirror-binary-security:,mirror-debian-installer:,
archive-areas:,parent-archive-areas:,chroot-filesystem:,exposed-root:,
archive-areas:,parent-archive-areas:,chroot-filesystem:,
gzip-options:,hooks:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
security:,updates:,backports:,binary-filesystem:,binary-images:,
apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:,
......@@ -439,11 +438,6 @@ Local_arguments ()
shift 2
;;
--exposed-root)
LB_EXPOSED_ROOT="${2}"
shift 2
;;
--gzip-options)
GZIP_OPTIONS="${2}"
shift 2
......@@ -1133,10 +1127,6 @@ LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
# (Default: ${LB_UNION_FILESYSTEM})
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}"
# \$LB_EXPOSED_ROOT: expose root as read only
# (Default: ${LB_EXPOSED_ROOT})
LB_EXPOSED_ROOT="${LB_EXPOSED_ROOT}"
# \$LB_HOOKS: set hook commands
# (Default: empty)
LB_HOOKS="${LB_HOOKS}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment