Add support to create an 'all desktops' DVD

Include all four desktop environments supported by tasksel (GNOME, KDE,
LXDE and Xfce).

On x86 also add an option in the isolinux menu (under Advanced options)
to select which DE to install; GNOME remains default.
This commit is contained in:
Frans Pop 2008-12-05 14:12:24 +00:00
parent 5b750a3810
commit 2225676ffe
7 changed files with 132 additions and 3 deletions

5
debian/changelog vendored
View File

@ -75,6 +75,11 @@ debian-cd (3.1.0) UNRELEASED; urgency=low
* Add support for a 'light desktop environment' CD (LXDE + Xfce).
Includes a framework to manipulate the isolinux configuration for x86 so
that a user can select which desktop he wishes to install.
* Add support to create an 'all desktops' DVD.
This new task will include all four desktop environments supported by
tasksel (GNOME, KDE, LXDE and Xfce). On x86 it will also add an option in
the isolinux menu (under Advanced options) to select which DE to install,
but GNOME will remain default.
-- Frans Pop <fjp@debian.org> Fri, 05 Dec 2008 10:04:03 +0100

View File

@ -6,7 +6,7 @@ set -e
## See also CONF.sh for the meaning of variables used here.
show_usage() {
echo "Usage: $(basename $0) [-d kde|lxde|xfce|light] BC|NETINST|CD|DVD [<ARCH> ...]"
echo "Usage: $(basename $0) [-d kde|lxde|xfce|light|all] BC|NETINST|CD|DVD [<ARCH> ...]"
}
@ -31,7 +31,7 @@ if [ "$1" = "-d" ]; then
# Ignore (gnome is default)
shift 2
;;
kde|lxde|xfce|light)
kde|lxde|xfce|light|all)
desktop=$2
shift 2
;;

17
tasks/lenny/Debian-all Normal file
View File

@ -0,0 +1,17 @@
/*
* This file will be used to build official complete sets of Lenny DVDs
* supporting all available desktop environments: GNOME (default), KDE,
* LXDE and Xfce
*/
/* Packages that should really be on CD1 */
#include <debian-installer+kernel>
#include <forcd1>
#include <task-essential-all>
/* Other interesting packages */
#include <task-full-all>
#include <interesting-fromcd23>
/* The rest ordered by popularity */
#include <popularity-contest>

19
tasks/lenny/task.list.all Normal file
View File

@ -0,0 +1,19 @@
# Default desktop task
gnome-desktop
# Alternative desktop environments
kde-desktop
xfce-desktop
lxde-desktop
# General desktop/laptop packages
desktop
laptop
# Server tasks
web-server
mail-server
print-server
database-server
dns-server
file-server

View File

@ -141,6 +141,10 @@ extra_image () {
# If multiple desktops are to be supported, set the default one
ORIG_DESKTOP=
case "$DESKTOP" in
all)
ORIG_DESKTOP=$DESKTOP
DESKTOP=
;;
light)
ORIG_DESKTOP=$DESKTOP
DESKTOP=xfce
@ -322,6 +326,8 @@ EOF
fi
case "$ORIG_DESKTOP" in
all)
modify_for_all_desktop ;;
light)
modify_for_light_desktop ;;
esac

View File

@ -149,3 +149,85 @@ menu begin rescue
menu end
EOF
}
modify_for_all_desktop() {
make_desktop_template
# Remove desktop option in root config files (for GNOME)
sed -i "s:desktop=[^ ]*::" boot$N/isolinux/*.cfg
cp -r boot$N/isolinux/desktop boot$N/isolinux/kde
sed -i "s:%desktop%:kde:g" boot$N/isolinux/kde/*.cfg
sed -i "/Advanced options/ s:title:title KDE:" \
boot$N/isolinux/kde/menu.cfg
cp -r boot$N/isolinux/desktop boot$N/isolinux/xfce
sed -i "s:%desktop%:xfce:g" boot$N/isolinux/xfce/*.cfg
sed -i "/Advanced options/ s:title:title Xfce:" \
boot$N/isolinux/xfce/menu.cfg
cp -r boot$N/isolinux/desktop boot$N/isolinux/lxde
sed -i "s:%desktop%:lxde:g" boot$N/isolinux/lxde/*.cfg
sed -i "/Advanced options/ s:title:title LXDE:" \
boot$N/isolinux/lxde/menu.cfg
# Cleanup
rm -r boot$N/isolinux/desktop
# Create desktop menu file
cat >boot$N/isolinux/dtmenu.cfg <<EOF
menu begin desktop
include stdmenu.cfg
menu hshift 13
menu width 49
menu label Alternative desktop environments
menu title Desktop environment menu
label mainmenu-kde
menu label ^Back..
text help
Higher level options install the GNOME desktop environment
endtext
menu exit
menu begin kde-desktop
include stdmenu.cfg
menu label ^KDE
menu title KDE desktop boot menu
text help
Select the 'K Desktop Environment' for the Desktop task
endtext
label mainmenu-kde
menu label ^Back..
menu exit
include kde/menu.cfg
menu end
menu begin lxde-desktop
include stdmenu.cfg
menu label ^LXDE
menu title LXDE desktop boot menu
text help
Select the 'Lightweight X11 Desktop Environment' for the Desktop task
endtext
label mainmenu-lxde
menu label ^Back..
menu exit
include lxde/menu.cfg
menu end
menu begin xfce-desktop
include stdmenu.cfg
menu label ^Xfce
menu title Xfce desktop boot menu
text help
Select the 'Xfce lightweight desktop environment' for the Desktop task
endtext
label mainmenu-xfce
menu label ^Back..
menu exit
include xfce/menu.cfg
menu end
menu end
EOF
# Include desktop submenu in Advanced options submenu
sed -i "/menu end/ i\\\tinclude dtmenu.cfg" \
boot$N/isolinux/menu.cfg
}

View File

@ -165,7 +165,7 @@ dpkg -x $TASKSEL_DEB $TDIR/tasksel
[ -e task.languages ] || exit 1
grep -Ev "^(#.*)?[[:space:]]*$" task.languages > $TDIR/languages
for variant in "" kde lxde xfce light; do
for variant in "" kde lxde xfce light all; do
if [ ! -e task.list${variant:+.$variant} ]; then
echo "Warning: task.list${variant:+.$variant} does not exist; skipping"
continue