From c79ab34a7c597c9e3ab202c644121c6944789424 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:05:15 +0200 Subject: Adding live-helper 1.0~a19-1. --- Makefile | 15 ++-- data/casper/parameters.txt | 29 ++++++++ debian/changelog | 8 ++ debian/control | 1 + debian/postrm | 0 docs/ChangeLog | 42 +++++++++++ examples/cron/crontab | 1 + examples/cron/etch.sh | 10 +-- examples/cron/lenny.sh | 8 +- examples/cron/manpages.sh | 99 +++++++++++++++++++++++++ examples/cron/sid.sh | 12 +-- examples/cron/snapshots.sh | 2 +- examples/hooks/win32-loader.sh | 12 +++ functions/common.sh | 2 +- functions/defaults.sh | 3 + functions/package.sh | 28 +++++-- functions/templates.sh | 25 ++++--- helpers/lh_binary | 34 +++++---- helpers/lh_binary_chroot | 12 +-- helpers/lh_binary_debian-installer | 31 +++----- helpers/lh_binary_encryption | 39 ++++++++-- helpers/lh_binary_grub | 25 +++++-- helpers/lh_binary_includes | 8 -- helpers/lh_binary_iso | 33 +++++++-- helpers/lh_binary_linux-image | 16 ++++ helpers/lh_binary_memtest | 32 ++++++-- helpers/lh_binary_rootfs | 64 ++++++++++++---- helpers/lh_binary_syslinux | 51 +++++++++++-- helpers/lh_binary_usb-hdd | 6 ++ helpers/lh_binary_yaboot | 20 ++++- helpers/lh_bootstrap_cache | 4 +- helpers/lh_chroot_cache | 4 +- helpers/lh_clean | 3 +- helpers/lh_config | 5 ++ helpers/lh_source_debian-live | 2 +- includes/sid/live/parameters.txt.casper | 29 -------- includes/sid/live/parameters.txt.live-initramfs | 46 ------------ lists/rescue | 2 +- manpages/lh_binary.de.1 | 2 +- manpages/lh_binary.en.1 | 2 +- manpages/lh_bootstrap.de.1 | 2 +- manpages/lh_bootstrap.en.1 | 2 +- manpages/lh_bootstrap_cdebootstrap.de.1 | 2 +- manpages/lh_bootstrap_cdebootstrap.en.1 | 2 +- manpages/lh_bootstrap_debootstrap.de.1 | 2 +- manpages/lh_bootstrap_debootstrap.en.1 | 2 +- manpages/lh_build.de.1 | 2 +- manpages/lh_build.en.1 | 2 +- manpages/lh_chroot.de.1 | 2 +- manpages/lh_chroot.en.1 | 2 +- manpages/lh_clean.de.1 | 2 +- manpages/lh_clean.en.1 | 2 +- manpages/lh_source.de.1 | 2 +- manpages/lh_source.en.1 | 2 +- manpages/lh_testroot.de.1 | 2 +- manpages/lh_testroot.en.1 | 2 +- manpages/live-helper.de.7 | 2 +- manpages/live-helper.en.7 | 2 +- manpages/make-live.de.1 | 2 +- manpages/make-live.en.1 | 2 +- 60 files changed, 562 insertions(+), 245 deletions(-) create mode 100644 data/casper/parameters.txt mode change 100755 => 100644 debian/postrm create mode 100755 examples/cron/manpages.sh create mode 100755 examples/hooks/win32-loader.sh delete mode 100644 includes/sid/live/parameters.txt.casper delete mode 100644 includes/sid/live/parameters.txt.live-initramfs diff --git a/Makefile b/Makefile index a8fc5f9..3a35ad6 100644 --- a/Makefile +++ b/Makefile @@ -89,17 +89,12 @@ uninstall: done update: - set -e; for MANPAGE in manpages/*.de.* manpages/*.en.*; \ + set -e; for FILE in functions/*.sh examples/cron/*.sh manpages/*.de.* manpages/*.en.*; \ do \ - sed -i -e 's/2007\\-07\\-02/2007\\-07\\-09/' \ - -e 's/02.07.2007/09.07.2007/' \ - -e 's/1.0~a17/1.0~a18/' \ - $$MANPAGE; \ - done - - set -e; for SCRIPT in functions/*.sh examples/cron/*.sh; \ - do \ - sed -i -e 's/1.0~a17/1.0~a18/' $$SCRIPT; \ + sed -i -e 's/2007\\-07\\-16/2007\\-07\\-23/' \ + -e 's/16.07.2007/23.07.2007/' \ + -e 's/1.0~a19/1.0~a20/' \ + $$FILE; \ done clean: diff --git a/data/casper/parameters.txt b/data/casper/parameters.txt new file mode 100644 index 0000000..10904be --- /dev/null +++ b/data/casper/parameters.txt @@ -0,0 +1,29 @@ +Boot Parameters for Debian Live +------------------------------- + +Updated for casper 1.77+debian-7 on 2007-02-08. + +These options (can be combined) work from the syslinux bootprompt: + +casper casper-getty +casper xdebconf +casper hostname=HOSTNAME +casper userfullname=USERFULLNAME +casper username=USERNAME +casper {keyb|kbd-chooser/method}=KEYBOARD +casper {klayout|console-setup/layoutcode}=LAYOUT +casper {kvariant|console-setup/variantcode}=VARIANT , +casper {kmodel|console-setup/modelcode}=CODE , koptions=OPTIONS +casper ip=IFACE,ADDRESS,NETMASK,GATEWAY[:IFACE,ADDRESS,NETMASK,GATEWAY]* +casper ip[=frommedia] +casper {live-media|bootfrom}=DEVICE +casper live-media-offset=BYTES +casper locale=LOCALE | debian-installer/locale=LOCALE +casper netboot[=nfs|cifs] +casper persistent +casper nopersistent +casper showmounts +casper todisk=DEVICE +casper toram +casper {preseed/file|file}=FILE +casper package/question=VALUE diff --git a/debian/changelog b/debian/changelog index d03aaac..e67f5b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +live-helper (1.0~a19-1) unstable; urgency=medium + + * New upstream release: + - Supports using packages from the build host (Closes: #433611). + - Adds destdir to default entries in grub (Closes: #433612). + + -- Daniel Baumann Mon, 16 Jul 2007 00:00:00 +0200 + live-helper (1.0~a18-1) unstable; urgency=medium * New upstream release: diff --git a/debian/control b/debian/control index 2e2aac1..04fa651 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ XS-VCS-Browse: http://svn.debian.org/wsvn/debian-live/dists/trunk/live-helper/ Package: live-helper Architecture: all Depends: cdebootstrap (>= 0.3.15) | debootstrap (>= 0.3.3.2) +Suggests: genisoimage | mkisofs, memtest86+ | memtest86, mtools, squashfs-tools | genext2fs, syslinux | grub Conflicts: live-package Replaces: live-package Provides: make-live diff --git a/debian/postrm b/debian/postrm old mode 100755 new mode 100644 diff --git a/docs/ChangeLog b/docs/ChangeLog index 2b873fb..a538403 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -1,3 +1,44 @@ +2007-07-19 Daniel Baumann + + * functions/defaults.sh, package.sh, helpers/lh_config, lh_binary_*: + - Added support for non-chrooted build. + - Added caching of deb packages on this stage too. + * helpers/lh_binary_grub: + - Added forgotten destdir for default entries. + * helpers/lh_binary_memtest: + - Added workaround for grub inside chroot when installing memtest as + suggested by Vladimir Stavrinov . + * helpers/lh_binary_rootfs: + - Updated squashfs-tools package check. + * helpers/lh_binary_syslinux: + - Using etch workaround for long filenames in syslinux on all + distributions. + * Uploaded 1.0~a19-1. + +2007-07-15 Daniel Baumann + + * examples/cron/manpages.sh, examples/hooks/win32-loader.sh: + - Added. + +2007-07-15 Otavio Salvador + + * functions/templates.sh: + - Changed whole code to export TEMPLATES for the item beeing + checked. + * helpers/lh_binary_grub, helpers/lh_binary_syslinux, + helpers/lh_binary_yaboot: + - Changed code to use the new TEMPLATES variable and avoid + hardcoding the path. + +2007-07-14 Daniel Baumann + + * helpers/lh_binary_debian-installer: + - Addded 'live' mode. + - Fixed a minor typo. + * helpers/lh_binary_includes: + - Moved copying of parameters.txt to lh_binary_linux-image. + - Moved parameters.txt.* to live-initramfs and data/casper. + 2007-07-12 Daniel Baumann * helpers/lh_binary_grub, lh_binary_syslinux: @@ -13,6 +54,7 @@ - Fixed typo in variable name. * lists/rescue: - Added aide and tripwire. + * Uploaded 1.0~a18-1. 2007-07-09 Chris Lamb diff --git a/examples/cron/crontab b/examples/cron/crontab index 470be6e..960f5e9 100644 --- a/examples/cron/crontab +++ b/examples/cron/crontab @@ -4,4 +4,5 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command +*/10 * * * * user /usr/share/doc/live-helper/examples/cron/manpages.sh > /dev/null 2>&1 */10 * * * * user /usr/share/doc/live-helper/examples/cron/snapshots.sh > /dev/null 2>&1 diff --git a/examples/cron/etch.sh b/examples/cron/etch.sh index 3f647aa..49c62b7 100755 --- a/examples/cron/etch.sh +++ b/examples/cron/etch.sh @@ -2,16 +2,16 @@ set -e -BUILD="etch" +BUILD="monthly" # Begin custom defaults AUTOBUILD="enabled" -DATE="r0_1.0~a18-1" -DESTDIR="/srv/debian-unofficial/ftp/debian-live/cdimage" +DATE="`date +%Y%m%d`" +DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" -OPTIONS="--binary-indices disabled --initramfs casper" +OPTIONS="--initramfs casper --apt-recommends disabled" ARCHITECTURES="`dpkg --print-architecture`" DISTRIBUTIONS="etch" @@ -82,7 +82,7 @@ do # Moving logs mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt + cp "${TEMPDIR}"/debian-live/binary/casper/filesystem.manifest "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt # Creating images directory mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} diff --git a/examples/cron/lenny.sh b/examples/cron/lenny.sh index 0ce64f0..10cef51 100755 --- a/examples/cron/lenny.sh +++ b/examples/cron/lenny.sh @@ -2,16 +2,16 @@ set -e -BUILD="lenny" +BUILD="weekly" # Begin custom defaults AUTOBUILD="enabled" DATE="`date +%Y%m%d`" -DESTDIR="/srv/debian-unofficial/ftp/debian-live/cdimage" +DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" -OPTIONS="--binary-indices disabled --initramfs live-initramfs" +OPTIONS="--apt-recommends disabled --security disabled" ARCHITECTURES="`dpkg --print-architecture`" DISTRIBUTIONS="lenny" @@ -82,7 +82,7 @@ do # Moving logs mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt + cp "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt # Creating images directory mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} diff --git a/examples/cron/manpages.sh b/examples/cron/manpages.sh new file mode 100755 index 0000000..571ea14 --- /dev/null +++ b/examples/cron/manpages.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Needs: man2html svn + +# Static variables +PACKAGES="live-helper live-initramfs live-initscripts live-webhelper" + +TEMPDIR="/srv/tmp/manpages" +SERVER="/srv/debian-live/www/other/manpages" + +DATE_START="`date -R`" + +# Checking lock file +if [ -f "${SERVER}"/lock ] +then + echo "E: locked." + exit 1 +fi + +# Creating server directory +if [ ! -d "${SERVER}" ] +then + mkdir -p "${SERVER}" +fi + +# Creating lock trap +trap "test -f ${SERVER}/lock && rm -f ${SERVER}/lock; exit 0" 0 1 2 3 9 15 + +# Creating lock file +echo "${DATE_START}" > "${SERVER}"/lock + +echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin manpage build." >> /var/log/live + +# Remove old manpages +rm -f "${SERVER}"/*.html + +# Processing packages +for PACKAGE in ${PACKAGES} +do + # Cleaning build directory + if [ -d "${TEMPDIR}" ] + then + rm -rf "${TEMPDIR}" + fi + + # Creating build directory + mkdir -p "${TEMPDIR}" + + # Getting sources + cd "${TEMPDIR}" + svn co svn://svn.debian.org/debian-live/dists/trunk/${PACKAGE} ${PACKAGE} + + # Building manpages + for MANPAGE in "${TEMPDIR}"/${PACKAGE}/manpages/* + do + man2html -D "${SERVER}"/ -r ${MANPAGE} | \ + sed -e "s#Content-type: text/html##" \ + -e 's#HREF="../index.html"#HREF="./"#' \ + -e 's#HREF="../man1/#HREF="#g' \ + -e 's#HREF="../man2/#HREF="#g' \ + -e 's#HREF="../man3/#HREF="#g' \ + -e 's#HREF="../man4/#HREF="#g' \ + -e 's#HREF="../man5/#HREF="#g' \ + -e 's#HREF="../man6/#HREF="#g' \ + -e 's#HREF="../man7/#HREF="#g' \ + -e 's#HREF="../man8/#HREF="#g' \ + -e 's#HREF="../man9/#HREF="#g' \ + -e 's#/cgi-bin/man/man2html#http://packages.debian.org/man2html#' \ + > "${SERVER}"/`basename ${MANPAGE}`.html + done + + # Removing sources + rm -rf "${TEMPDIR}"/${PACKAGE} + + cd "${OLDPWD}" +done + +# Creating symlinks +for NUMBER in 1 2 3 4 5 6 7 8 9 +do + for MANPAGE in "${SERVER}"/*.en.${NUMBER}.html + do + if [ -f "${MANPAGE}" ] + then + ln -s `basename ${MANPAGE}` "${SERVER}"/`basename ${MANPAGE} .en.${NUMBER}.html`.${NUMBER}.html + fi + done +done + +# Writing timestamp +cat > "${SERVER}"/LAST_BUILD << EOF +Last run begin: ${DATE_START} +Last run end: `date -R` +EOF + +# Removing build directory +rm -rf "${TEMPDIR}" + +echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end manpage build." >> /var/log/live diff --git a/examples/cron/sid.sh b/examples/cron/sid.sh index 1d7a5a7..7769fef 100755 --- a/examples/cron/sid.sh +++ b/examples/cron/sid.sh @@ -2,16 +2,16 @@ set -e -BUILD="sid" +BUILD="daily" # Begin custom defaults AUTOBUILD="enabled" DATE="`date +%Y%m%d`" -DESTDIR="/srv/debian-unofficial/ftp/debian-live/cdimage" +DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" -OPTIONS="--binary-indices disabled --initramfs live-initramfs" +OPTIONS="--apt-recommends disabled" ARCHITECTURES="`dpkg --print-architecture`" DISTRIBUTIONS="sid" @@ -82,7 +82,7 @@ do # Moving logs mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt + cp "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt # Creating images directory mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} @@ -96,10 +96,10 @@ do if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt ] then # Workaround of missing multi-binary support in live-helper - mv "${TEMPDIR}"/debian-live/binary/casper "${TEMPDIR}"/debian-live/casper.tmp + mv "${TEMPDIR}"/debian-live/binary/live "${TEMPDIR}"/debian-live/live.tmp rm -rf "${TEMPDIR}"/debian-live/binary* "${TEMPDIR}"/debian-live/.stage/binary_* mkdir "${TEMPDIR}"/debian-live/binary - mv "${TEMPDIR}"/debian-live/casper.tmp "${TEMPDIR}"/debian-live/binary/casper + mv "${TEMPDIR}"/debian-live/live.tmp "${TEMPDIR}"/debian-live/binary/live touch "${TEMPDIR}"/debian-live/.stage/binary_chroot touch "${TEMPDIR}"/debian-live/.stage/binary_rootfs diff --git a/examples/cron/snapshots.sh b/examples/cron/snapshots.sh index 00d818c..bdf6433 100755 --- a/examples/cron/snapshots.sh +++ b/examples/cron/snapshots.sh @@ -12,7 +12,7 @@ NAME="Debian Live Autobuilder" export DEBEMAIL EMAIL DEBFULLNAME NAME -TEMPDIR="/srv/tmp/svn-snapshots" +TEMPDIR="/srv/tmp/snapshots" SERVER="/srv/debian-unofficial/ftp/debian-live-snapshots" DATE_START="`date -R`" diff --git a/examples/hooks/win32-loader.sh b/examples/hooks/win32-loader.sh new file mode 100755 index 0000000..ee328c5 --- /dev/null +++ b/examples/hooks/win32-loader.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install win32-loader. +# win32-loader was written by Robert Milan . +# +# To enable it, copy this hook into your config/binary_local-hooks directory. + +cd binary + +wget http://goodbye-microsoft.com/pub/debian.exe + +cd "${OLDPWD}" diff --git a/functions/common.sh b/functions/common.sh index 8c1bca5..24212c4 100755 --- a/functions/common.sh +++ b/functions/common.sh @@ -10,4 +10,4 @@ set -e PROGRAM="`basename ${0}`" -VERSION="1.0~a18" +VERSION="1.0~a19" diff --git a/functions/defaults.sh b/functions/defaults.sh index a5b9e73..098a87f 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -584,6 +584,9 @@ Set_defaults () esac fi + # Setting chroot option + LIVE_CHROOT_BUILD="${LIVE_CHROOT_BUILD:-enabled}" + # Setting debian-installer option LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER:-disabled}" diff --git a/functions/package.sh b/functions/package.sh index 3d11873..96316dc 100755 --- a/functions/package.sh +++ b/functions/package.sh @@ -11,18 +11,32 @@ set -e Check_package () { - FILE="${1}" + ITEM="${1}" PACKAGE="${2}" - if [ ! -f "${FILE}" ] - then - PACKAGES="${PACKAGES} ${PACKAGE}" - fi + case "${LIVE_CHROOT_BUILD}" in + enabled) + if [ ! -d "${ITEM}" ] && [ ! -f "${ITEM}" ] + then + PACKAGES="${PACKAGES} ${PACKAGE}" + fi + ;; + + disabled) + ITEM="`echo ${ITEM} | sed -e 's/chroot//'`" + + if [ ! -d "${ITEM}" ] && [ ! -f "${ITEM}" ] + then + Echo_error "You need to install ${PACKAGE} on your host system." + exit 1 + fi + ;; + esac } Install_package () { - if [ -n "${PACKAGES}" ] + if [ -n "${PACKAGES}" ] && [ "${LIVE_CHROOT_BUILD}" != "disabled" ] then case "${LH_APT}" in apt|apt-get) @@ -38,7 +52,7 @@ Install_package () Remove_package () { - if [ -n "${PACKAGES}" ] + if [ -n "${PACKAGES}" ] && [ "${LIVE_CHROOT_BUILD}" != "disabled" ] then case "${LH_APT}" in apt|apt-get) diff --git a/functions/templates.sh b/functions/templates.sh index 9fbc365..6b60c9e 100755 --- a/functions/templates.sh +++ b/functions/templates.sh @@ -11,22 +11,25 @@ set -e Check_templates () { - PROGRAM="${1}" + ITEM="${1}" - # Check local templates - if [ -d config/templates/"${PROGRAM}" ] + # Check user defined templates directory + if [ ! -d "${LIVE_TEMPLATES}" ] then - LIVE_TEMPLATES="config/templates" + if [ -d config/templates ] + then + LIVE_TEMPLATES=config/templates + else + Echo_error "templates not accessible in ${LIVE_TEMPLATES} nor config/templates" + exit 1 + fi fi - # Checking user templates - if [ ! -d "${LIVE_TEMPLATES}" ] - then - Echo_error "user specified templates not accessible in ${LIVE_TEMPLATES}" - exit 1 - elif [ ! -d "${LIVE_TEMPLATES}/${PROGRAM}" ] + if [ -d "${LIVE_TEMPLATES}/${ITEM}" ] then - Echo_error "${PROGRAM} templates not accessible in ${LIVE_TEMPLATES}" + TEMPLATES="${LIVE_TEMPLATES}/${ITEM}" + else + Echo_error "${ITEM} templates not accessible in ${LIVE_TEMPLATES}" exit 1 fi } diff --git a/helpers/lh_binary b/helpers/lh_binary index c7ab776..7a71cbc 100755 --- a/helpers/lh_binary +++ b/helpers/lh_binary @@ -27,13 +27,16 @@ Arguments "${@}" # Preparing root filesystem lh_binary_chroot ${*} -# Configuring chroot -lh_chroot_proc install ${*} -lh_chroot_sysfs install ${*} -lh_chroot_hosts install ${*} -lh_chroot_resolv install ${*} -lh_chroot_hostname install ${*} -lh_chroot_sources install ${*} +if [ "${LIVE_CHROOT_BUILD}" = "enabled" ] +then + # Configuring chroot + lh_chroot_proc install ${*} + lh_chroot_sysfs install ${*} + lh_chroot_hosts install ${*} + lh_chroot_resolv install ${*} + lh_chroot_hostname install ${*} + lh_chroot_sources install ${*} +fi # Building root filesystem lh_binary_rootfs ${*} @@ -59,10 +62,13 @@ lh_binary_net ${*} lh_binary_tar ${*} lh_binary_usb-hdd ${*} -# Deconfiguring chroot -rm -f .stage/chroot_sources -lh_chroot_hostname remove ${*} -lh_chroot_resolv remove ${*} -lh_chroot_hosts remove ${*} -lh_chroot_sysfs remove ${*} -lh_chroot_proc remove ${*} +if [ "${LIVE_CHROOT_BUILD}" = "enabled" ] +then + # Deconfiguring chroot + rm -f .stage/chroot_sources + lh_chroot_hostname remove ${*} + lh_chroot_resolv remove ${*} + lh_chroot_hosts remove ${*} + lh_chroot_sysfs remove ${*} + lh_chroot_proc remove ${*} +fi diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index 55be65c..6d13bad 100755 --- a/helpers/lh_binary_chroot +++ b/helpers/lh_binary_chroot @@ -58,17 +58,17 @@ then ${LH_ROOT_COMMAND} umount chroot/sys fi +if [ "${LIVE_CHROOT_BUILD}" = "disabled" ] +then + exit 0 +fi + # Removing old chroot ${LH_ROOT_COMMAND} rm -rf chroot/chroot ${LH_ROOT_COMMAND} rm -rf chroot.tmp # Copying new chroot -#if [ "${LIVE_BINARY_INDICES}" = "enabled" ] -#then - ${LH_ROOT_COMMAND} cp -a chroot chroot.tmp -#else -# ${LH_ROOT_COMMAND} cp -al chroot chroot.tmp -#fi +${LH_ROOT_COMMAND} cp -a chroot chroot.tmp ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot if [ -n "${LH_ROOT_COMMAND}" ] diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index 379a006..e4466df 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -34,13 +34,7 @@ Set_defaults # Setting remote d-i directories case "${LIVE_DEBIAN_INSTALLER}" in - netboot) - DI="netboot/debian-installer/i386" - DI_GTK="netboot/gtk/debian-installer/i386" - DI_KERNEL="linux" - ;; - - cdrom|enabled) + enabled|cdrom|live) DI="cdrom" DI_GTK="${DI}/gtk" DI_KERNEL="vmlinuz" @@ -50,6 +44,12 @@ case "${LIVE_DEBIAN_INSTALLER}" in exit 0 ;; + netboot) + DI="netboot/debian-installer/i386" + DI_GTK="netboot/gtk/debian-installer/i386" + DI_KERNEL="linux" + ;; + *) Echo_error "debian-installer flavor ${LIVE_DEBIAN_INSTALLER} not supported." exit 1 @@ -296,22 +296,11 @@ 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 "${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 @@ -328,7 +317,7 @@ do if [ -f ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ] then # Copying cached udebs - cp -l ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ./ + cp ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ./ else # Downloading udebs wget "${LIVE_MIRROR_BOOTSTRAP}"/${UDEB} @@ -338,7 +327,7 @@ done # Caching udebs rm -rf ../cache/packages_debian-installer.udeb mkdir -p ../cache/packages_debian-installer.udeb -cp -l *.udeb ../cache/packages_debian-installer.udeb +cp *.udeb ../cache/packages_debian-installer.udeb # Including local udebs if ls ../config/binary_local-udebs/* &> /dev/null @@ -375,7 +364,7 @@ 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 >> exclude grep -v "^#" ${LH_BASE:-/usr/share/live-helper}/data/debian-cd/"${LIVE_DISTRIBUTION}"/exclude-udebs-${LIVE_ARCHITECTURE} >> exclude for EXCLUDE in `cat exclude` diff --git a/helpers/lh_binary_encryption b/helpers/lh_binary_encryption index 1a9265a..06ad2c4 100755 --- a/helpers/lh_binary_encryption +++ b/helpers/lh_binary_encryption @@ -80,11 +80,16 @@ esac # Checking depends Check_package chroot/usr/bin/aespipe aespipe +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package -# Moving image -mv binary/${INITFS}/filesystem.${LIVE_CHROOT_FILESYSTEM} chroot +case "${LIVE_CHROOT_BUILD}" in + enabled) + # Moving image + mv binary/${INITFS}/filesystem.${LIVE_CHROOT_FILESYSTEM} chroot echo "Encrypting binary/${INITFS}/filesystem.${ROOTFS} with ${LIVE_ENCRYPTION}..." @@ -105,11 +110,33 @@ do done EOF -Chroot "sh encrypt.sh" + Chroot "sh encrypt.sh" + + # Move image + mv chroot/filesystem.${LIVE_CHROOT_FILESYSTEM} binary/${INITFS} + rm -f chroot/encrypt.sh + ;; + + disabled) + while true + do + cat binary/${INITFS}/filesystem.${ROOTFS} | aespipe -e ${LIVE_ENCRYPTION} -T > binary/${INITFS}/filesystem.${ROOTFS}.tmp && mv binary/${INITFS}/filesystem.${ROOTFS}.tmp binary/${INITFS}/filesystem.${ROOTFS} && break + + echo -n "Something went wrong... Retry? [YES/no] " + + read ANSWER + + if [ "no" = "${ANSWER}" ] + then + unset ANSWER + break + fi + done + ;; +esac -# Move image -mv chroot/filesystem.${LIVE_CHROOT_FILESYSTEM} binary/${INITFS} -rm -f chroot/encrypt.sh +# Saving cache +Save_cache cache/packages_binary # Removing depends Remove_package diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub index b196ad1..1bcf4ab 100755 --- a/helpers/lh_binary_grub +++ b/helpers/lh_binary_grub @@ -60,6 +60,9 @@ Check_architecture amd64 i386 # Checking depends Check_package chroot/usr/sbin/grub grub +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package @@ -185,8 +188,8 @@ DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`" DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`" DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`" -Grub_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" -Grub_live_entry "live (fail-safe mode)" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}" +Grub_live_entry "live" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}" +Grub_live_entry "live (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}" "${FAILSAFE}" for KERNEL in chroot/boot/vmlinuz-* do @@ -234,19 +237,26 @@ fi # Copying templates mkdir -p binary/boot/grub -cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub +cp -r "${TEMPLATES}"/* binary/boot/grub -# Copying grub case ${LIVE_BINARY_IMAGES} in iso) - cp chroot/usr/lib/grub/*/stage2_eltorito binary/boot/grub + FILES="chroot/usr/lib/grub/*/stage2_eltorito" ;; tar|usb-hdd) - cp chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2 binary/boot/grub + FILES="chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2" ;; esac +if [ "${LIVE_CHROOT_BUILD}" = "disabled" ] +then + FILES="`echo ${FILES} | sed -e 's/chroot//g'`" +fi + +# Copying grub +cp ${FILES} binary/boot/grub + # Copying local configuration file if [ -f config/binary_grub/menu.lst ] then @@ -283,6 +293,9 @@ sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst sed -i -e 's/\ $//g' binary/boot/grub/menu.lst +# Saving cache +Save_cache cache/packages_binary + # Removing depends Remove_package diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes index 14d1206..bac2de2 100755 --- a/helpers/lh_binary_includes +++ b/helpers/lh_binary_includes @@ -160,13 +160,5 @@ then sed -i -e "s#DEBIAN_NAME#${DEBIAN_NAME}#g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s#DEBIAN_TOOLS#${DEBIAN_TOOLS_TXT}#g" binary/README.txt fi -# Cleaning up includes -if [ -e binary/parameters.txt.${LH_INITRAMFS} ] -then - mv binary/parameters.txt.${LH_INITRAMFS} binary/parameters.txt -fi - -rm -f binary/parameters.txt.* - # Creating stage file Create_stagefile .stage/binary_includes diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso index f57b4e5..b39f31e 100755 --- a/helpers/lh_binary_iso +++ b/helpers/lh_binary_iso @@ -54,6 +54,9 @@ Create_lockfile .lock # Checking depends Check_package chroot/usr/bin/"${LH_GENISOIMAGE}" ${LH_GENISOIMAGE} +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package @@ -88,9 +91,6 @@ then GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -V \"${LIVE_ISO_VOLUME}\"" fi -# Moving image -mv binary chroot - # Create image case "${LIVE_BOOTLOADER}" in grub) @@ -128,15 +128,34 @@ case "${LIVE_BOOTLOADER}" in ;; esac +case "${LIVE_CHROOT_BUILD}" in + enabled) + # Moving image + mv binary chroot + cat > chroot/binary.sh << EOF ${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -J -l -cache-inodes binary EOF -Chroot "sh binary.sh" + Chroot "sh binary.sh" + + # Move image + mv chroot/binary chroot/binary.iso ./ + rm -f chroot/binary.sh + ;; + + disabled) +cat > binary.sh << EOF +${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -J -l -cache-inodes binary +EOF + + sh binary.sh + rm -f binary.sh + ;; +esac -# Move image -mv chroot/binary chroot/binary.iso ./ -rm -f chroot/binary.sh +# Saving cache +Save_cache cache/packages_binary # Removing depends Remove_package diff --git a/helpers/lh_binary_linux-image b/helpers/lh_binary_linux-image index b4cee2e..077b4e3 100755 --- a/helpers/lh_binary_linux-image +++ b/helpers/lh_binary_linux-image @@ -98,5 +98,21 @@ mkdir -p "${DESTDIR}" cp chroot/boot/"${LINUX}"-* "${DESTDIR}" cp chroot/boot/initrd.img-* "${DESTDIR}" +# Including boot parameter documentation +if [ "${LIVE_BINARY_IMAGES}" != "net" ] +then + DESTDIR="binary" +fi + +case "${LH_INITRAMFS}" in + casper) + cp "${LH_BASE:-/usr/share/live-helper}"/data/casper/parameters.txt "${DESTDIR}"/parameters.txt + ;; + + live-initramfs) + cp chroot/usr/share/doc/live-initramfs/parameters.txt "${DESTDIR}"/parameters.txt + ;; +esac + # Creating stage file Create_stagefile .stage/binary_linux-image diff --git a/helpers/lh_binary_memtest b/helpers/lh_binary_memtest index 97fa8ab..586e362 100755 --- a/helpers/lh_binary_memtest +++ b/helpers/lh_binary_memtest @@ -57,6 +57,17 @@ then exit 0 fi +if [ "${LIVE_CHROOT_BUILD}" = "enabled" ] +then + + if [ -f chroot/usr/sbin/grub ] && [ ! -d chroot/boot/grub ] + then + GRUB="yes" + + mkdir -p chroot/boot/grub + fi +fi + # Checking depends case "${LIVE_MEMTEST}" in memtest86) @@ -68,6 +79,9 @@ case "${LIVE_MEMTEST}" in ;; esac +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package @@ -114,18 +128,26 @@ Check_multiarchitecture mkdir -p "${DESTDIR}" # Installing memtest -case "${LIVE_MEMTEST}" in - memtest86) - cp -f chroot/boot/memtest86.bin "${DESTDIR}"/memtest +case "${LIVE_CHROOT_BUILD}" in + enabled) + cp chroot/boot/${LIVE_MEMTEST}.bin "${DESTDIR}"/memtest ;; - memtest86+) - cp -f chroot/boot/memtest86+.bin "${DESTDIR}"/memtest + disabled) + cp /boot/${LIVE_MEMTEST}.bin "${DESTDIR}"/memtest ;; esac +# Saving cache +Save_cache cache/packages_binary + # Removing depends Remove_package +if [ "${GRUB}" ] +then + rm -rf chroot/boot/grub +fi + # Creating stage file Create_stagefile .stage/binary_memtest diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs index 148a5fe..e8f34c8 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 -al cache/stages_rootfs/filesystem.* binary/"${INITFS}" + ${LH_ROOT_COMMAND} cp -a cache/stages_rootfs/filesystem.* binary/"${INITFS}" if [ -n "${LH_ROOT_COMMAND}" ] then @@ -97,6 +97,9 @@ case "${LIVE_CHROOT_FILESYSTEM}" in # Checking depends Check_package chroot/usr/bin/genext2fs genext2fs + # Restoring cache + Restore_cache cache/packages_binary + # Installing depends Install_package @@ -109,11 +112,22 @@ case "${LIVE_CHROOT_FILESYSTEM}" in DU_DIM="`du -ks chroot/chroot | cut -f1`" REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... - Chroot "genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot filesystem.ext2" + case "${LIVE_CHROOT_BUILD}" in + enabled) + Chroot "genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot filesystem.ext2" + + # Move image + mv chroot/filesystem.ext2 binary/${INITFS} + rm -rf chroot/chroot + ;; - # Move image - mv chroot/filesystem.ext2 binary/${INITFS} - rm -rf chroot/chroot + disabled) + genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot binary/${INITFS}/filesystem.ext2 + ;; + esac + + # Saving cache + Save_cache cache/packages_binary # Removing depends Remove_package @@ -125,12 +139,23 @@ case "${LIVE_CHROOT_FILESYSTEM}" in rm -rf binary/${INITFS}/filesystem.dir fi - mv chroot/chroot binary/${INITFS}/filesystem.dir + case "${LIVE_CHROOT_BUILD}" in + enabled) + mv chroot/chroot binary/${INITFS}/filesystem.dir + ;; + + disabled) + cp -a chroot binary/${INITFS}/filesystem.dir + ;; + esac ;; squashfs) # Checking depends - Check_package chroot/usr/sbin/mksquashfs squashfs-tools + Check_package chroot/usr/share/doc/squashfs-tools squashfs-tools + + # Restoring cache + Restore_cache cache/packages_binary # Installing depends Install_package @@ -159,21 +184,32 @@ case "${LIVE_CHROOT_FILESYSTEM}" in if [ -f config/binary_rootfs/squashfs.sort ] then MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -sort squashfs.sort" - cp config/binary_rootfs/squashfs.sort chroot + cp config/binary_rootfs/squashfs.sort chroot #FIXME fi - # Create image - Chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}" + case "${LIVE_CHROOT_BUILD}" in + enabled) + # Create image + Chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}" + + # Move image + ${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS} + ${LH_ROOT_COMMAND} rm -rf chroot/chroot chroot/squashfs.sort + ;; - # Move image - ${LH_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS} - ${LH_ROOT_COMMAND} rm -rf chroot/chroot chroot/squashfs.sort + disabled) + mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} + ;; + esac if [ -n "${LH_ROOT_COMMAND}" ] then ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary/${INITFS} fi + # Saving cache + Save_cache cache/packages_binary + # Removing depends Remove_package ;; @@ -187,7 +223,7 @@ do mkdir -p cache/stages_rootfs - ${LH_ROOT_COMMAND} cp -al binary/"${INITFS}"/filesystem.* cache/stages_rootfs + ${LH_ROOT_COMMAND} cp -a 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 8f8629f..88a154b 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -60,6 +60,9 @@ Check_architecture amd64 i386 # Checking depends Check_package chroot/usr/bin/syslinux syslinux +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package @@ -320,8 +323,18 @@ case "${LIVE_BINARY_IMAGES}" in iso) # Copying syslinux mkdir -p binary/isolinux - cp chroot/usr/lib/syslinux/isolinux.bin binary/isolinux - cp -r "${LIVE_TEMPLATES}"/syslinux/* binary/isolinux + + case "${LIVE_CHROOT_BUILD}" in + enabled) + cp chroot/usr/lib/syslinux/isolinux.bin binary/isolinux + ;; + + disabled) + cp /usr/lib/syslinux/isolinux.bin binary/isolinux + ;; + esac + + cp -r "${TEMPLATES}"/* binary/isolinux mv binary/isolinux/syslinux.cfg binary/isolinux/isolinux.cfg # Copying local configuration file @@ -380,9 +393,20 @@ case "${LIVE_BINARY_IMAGES}" in net) # Copying syslinux - cp chroot/usr/lib/syslinux/pxelinux.0 tftpboot + mkdir -p tftpboot + + case "${LIVE_CHROOT_BUILD}" in + enabled) + cp chroot/usr/lib/syslinux/pxelinux.0 tftpboot + ;; + + disabled) + cp /usr/lib/syslinux/pxelinux.0 tftpboot + ;; + esac + mkdir -p tftpboot/pxelinux.cfg - cp -r "${LIVE_TEMPLATES}"/syslinux/* tftpboot/pxelinux.cfg + cp -r "${TEMPLATES}"/* tftpboot/pxelinux.cfg mv tftpboot/pxelinux.cfg/syslinux.cfg tftpboot/pxelinux.cfg/default # Copying local configuration file @@ -439,8 +463,18 @@ case "${LIVE_BINARY_IMAGES}" in # Copying syslinux mkdir -p "${DESTDIR}" - cp chroot/usr/lib/syslinux/isolinux.bin "${DESTDIR}"/syslinux.bin - cp -r "${LIVE_TEMPLATES}"/syslinux/* "${DESTDIR}" + + case "${LIVE_CHROOT_BUILD}" in + enabled) + cp chroot/usr/lib/syslinux/isolinux.bin "${DESTDIR}"/syslinux.bin + ;; + + disabled) + cp /usr/lib/syslinux/isolinux.bin "${DESTDIR}"/syslinux.bin + ;; + esac + + cp -r "${TEMPLATES}"/* "${DESTDIR}" # Copying local configuration file if [ -f config/binary_syslinux/syslinux.cfg ] @@ -472,7 +506,7 @@ case "${LIVE_BINARY_IMAGES}" in sed -i -e "s/LIVE_VERSION/${VERSION}/" "${DESTDIR}"/f10.txt # Workaround for syslinux (<< 3.36) which doesn't support long file/path names - if [ "${LIVE_DISTRIBUTION}" = "etch" ] && [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ] + if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ] then NUMBER="0" @@ -494,6 +528,9 @@ case "${LIVE_BINARY_IMAGES}" in ;; esac +# Saving cache +Save_cache cache/packages_binary + # Removing depends Remove_package diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd index 71353da..7a5055b 100755 --- a/helpers/lh_binary_usb-hdd +++ b/helpers/lh_binary_usb-hdd @@ -67,6 +67,9 @@ case "${LIVE_BOOTLOADER}" in ;; esac +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package @@ -161,6 +164,9 @@ fi mv chroot/binary.img ./ +# Saving cache +Save_cache cache/packages_binary + # Removing depends Remove_package diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot index 00bc15f..c915e1d 100755 --- a/helpers/lh_binary_yaboot +++ b/helpers/lh_binary_yaboot @@ -60,6 +60,9 @@ Check_architecture powerpc ppc64 # Checking depends Check_package chroot/usr/lib/yaboot/yaboot yaboot +# Restoring cache +Restore_cache cache/packages_binary + # Installing depends Install_package @@ -239,8 +242,18 @@ case "${LIVE_BINARY_IMAGES}" in iso|usb-hdd) # Copying yaboot mkdir -p binary/yaboot - cp chroot/usr/lib/yaboot/yaboot binary/yaboot - cp -r "${LIVE_TEMPLATES}"/yaboot/* binary/yaboot + + case "${LIVE_CHROOT_BUILD}" in + enabled) + cp chroot/usr/lib/yaboot/yaboot binary/yaboot + ;; + + disabled) + cp /usr/lib/yaboot/yaboot binary/yaboot + ;; + esac + + cp -r "${TEMPLATES}"/* binary/yaboot if [ "${LIVE_BINARY_IMAGES}" = "usb-hdd" ] then @@ -257,6 +270,9 @@ case "${LIVE_BINARY_IMAGES}" in ;; esac +# Saving cache +Save_cache cache/packages_binary + # Removing depends Remove_package diff --git a/helpers/lh_bootstrap_cache b/helpers/lh_bootstrap_cache index a3d05f3..03ae904 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 -al cache/stages_bootstrap chroot + ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot if [ -n "${LH_ROOT_COMMAND}" ] then @@ -83,7 +83,7 @@ do mkdir -p cache - ${LH_ROOT_COMMAND} cp -al chroot cache/stages_bootstrap + ${LH_ROOT_COMMAND} cp -a chroot cache/stages_bootstrap if [ -n "${LH_ROOT_COMMAND}" ] then diff --git a/helpers/lh_chroot_cache b/helpers/lh_chroot_cache index 0e655be..2f016a6 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 -al cache/stages_chroot chroot + ${LH_ROOT_COMMAND} cp -a cache/stages_chroot chroot if [ -n "${LH_ROOT_COMMAND}" ] then @@ -83,7 +83,7 @@ do mkdir -p cache - ${LH_ROOT_COMMAND} cp -al chroot cache/stages_chroot + ${LH_ROOT_COMMAND} cp -a chroot cache/stages_chroot if [ -n "${LH_ROOT_COMMAND}" ] then diff --git a/helpers/lh_clean b/helpers/lh_clean index d843907..c417415 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 -al cache/stages_bootstrap chroot + ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot mkdir -p .stage touch .stage/bootstrap fi @@ -79,6 +79,7 @@ case "${1}" in rm -f binary.iso rm -f binary.img rm -f binary*.tar.gz + rm -f binary.sh rm -rf binary rm -rf tftpboot diff --git a/helpers/lh_config b/helpers/lh_config index c9dc615..d101571 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -321,6 +321,11 @@ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND}" # (Default: ${LIVE_BOOTLOADER}) LIVE_BOOTLOADER="${LIVE_BOOTLOADER}" +# \${LIVE_CHROOT_BUILD: control if we build binary images chrooted +# (Default: ${LIVE_CHROOT_BUILD}) +# DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to disabled. +LIVE_CHROOT_BUILD="${LIVE_CHROOT_BUILD}" + # \$LIVE_DEBIAN_INSTALLER: set debian-installer # (Default: ${LIVE_DEBIAN_INSTALLER}) LIVE_DEBIAN_INSTALLER="${LIVE_DEBIAN_INSTALLER}" diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live index c51364d..970e0fd 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 -al config source/debian-live +cp -a config source/debian-live # Create tarball cd source diff --git a/includes/sid/live/parameters.txt.casper b/includes/sid/live/parameters.txt.casper deleted file mode 100644 index 10904be..0000000 --- a/includes/sid/live/parameters.txt.casper +++ /dev/null @@ -1,29 +0,0 @@ -Boot Parameters for Debian Live -------------------------------- - -Updated for casper 1.77+debian-7 on 2007-02-08. - -These options (can be combined) work from the syslinux bootprompt: - -casper casper-getty -casper xdebconf -casper hostname=HOSTNAME -casper userfullname=USERFULLNAME -casper username=USERNAME -casper {keyb|kbd-chooser/method}=KEYBOARD -casper {klayout|console-setup/layoutcode}=LAYOUT -casper {kvariant|console-setup/variantcode}=VARIANT , -casper {kmodel|console-setup/modelcode}=CODE , koptions=OPTIONS -casper ip=IFACE,ADDRESS,NETMASK,GATEWAY[:IFACE,ADDRESS,NETMASK,GATEWAY]* -casper ip[=frommedia] -casper {live-media|bootfrom}=DEVICE -casper live-media-offset=BYTES -casper locale=LOCALE | debian-installer/locale=LOCALE -casper netboot[=nfs|cifs] -casper persistent -casper nopersistent -casper showmounts -casper todisk=DEVICE -casper toram -casper {preseed/file|file}=FILE -casper package/question=VALUE diff --git a/includes/sid/live/parameters.txt.live-initramfs b/includes/sid/live/parameters.txt.live-initramfs deleted file mode 100644 index 07566fe..0000000 --- a/includes/sid/live/parameters.txt.live-initramfs +++ /dev/null @@ -1,46 +0,0 @@ -Boot Parameters for Debian Live -------------------------------- - -Updated for live-initramfs 1.91.3-1 on 2007-07-09. - -These options (can be combined) work from the syslinux bootprompt: - -live access=ACCESS -live console=TTY,SPEED -live hostname=HOSTNAME -live username=USER -live userfullname=USERFULLNAME -live integrity-check -live ip=[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:[DEVICE]:[AUTOCONF] [,[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:[DEVICE]:[AUTOCONF]]* -live ip[=frommedia] -live {keyb|kbd-chooser/method}=KEYBOARD -live {klayout|console-setup/layoutcode}=LAYOUT -live {kvariant|console-setup/variantcode}=VARIANT -live {kmodel|console-setup/modelcode}=CODE -live koptions=OPTIONS -live live-getty -live {live-media|bootfrom}=DEVICE -live {live-media-encryption|encryption}=TYPE -live live-media-offset=BYTES -live live-media-timeout=SECONDS -live {locale|debian-installer/locale}=LOCALE -live module=NAME -live netboot[=nfs|cifs] -live nfsopts= -live noautologin -live noxautologin -live nofastboot -live nopersistent -live nosudo -live noswap -live persistent -live {preseed/file|file}=FILE -live package/question=VALUE -live quickreboot -live showmounts -live timezone=TIMEZONE -live todisk=DEVICE -live toram -live union=unionfs|aufs -live xdebconf -live xvideomode=RESOLUTION diff --git a/lists/rescue b/lists/rescue index 9c98374..2c849d6 100644 --- a/lists/rescue +++ b/lists/rescue @@ -13,7 +13,7 @@ aview mc nano-tiny qemacs-nox mg vim wdiff dosfstools dvd+rw-tools e2fsprogs ext2resize genisoimage hdparm blktool ntfsprogs parted partimage reiserfsprogs secure-delete scsitools smartmontools testdisk wodim wipe xfsprogs ## System -dmidecode lshw pciutils procinfo read-edid sysutils usbutils +dmidecode lshw pciutils procinfo read-edid sysutils usbutils mcelog ## Browser lynx links2 w3m diff --git a/manpages/lh_binary.de.1 b/manpages/lh_binary.de.1 index fbce027..0474b6c 100644 --- a/manpages/lh_binary.de.1 +++ b/manpages/lh_binary.de.1 @@ -1,4 +1,4 @@ -.TH LH_BINARY 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_BINARY 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_binary \- Meta\-Helper f\[:u]r lh_binary_* diff --git a/manpages/lh_binary.en.1 b/manpages/lh_binary.en.1 index 8064042..1694d07 100644 --- a/manpages/lh_binary.en.1 +++ b/manpages/lh_binary.en.1 @@ -1,4 +1,4 @@ -.TH LH_BINARY 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_BINARY 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_binary \- meta\-helper for lh_binary_* diff --git a/manpages/lh_bootstrap.de.1 b/manpages/lh_bootstrap.de.1 index db107ca..5563c42 100644 --- a/manpages/lh_bootstrap.de.1 +++ b/manpages/lh_bootstrap.de.1 @@ -1,4 +1,4 @@ -.TH LH_BOOTSTRAP 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_BOOTSTRAP 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_bootstrap \- Meta\-Helper f\[:u]r lh_bootstrap_* diff --git a/manpages/lh_bootstrap.en.1 b/manpages/lh_bootstrap.en.1 index b6066fd..559996a 100644 --- a/manpages/lh_bootstrap.en.1 +++ b/manpages/lh_bootstrap.en.1 @@ -1,4 +1,4 @@ -.TH LH_BOOTSTRAP 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_BOOTSTRAP 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_bootstrap \- meta\-helper for lh_bootstrap_* diff --git a/manpages/lh_bootstrap_cdebootstrap.de.1 b/manpages/lh_bootstrap_cdebootstrap.de.1 index 21c2526..d42188c 100644 --- a/manpages/lh_bootstrap_cdebootstrap.de.1 +++ b/manpages/lh_bootstrap_cdebootstrap.de.1 @@ -1,4 +1,4 @@ -.TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_bootstrap_cdebootstrap \- erstellt ein Debian-System mit \fIcdebootstrap\fR(1) diff --git a/manpages/lh_bootstrap_cdebootstrap.en.1 b/manpages/lh_bootstrap_cdebootstrap.en.1 index b207f9b..6d96c0a 100644 --- a/manpages/lh_bootstrap_cdebootstrap.en.1 +++ b/manpages/lh_bootstrap_cdebootstrap.en.1 @@ -1,4 +1,4 @@ -.TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_BOOTSTRAP_CDEBOOTSTRAP 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_bootstrap_cdebootstrap \- bootstrap a Debian system with \fIcdebootstrap\fR(1) diff --git a/manpages/lh_bootstrap_debootstrap.de.1 b/manpages/lh_bootstrap_debootstrap.de.1 index 5999b65..20eeeeb 100644 --- a/manpages/lh_bootstrap_debootstrap.de.1 +++ b/manpages/lh_bootstrap_debootstrap.de.1 @@ -1,4 +1,4 @@ -.TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_bootstrap_debootstrap \- erstellt ein Debian-System mit \fIdebootstrap\fR(8) diff --git a/manpages/lh_bootstrap_debootstrap.en.1 b/manpages/lh_bootstrap_debootstrap.en.1 index 2b40a9b..4772cf2 100644 --- a/manpages/lh_bootstrap_debootstrap.en.1 +++ b/manpages/lh_bootstrap_debootstrap.en.1 @@ -1,4 +1,4 @@ -.TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_BOOTSTRAP_DEBOOTSTRAP 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_bootstrap_debootstrap \- bootstrap a Debian system with \fIdebootstrap\fR(8) diff --git a/manpages/lh_build.de.1 b/manpages/lh_build.de.1 index 4bf85e9..2e5039d 100644 --- a/manpages/lh_build.de.1 +++ b/manpages/lh_build.de.1 @@ -1,4 +1,4 @@ -.TH LH_BUILD 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_BUILD 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_build \- erstellen eines Live-Systemes diff --git a/manpages/lh_build.en.1 b/manpages/lh_build.en.1 index b3ded67..daaa023 100644 --- a/manpages/lh_build.en.1 +++ b/manpages/lh_build.en.1 @@ -1,4 +1,4 @@ -.TH LH_BUILD 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_BUILD 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_build \- building a live system diff --git a/manpages/lh_chroot.de.1 b/manpages/lh_chroot.de.1 index 592d47c..15829a7 100644 --- a/manpages/lh_chroot.de.1 +++ b/manpages/lh_chroot.de.1 @@ -1,4 +1,4 @@ -.TH LH_CHROOT 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_CHROOT 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_chroot \- Meta\-Helper f\[:u]r lh_chroot_* diff --git a/manpages/lh_chroot.en.1 b/manpages/lh_chroot.en.1 index 1625f14..8f76c19 100644 --- a/manpages/lh_chroot.en.1 +++ b/manpages/lh_chroot.en.1 @@ -1,4 +1,4 @@ -.TH LH_CHROOT 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_CHROOT 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_chroot \- meta\-helper for lh_chroot_* diff --git a/manpages/lh_clean.de.1 b/manpages/lh_clean.de.1 index 9f7ab8a..23cf366 100644 --- a/manpages/lh_clean.de.1 +++ b/manpages/lh_clean.de.1 @@ -1,4 +1,4 @@ -.TH LH_CLEAN 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_CLEAN 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_clean \- r\[:a]umt das Build-Verzeichnis auf diff --git a/manpages/lh_clean.en.1 b/manpages/lh_clean.en.1 index 1f8261b..f8136f8 100644 --- a/manpages/lh_clean.en.1 +++ b/manpages/lh_clean.en.1 @@ -1,4 +1,4 @@ -.TH LH_CLEAN 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_CLEAN 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_clean \- clean up system build directories diff --git a/manpages/lh_source.de.1 b/manpages/lh_source.de.1 index d8fceef..bc1e2c1 100644 --- a/manpages/lh_source.de.1 +++ b/manpages/lh_source.de.1 @@ -1,4 +1,4 @@ -.TH LH_SOURCE 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_SOURCE 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_source \- Meta\-Helper f\[:u]r lh_source_* diff --git a/manpages/lh_source.en.1 b/manpages/lh_source.en.1 index 496719e..355fd2c 100644 --- a/manpages/lh_source.en.1 +++ b/manpages/lh_source.en.1 @@ -1,4 +1,4 @@ -.TH LH_SOURCE 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_SOURCE 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_source \- meta\-helper for lh_source_* diff --git a/manpages/lh_testroot.de.1 b/manpages/lh_testroot.de.1 index c4a6c83..b41ba27 100644 --- a/manpages/lh_testroot.de.1 +++ b/manpages/lh_testroot.de.1 @@ -1,4 +1,4 @@ -.TH LH_TESTROOT 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH LH_TESTROOT 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME lh_testroot \- stellt sicher dass das System als root gebaut wird diff --git a/manpages/lh_testroot.en.1 b/manpages/lh_testroot.en.1 index 0eea335..30f4e18 100644 --- a/manpages/lh_testroot.en.1 +++ b/manpages/lh_testroot.en.1 @@ -1,4 +1,4 @@ -.TH LH_TESTROOT 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LH_TESTROOT 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME lh_testroot \- ensure that a system is built as root diff --git a/manpages/live-helper.de.7 b/manpages/live-helper.de.7 index 28d9767..97dae2a 100644 --- a/manpages/live-helper.de.7 +++ b/manpages/live-helper.de.7 @@ -1,4 +1,4 @@ -.TH LIVE\-HELPER 7 "09.07.2007" "1.0~a18" "live\-helper" +.TH LIVE\-HELPER 7 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME live\-helper \- Debian Live Helper-Programme diff --git a/manpages/live-helper.en.7 b/manpages/live-helper.en.7 index 1e3c0de..b1c0b71 100644 --- a/manpages/live-helper.en.7 +++ b/manpages/live-helper.en.7 @@ -1,4 +1,4 @@ -.TH LIVE\-HELPER 7 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH LIVE\-HELPER 7 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME live\-helper \- Debian Live helper programs diff --git a/manpages/make-live.de.1 b/manpages/make-live.de.1 index 860ed8e..d4c33d5 100644 --- a/manpages/make-live.de.1 +++ b/manpages/make-live.de.1 @@ -1,4 +1,4 @@ -.TH MAKE\-LIVE 1 "09.07.2007" "1.0~a18" "live\-helper" +.TH MAKE\-LIVE 1 "16.07.2007" "1.0~a19" "live\-helper" .SH NAME make\-live \- erstellt ein Debian Live-System diff --git a/manpages/make-live.en.1 b/manpages/make-live.en.1 index 83e1bdc..9af8979 100644 --- a/manpages/make-live.en.1 +++ b/manpages/make-live.en.1 @@ -1,4 +1,4 @@ -.TH MAKE\-LIVE 1 "2007\-07\-09" "1.0~a18" "live\-helper" +.TH MAKE\-LIVE 1 "2007\-07\-16" "1.0~a19" "live\-helper" .SH NAME make\-live \- build a Debian Live system -- cgit v1.0