summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary2
-rwxr-xr-xhelpers/lh_binary_debian-installer97
-rwxr-xr-xhelpers/lh_binary_grub2
-rwxr-xr-xhelpers/lh_binary_live-installer333
-rwxr-xr-xhelpers/lh_binary_local-hooks (renamed from helpers/lh_bootstrap_clone)37
-rwxr-xr-xhelpers/lh_binary_rootfs4
-rwxr-xr-xhelpers/lh_binary_syslinux66
-rwxr-xr-xhelpers/lh_binary_yaboot2
-rwxr-xr-xhelpers/lh_bootstrap_cache4
-rwxr-xr-xhelpers/lh_chroot_cache4
-rwxr-xr-xhelpers/lh_chroot_linux-image6
-rwxr-xr-xhelpers/lh_chroot_local-packageslists6
-rwxr-xr-xhelpers/lh_chroot_packageslists4
-rwxr-xr-xhelpers/lh_clean2
-rwxr-xr-xhelpers/lh_config21
-rwxr-xr-xhelpers/lh_source_debian-live2
16 files changed, 166 insertions, 426 deletions
diff --git a/helpers/lh_binary b/helpers/lh_binary
index 39ba20994..fb91cb321 100755
--- a/helpers/lh_binary
+++ b/helpers/lh_binary
@@ -42,13 +42,13 @@ lh_binary_encryption ${*}
# Prepare images
lh_binary_linux-image ${*}
lh_binary_debian-installer ${*}
-lh_binary_live-installer ${*}
lh_binary_memtest ${*}
lh_binary_grub ${*}
lh_binary_syslinux ${*}
lh_binary_yaboot ${*}
lh_binary_includes ${*}
lh_binary_local-includes ${*}
+lh_binary_local-hooks ${*}
lh_binary_md5sum ${*}
# Building images
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index de15f1ca5..8bb9a77f2 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -125,15 +125,47 @@ fi
# Downloading debian-installer
mkdir -p "${DESTDIR_DI}"
-wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/vmlinuz
-wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/initrd.gz
+
+if [ "${LIVE_DISTRIBUTION}" = "sid" ] # FIXME arch
+then
+ case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" http://people.debian.org/~aba/d-i/images/daily/cdrom/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" http://people.debian.org/~aba/d-i/images/daily/cdrom/initrd.gz
+ ;;
+
+ i386)
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" http://people.debian.org/~joeyh/d-i/images/daily/cdrom/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" http://people.debian.org/~joeyh/d-i/images/daily/cdrom/initrd.gz
+ ;;
+ esac
+else
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/initrd.gz
+fi
# Downloading graphical-installer
if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] || [ "${LIVE_ARCHITECTURE}" = "powerpc" ]
then
mkdir -p "${DESTDIR_GI}"
- wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/gtk/vmlinuz
- wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/gtk/initrd.gz
+
+ if [ "${LIVE_DISTRIBUTION}" = "sid" ] # FIXME arch
+ then
+ case "${LIVE_ARCHITECTURE}" in
+ amd64)
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" http://people.debian.org/~aba/d-i/images/daily/cdrom/gtk/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" http://people.debian.org/~aba/d-i/images/daily/cdrom/gtk/initrd.gz
+ ;;
+
+ i386)
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" http://people.debian.org/~joeyh/d-i/images/daily/cdrom/gtk/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" http://people.debian.org/~joeyh/d-i/images/daily/cdrom/gtk/initrd.gz
+ ;;
+ esac
+ else
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/gtk/vmlinuz
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/gtk/initrd.gz
+ fi
fi
# Downloading additional packages
@@ -143,11 +175,11 @@ touch chroot/var/lib/dpkg/status
case "${LIVE_ARCHITECTURE}" in
amd64)
- DI_PACKAGES="linux-image-2.6-amd64 lilo grub"
+ DI_PACKAGES="linux-image-2.6-amd64 elilo lilo grub"
;;
i386)
- DI_PACKAGES="linux-image-2.6-486 linux-image-2.6-686 lilo grub"
+ DI_PACKAGES="linux-image-2.6-486 linux-image-2.6-686 elilo lilo grub"
;;
powerpc)
@@ -199,15 +231,8 @@ gzip -9 -c dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Packages
#gzip -9 -c dists/${LIVE_DISTRIBUTION}/main/source/Sources > dists/${LIVE_DISTRIBUTION}/main/source/Sources
cd "${OLDPWD}"
-# Writing release
-cat > binary/dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Release << EOF
-Archive: stable
-Version: 4.0r0
-Component: main
-Origin: Debian
-Label: Debian
-Architecture: ${LIVE_ARCHITECTURE}
-EOF
+# Fetching release
+wget "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/binary-"${LIVE_ARCHITECTURE}"/Release -O binary/dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Release
#cat > binary/dists/${LIVE_DISTRIBUTION}/main/source/Release << EOF
#Archive: stable
@@ -229,12 +254,43 @@ gunzip -c Packages.gz > Packages
UDEBS="`awk '/Filename: / { print $2 }' Packages`"
# Downloading udebs
-DOWNLOAD=""
for UDEB in ${UDEBS}
do
- DOWNLOAD="$DOWNLOAD ${LIVE_MIRROR_BOOTSTRAP}/${UDEB}"
+ wget "${LIVE_MIRROR_BOOTSTRAP}"/${UDEB}
done
-echo $DOWNLOAD | xargs wget
+
+# Including local udebs
+if ls ../config/binary_local-udebs/* &> /dev/null
+then
+ for FILE in ../config/binary_local-udebs/*.udeb
+ do
+ SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`"
+
+ if [ -z "${SOURCE}" ]
+ then
+ SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
+ fi
+
+ case "${SOURCE}" in
+ lib?*)
+ LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ ;;
+
+ *)
+ LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ ;;
+ esac
+
+ # Install directory
+ mkdir -p pool/main/"${LETTER}"/"${SOURCE}"
+
+ # Copy files
+ cp "${FILE}" pool/main/"${LETTER}"/"${SOURCE}"
+
+ # Prefere local udebs over downloaded udebs
+ rm -f "`basename ${FILE} | awk -F_ '{ print $1 }'`"_*.udeb
+ done
+fi
# Excluding udebs
grep -v "^#" ${LH_BASE:-/usr/share/live-helper}/data/debian-cd/"${LIVE_DISTRIBUTION}"/udeb_exclude > exclude
@@ -304,5 +360,10 @@ pcmciautils-udeb
wireless-tools-udeb
EOF
+if [ -d binary/pool/main/l/live-installer ]
+then
+ echo "live-installer" >> binary/.disk/udeb_include
+fi
+
# Creating stage file
Create_stagefile .stage/binary_debian-installer
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index dc22d7f0d..d559f63ff 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -194,7 +194,7 @@ fi
LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
# Assembling debian-installer configuration
-if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ] || [ "${LIVE_LIVE_INSTALLER}" = "enabled" ]
+if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
then
LINUX="title\t\tLive:\nroot\n\n${LINUX}"
diff --git a/helpers/lh_binary_live-installer b/helpers/lh_binary_live-installer
deleted file mode 100755
index 8517ceb53..000000000
--- a/helpers/lh_binary_live-installer
+++ /dev/null
@@ -1,333 +0,0 @@
-#!/bin/sh
-
-# lh_binary_live-installer(1) - install live-installer into binary
-# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
-#
-# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
-# This is free software, and you are welcome to redistribute it
-# under certain conditions; see COPYING for details.
-
-set -e
-
-# Including common functions
-LH_BASE="${LH_BASE:-/usr/share/live-helper}"
-
-for FUNCTION in "${LH_BASE}"/functions/*.sh
-do
- . "${FUNCTION}"
-done
-
-# Setting static variables
-DESCRIPTION="install live-installer into binary"
-HELP=""
-USAGE="${PROGRAM} [--force]"
-
-Arguments "${@}"
-
-# Reading configuration files
-Read_conffile config/common
-Read_conffile config/bootstrap
-Read_conffile config/chroot
-Read_conffile config/binary
-Read_conffile config/source
-Set_defaults
-
-if [ "${LIVE_LIVE_INSTALLER}" != "enabled" ]
-then
- exit 0
-fi
-
-Echo_message "Begin installing live-installer..."
-
-# Requiring stage file
-Require_stagefile .stage/bootstrap
-
-# Checking stage file
-Check_stagefile .stage/binary_live-installer
-
-# Checking lock file
-Check_lockfile .lock
-
-# Creating lock file
-Create_lockfile .lock
-
-# Setting destination directory
-case "${LIVE_BINARY_IMAGES}" in
- iso)
- DESTDIR="binary/install"
- DI="cdrom"
- ;;
-
- net)
- DESTDIR="tftpboot"
- DI="netboot"
-
- Echo_error "Not supported yet (FIXME)"
- exit 1
- ;;
-
- tar|usb-hdd)
- DESTDIR="binary/install"
- DI="hd-media"
-
- # Workaround for syslinux (<< 3.36) which doesn't support long file/path names
- if [ "${LIVE_DISTRIBUTION}" = "etch" ] && [ "${LIVE_BOOTLOADER}" = "syslinux" ]
- then
- DESTDIR="binary"
- fi
- ;;
-esac
-
-# Temporary check for broken syslinux
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assemble multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- DESTDIR="${DESTDIR}.amd"
- ;;
-
- i386)
- DESTDIR="${DESTDIR}.386"
- ;;
-
- powerpc)
- DESTDIR="${DESTDIR}.ppc"
- ;;
- esac
- fi
-fi
-
-VMLINUZ_DI="vmlinuz"
-INITRD_DI="initrd.gz"
-DESTDIR_DI="${DESTDIR}"
-
-VMLINUZ_GI="gtk/vmlinuz"
-INITRD_GI="gtk/initrd.gz"
-DESTDIR_GI="${DESTDIR}/gtk"
-
-# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
-if [ "${LIVE_DISTRIBUTION}" = "etch" ]
-then
- if [ "${LIVE_BINARY_IMAGES}" = "tar" ] || [ "${LIVE_BINARY_IMAGES}" = "usb-hdd" ]
- then
- VMLINUZ_DI="vmlinuz.di"
- INITRD_DI="initrddi.gz"
- DESTDIR_DI="${DESTDIR}"
-
- VMLINUZ_GI="vmlinuz.gi"
- INITRD_GI="initrdgi.gz"
- DESTDIR_GI="${DESTDIR}"
- fi
-fi
-
-# Downloading debian-installer
-mkdir -p "${DESTDIR_DI}"
-wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/vmlinuz
-wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/initrd.gz
-
-# Downloading graphical-installer
-if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] || [ "${LIVE_ARCHITECTURE}" = "powerpc" ]
-then
- mkdir -p "${DESTDIR_GI}"
- wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/gtk/vmlinuz
- wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/gtk/initrd.gz
-fi
-
-# Downloading additional packages
-mkdir -p chroot/binary.deb/archives/partial
-mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp
-touch chroot/var/lib/dpkg/status
-
-case "${LIVE_ARCHITECTURE}" in
- amd64)
- DI_PACKAGES="linux-image-2.6-amd64 lilo grub"
- ;;
-
- i386)
- DI_PACKAGES="linux-image-2.6-486 linux-image-2.6-686 lilo grub"
- ;;
-
- powerpc)
- DI_PACKAGES="linux-image-2.6-powerpc linux-image-2.6-powerpc64 linux-image-2.6-powerpc-smp linux-image-2.6-prep yaboot" # FIXME bootloader?
- ;;
-esac
-
-Chroot "apt-get -o Dir::Cache=/binary.deb --download-only install --yes ${DI_PACKAGES}"
-mv chroot/binary.deb ./
-mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
-
-# Including base debian packages
-if [ -d cache/packages_bootstrap ]
-then
- for FILE in cache/packages_bootstrap/*.deb binary.deb/archives/*.deb
- do
- SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`"
-
- if [ -z "${SOURCE}" ]
- then
- SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
- fi
-
- case "${SOURCE}" in
- lib?*)
- LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
- ;;
-
- *)
- LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
- ;;
- esac
-
- # Install directory
- mkdir -p binary/pool/main/"${LETTER}"/"${SOURCE}"
-
- # Move files
- cp "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}"
- done
-fi
-
-# Generating deb indices
-mkdir -p binary/dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}
-
-cd binary
-apt-ftparchive packages pool/main > dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Packages
-gzip -9 -c dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Packages > dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Packages.gz
-#apt-ftparchive sources pool/main > dists/${LIVE_DISTRIBUTION}/main/source/Sources
-#gzip -9 -c dists/${LIVE_DISTRIBUTION}/main/source/Sources > dists/${LIVE_DISTRIBUTION}/main/source/Sources
-cd "${OLDPWD}"
-
-# Fetching release
-wget http://"${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/binary-"${LIVE_ARCHITECTURE}"/Release -O binary/dists/${LIVE_DISTRIBUTION}/main/binary-${LIVE_ARCHITECTURE}/Release
-
-#cat > binary/dists/${LIVE_DISTRIBUTION}/main/source/Release << EOF
-#Archive: stable
-#Version: 4.0r0
-#Component: main
-#Origin: Debian
-#Label: Debian
-#Architecture: source
-#EOF
-
-mkdir binary.udeb
-cd binary.udeb
-
-# Downloading udeb indices
-wget "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/debian-installer/binary-"${LIVE_ARCHITECTURE}"/Packages.gz
-gunzip -c Packages.gz > Packages
-
-# Sorting udebs
-UDEBS="`awk '/Filename: / { print $2 }' Packages`"
-
-# Downloading udebs
-for UDEB in ${UDEBS}
-do
- wget "${LIVE_MIRROR_BOOTSTRAP}"/${UDEB}
-done
-
-# Including local udebs
-if ls ../config/binary_local-udebs/* &> /dev/null
-then
- for FILE in ../config/binary_local-udebs/*.udeb
- do
- SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`"
-
- if [ -z "${SOURCE}" ]
- then
- SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
- fi
-
- case "${SOURCE}" in
- lib?*)
- LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
- ;;
-
- *)
- LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
- ;;
- esac
-
- # Install directory
- mkdir -p pool/main/"${LETTER}"/"${SOURCE}"
-
- # Copy files
- cp "${FILE}" pool/main/"${LETTER}"/"${SOURCE}"
-
- # Prefere local udebs over downloaded udebs
- rm -f "`basename ${FILE} | awk -F_ '{ print $1 }'`"_*.udeb
- done
-fi
-
-# Excluding udebs
-grep -v "^#" ${LH_BASE:-/usr/share/live-helper}/data/debian-cd/"${LIVE_DISTRIBUTION}"/udeb_exclude > exclude
-grep -v "^#" ${LH_BASE:-/usr/share/live-helper}/data/debian-cd/"${LIVE_DISTRIBUTION}"/exclude-udebs > exclude
-grep -v "^#" ${LH_BASE:-/usr/share/live-helper}/data/debian-cd/"${LIVE_DISTRIBUTION}"/exclude-udebs-${LIVE_ARCHITECTURE} >> exclude
-
-for EXCLUDE in `cat exclude`
-do
- rm -f "${EXCLUDE}"_*.udeb
-done
-
-# Moving udebs
-for UDEB in ${UDEBS}
-do
- if [ -f "`basename ${UDEB}`" ]
- then
- mkdir -p `dirname ${UDEB}`
- mv "`basename ${UDEB}`" "`dirname ${UDEB}`"
- fi
-done
-
-# Creating udeb indices
-mkdir -p dists/"${LIVE_DISTRIBUTION}"/main/debian-installer/binary-"${LIVE_ARCHITECTURE}"
-apt-ftparchive packages pool/main > dists/"${LIVE_DISTRIBUTION}"/main/debian-installer/binary-"${LIVE_ARCHITECTURE}"/Packages
-gzip -9 -c dists/${LIVE_DISTRIBUTION}/main/debian-installer/binary-${LIVE_ARCHITECTURE}/Packages > dists/${LIVE_DISTRIBUTION}/main/debian-installer/binary-${LIVE_ARCHITECTURE}/Packages.gz
-
-rm -f Packages* exclude
-find . | cpio -dmpu "${OLDPWD}"/binary
-cd "${OLDPWD}"
-
-rm -rf binary.udeb
-rm -rf binary.deb
-
-# Generating release file
-apt-ftparchive \
- -o APT::FTPArchive::Release::Origin="Debian" \
- -o APT::FTPArchive::Release::Label="Debian" \
- -o APT::FTPArchive::Release::Suite="${LIVE_DISTRIBUTION}" \
- -o APT::FTPArchive::Release::Version="4.0" \
- -o APT::FTPArchive::Release::Codename="${LIVE_DISTRIBUTION}" \
- -o APT::FTPArchive::Release::Date="`date -R`" \
- -o APT::FTPArchive::Release::Architectures="${LIVE_ARCHITECTURE}" \
- -o APT::FTPArchive::Release::Components="main" \
- -o APT::FTPArchive::Release::Description="Last updated: `date -R`" \
-release binary/dists/${LIVE_DISTRIBUTION} > binary/dists/${LIVE_DISTRIBUTION}/Release
-
-# Creating dist symlinks
-for DISTRIBUTION in frozen stable testing unstable
-do
- ln -s ${LIVE_DISTRIBUTION} binary/dists/${DISTRIBUTION}
-done
-
-ln -s . binary/debian
-
-# Creating disk info
-mkdir binary/.disk
-echo "main" > binary/.disk/base_components
-touch binary/.disk/base_installable
-echo "not_complete" > binary/.disk/cd_type
-echo "Debian GNU/Linux ${LIVE_DISTRIBUTION} - Unofficial ${LIVE_ARCHITECTURE} LIVE Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
-touch binary/.disk/mkisofs
-cat > binary/.disk/udeb_include << EOF
-netcfg
-ethdetect
-pcmcia-cs-udeb
-pcmciautils-udeb
-wireless-tools-udeb
-live-installer
-EOF
-
-# Creating stage file
-Create_stagefile .stage/binary_debian-installer
diff --git a/helpers/lh_bootstrap_clone b/helpers/lh_binary_local-hooks
index ce5f29f87..e7582476b 100755
--- a/helpers/lh_bootstrap_clone
+++ b/helpers/lh_binary_local-hooks
@@ -1,6 +1,6 @@
#!/bin/sh
-# lh_bootstrap_clone(1) - bootstrap by cloning the host system
+# lh_binary_local-hooks(1) - execute local hooks in binary
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -18,7 +18,7 @@ do
done
# Setting static variables
-DESCRIPTION="bootstrap by cloning the host system"
+DESCRIPTION="execute local hooks in binary"
HELP=""
USAGE="${PROGRAM} [--force]"
@@ -32,18 +32,13 @@ Read_conffile config/binary
Read_conffile config/source
Set_defaults
-if [ "${LH_BOOTSTRAP}" != "clone" ]
-then
- exit 0
-fi
+Echo_message "Begin executing local hooks..."
-Echo_message "Begin bootstrapping system..."
-
-# Ensure that a system is built as root
-lh_testroot
+# Requiring stage file
+Require_stagefile .stage/bootstrap
# Checking stage file
-Check_stagefile .stage/bootstrap
+Check_stagefile .stage/binary_local-hooks
# Checking lock file
Check_lockfile .lock
@@ -51,11 +46,15 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-# Read package selection
-dpkg --get-selections
-
-# Read debconf values
-> preseed
-
-# Creating stage file
-Create_stagefile .stage/bootstrap
+# Processing local-hooks
+if ls config/binary_local-hooks/* > /dev/null 2>&1
+then
+ for HOOK in config/binary_local-hooks/*
+ do
+ # Executing hook
+ ./"${HOOK}"
+ done
+
+ # Creating stage file
+ Create_stagefile .stage/binary_local-hooks
+fi
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index f2a00f33e..8c370b4ea 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -79,7 +79,7 @@ do
# Restoring old cache
mkdir -p binary/"${INITFS}"
- ${LH_ROOT_COMMAND} cp -a cache/stages_rootfs/filesystem.* binary/"${INITFS}"
+ ${LH_ROOT_COMMAND} cp -al cache/stages_rootfs/filesystem.* binary/"${INITFS}"
if [ -n "${LH_ROOT_COMMAND}" ]
then
@@ -187,7 +187,7 @@ do
mkdir -p cache/stages_rootfs
- ${LH_ROOT_COMMAND} cp -a binary/"${INITFS}"/filesystem.* cache/stages_rootfs
+ ${LH_ROOT_COMMAND} cp -al binary/"${INITFS}"/filesystem.* cache/stages_rootfs
if [ -n "${LH_ROOT_COMMAND}" ]
then
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index d736d5f85..73c29e521 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -190,16 +190,16 @@ then
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
if [ "`basename ${DESTDIR_LIVE}`" = "binary" ]
then
- LINUX="LABEL live\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-failsafe\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="# Debian GNU/Linux - live\nLABEL live\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-failsafe\nLABEL live-failsafe\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
else
- LINUX="LABEL live\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="# Debian GNU/Linux - live\nLABEL live\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-failsafe\nLABEL live-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
else
DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
- LINUX="LABEL live\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-failsafe\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="# Debian GNU/Linux - live\nLABEL live\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-failsafe\nLABEL live-failsafe\n\tkernel `basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\n\tappend initrd=initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
@@ -210,20 +210,20 @@ then
then
if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
then
- LINUX="LABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
else
- LINUX="LABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} live_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} live_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
else
if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
then
- LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`-failsafe\n\tkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n\tappend initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
else
- LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- LINUX="${LINUX}\n\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\n# Debian GNU/Linux - live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nLABEL live-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`\n\tkernel `basename ${KERNEL}`\n\tappend initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}"
fi
fi
done
@@ -233,7 +233,7 @@ fi
LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
# Assembling debian-installer configuration
-if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ] || [ "${LIVE_LIVE_INSTALLER}" = "enabled" ]
+if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
then
VMLINUZ_DI="vmlinuz"
INITRD_DI="initrd.gz"
@@ -331,7 +331,7 @@ case "${LIVE_BINARY_IMAGES}" in
fi
# Configure syslinux templates
- sed -i -e "s#LIVE_LINUX_LIVE#${LINUX}#" -e "s#LIVE_LINUX_INSTALL#${LIVE_LINUX_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/isolinux/isolinux.cfg
+ sed -i -e "s@LIVE_LINUX_LIVE@${LINUX}@" -e "s@LIVE_LINUX_INSTALL@${LIVE_LINUX_INSTALL}@" -e "s@LIVE_MEMTEST@${MEMTEST}@" binary/isolinux/isolinux.cfg
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/isolinux/isolinux.cfg
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/isolinux/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/isolinux/f10.txt
@@ -385,7 +385,7 @@ case "${LIVE_BINARY_IMAGES}" in
fi
# Configure syslinux templates
- sed -i -e "s#LIVE_LINUX_LIVE#${LINUX}#" -e "s#LIVE_LINUX_INSTALL#${LIVE_LINUX_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" tftpboot/pxelinux.cfg/default
+ sed -i -e "s@LIVE_LINUX_LIVE@${LINUX}@" -e "s@LIVE_LINUX_INSTALL@${LIVE_LINUX_INSTALL}@" -e "s@LIVE_MEMTEST@${MEMTEST}@" tftpboot/pxelinux.cfg/default
sed -i -e "s/LIVE_NET_SERVER/${LIVE_NET_SERVER}/" -e "s#LIVE_NET_PATH#${LIVE_NET_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" tftpboot/pxelinux.cfg/default
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" tftpboot/pxelinux.cfg/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt
@@ -424,7 +424,7 @@ case "${LIVE_BINARY_IMAGES}" in
mkdir -p "${DESTDIR}"
cp chroot/usr/lib/syslinux/isolinux.bin "${DESTDIR}"/syslinux.bin
cp -r "${LIVE_TEMPLATES}"/syslinux/* "${DESTDIR}"
- mv binary/isolinux.cfg "${DESTDIR}"/syslinux.cfg
+ mv "${DESTDIR}"/isolinux.cfg "${DESTDIR}"/syslinux.cfg
# Copying splash screen
if [ -f config/binary_syslinux/splash.rle ]
@@ -444,7 +444,7 @@ case "${LIVE_BINARY_IMAGES}" in
fi
# Configure syslinux templates
- sed -i -e "s#LIVE_LINUX_LIVE#${LINUX}#" -e "s#LIVE_LINUX_INSTALL#${LIVE_LINUX_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" "${DESTDIR}"/syslinux.cfg
+ sed -i -e "s@LIVE_LINUX_LIVE@${LINUX}@" -e "s@LIVE_LINUX_INSTALL@${LIVE_LINUX_INSTALL}@" -e "s@LIVE_MEMTEST@${MEMTEST}@" "${DESTDIR}"/syslinux.cfg
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${DESTDIR}"/syslinux.cfg
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${DESTDIR}"/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" "${DESTDIR}"/f10.txt
@@ -453,23 +453,19 @@ case "${LIVE_BINARY_IMAGES}" in
rm -f "${DESTDIR}"/pxelinux.cfg
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
- if [ "${LIVE_DISTRIBUTION}" = "etch" ]
+ if [ "${LIVE_DISTRIBUTION}" = "etch" ] && [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
then
- if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
- then
- for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
- do
- NUMBER=$(($NUMBER + 1))
-
- mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
- mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
- sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" "${DESTDIR}"/syslinux.cfg
- done
- else
- mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
- mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
- sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" "${DESTDIR}"/syslinux.cfg
- fi
+ for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
+ do
+ NUMBER=$(($NUMBER + 1))
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
+ sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" "${DESTDIR}"/syslinux.cfg
+ done
+ else
+ mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
+ mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
+ sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" "${DESTDIR}"/syslinux.cfg
fi
;;
esac
diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot
index fea812eaa..930c4cd57 100755
--- a/helpers/lh_binary_yaboot
+++ b/helpers/lh_binary_yaboot
@@ -202,7 +202,7 @@ fi
LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
# Assembling debian-installer configuration
-if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ] || [ "${LIVE_LIVE_INSTALLER}" = "enabled" ]
+if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
then
VMLINUZ_DI="vmlinuz"
INITRD_DI="initrd.gz"
diff --git a/helpers/lh_bootstrap_cache b/helpers/lh_bootstrap_cache
index 03ae9040a..a3d05f38a 100755
--- a/helpers/lh_bootstrap_cache
+++ b/helpers/lh_bootstrap_cache
@@ -53,7 +53,7 @@ do
rm -rf chroot
# Restoring old cache
- ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot
+ ${LH_ROOT_COMMAND} cp -al cache/stages_bootstrap chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
@@ -83,7 +83,7 @@ do
mkdir -p cache
- ${LH_ROOT_COMMAND} cp -a chroot cache/stages_bootstrap
+ ${LH_ROOT_COMMAND} cp -al chroot cache/stages_bootstrap
if [ -n "${LH_ROOT_COMMAND}" ]
then
diff --git a/helpers/lh_chroot_cache b/helpers/lh_chroot_cache
index 2f016a6f7..0e655be3c 100755
--- a/helpers/lh_chroot_cache
+++ b/helpers/lh_chroot_cache
@@ -53,7 +53,7 @@ do
rm -rf chroot
# Restoring old cache
- ${LH_ROOT_COMMAND} cp -a cache/stages_chroot chroot
+ ${LH_ROOT_COMMAND} cp -al cache/stages_chroot chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
@@ -83,7 +83,7 @@ do
mkdir -p cache
- ${LH_ROOT_COMMAND} cp -a chroot cache/stages_chroot
+ ${LH_ROOT_COMMAND} cp -al chroot cache/stages_chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
diff --git a/helpers/lh_chroot_linux-image b/helpers/lh_chroot_linux-image
index 0678134ee..92e5eb5ca 100755
--- a/helpers/lh_chroot_linux-image
+++ b/helpers/lh_chroot_linux-image
@@ -37,6 +37,9 @@ Require_stagefile .stage/bootstrap
case "${1}" in
install)
+ # Restoring cache
+ Restore_cache cache/packages_linux-image
+
Echo_message "Configuring file /etc/kernel-img.conf"
# Checking stage file
@@ -85,6 +88,9 @@ EOF
;;
esac
+ # Saving cache
+ Save_cache cache/packages_linux-image
+
# Creating stage file
Create_stagefile .stage/chroot_linux-image
;;
diff --git a/helpers/lh_chroot_local-packageslists b/helpers/lh_chroot_local-packageslists
index ed914abd7..3e814f674 100755
--- a/helpers/lh_chroot_local-packageslists
+++ b/helpers/lh_chroot_local-packageslists
@@ -53,9 +53,9 @@ then
for PACKAGESLIST in config/chroot_local-packageslists/*
do
- # Copying package list
- grep -v "^#" "${PACKAGESLIST}" > chroot/root/"`basename ${PACKAGESLIST}`"
-
+ # Generate package list
+ Expand_packagelist "`basename ${PACKAGESLIST}`" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper/lists}/lists" > chroot/root/"`basename ${PACKAGESLIST}`"
+
# Installing package list
case "${LH_APT}" in
apt|apt-get)
diff --git a/helpers/lh_chroot_packageslists b/helpers/lh_chroot_packageslists
index 3735d6bc4..da796a764 100755
--- a/helpers/lh_chroot_packageslists
+++ b/helpers/lh_chroot_packageslists
@@ -55,8 +55,8 @@ then
do
if [ -f ${LH_BASE:-/usr/share/live-helper}/lists/"${LIST}" ]
then
- # Copying package list
- grep -v "^#" ${LH_BASE:-/usr/share/live-helper}/lists/"${LIST}" > chroot/root/"${LIST}"
+ # Generating package list
+ Expand_packagelist "${LIST}" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper}/lists" > chroot/root/${LIST}
# Installing package list
case "${LH_APT}" in
diff --git a/helpers/lh_clean b/helpers/lh_clean
index bd2268180..d8439071d 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -65,7 +65,7 @@ case "${1}" in
if [ "${PURGE}" != "true" ] && [ -d cache/stages_bootstrap ]
then
- ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot
+ ${LH_ROOT_COMMAND} cp -al cache/stages_bootstrap chroot
mkdir -p .stage
touch .stage/bootstrap
fi
diff --git a/helpers/lh_config b/helpers/lh_config
index ef5e4237d..67ecbfb34 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -291,6 +291,7 @@ EOF
# Creating lh_binary_* configuration
mkdir -p "${LIVE_ROOT}"/config/binary_grub
+mkdir -p "${LIVE_ROOT}"/config/binary_local-hooks
mkdir -p "${LIVE_ROOT}"/config/binary_local-includes
mkdir -p "${LIVE_ROOT}"/config/binary_local-udebs
mkdir -p "${LIVE_ROOT}"/config/binary_rootfs
@@ -319,10 +320,6 @@ LIVE_BOOTLOADER="${LIVE_BOOTLOADER}"
# (Default: ${LIVE_DEBIAN_INSTALLER})
LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER}"
-# \$LIVE_LIVE_INSTALLER: set debian-installer + live-installer
-# (Default: ${LIVE_LIVE_INSTALLER})
-LIVE_LIVE_INSTALLER="${LIVE_LIVE_INSTALLER}"
-
# \$LIVE_ENCRYPTION: set encrytion
# (Default: empty)
LIVE_ENCRYPTION="${LIVE_ENCRYPTION}"
@@ -347,7 +344,7 @@ LIVE_ISO_PREPARER="${LIVE_ISO_PREPARER}"
# (Default: ${LIVE_ISO_PUBLISHER})
LIVE_ISO_PUBLISHER="${LIVE_ISO_PUBLISHER}"
-# \$LIVE_ISO_VOLUME: set iso volume
+# \$LIVE_ISO_VOLUME: set iso volume (max 32 chars)
# (Default: ${LIVE_ISO_VOLUME})
LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}"
@@ -384,3 +381,17 @@ LIVE_SOURCE="${LIVE_SOURCE}"
# (Default: ${LIVE_SOURCE_IMAGES})
LIVE_SOURCE_IMAGES="${LIVE_SOURCE_IMAGES}"
EOF
+
+if [ "${CONFIG}" = "clone" ]
+then
+ # Read package selection
+ echo `dpkg --get-selections | awk '{ print $1 }'` > config/chroot_local-packageslists/local-system
+
+ # Read debconf questions
+ if [ ! -f /usr/bin/debconf-get-selections ]
+ then
+ Echo_warning "Please install 'debconf-utils' in order to use this feature."
+ else
+ debconf-get-selections | grep -v deinstall | cut -f1 > config/chroot_local-preseed/local-system
+ fi
+fi
diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live
index 970e0fd7b..c51364da6 100755
--- a/helpers/lh_source_debian-live
+++ b/helpers/lh_source_debian-live
@@ -59,7 +59,7 @@ fi
# Copy system configuration
mkdir -p source/debian-live
-cp -a config source/debian-live
+cp -al config source/debian-live
# Create tarball
cd source