summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:22 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:22 +0200
commitd80c8552b60d499dbec7fb37e09ab8fc4145ce2d (patch)
tree34983c8c14a3316fbe7d34d564cbfebb73489ca3 /src
parent262e501463f4cc8bba690a1ef7cf0887cbfaa8cf (diff)
downloadlive-build-d80c8552b60d499dbec7fb37e09ab8fc4145ce2d.zip
live-build-d80c8552b60d499dbec7fb37e09ab8fc4145ce2d.tar.gz
Adding live-package 0.99.6-1.
Diffstat (limited to 'src')
-rw-r--r--src/config3
-rwxr-xr-xsrc/main.sh54
-rw-r--r--src/scripts/02defaults.sh30
-rw-r--r--src/scripts/14chroot.sh16
-rw-r--r--src/scripts/21image.sh3
-rw-r--r--src/scripts/22iso.sh2
-rw-r--r--src/scripts/23net.sh4
7 files changed, 72 insertions, 40 deletions
diff --git a/src/config b/src/config
index 75b8761..a039aef 100644
--- a/src/config
+++ b/src/config
@@ -42,6 +42,9 @@
# Kernel flavour (Default: auto-detected)
#LIVE_KERNEL=""
+# Desktop package manifest (Default: empty)
+#LIVE_MANIFEST=""
+
# Debian mirror (Default: http://ftp.debian.org/debian/)
#LIVE_MIRROR="http://ftp.debian.org/debian/"
diff --git a/src/main.sh b/src/main.sh
index 5d27859..524ec3a 100755
--- a/src/main.sh
+++ b/src/main.sh
@@ -28,7 +28,7 @@ set -e
BASE="/usr/share/make-live"
CONFIG="/etc/make-live.conf"
PROGRAM="`basename ${0}`"
-VERSION="0.99.5"
+VERSION="0.99.6"
CODENAME_OLDSTABLE="woody"
CODENAME_STABLE="sarge"
@@ -41,11 +41,13 @@ do
. "${SCRIPT}"
done
+USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-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] [--proxy-ftp URL] [--proxy-http URL] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]"
+
Help ()
{
echo "${PROGRAM} - utility to build Debian Live systems"
echo
- echo "Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-generic-indices] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [-m|--mirror URL] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--proxy-ftp URL] [--proxy-http URL] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]"
+ echo "${USAGE}"
echo "Usage: ${PROGRAM} [-h|--help]"
echo "Usage: ${PROGRAM} [-u|--usage]"
echo "Usage: ${PROGRAM} [-v|--version]"
@@ -74,6 +76,7 @@ Help ()
echo " --include-chroot: specifies file or directory for chroot inclusion."
echo " --include-image: specifies file or directory for image inclusion."
echo " -k, --kernel: specifies debian kernel flavour."
+ echo " --manifest: specifies the pivot package to create filesystem.manifest-desktop upon (mostly \"ubuntu-live\")."
echo " -m, --mirror: specifies debian mirror."
echo " --mirror-security: specifies debian security mirror."
echo " --packages: specifies aditional packages."
@@ -91,20 +94,20 @@ Help ()
echo " All settings can be also specified trough environment variables. Please see make-live.conf(8) for more information."
echo
echo "Report bugs to Debian Live project <http://live.debian.net>."
- exit 1
+ exit 0
}
Usage ()
{
echo "${PROGRAM} - utility to build Debian Live systems"
echo
- echo "Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-generic-indices] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [-m|--mirror URL] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--proxy-ftp URL] [--proxy-http URL] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]"
+ echo "${USAGE}"
echo "Usage: ${PROGRAM} [-h|--help]"
echo "Usage: ${PROGRAM} [-u|--usage]"
echo "Usage: ${PROGRAM} [-v|--version]"
echo
echo "Try \"${PROGRAM} --help\" for more information."
- exit 1
+ exit ${1}
}
Version ()
@@ -132,7 +135,7 @@ Version ()
echo "can be found in /usr/share/common-licenses/GPL file."
echo
echo "Homepage: <http://live.debian.net/>"
- exit 1
+ exit 0
}
Configuration ()
@@ -155,7 +158,7 @@ Configuration ()
Main ()
{
- ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,proxy-http:,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:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,proxy-http:,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 -- ${@}`"
if [ "${?}" != "0" ]
then
@@ -193,34 +196,7 @@ Main ()
;;
-d|--distribution)
- case "${2}" in
- "${CODENAME_OLDSTABLE}")
- LIVE_DISTRIBUTION="oldstable"
- ;;
-
- "${CODENAME_STABLE}")
- LIVE_DISTRIBUTION="stable"
- ;;
-
- "${CODENAME_TESTING}")
- LIVE_DISTRIBUTION="testing"
- ;;
-
- "${CODENAME_UNSTABLE}")
- LIVE_DISTRIBUTION="unstable"
- ;;
-
- experimental)
- LIVE_DISTRIBUTION="unstable"
- LIVE_DISTRIBUTION_EXPERIMENTAL="yes"
- ;;
-
- *)
- LIVE_DISTRIBUTION="${2}"
- ;;
- esac
-
- shift 2
+ LIVE_DISTRIBUTION="${2}"; shift 2
;;
--filesystem)
@@ -246,6 +222,10 @@ Main ()
LIVE_KERNEL="${2}"; shift 2
;;
+ --manifest)
+ LIVE_MANIFEST="${2}"; shift 2
+ ;;
+
-m|--mirror)
LIVE_MIRROR="${2}"; shift 2
;;
@@ -311,7 +291,7 @@ Main ()
;;
-u|--usage)
- Usage; shift
+ Usage 0; shift
;;
-v|--version)
@@ -340,7 +320,7 @@ Main ()
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_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
diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh
index 78831e7..6e54c13 100644
--- a/src/scripts/02defaults.sh
+++ b/src/scripts/02defaults.sh
@@ -31,6 +31,7 @@ Defaults ()
*)
echo "E: image type wrong or not yet supported."
+ Usage 1
;;
esac
else
@@ -53,6 +54,33 @@ Defaults ()
if [ -z "${LIVE_DISTRIBUTION}" ]
then
LIVE_DISTRIBUTION="unstable"
+ else
+ case "${LIVE_DISTRIBUTION}" in
+ "${CODENAME_OLDSTABLE}")
+ LIVE_DISTRIBUTION="oldstable"
+ ;;
+
+ "${CODENAME_STABLE}")
+ LIVE_DISTRIBUTION="stable"
+ ;;
+
+ "${CODENAME_TESTING}")
+ LIVE_DISTRIBUTION="testing"
+ ;;
+
+ "${CODENAME_UNSTABLE}")
+ LIVE_DISTRIBUTION="unstable"
+ ;;
+
+ experimental)
+ LIVE_DISTRIBUTION="unstable"
+ LIVE_DISTRIBUTION_EXPERIMENTAL="yes"
+ ;;
+
+ *)
+ LIVE_DISTRIBUTION="unstable"
+ ;;
+ esac
fi
# Set bootstrap flavour
@@ -128,7 +156,7 @@ Defaults ()
*)
echo "FIXME: Architecture not yet supported."
- exit 1
+ Usage 1
;;
esac
fi
diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh
index 55ffa9a..918e09a 100644
--- a/src/scripts/14chroot.sh
+++ b/src/scripts/14chroot.sh
@@ -13,6 +13,7 @@ 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="noninteractive" DEBIAN_PRIORITY="critical" ${1}
+ return ${?}
}
Chroot ()
@@ -70,7 +71,11 @@ Chroot ()
fi
# Execute extra command in the chroot
- if [ -n "${LIVE_HOOK}" ]
+ if [ -r "${LIVE_HOOK}" ]
+ then
+ # FIXME
+ Chroot_exec "`cat ${LIVE_HOOK}`"
+ elif [ -n "${LIVE_HOOK}" ]
then
Chroot_exec "${LIVE_HOOK}"
fi
@@ -78,6 +83,15 @@ Chroot ()
# 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 "apt-get install --yes ${LIVE_MANIFEST}"
+ Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest-desktop
+ fi
+
# Clean apt packages cache
rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb
rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/partial/*.deb
diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh
index 10c56e2..6357f09 100644
--- a/src/scripts/21image.sh
+++ b/src/scripts/21image.sh
@@ -171,7 +171,8 @@ Syslinux ()
cp -r "${LIVE_TEMPLATES}"/syslinux/* \
"${LIVE_ROOT}"/tftpboot/pxelinux.cfg
mv "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/pxelinux.cfg "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default
- rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.*
+ rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg
+ sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.txt
# Configure syslinux templates
sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default
diff --git a/src/scripts/22iso.sh b/src/scripts/22iso.sh
index 07b1f91..96ab777 100644
--- a/src/scripts/22iso.sh
+++ b/src/scripts/22iso.sh
@@ -14,6 +14,7 @@ Iso ()
if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
then
mkdir -p "${LIVE_ROOT}"/binary/casper
+ mv "${LIVE_ROOT}"/filesystem.manifest* "${LIVE_ROOT}"/binary/casper/
# Switching package indices to default
if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
@@ -43,6 +44,7 @@ Iso ()
if [ "${LIVE_FLAVOUR}" != "minimal" ]
then
cp -r "${LIVE_TEMPLATES}"/iso/* "${LIVE_ROOT}"/binary
+ cp -r "${LIVE_TEMPLATES}"/common/* "${LIVE_ROOT}"/binary
fi
# Calculating md5sums
diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh
index 563420b..0b571ef 100644
--- a/src/scripts/23net.sh
+++ b/src/scripts/23net.sh
@@ -13,6 +13,10 @@ Net ()
{
if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
then
+ mkdir -p "${LIVE_ROOT}"/binary/casper
+ cp -r "${LIVE_TEMPLATES}"/common/* "${LIVE_ROOT}"/binary
+ mv "${LIVE_ROOT}"/filesystem.manifest* "${LIVE_ROOT}"/binary/casper
+
# Installing smbfs
Chroot_exec "apt-get install --yes smbfs"