[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[5/6] Add support to create an 'all desktops' DVD



This patch builds on the previous one and uses the make_desktop_template 
function unchanged.

As this task is intended to be used for _existing_ images (x86 BC, netinst 
and DVD) there are no new DISKTYPE added in testingcds.

Basically the cronjobs will need to use TASK=Debian-all instead of 
TASK=Debian for the relevant images.

    Add support to create an 'all desktops' DVD

diff --git a/easy-build.sh b/easy-build.sh
index cbde593..0760044 100755
--- a/easy-build.sh
+++ b/easy-build.sh
@@ -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
 		;;
diff --git a/tasks/lenny/Debian-all b/tasks/lenny/Debian-all
new file mode 100644
index 0000000..39c4b51
--- /dev/null
+++ b/tasks/lenny/Debian-all
@@ -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>
diff --git a/tasks/lenny/task.list.all b/tasks/lenny/task.list.all
new file mode 100644
index 0000000..43f05aa
--- /dev/null
+++ b/tasks/lenny/task.list.all
@@ -0,0 +1,15 @@
+# Main tasks
+gnome-desktop
+desktop
+web-server
+laptop
+mail-server
+print-server
+database-server
+dns-server
+file-server
+
+# Alternative desktop environments
+kde-desktop
+xfce-desktop
+lxde-desktop
diff --git a/tools/boot/lenny/boot-x86 b/tools/boot/lenny/boot-x86
index d633145..57a6132 100644
--- a/tools/boot/lenny/boot-x86
+++ b/tools/boot/lenny/boot-x86
@@ -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
diff --git a/tools/boot/lenny/x86-desktop.sh b/tools/boot/lenny/x86-desktop.sh
index 6f3ac35..2bfe19a 100644
--- a/tools/boot/lenny/x86-desktop.sh
+++ b/tools/boot/lenny/x86-desktop.sh
@@ -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
+}
diff --git a/tools/update_tasks b/tools/update_tasks
index 8365a0e..dbecbf3 100755
--- a/tools/update_tasks
+++ b/tools/update_tasks
@@ -163,7 +163,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

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: