2008-10-14 08:22:03 +00:00
|
|
|
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
## Wrapper script for build.sh
|
|
|
|
## See README.easy-build for instructions how to use this script.
|
|
|
|
## See also CONF.sh for the meaning of variables used here.
|
|
|
|
|
|
|
|
show_usage() {
|
2009-08-09 14:32:49 +00:00
|
|
|
echo "Usage: $(basename $0) [OPTIONS] BC|NETINST|CD|DVD [<ARCH> ...]"
|
|
|
|
echo " Options:"
|
|
|
|
echo " -d gnome|kde|lxde|xfce|light|all : desktop variant (task) to use"
|
2009-08-09 14:32:55 +00:00
|
|
|
echo " -V <variant> : extra image variants to enable"
|
2009-08-09 14:32:49 +00:00
|
|
|
echo " -h : help"
|
2008-10-14 08:22:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Set configuration file to be used for the build and source it
|
2009-08-07 14:06:09 +00:00
|
|
|
export CF=./CONF.sh
|
2008-10-14 08:22:03 +00:00
|
|
|
. $CF
|
|
|
|
export DEBIAN_CD_CONF_SOURCED=true
|
|
|
|
unset UPDATE_LOCAL
|
|
|
|
|
|
|
|
|
|
|
|
## Parse the parameters passed to the script
|
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
show_usage
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2008-10-14 08:22:07 +00:00
|
|
|
desktop=
|
2009-08-09 14:32:55 +00:00
|
|
|
VARIANTS=
|
|
|
|
while getopts d:hV: OPT; do
|
2009-08-09 14:32:49 +00:00
|
|
|
case $OPT in
|
|
|
|
d)
|
|
|
|
case $OPTARG in
|
|
|
|
# Note: "gnome" is the special gnome task, not the generic task
|
|
|
|
gnome|kde|lxde|xfce|light|all)
|
|
|
|
desktop=$2
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
show_usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac ;;
|
2009-08-09 14:32:55 +00:00
|
|
|
V)
|
|
|
|
VARIANTS="${VARIANTS:+$VARIANTS }$OPTARG"
|
|
|
|
;;
|
2009-08-09 14:32:49 +00:00
|
|
|
h)
|
|
|
|
show_usage
|
|
|
|
exit 0
|
2008-10-14 08:22:07 +00:00
|
|
|
;;
|
2009-08-09 14:32:49 +00:00
|
|
|
\?)
|
2008-10-14 08:22:07 +00:00
|
|
|
show_usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2009-08-09 14:32:49 +00:00
|
|
|
done
|
|
|
|
shift $(($OPTIND - 1))
|
2008-10-14 08:22:07 +00:00
|
|
|
|
2009-08-09 14:32:55 +00:00
|
|
|
export VARIANTS
|
2008-10-14 08:22:03 +00:00
|
|
|
export DISKTYPE="$1"
|
|
|
|
shift
|
|
|
|
|
|
|
|
# The architecture(s) for which to build the CD/DVD image
|
|
|
|
if [ "$1" ]; then
|
|
|
|
ARCHES="$@"
|
|
|
|
else
|
|
|
|
ARCHES=i386
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
## For what release to build images
|
|
|
|
|
|
|
|
# The suite the installed system will be based on
|
2011-02-07 21:30:21 -01:00
|
|
|
export CODENAME=wheezy
|
2008-10-14 08:22:03 +00:00
|
|
|
# The suite from which the udebs for the installer will be taken (normally
|
|
|
|
# the same as CODENAME)
|
2011-02-07 21:30:21 -01:00
|
|
|
export DI_CODENAME=wheezy
|
2008-10-14 08:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
## The debian-installer images to use. This must match the suite (DI_CODENAME)
|
|
|
|
## from which udebs will be taken.
|
|
|
|
## Use *only one* of the next four settings. The "%ARCH%" placeholder in the
|
|
|
|
## 2nd and 4th options will be magically expanded at runtime.
|
|
|
|
## See also: tools/boot/<codename>/boot-$ARCH scripts.
|
|
|
|
|
|
|
|
# Use official images from the local mirror
|
|
|
|
export DI_DIST=$DI_CODENAME
|
|
|
|
# or, use official images from an outside mirror
|
|
|
|
#export DI_WWW_HOME="http://ftp.nl.debian.org/debian/dists/$DI_CODENAME/main/installer-%ARCH%/current/images/"
|
|
|
|
# or, use daily built d-i images (most from http://people.debian.org)
|
|
|
|
#export DI_WWW_HOME=default
|
|
|
|
# or, use custom / locally built images
|
|
|
|
#export DI_DIR="$HOME/d-i_images/%ARCH%"
|
|
|
|
|
|
|
|
|
|
|
|
## Other options
|
|
|
|
|
|
|
|
# Include local packages in the build
|
|
|
|
#export LOCAL=1
|
|
|
|
# Automatically update the Packages file(s) for the "local" repository?
|
|
|
|
#UPDATE_LOCAL=1
|
|
|
|
|
|
|
|
# Number of CD/DVDs to build; comment out to build full set
|
|
|
|
MAX_CDS=1
|
|
|
|
MAX_DVDS=1
|
|
|
|
|
|
|
|
# Only create the ISO files; don't create jigdo files
|
2008-10-14 08:31:15 +00:00
|
|
|
#export MAXISOS=0
|
|
|
|
export MAXJIGDOS=0
|
2008-10-14 08:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Options that include CODENAME should be set here if needed, not in CONF.sh
|
|
|
|
|
|
|
|
# Include proposed-updates
|
|
|
|
#export PROPOSED_UPDATES=$CODENAME-proposed-updates
|
|
|
|
|
|
|
|
#export UDEB_INCLUDE="$BASEDIR"/data/$CODENAME/udeb_include
|
|
|
|
#export UDEB_EXCLUDE="$BASEDIR"/data/$CODENAME/udeb_exclude
|
|
|
|
#export BASE_INCLUDE="$BASEDIR"/data/$CODENAME/base_include
|
|
|
|
#export BASE_EXCLUDE="$BASEDIR"/data/$CODENAME/base_exclude
|
|
|
|
#export SPLASHPNG="$BASEDIR/data/$CODENAME/splash-img.png"
|
|
|
|
#export RELEASE_NOTES_LOCATION="http://www.debian.org/releases/$CODENAME"
|
|
|
|
|
|
|
|
|
|
|
|
## The rest of the script should just work without any changes
|
|
|
|
|
|
|
|
# Set variables that determine the type of image to be built
|
|
|
|
case $DISKTYPE in
|
|
|
|
BC)
|
|
|
|
export INSTALLER_CD=1
|
|
|
|
;;
|
|
|
|
NETINST)
|
|
|
|
export INSTALLER_CD=2
|
|
|
|
;;
|
|
|
|
CD)
|
|
|
|
unset INSTALLER_CD
|
|
|
|
[ -z "$MAX_CDS" ] || export MAXCDS=$MAX_CDS
|
|
|
|
;;
|
|
|
|
DVD)
|
|
|
|
export INSTALLER_CD=3
|
|
|
|
[ -z "$MAX_DVDS" ] || export MAXCDS=$MAX_DVDS
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
show_usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2008-12-05 13:12:29 -01:00
|
|
|
# By default a GNOME CD/DVD is built, but other desktops are supported too
|
|
|
|
if [ "$desktop" ]; then
|
|
|
|
if [ ! -e tasks/$CODENAME/task.list.$desktop ]; then
|
|
|
|
echo "Error: desktop '$desktop' is not supported for $CODENAME"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ "$desktop" = all ] && [ $DISKTYPE = CD ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: CD1 by itself can never support installing all desktops!"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $DISKTYPE != BC ] && [ $DISKTYPE != NETINST ]; then
|
|
|
|
export TASK=Debian-$desktop
|
|
|
|
fi
|
2008-11-13 22:19:30 -01:00
|
|
|
if [ "$CODENAME" = etch ]; then
|
|
|
|
KERNEL_PARAMS="tasks=\"$desktop-desktop, standard\""
|
2008-10-14 08:22:07 +00:00
|
|
|
else
|
|
|
|
KERNEL_PARAMS="desktop=$desktop"
|
|
|
|
fi
|
|
|
|
DESKTOP=$desktop
|
2008-12-05 13:12:29 -01:00
|
|
|
export KERNEL_PARAMS DESKTOP
|
2008-10-14 08:22:07 +00:00
|
|
|
fi
|
2008-10-14 08:22:03 +00:00
|
|
|
|
|
|
|
if [ "$LOCAL" ] && [ "$UPDATE_LOCAL" ]; then
|
|
|
|
echo "Updating Packages files for local repository..."
|
|
|
|
for arch in $ARCHES; do
|
2009-01-12 14:10:55 -01:00
|
|
|
./tools/Packages-gen $CODENAME $arch
|
|
|
|
./tools/Packages-gen -i $DI_CODENAME $arch
|
2008-10-14 08:22:03 +00:00
|
|
|
done
|
2008-11-13 22:19:30 -01:00
|
|
|
echo
|
2008-10-14 08:22:03 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Starting the actual debian-cd build..."
|
|
|
|
./build.sh "$ARCHES"
|