From 9a5955a79f907075d0cde61db6f7d2d605ab3b4a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:39 +0200 Subject: Adding live-package 0.99.19-1. --- ChangeLog | 10 +++ debian/changelog | 6 ++ debian/cron.daily | 36 ++++---- debian/default | 22 +++-- src/lists/gnome | 1 + src/lists/gnome-core | 1 + src/lists/gnome-full | 1 + src/lists/kde | 1 + src/lists/kde-core | 1 + src/lists/kde-core-i18n | 1 + src/lists/kde-extra | 1 + src/lists/kde-extra-i18n | 1 + src/lists/kde-full | 1 + src/lists/kde-full-i18n | 1 + src/lists/kde-i18n | 1 + src/lists/xfce | 1 + src/main.sh | 21 ++--- src/scripts/02defaults.sh | 23 +++-- src/scripts/13chroot.sh | 222 ++++++++++++++++++++++++++++++++++++++++++++++ src/scripts/13hack.sh | 23 ----- src/scripts/14chroot.sh | 213 -------------------------------------------- 21 files changed, 306 insertions(+), 282 deletions(-) create mode 100644 src/scripts/13chroot.sh delete mode 100644 src/scripts/13hack.sh delete mode 100644 src/scripts/14chroot.sh diff --git a/ChangeLog b/ChangeLog index af4fe3e..0638587 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-02-01 Daniel Baumann + + * Added "--tasks". + * Added desktop base to all desktop package lists. + +2007-01-31 Daniel Baumann + + * Changed vars in autobuilding script to be able to source + make-live.conf. + 2007-01-30 Daniel Baumann * Added cron job for autobuilding images. diff --git a/debian/changelog b/debian/changelog index f09a07f..0b503e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +live-package (0.99.19-1) unstable; urgency=low + + * New upstream release. + + -- Daniel Baumann Wed, 31 Jan 2007 12:38:00 +0100 + live-package (0.99.18-1) unstable; urgency=low * New upstream release. diff --git a/debian/cron.daily b/debian/cron.daily index 50f34b5..f330e1f 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -22,40 +22,42 @@ then fi # Check for build directory -if [ ! -d "${DIRECTORY}" ] +if [ ! -d "${AUTOBUILD_DIRECTORY}" ] then - mkdir -p "${DIRECTORY}" + mkdir -p "${AUTOBUILD_DIRECTORY}" else # FIXME: maybe we should just remove the left overs. - echo "E: ${DIRECTORY} needs cleanup." + echo "E: ${AUTOBUILD_DIRECTORY} needs cleanup." exit 1 fi # Process image autobuilding -cd "${DIRECTORY}" +cd "${AUTOBUILD_DIRECTORY}" -for DISTRIBUTION in ${DISTRIBUTIONS} +for DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} do - for FLAVOUR in ${FLAVOURS} + for FLAVOUR in ${AUTOBUILD_FLAVOURS} do - if [ ! -f "${SERVER}"/daily-release/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}_${DATE}.txt ] + if [ ! -f "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}.txt ] then # Generating images mkdir debian-live - make-live -d ${DISTRIBUTION} -p ${FLAVOUR} -m ${MIRROR} ${OPTIONS} > debian-live/log.txt 2>&1 + make-live -d ${AUTOBUILD_DISTRIBUTION} -p ${AUTOBUILD_FLAVOUR} -m ${LIVE_MIRROR} ${AUTOBUILD_OPTIONS} > debian-live/log.txt 2>&1 fi if [ -f debian-live/binary.iso ] && [ -f debian-live/source.iso ] then - # Moving images - mkdir -p "${SERVER}"/daily-release/${DATE}/log - mv debian-live/log.txt "${SERVER}"/daily-release/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}_${DATE}.txt + # Moving logs + mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log + mv debian-live/log.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-log.txt + mv debian-live/packages.txt "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/log/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}_${AUTOBUILD_DATE}-packages.txt - mkdir -p "${SERVER}"/daily-release/${DATE}/${ARCHITECTURE} - mv debian-live/binary.iso "${SERVER}"/daily-release/${DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso + # Moving images + mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/${AUTOBUILD_ARCHITECTURE} + mv debian-live/binary.iso "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/${AUTOBUILD_ARCHITECTURE}/debian-live-${AUTOBUILD_DISTRIBUTION}-${AUTOBUILD_ARCHITECTURE}-${AUTOBUILD_FLAVOUR}.iso - mkdir -p "${SERVER}"/daily-release/${DATE}/source - mv debian-live/source.iso "${SERVER}"/daily-release/${DATE}/source/debian-live-${DISTRIBUTION}-source-${FLAVOUR}.iso + mkdir -p "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/source + mv debian-live/source.iso "${AUTOBUILD_SERVER}"/daily-release/${AUTOBUILD_DATE}/source/debian-live-${AUTOBUILD_DISTRIBUTION}-source-${AUTOBUILD_FLAVOUR}.iso fi rm -rf debian-live @@ -63,5 +65,5 @@ do done # Cleanup -umount -f "${DIRECTORY}"/debian-live/chroot/proc > /dev/null 2>&1 -rm -rf "${DIRECTORY}" +umount -f "${AUTOBUILD_DIRECTORY}"/debian-live/chroot/proc > /dev/null 2>&1 +rm -rf "${AUTOBUILD_DIRECTORY}" diff --git a/debian/default b/debian/default index bd8e7fd..50ccb2a 100644 --- a/debian/default +++ b/debian/default @@ -2,12 +2,16 @@ AUTOBUILD="false" -DISTRIBUTIONS="etch sid" -FLAVOURS="minimal standard kde gnome xfce" -MIRROR="http://ftp.debian.org/debian/" -OPTIONS="--with-source" - -DIRECTORY="/srv/tmp/make-live" -SERVER="/srv/debian-live" -ARCHITECTURE="`dpkg --print-architecture`" -DATE="`date +%Y%m%d`" +AUTOBUILD_DISTRIBUTIONS="etch sid" +AUTOBUILD_FLAVOURS="minimal standard kde-desktop gnome-desktop xfce-desktop" +AUTOBUILD_OPTIONS="--tasks laptop --with-source" + +AUTOBUILD_DIRECTORY="/srv/tmp/make-live" +AUTOBUILD_SERVER="/srv/debian-live" +AUTOBUILD_ARCHITECTURE="`dpkg --print-architecture`" +AUTOBUILD_DATE="`date +%Y%m%d`" + +LIVE_MIRROR="http://ftp.debian.org/debian/" + +# Source /etc/make-live.conf +# . /etc/make-live.conf diff --git a/src/lists/gnome b/src/lists/gnome index 8474dd5..6b8dc44 100644 --- a/src/lists/gnome +++ b/src/lists/gnome @@ -9,6 +9,7 @@ console-common locales # GNOME gdm gdm-themes gnome-desktop-environment gnome-cups-manager gnome-screensaver gnome-themes-extras +desktop-base rhythmbox synaptic diff --git a/src/lists/gnome-core b/src/lists/gnome-core index e1a9cac..05a7a5e 100644 --- a/src/lists/gnome-core +++ b/src/lists/gnome-core @@ -8,5 +8,6 @@ console-common locales # GNOME Core gdm gnome-core +desktop-base x-window-system-core diff --git a/src/lists/gnome-full b/src/lists/gnome-full index f3d17b5..89cd662 100644 --- a/src/lists/gnome-full +++ b/src/lists/gnome-full @@ -8,5 +8,6 @@ console-common locales # GNOME Full gdm gnome +desktop-base x-window-system-core diff --git a/src/lists/kde b/src/lists/kde index 2f81510..7379921 100644 --- a/src/lists/kde +++ b/src/lists/kde @@ -8,5 +8,6 @@ console-common locales # KDE kde kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-core b/src/lists/kde-core index 020f4f4..061e093 100644 --- a/src/lists/kde-core +++ b/src/lists/kde-core @@ -8,5 +8,6 @@ console-common locales # KDE Core kde-core kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-core-i18n b/src/lists/kde-core-i18n index 0602328..3b4359e 100644 --- a/src/lists/kde-core-i18n +++ b/src/lists/kde-core-i18n @@ -14,6 +14,7 @@ manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh # KDE Core kde-core kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-extra b/src/lists/kde-extra index ca3212c..196ac06 100644 --- a/src/lists/kde-extra +++ b/src/lists/kde-extra @@ -8,6 +8,7 @@ console-common locales # KDE kde kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-extra-i18n b/src/lists/kde-extra-i18n index 56b775b..e14fb27 100644 --- a/src/lists/kde-extra-i18n +++ b/src/lists/kde-extra-i18n @@ -14,6 +14,7 @@ manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh # KDE kde kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-full b/src/lists/kde-full index 624ff80..dc6ba5b 100644 --- a/src/lists/kde-full +++ b/src/lists/kde-full @@ -8,6 +8,7 @@ console-common locales # KDE kde kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-full-i18n b/src/lists/kde-full-i18n index aacb425..8b0cfef 100644 --- a/src/lists/kde-full-i18n +++ b/src/lists/kde-full-i18n @@ -14,6 +14,7 @@ manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh # KDE kde kdm +desktop-base x-window-system-core diff --git a/src/lists/kde-i18n b/src/lists/kde-i18n index a532719..af135c8 100644 --- a/src/lists/kde-i18n +++ b/src/lists/kde-i18n @@ -14,6 +14,7 @@ manpages-pl-dev manpages-pt manpages-pt-dev manpages-ru manpages-tr manpages-zh # KDE kde kdm +desktop-base x-window-system-core diff --git a/src/lists/xfce b/src/lists/xfce index b1f5049..0e95148 100644 --- a/src/lists/xfce +++ b/src/lists/xfce @@ -8,5 +8,6 @@ console-common locales # Xfce gdm xfce4 +desktop-base x-window-system-core diff --git a/src/main.sh b/src/main.sh index cb65d7d..20bc5c5 100755 --- a/src/main.sh +++ b/src/main.sh @@ -28,7 +28,7 @@ set -e BASE=${LIVE_BASE:-"/usr/share/make-live"} CONFIG="/etc/make-live.conf" PROGRAM="`basename ${0}`" -VERSION="0.99.18" +VERSION="0.99.19" CODENAME_OLDSTABLE="woody" CODENAME_STABLE="sarge" @@ -41,7 +41,7 @@ do . "${SCRIPT}" done -USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--clone DIRECTORY] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--with-generic-indices] [--without-generic-indices] [--with-recommends] [--without-recommends] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [-k|--keyring] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--preseed FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]" +USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--clone DIRECTORY] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--with-generic-indices] [--without-generic-indices] [--with-recommends] [--without-recommends] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [-k|--keyring] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--preseed FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE] [--tasks TASK]" Help () { @@ -92,6 +92,7 @@ Help () echo " --server-path: specifies the netboot server path for chroot." echo " --templates: specifies location of the templates." echo " -t, --type: specifies live system type." + echo " --tasks: specifies one or more aptitude tasks." echo " --with-generic-indices: enables generic debian package indices (default)." echo " --without-generic-indices: disables generic debian package indices." echo " --with-recommends: installes recommended packages too." @@ -165,7 +166,7 @@ Configuration () Main () { - ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,keyring:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" + ARGUMENTS="`getopt --longoptions root:,tasks:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,keyring:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" if [ "${?}" != "0" ] then @@ -186,6 +187,10 @@ Main () LIVE_TYPE="${2}"; shift 2 ;; + --tasks) + LIVE_TASKS="${2}"; shift 2 + ;; + -a|--architecture) LIVE_ARCHITECTURE="${2}"; shift 2 ;; @@ -348,16 +353,6 @@ Main () Configuration Defaults - # Distribution - if [ "${1}" = "dist" ] - then - for FLAVOUR in minimal standard gnome kde xfce - do - ( make-live -d testing -o "debian-live-${CODENAME_TESTING}-`dpkg --print-architecture`-${FLAVOUR}-" -p ${FLAVOUR} --with-source && cd "${LIVE_ROOT}" && cd .. && mv "${LIVE_ROOT}"/*.iso ./ && rm -rf "${LIVE_ROOT}" ) || rm -rf "${LIVE_ROOT}" - ( make-live -d unstable -o "debian-live-${CODENAME_UNSTABLE}-`dpkg --print-architecture`-${FLAVOUR}-" -p ${FLAVOUR} --with-source && cd "${LIVE_ROOT}" && cd .. && mv "${LIVE_ROOT}"/*.iso ./ && rm -rf "${LIVE_ROOT}" ) || rm -rf "${LIVE_ROOT}" - done - fi - # Building live system Bootstrap Chroot diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh index 83101fc..e762145 100644 --- a/src/scripts/02defaults.sh +++ b/src/scripts/02defaults.sh @@ -86,13 +86,7 @@ Defaults () ;; amd64) - if [ "${LIVE_DISTRIBUTION}" = "unstable" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ] || \ - [ "${LIVE_DISTRIBUTION}" = "testing" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ] - then - LIVE_KERNEL="amd64" - else - LIVE_KERNEL="amd64-generic" - fi + LIVE_KERNEL="amd64" ;; arm) @@ -166,6 +160,21 @@ Defaults () LIVE_MIRROR_SECURITY="http://security.debian.org/" fi + # Set default aptitude tasks + if [ "${LIVE_PACKAGE_LIST}" = "gnome-desktop" ] + then + LIVE_PACKAGE_LIST="gnome" + LIVE_TASKS="${LIVE_TASKS} gnome-desktop" + elif [ "${LIVE_PACKAGE_LIST}" = "kde-desktop" ] + then + LIVE_PACKAGE_LIST="kde" + LIVE_TASKS="${LIVE_TASKS} kde-desktop" + elif [ "${LIVE_PACKAGE_LIST}" = "xfce-desktop" ] + then + LIVE_PACKAGE_LIST="xfce" + LIVE_TASKS="${LIVE_TASKS} xfce-desktop" + fi + # Check for package lists if [ -z "${LIVE_PACKAGE_LIST}" ] then diff --git a/src/scripts/13chroot.sh b/src/scripts/13chroot.sh new file mode 100644 index 0000000..06df0b6 --- /dev/null +++ b/src/scripts/13chroot.sh @@ -0,0 +1,222 @@ +#!/bin/sh + +# make-live - utility to build Debian Live systems +# +# Copyright (C) 2006 Daniel Baumann +# Copyright (C) 2006 Marco Amadori +# +# make-live 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. + +Chroot_exec () +{ + # Execute commands chrooted + chroot "${LIVE_CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LIVE_PROXY_FTP}" http_proxy="${LIVE_PPROXY_HTTP}" DEBIAN_FRONTEND="${LIVE_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LIVE_DEBCONF_PRIORITY}" ${1} + return ${?} +} + +Chroot () +{ + if [ ! -f "${LIVE_ROOT}"/.stage/chroot ] + then + # Configure chroot + Patch_chroot apply + Patch_runlevel apply + + # Configure network + Patch_network apply + + # Mount proc + mount proc-live -t proc "${LIVE_CHROOT}"/proc + + # Avoid daemon starting + cat > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d < "${LIVE_ROOT}"/preseed.cloned + + # Extract package selection + Chroot_exec "dpkg --get-selections" | grep -v deinstall | cut -f1 > "${LIVE_ROOT}"/package-list.cloned + + # Restoring chroot directories + LIVE_CHROOT="${LIVE_CHROOT_TMP}" + LIVE_CHROOT_TMP="" + + LIVE_PRESEED="${LIVE_ROOT}/preseed.cloned" + LIVE_PACKAGE_LIST_CLONED="${LIVE_ROOT}/package-list.cloned" + fi + + # Restore preseed configuration + if [ -f "${LIVE_PRESEED}" ] + then + Chroot_exec "aptitude install --assume-yes debconf-utils" + cp "${LIVE_PRESEED}" "${LIVE_CHROOT}"/root/preseed + Chroot_exec "debconf-set-selections /root/preseed" + rm -f "${LIVE_CHROOT}"/root/preseed + else + if [ -n "${LIVE_PRESEED}" ]; then + echo "'${LIVE_PRESEED}' file doesn't exists. Exiting..." + exit 1 + fi + fi + + # Restore cloned package selection + if [ -f "${LIVE_PACKAGE_LIST_CLONED}" ] + then + Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST_CLONED}` aptitude install --assume-yes" + fi + + # Install packages list + if [ -n "${LIVE_PACKAGE_LIST}" ] + then + grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" + Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes" + rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" + fi + + # Install extra packages + if [ -n "${LIVE_PACKAGES}" ] + then + Chroot_exec "aptitude install --assume-yes ${LIVE_PACKAGES}" + fi + + # Install aptitude tasks + if [ -n "${LIVE_TASKS}" ] + then + for TASK in ${LIVE_TASKS} + do + Chroot_exec "aptitude install --assume-yes ${TASK}" + done + fi + + # Copy external directory into the chroot + if [ -d "${LIVE_INCLUDE_CHROOT}" ] + then + cd "${LIVE_INCLUDE_CHROOT}" + find . | cpio -pumd "${LIVE_CHROOT}" + cd "${OLDPWD}" + fi + + # Process flavour specific hooks + if [ -r "${BASE}"/hooks/"${LIVE_FLAVOUR}" ] + then + grep -v "^#" "${BASE}"/hooks/"${LIVE_FLAVOUR}" > "${LIVE_CHROOT}"/root/"${LIVE_FLAVOUR}" + LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" Chroot_exec "sh /root/${LIVE_FLAVOUR}" + rm -f "${LIVE_CHROOT}"/root/"${LIVE_FLAVOUR}" + fi + + # Execute extra command in the chroot + if [ -r "${LIVE_HOOK}" ] + then + # FIXME + LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" Chroot_exec "`cat ${LIVE_HOOK}`" + elif [ -n "${LIVE_HOOK}" ] + then + LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" Chroot_exec "${LIVE_HOOK}" + fi + + # Save package list + Chroot_exec "dpkg --get-selections" > "${LIVE_ROOT}"/packages.txt + + # Add filesystem.manifest + Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest + + if [ ! -z "${LIVE_MANIFEST}" ] + then + Chroot_exec "aptitude install --assume-yes ${LIVE_MANIFEST}" + Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest-desktop + fi + + # Clean apt packages cache + rm -rf "${LIVE_CHROOT}"/var/cache/apt + mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives/partial + + if [ "${LIVE_FLAVOUR}" = "minimal" ] + then + rm -f "${LIVE_CHROOT}"/var/lib/apt/lists/* + rm -f "${LIVE_CHROOT}"/var/lib/dpkg/available-old + rm -f "${LIVE_CHROOT}"/var/lib/dpkg/diversions-old + rm -f "${LIVE_CHROOT}"/var/lib/dpkg/statoverride-old + rm -f "${LIVE_CHROOT}"/var/lib/dpkg/status-old + fi + + # Workaround binfmt-support /proc locking + umount "${LIVE_CHROOT}"/proc/sys/fs/binfmt_misc > /dev/null || true + + # Unmount proc + umount "${LIVE_CHROOT}"/proc + + # Allow daemon starting + rm "${LIVE_CHROOT}"/usr/sbin/policy-rc.d + + # Deconfigure network + Patch_network deapply + + # Deconfigure chroot + Patch_runlevel deapply + Patch_chroot deapply + + # Touching stage file + touch "${LIVE_ROOT}"/.stage/chroot + fi +} diff --git a/src/scripts/13hack.sh b/src/scripts/13hack.sh deleted file mode 100644 index 1f7b57a..0000000 --- a/src/scripts/13hack.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# make-live - utility to build Debian Live systems -# -# Copyright (C) 2006 Daniel Baumann -# Copyright (C) 2006 Marco Amadori -# -# make-live 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. - -Hack_xorg () -{ - # xserver-xorg << 7.1 - if [ -f "${LIVE_CHROOT}/etc/X11/xorg.conf" ] - then - if [ "${LIVE_DISTRIBUTION}" = "testing" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ] - then - # Comment "BusID" line and set driver to "vesa" - sed -i -e 's/\(^.*BusID.*\)/#\1/g' -e '/Section "Device"/,/EndSection/ s/\(.*Driver.*"\).*\(".*\)/\1vesa\2/g' "${LIVE_CHROOT}"/etc/X11/xorg.conf - fi - fi -} diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh deleted file mode 100644 index 125f08f..0000000 --- a/src/scripts/14chroot.sh +++ /dev/null @@ -1,213 +0,0 @@ -#!/bin/sh - -# make-live - utility to build Debian Live systems -# -# Copyright (C) 2006 Daniel Baumann -# Copyright (C) 2006 Marco Amadori -# -# make-live 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. - -Chroot_exec () -{ - # Execute commands chrooted - chroot "${LIVE_CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/sbin:/usr/bin:/sbin:/bin" TERM="${TERM}" ftp_proxy="${LIVE_PROXY_FTP}" http_proxy="${LIVE_PPROXY_HTTP}" DEBIAN_FRONTEND="${LIVE_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LIVE_DEBCONF_PRIORITY}" ${1} - return ${?} -} - -Chroot () -{ - if [ ! -f "${LIVE_ROOT}"/.stage/chroot ] - then - # Configure chroot - Patch_chroot apply - Patch_runlevel apply - - # Configure network - Patch_network apply - - # Mount proc - mount proc-live -t proc "${LIVE_CHROOT}"/proc - - # Avoid daemon starting - cat > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d < "${LIVE_ROOT}"/preseed.cloned - - # Extract package selection - Chroot_exec "dpkg --get-selections" | grep -v deinstall | cut -f1 > "${LIVE_ROOT}"/package-list.cloned - - # Restoring chroot directories - LIVE_CHROOT="${LIVE_CHROOT_TMP}" - LIVE_CHROOT_TMP="" - - LIVE_PRESEED="${LIVE_ROOT}/preseed.cloned" - LIVE_PACKAGE_LIST_CLONED="${LIVE_ROOT}/package-list.cloned" - fi - - # Restore preseed configuration - if [ -f "${LIVE_PRESEED}" ] - then - Chroot_exec "aptitude install --assume-yes debconf-utils" - cp "${LIVE_PRESEED}" "${LIVE_CHROOT}"/root/preseed - Chroot_exec "debconf-set-selections /root/preseed" - rm -f "${LIVE_CHROOT}"/root/preseed - else - if [ -n "${LIVE_PRESEED}" ]; then - echo "'${LIVE_PRESEED}' file doesn't exists. Exiting..." - exit 1 - fi - fi - - # Restore cloned package selection - if [ -f "${LIVE_PACAKGE_LIST_CLONED}" ] - then - Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST_CLONED}` aptitude install --assume-yes" - fi - - # Install packages list - if [ -n "${LIVE_PACKAGE_LIST}" ] - then - grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" - Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes" - rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`" - fi - - # Install extra packages - if [ -n "${LIVE_PACKAGES}" ] - then - Chroot_exec "aptitude install --assume-yes ${LIVE_PACKAGES}" - fi - - # Copy external directory into the chroot - if [ -d "${LIVE_INCLUDE_CHROOT}" ] - then - cd "${LIVE_INCLUDE_CHROOT}" - find . | cpio -pumd "${LIVE_CHROOT}" - cd "${OLDPWD}" - fi - - # Process flavour specific hooks - if [ -r "${BASE}"/hooks/"${LIVE_FLAVOUR}" ] - then - grep -v "^#" "${BASE}"/hooks/"${LIVE_FLAVOUR}" > "${LIVE_CHROOT}"/root/"${LIVE_FLAVOUR}" - LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" Chroot_exec "sh /root/${LIVE_FLAVOUR}" - rm -f "${LIVE_CHROOT}"/root/"${LIVE_FLAVOUR}" - fi - - # Execute extra command in the chroot - if [ -r "${LIVE_HOOK}" ] - then - # FIXME - LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" Chroot_exec "`cat ${LIVE_HOOK}`" - elif [ -n "${LIVE_HOOK}" ] - then - LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" Chroot_exec "${LIVE_HOOK}" - fi - - # Temporary hacks for broken packages - Hack_xorg - - # Add filesystem.manifest - Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest - - if [ ! -z "${LIVE_MANIFEST}" ] - then - Chroot_exec "aptitude install --assume-yes ${LIVE_MANIFEST}" - Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest-desktop - fi - - # Clean apt packages cache - rm -rf "${LIVE_CHROOT}"/var/cache/apt - mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives/partial - - if [ "${LIVE_FLAVOUR}" = "minimal" ] - then - rm -f "${LIVE_CHROOT}"/var/lib/apt/lists/* - rm -f "${LIVE_CHROOT}"/var/lib/dpkg/available-old - rm -f "${LIVE_CHROOT}"/var/lib/dpkg/diversions-old - rm -f "${LIVE_CHROOT}"/var/lib/dpkg/statoverride-old - rm -f "${LIVE_CHROOT}"/var/lib/dpkg/status-old - fi - - # Workaround binfmt-support /proc locking - umount "${LIVE_CHROOT}"/proc/sys/fs/binfmt_misc > /dev/null || true - - # Unmount proc - umount "${LIVE_CHROOT}"/proc - - # Allow daemon starting - rm "${LIVE_CHROOT}"/usr/sbin/policy-rc.d - - # Deconfigure network - Patch_network deapply - - # Deconfigure chroot - Patch_runlevel deapply - Patch_chroot deapply - - # Touching stage file - touch "${LIVE_ROOT}"/.stage/chroot - fi -} -- cgit v1.0