summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:36 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:36 +0200
commitb7d07a269e4a2d1bac730e177bc6826a7cd450d5 (patch)
tree62003f7571c98e4dab5e1ed2628e98164b98a914 /src
parent03c8a20c280c6888b4d274a3095013064b94e99b (diff)
downloadlive-build-b7d07a269e4a2d1bac730e177bc6826a7cd450d5.zip
live-build-b7d07a269e4a2d1bac730e177bc6826a7cd450d5.tar.gz
Adding live-package 0.99.14-1.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main.sh20
-rw-r--r--src/scripts/02defaults.sh12
-rw-r--r--src/scripts/11bootstrap.sh2
-rw-r--r--src/scripts/12patch.sh10
-rw-r--r--src/scripts/14chroot.sh28
-rw-r--r--src/scripts/21image.sh19
-rw-r--r--src/scripts/23net.sh2
7 files changed, 64 insertions, 29 deletions
diff --git a/src/main.sh b/src/main.sh
index 0e3cb03..cfffd83 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.13"
+VERSION="0.99.14"
CODENAME_OLDSTABLE="woody"
CODENAME_STABLE="sarge"
@@ -36,12 +36,12 @@ CODENAME_TESTING="etch"
CODENAME_UNSTABLE="sid"
# Source sub scripts
-for SCRIPT in `find ${BASE}/scripts/ -not -name '*~' -and -type f`
+for SCRIPT in `find ${BASE}/scripts/ -not -name '*~' -not -wholename "${BASE}/scripts/.*" -and -type f`
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] [--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] [--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] [--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]"
Help ()
{
@@ -93,9 +93,11 @@ Help ()
echo " -t, --type: specifies live system type."
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."
+ echo " --without-recommends: does not install recommended packages (default)."
echo
echo "Environment:"
- echo " All settings can be also specified trough environment variables. Please see make-live.conf(8) for more information."
+ echo " All settings can be also specified trough environment variables. Please see make-live.conf(5) for more information."
echo
echo "Report bugs to Debian Live project <http://live.debian.net>."
exit 0
@@ -162,7 +164,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:,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-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:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,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
@@ -297,6 +299,14 @@ Main ()
LIVE_GENERIC_INDICES="no"; shift
;;
+ --with-recommends)
+ LIVE_RECOMMENDS="yes"; shift
+ ;;
+
+ --without-recommends)
+ LIVE_RECOMMENDS="no"; shift
+ ;;
+
--with-source)
LIVE_SOURCE="yes"; shift
;;
diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh
index f0ef328..410332c 100644
--- a/src/scripts/02defaults.sh
+++ b/src/scripts/02defaults.sh
@@ -86,7 +86,8 @@ Defaults ()
;;
amd64)
- if [ "${LIVE_DISTRIBUTION}" = "unstable" ] || [ "${LIVE_DISTRIBUTION}" = "testing" ]
+ if [ "${LIVE_DISTRIBUTION}" = "unstable" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ] || \
+ [ "${LIVE_DISTRIBUTION}" = "testing" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ]
then
LIVE_KERNEL="amd64"
else
@@ -104,7 +105,8 @@ Defaults ()
;;
i386)
- if [ "${LIVE_DISTRIBUTION}" = "oldstable" ] || [ "${LIVE_DISTRIBUTION}" = "stable" ]
+ if [ "${LIVE_DISTRIBUTION}" = "oldstable" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_OLDSTABLE}" ] || \
+ [ "${LIVE_DISTRIBUTION}" = "stable" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_STABLE}" ]
then
LIVE_KERNEL="386"
else
@@ -235,6 +237,12 @@ Defaults ()
LIVE_GENERIC_INDICES="yes"
fi
+ # Set recommends
+ if [ -z "${LIVE_RECOMMENDS}" ]
+ then
+ LIVE_RECOMMENDS="no"
+ fi
+
# Set source image
if [ -z "${LIVE_SOURCE}" ]
then
diff --git a/src/scripts/11bootstrap.sh b/src/scripts/11bootstrap.sh
index 9aee5ec..7247223 100644
--- a/src/scripts/11bootstrap.sh
+++ b/src/scripts/11bootstrap.sh
@@ -27,7 +27,7 @@ Bootstrap ()
cdebootstrap --arch="${LIVE_ARCHITECTURE}" --flavour="${LIVE_FLAVOUR}" ${SUITE_CONFIG} "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}"
# Remove unused packages
- Chroot_exec "apt-get remove --purge --yes cdebootstrap-helper-diverts"
+ Chroot_exec "dpkg -P cdebootstrap-helper-diverts"
# Remove package cache
rm -rf "${LIVE_CHROOT}"/var/cache/bootstrap
diff --git a/src/scripts/12patch.sh b/src/scripts/12patch.sh
index 7f07241..326ba4a 100644
--- a/src/scripts/12patch.sh
+++ b/src/scripts/12patch.sh
@@ -35,7 +35,7 @@ Patch_runlevel ()
case "${1}" in
apply)
# Create init policy
- echo > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d <<EOF
+ cat > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
@@ -73,6 +73,14 @@ Patch_network ()
echo "Acquire::http::Proxy \"${LIVE_PROXY_HTTP}\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf
fi
+ # Configure recommends
+ if [ "${LIVE_RECOMMENDS}" = "yes" ]
+ then
+ echo "Aptitude::Recommends-Important \"true\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf
+ else
+ echo "Aptitude::Recommends-Important \"false\";" >> "${LIVE_CHROOT}"/etc/apt/apt.conf
+ fi
+
# Save host lookup table
if [ -f "${LIVE_CHROOT}"/etc/hosts ]
then
diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh
index 45d214d..2e2b489 100644
--- a/src/scripts/14chroot.sh
+++ b/src/scripts/14chroot.sh
@@ -31,14 +31,18 @@ Chroot ()
mount proc-live -t proc "${LIVE_CHROOT}"/proc
# Configure sources.list
- Indices custom
+ Indices custom initial
+
+ # Install aptitude
+ Chroot_exec "apt-get install --yes --force-yes aptitude"
# Install secure apt
- if [ "${LIVE_DISTRIBUTION}" = "testing" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ] || [ "${LIVE_DISTRIBUTION}" = "unstable" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ]
+ if [ "${LIVE_DISTRIBUTION}" = "unstable" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_UNSTABLE}" ] || \
+ [ "${LIVE_DISTRIBUTION}" = "testing" ] || [ "${LIVE_DISTRIBUTION}" = "${CODENAME_TESTING}" ]
then
if [ "${LIVE_FLAVOUR}" != "minimal" ]
then
- Chroot_exec "apt-get install --yes --force-yes debian-archive-keyring"
+ Chroot_exec "aptitude install --assume-yes debian-archive-keyring"
for NAME in ${LIVE_REPOSITORIES}
do
@@ -47,7 +51,7 @@ Chroot ()
if [ -n "${REPOSITORY_KEYRING}" ]
then
- Chroot_exec "apt-get install ${REPOSITORY_KEYRING}"
+ Chroot_exec "aptiude install ${REPOSITORY_KEYRING}"
elif [ -n "${REPOSITORY_KEY}" ]
then
Chroot_exec "wget ${REPOSITORY_KEY}"
@@ -59,13 +63,13 @@ Chroot ()
fi
# Update indices
- Chroot_exec "apt-get update"
+ Chroot_exec "aptitude update"
# Configure linux-image
Patch_linux apply
# Install linux-image, modules and casper
- Chroot_exec "apt-get install --yes --force-yes ${LIVE_KERNEL_PACKAGES} casper"
+ Chroot_exec "aptitude install --assume-yes ${LIVE_KERNEL_PACKAGES} casper"
# Deconfigure linux-image
Patch_linux deapply
@@ -78,7 +82,7 @@ Chroot ()
LIVE_CHROOT="${LIVE_CLONE}"
# Extract debconf settings
- Chroot_exec "apt-get install --yes debconf-utils"
+ Chroot_exec "aptitude install --assume-yes debconf-utils"
Chroot_exec "debconf-get-selections" > "${LIVE_ROOT}"/preseed.cloned
# Extract package selection
@@ -95,7 +99,7 @@ Chroot ()
# Restore preseed configuration
if [ -f "${LIVE_PRESEED}" ]
then
- Chroot_exec "apt-get install --yes --force-yes debconf-utils"
+ 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
@@ -109,21 +113,21 @@ Chroot ()
# Restore cloned package selection
if [ -f "${LIVE_PACAKGE_LIST_CLONED}" ]
then
- Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST_CLONED}` apt-get install --yes --force-yes"
+ 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}` apt-get install --yes --force-yes"
+ 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 "apt-get install --yes --force-yes ${LIVE_PACKAGES}"
+ Chroot_exec "aptitude install --assume-yes ${LIVE_PACKAGES}"
fi
# Copy external directory into the chroot
@@ -160,7 +164,7 @@ Chroot ()
if [ ! -z "${LIVE_MANIFEST}" ]
then
- Chroot_exec "apt-get install --yes --force-yes ${LIVE_MANIFEST}"
+ Chroot_exec "aptitude install --assume-yes ${LIVE_MANIFEST}"
Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest-desktop
fi
diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh
index 57c3d9f..0c8ab67 100644
--- a/src/scripts/21image.sh
+++ b/src/scripts/21image.sh
@@ -119,14 +119,19 @@ EOF
done
# Update indices
- Chroot_exec "apt-get update"
+ if [ "${2}" = "initial" ]
+ then
+ Chroot_exec "apt-get update"
+ else
+ Chroot_exec "aptitude update"
+ fi
if [ "${LIVE_DISTRIBUTION_EXPERIMENTAL}" = "yes" ]
then
# experimental is sometimes broken,
# therefore this is intentionally kept interactive.
- Chroot_exec "apt-get upgrade" || return 0
- Chroot_exec "apt-get dist-upgrade" || return 0
+ Chroot_exec "aptitude upgrade" || return 0
+ Chroot_exec "aptitude dist-upgrade" || return 0
fi
}
@@ -163,7 +168,7 @@ Syslinux ()
then
# Install syslinux
Patch_network apply
- Chroot_exec "apt-get install --yes --force-yes syslinux"
+ Chroot_exec "aptitude install --assume-yes syslinux"
case "${1}" in
iso)
@@ -203,7 +208,7 @@ Syslinux ()
esac
# Remove syslinux
- Chroot_exec "apt-get remove --purge --yes syslinux"
+ Chroot_exec "aptitude purge --assume-yes syslinux"
Patch_network deapply
fi
}
@@ -244,7 +249,7 @@ Memtest ()
then
# Install memtest
Patch_network apply
- Chroot_exec "apt-get install --yes --force-yes memtest86+"
+ Chroot_exec "aptitude install --assume-yes memtest86+"
case "$1" in
iso)
@@ -259,7 +264,7 @@ Memtest ()
esac
# Remove memtest
- Chroot_exec "apt-get remove --purge --yes memtest86+"
+ Chroot_exec "aptitude purge --assume-yes memtest86+"
Patch_network deapply
fi
}
diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh
index 3f973e0..48f5926 100644
--- a/src/scripts/23net.sh
+++ b/src/scripts/23net.sh
@@ -34,7 +34,7 @@ Net ()
mount proc-live -t proc "${LIVE_CHROOT}"/proc
# Installing smbfs
- Chroot_exec "apt-get install --yes --force-yes smbfs"
+ Chroot_exec "aptitude install --assume-yes smbfs"
# Unmount proc
umount "${LIVE_CHROOT}"/proc