[Debian-live-changes] r2274 - in dists/trunk/live-helper: docs functions helpers templates/syslinux

daniel at alioth.debian.org daniel at alioth.debian.org
Fri Jun 29 15:27:55 UTC 2007


Author: daniel
Date: 2007-06-29 15:27:54 +0000 (Fri, 29 Jun 2007)
New Revision: 2274

Added:
   dists/trunk/live-helper/helpers/lh_binary_disk
   dists/trunk/live-helper/helpers/lh_binary_hacks
   dists/trunk/live-helper/helpers/lh_source_disk
Modified:
   dists/trunk/live-helper/docs/ChangeLog
   dists/trunk/live-helper/docs/TODO
   dists/trunk/live-helper/functions/defaults.sh
   dists/trunk/live-helper/helpers/lh_binary
   dists/trunk/live-helper/helpers/lh_binary_debian-installer
   dists/trunk/live-helper/helpers/lh_binary_grub
   dists/trunk/live-helper/helpers/lh_binary_linux-image
   dists/trunk/live-helper/helpers/lh_binary_manifest
   dists/trunk/live-helper/helpers/lh_binary_md5sum
   dists/trunk/live-helper/helpers/lh_binary_memtest
   dists/trunk/live-helper/helpers/lh_binary_rootfs
   dists/trunk/live-helper/helpers/lh_binary_syslinux
   dists/trunk/live-helper/helpers/lh_source
   dists/trunk/live-helper/helpers/lh_source_md5sum
   dists/trunk/live-helper/templates/syslinux/isolinux.cfg
Log:


Modified: dists/trunk/live-helper/docs/ChangeLog
===================================================================
--- dists/trunk/live-helper/docs/ChangeLog	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/docs/ChangeLog	2007-06-29 15:27:54 UTC (rev 2274)
@@ -1,16 +1,32 @@
+2007-06-29  Daniel Baumann  <daniel at debian.org>
+
+	* helpers/lh_binary_syslinux:
+	  - Fixed damaged memtest entry.
+	  - Corrected code style.
+	  - Added NUMBER initaliazation to fixed wrong numbering when in compat
+	    mode.
+	  - Fixed bug with isolinux.cfg fuckup if flavours are in this order:
+	    686 686-bigmem.
+	* helpers/lh_binary_grub, lh_binary_linux-image, lh_binary_memtest,
+	  lh_binary_syslinux:
+	  - Added compat mode for casper/live directories.
+	* helpers/lh_binary_manifest, lh_binary_md5sum, lh_source_mdsum:
+	  - Added introductional text to the generated file.
+	* helpers/lh_binary_manifest:
+	  - Only create the correct manifest file for the respective initramfs.
+	* helpers/lh_binary_disk, lh_source_disk:
+	  - Added.
+
 2007-06-27  Otavio Salvador  <otavio at debian.org>
 
 	* helpers/lh_binary_syslinux:
-	  - Added new methods (syslinux_live_entry and syslinux_di_entry)
-  	    and change whole code to use them making it much easier to
-	    read and modify.
-
+	  - Added new methods (syslinux_live_entry and syslinux_di_entry) and
+	    change whole code to use them making it much easier to read and
+	    modify.
 	* functions/arch.sh:
 	  - Added.
-	* helpers/lh_binary_grub, helpers/lh_binary_syslinux,
-	  helpers/lh_binary_yaboot:
+	* helpers/lh_binary_grub, lh_binary_syslinux, lh_binary_yaboot:
 	  - Use the new Check_architecture method to avoid duplicated code.
-
 	* functions/templates.sh:
 	  - Added.
 	* helpers/lh_binary_grub, helpers/lh_binary_syslinux,

Modified: dists/trunk/live-helper/docs/TODO
===================================================================
--- dists/trunk/live-helper/docs/TODO	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/docs/TODO	2007-06-29 15:27:54 UTC (rev 2274)
@@ -8,7 +8,6 @@
 
 FIXME
   * xfce flavours seem to be damaged again
-  * multi-kernel syslinux breakage
   * yaboot (powerpc) boot support
   * grub (i386/amd64) boot support on usb* binary images
   * grub (i386/amd64) boot support on net binary images

Modified: dists/trunk/live-helper/functions/defaults.sh
===================================================================
--- dists/trunk/live-helper/functions/defaults.sh	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/functions/defaults.sh	2007-06-29 15:27:54 UTC (rev 2274)
@@ -350,7 +350,7 @@
 				;;
 
 			arm)
-				echo "E: You need to specify the linux kernel flavour manually on arm (FIXME)."
+				Echo_error "You need to specify the linux kernel flavour manually on arm (FIXME)."
 				exit 1
 				;;
 
@@ -375,7 +375,7 @@
 				;;
 
 			m68k)
-				LIVE_LINUX_FLAVOURS="E: You need to specify the linux kernel flavour manually on m68k."
+				LIVE_LINUX_FLAVOURS="You need to specify the linux kernel flavour manually on m68k."
 				exit 1
 				;;
 
@@ -401,7 +401,7 @@
 				;;
 
 			*)
-				echo "E: Architecture notyet supported (FIXME)"
+				Echo_error "Architecture notyet supported (FIXME)"
 				;;
 		esac
 	fi

Modified: dists/trunk/live-helper/helpers/lh_binary
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary	2007-06-29 15:27:54 UTC (rev 2274)
@@ -46,9 +46,11 @@
 lh_binary_grub ${*}
 lh_binary_syslinux ${*}
 lh_binary_yaboot ${*}
+lh_binary_disk ${*}
 lh_binary_includes ${*}
 lh_binary_local-includes ${*}
 lh_binary_local-hooks ${*}
+lh_binary_hacks ${*}
 lh_binary_md5sum ${*}
 
 # Building images

Modified: dists/trunk/live-helper/helpers/lh_binary_debian-installer
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_debian-installer	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_debian-installer	2007-06-29 15:27:54 UTC (rev 2274)
@@ -375,25 +375,5 @@
 
 ln -s . binary/debian
 
-# Creating disk info
-mkdir binary/.disk
-echo "main" > binary/.disk/base_components
-touch binary/.disk/base_installable
-echo "not_complete" > binary/.disk/cd_type
-echo "Debian GNU/Linux ${LIVE_DISTRIBUTION} - Unofficial ${LIVE_ARCHITECTURE} LIVE Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
-touch binary/.disk/mkisofs
-cat > binary/.disk/udeb_include << EOF
-netcfg
-ethdetect
-pcmcia-cs-udeb
-pcmciautils-udeb
-wireless-tools-udeb
-EOF
-
-if [ -d binary/pool/main/l/live-installer ]
-then
-	echo "live-installer" >> binary/.disk/udeb_include
-fi
-
 # Creating stage file
 Create_stagefile .stage/binary_debian-installer

Added: dists/trunk/live-helper/helpers/lh_binary_disk
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_disk	                        (rev 0)
+++ dists/trunk/live-helper/helpers/lh_binary_disk	2007-06-29 15:27:54 UTC (rev 2274)
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# lh_binary_disk (1) - install disk information into binary
+# Copyright (C) 2006-2007 Daniel Baumann <daniel at debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Including common functions
+LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+
+for FUNCTION in "${LH_BASE}"/functions/*.sh
+do
+	. "${FUNCTION}"
+done
+
+# Setting static variables
+DESCRIPTION="install disk information into binary"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
+Set_defaults
+
+if [ "${LIVE_BINARY_IMAGES}" != "iso" ]
+then
+	exit 0
+fi
+
+Echo_message "Begin installing disk information..."
+
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+
+# Checking stage file
+Check_stagefile .stage/binary_disk
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+mkdir -p binary/.disk
+
+if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
+then
+	echo "main" > binary/.disk/base_components
+
+	touch binary/.disk/base_installable
+
+	echo "not_complete" > binary/.disk/cd_type
+
+	echo "Debian GNU/Linux \"${LIVE_DISTRIBUTION}\" - Official ${LIVE_ARCHITECTURE} LIVE/NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+
+	#touch binary/.disk/mkisofs
+
+cat > binary/.disk/udeb_include << EOF
+netcfg
+ethdetect
+pcmcia-cs-udeb
+pcmciautils-udeb
+wireless-tools-udeb
+EOF
+
+	if [ -d binary/pool/main/l/live-installer ]
+	then
+		echo "live-installer" >> binary/.disk/udeb_include
+		echo "Debian GNU/Linux \"${LIVE_DISTRIBUTION}\" - Official ${LIVE_ARCHITECTURE} LIVE/INSTALL Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+	fi
+else
+	echo "Debian GNU/Linux \"${LIVE_DISTRIBUTION}\" - Official ${LIVE_ARCHITECTURE} LIVE Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+fi
+
+# Creating stage file
+Create_stagefile .stage/binary_disk


Property changes on: dists/trunk/live-helper/helpers/lh_binary_disk
___________________________________________________________________
Name: svn:executable
   + *

Modified: dists/trunk/live-helper/helpers/lh_binary_grub
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_grub	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_grub	2007-06-29 15:27:54 UTC (rev 2274)
@@ -75,13 +75,22 @@
 
 # Setting destination directory
 case "${LIVE_BINARY_IMAGES}" in
-	iso|tar|usb-hdd)
-		DESTDIR_LIVE="binary/live"
+	iso|tar)
+		case "${LH_INITRAMFS}" in
+			casper)
+				DESTDIR_LIVE="binary/casper"
+				;;
+
+			live-initramfs)
+				DESTDIR_LIVE="binary/live"
+				;;
+		esac
+
 		DESTDIR_INSTALL="binary/install"
 		;;
 
-	net)
-		Echo_error "not supported, aborting (FIXME)."
+	usb-hdd|net)
+		Echo_error "not yet supported, aborting (FIXME)."
 		exit 1
 	;;
 esac

Added: dists/trunk/live-helper/helpers/lh_binary_hacks
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_hacks	                        (rev 0)
+++ dists/trunk/live-helper/helpers/lh_binary_hacks	2007-06-29 15:27:54 UTC (rev 2274)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# lh_binary_hacks(1) - execute hacks in binary
+# Copyright (C) 2006-2007 Daniel Baumann <daniel at debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Including common functions
+LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+
+for FUNCTION in "${LH_BASE}"/functions/*.sh
+do
+	. "${FUNCTION}"
+done
+
+# Setting static variables
+DESCRIPTION="execute hacks in binary"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
+Set_defaults
+
+Echo_message "Begin executing hacks..."
+
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+
+# Checking stage file
+Check_stagefile .stage/binary_hacks
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+# Removing live-initramfs docs
+if [ "${LH_INITRAMFS}" = "casper" ]
+then
+	rm -f binary/boot-parameters.txt
+fi
+
+# Creating stage file
+Create_stagefile .stage/binary_hacks


Property changes on: dists/trunk/live-helper/helpers/lh_binary_hacks
___________________________________________________________________
Name: svn:executable
   + *

Modified: dists/trunk/live-helper/helpers/lh_binary_linux-image
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_linux-image	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_linux-image	2007-06-29 15:27:54 UTC (rev 2274)
@@ -52,7 +52,15 @@
 # Setting destination directory
 case "${LIVE_BINARY_IMAGES}" in
 	iso)
-		DESTDIR="binary/live"
+		case "${LH_INITRAMFS}" in
+			casper)
+				DESTDIR="binary/casper"
+				;;
+
+			live-initramfs)
+				DESTDIR="binary/live"
+				;;
+		esac
 		;;
 
 	net)
@@ -70,6 +78,20 @@
 		;;
 esac
 
+case "${LIVE_ARCHITECTURE}" in
+	amd64)
+		LINUX="vmlinuz"
+		;;
+
+	i386)
+		LINUX="vmlinuz"
+		;;
+
+	powerpc)
+		LINUX="vmlinux"
+		;;
+esac
+
 # Temporary check for broken syslinux
 if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
 then
@@ -79,17 +101,14 @@
 		case "${LIVE_ARCHITECTURE}" in
 			amd64)
 				DESTDIR="${DESTDIR}.amd"
-				LINUX="vmlinuz"
 				;;
 
 			i386)
 				DESTDIR="${DESTDIR}.386"
-				LINUX="vmlinuz"
 				;;
 
 			powerpc)
 				DESTDIR="${DESTDIR}.ppc"
-				LINUX="vmlinux"
 				;;
 		esac
 	fi

Modified: dists/trunk/live-helper/helpers/lh_binary_manifest
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_manifest	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_manifest	2007-06-29 15:27:54 UTC (rev 2274)
@@ -48,19 +48,22 @@
 
 case "${LH_INITRAMFS}" in
 	casper)
-		INITFS="casper"
+		# Add filesystem.manifest
+		Chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > binary/casper/filesystem.manifest
 		;;
 
 	live-initramfs)
-		INITFS="live"
+		# Add packages.list
+
+cat > binary/packages.txt << EOF
+This file contains the list of all packages installed in this live system.
+
+
+EOF
+
+		Chroot "dpkg -l" >> binary/packages.txt
 		;;
 esac
 
-# Add filesystem.manifest
-Chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > binary/${INITFS}/filesystem.manifest
-
-# Add packages.list
-Chroot "dpkg -l" > binary/packages.txt
-
 # Creating stage file
 Create_stagefile .stage/binary_manifest

Modified: dists/trunk/live-helper/helpers/lh_binary_md5sum
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_md5sum	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_md5sum	2007-06-29 15:27:54 UTC (rev 2274)
@@ -55,8 +55,19 @@
 # Calculating md5sums
 cd binary
 find . -type f | sort | grep -v 'isolinux/isolinux.bin' | grep -v 'boot/grub/stage2_eltorito' | xargs md5sum > ../md5sum.txt
-mv ../md5sum.txt ./
 
+cat > md5sum.txt << EOF
+This file contains the list of md5 checksums of all files on this medium.
+
+You can verify them automatically with the 'integrity-check' boot parameter,
+or, manually with: 'md5sum -c md5sum.txt'.
+
+
+EOF
+
+cat ../md5sum.txt >> md5sum.txt
+rm -f ../md5sum.txt
+
 cd "${OLDPWD}"
 
 # Creating stage file

Modified: dists/trunk/live-helper/helpers/lh_binary_memtest
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_memtest	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_memtest	2007-06-29 15:27:54 UTC (rev 2274)
@@ -74,7 +74,15 @@
 # Setting destination directory
 case "${LIVE_BINARY_IMAGES}" in
 	iso)
-		DESTDIR="binary/live"
+		case "${LH_INITRAMFS}" in
+			casper)
+				DESTDIR="binary/casper"
+				;;
+
+			live-initramfs)
+				DESTDIR="binary/live"
+				;;
+		esac
 		;;
 
 	net)
@@ -82,8 +90,16 @@
 		;;
 
 	tar|usb-hdd)
-		DESTDIR="binary/live"
+		case "${LH_INITRAMFS}" in
+			casper)
+				DESTDIR="binary/casper"
+				;;
 
+			live-initramfs)
+				DESTDIR="binary/live"
+				;;
+		esac
+
 		# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
 		if [ "${LIVE_DISTRIBUTION}" = "etch" ] && [ "${LIVE_BOOTLOADER}" = "syslinux" ]
 		then

Modified: dists/trunk/live-helper/helpers/lh_binary_rootfs
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_rootfs	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_rootfs	2007-06-29 15:27:54 UTC (rev 2274)
@@ -153,7 +153,7 @@
 
 		if [ "${LIVE_PACKAGES_LISTS}" != "minimal" ] && [ "${LIVE_PACKAGES_LISTS}" != "mini" ]
 		then
-			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* chroot/boot/config-* chroot/boot/System.map-*"
+			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img*"
 		fi
 
 		if [ -f config/binary_rootfs/squashfs.sort ]

Modified: dists/trunk/live-helper/helpers/lh_binary_syslinux
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_syslinux	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_binary_syslinux	2007-06-29 15:27:54 UTC (rev 2274)
@@ -66,42 +66,42 @@
 # Local methods
 Syslinux_live_entry ()
 {
-	label=$1
-	kernel=$2
-	initrd=$3
-	append=$4
+	LABEL="${1}"
+	KERNEL="${2}"
+	INITRD="${3}"
+	APPEND="${4}"
 
 	# pxelinux and syslinux << 3.36 lacks support to file/path
-	files_path="/`basename ${DESTDIR_LIVE}`"
-	if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "$files_path" != "binary" ]
+	if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "${DIRECTORY}" != "binary" ]
 	then
-		kernel=$files_path/$kernel
-		initrd=$files_path/$initrd
+		DIRECTORY="/`basename ${DESTDIR_LIVE}`"
+		KERNEL="${DIRECTORY}/${KERNEL}"
+		INITRD="${DIRECTORY}/${INITRD}"
 	fi
 
-	LINUX="$LINUX\nLABEL $label\n"
-	LINUX="$LINUX\tkernel $kernel\n"
-	LINUX="$LINUX\tappend initrd=$initrd boot=${INITFS} LIVE_BOOTAPPEND $append\n"
+	LINUX_LIVE="${LINUX_LIVE}\nLABEL ${LABEL}\n"
+	LINUX_LIVE="${LINUX_LIVE}\tkernel ${KERNEL}\n"
+	LINUX_LIVE="${LINUX_LIVE}\tappend initrd=${INITRD} boot=${INITFS} LIVE_BOOTAPPEND ${APPEND}\n"
 }
 
 Syslinux_install_entry ()
 {
-	label=$1
-	kernel=$2
-	initrd=$3
-	append=$4
+	LABEL="${1}"
+	KERNEL="${2}"
+	INITRD="${3}"
+	APPEND="${4}"
 
 	# pxelinux and syslinux << 3.36 lacks support to file/path
-	files_path="/`basename ${DESTDIR_INSTALL}`"
-	if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "$files_path" != "binary" ]
+	if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "${DIRECTORY}" != "binary" ]
 	then
-		kernel=$files_path/$kernel
-		initrd=$files_path/$initrd
+		DIRECTORY="`basename ${DESTDIR_INSTALL}`"
+		KERNEL="${DIRECTORY}/${KERNEL}"
+		INITRD="${DIRECTORY}/${INITRD}"
 	fi
 
-	LIVE_LINUX_INSTALL="$LIVE_LINUX_INSTALL\nLABEL $label\n"
-	LIVE_LINUX_INSTALL="$LIVE_LINUX_INSTALL\tkernel $kernel\n"
-	LIVE_LINUX_INSTALL="$LIVE_LINUX_INSTALL\tappend initrd=$initrd $append --\n"
+	LINUX_INSTALL="${LINUX_INSTALL}\nLABEL ${LABEL}\n"
+	LINUX_INSTALL="${LINUX_INSTALL}\tkernel ${KERNEL}\n"
+	LINUX_INSTALL="${LINUX_INSTALL}\tappend initrd=${INITRD} ${APPEND} --\n"
 }
 
 case "${LH_INITRAMFS}" in
@@ -117,7 +117,16 @@
 # Setting destination directory
 case "${LIVE_BINARY_IMAGES}" in
 	iso)
-		DESTDIR_LIVE="binary/live"
+		case "${LH_INITRAMFS}" in
+			casper)
+				DESTDIR_LIVE="binary/casper"
+				;;
+
+			live-initramfs)
+				DESTDIR_LIVE="binary/live"
+				;;
+		esac
+
 		DESTDIR_INSTALL="binary/install"
 		;;
 
@@ -127,7 +136,16 @@
 		;;
 
 	tar|usb-hdd)
-		DESTDIR_LIVE="binary/live"
+		case "${LH_INITRAMFS}" in
+			casper)
+				DESTDIR_LIVE="binary/casper"
+				;;
+
+			live-initramfs)
+				DESTDIR_LIVE="binary/live"
+				;;
+		esac
+
 		DESTDIR_INSTALL="binary/install"
 
 		# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
@@ -208,28 +226,28 @@
 # Assembling kernel configuration
 
 # Default entries
-DEfAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
+DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
 DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`"
 DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`"
 
-Syslinux_live_entry "live" "$DEFAULT_KERNEL" "$DEFAULT_INITRD"
-Syslinux_live_entry "live-failsafe" "$DEFAULT_KERNEL" "$DEFAULT_INITRD" "$FAILSAFE"
+Syslinux_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
+Syslinux_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
 
 if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
 then
 	for KERNEL in chroot/boot/vmlinuz*
 	do
-		KERNEL_IMG="`basename ${KERNEL}`"
-		KERNEL_VERSION="`echo ${KERNEL_IMG} | sed -e 's/vmlinuz-//'`"
+		KERNEL_IMAGE="`basename ${KERNEL}`"
+		KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//'`"
 		INITRD="initrd.img-${KERNEL_VERSION}"
 
-		Syslinux_live_entry "live-$KERNEL_VERSION" "$KERNEL_IMG" "$INITRD"
-		Syslinux_live_entry "live-$KERNEL_VERSION-failsafe" "$KERNEL_IMG" "$INITRD" "$FAILSAFE"
+		Syslinux_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
+		Syslinux_live_entry "live-${KERNEL_VERSION}-failsafe" "${KERNEL_IMAGE}" "${INITRD}" "${FAILSAFE}"
 	done
 fi
 
 # Removing '//'
-LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
+LINUX_LIVE="`echo ${LINUX_LIVE} | sed -e 's#//#/#g'`"
 
 # Assembling debian-installer configuration
 if [ "${LIVE_DEBIAN_INSTALLER}" = "enabled" ]
@@ -255,30 +273,32 @@
 		fi
 	fi
 
-	Syslinux_install_entry "linux" "$VMLINUZ_DI" "$INITRD_DI" "$APPEND_DI"
-	Syslinux_install_entry "install" "$VMLINUZ_DI" "$INITRD_DI" "$APPEND_DI"
-	Syslinux_install_entry "installgui" "$VMLINUZ_GI" "$INITRD_GI" "$APPEND_GI"
-	Syslinux_install_entry "expert" "$VMLINUZ_DI" "$INITRD_DI" "priority=low $APPEND_DI"
-	Syslinux_install_entry "expertgui" "$VMLINUZ_GI" "$INITRD_GI" "priority=low $APPEND_GI"
-	Syslinux_install_entry "rescue" "$VMLINUZ_DI" "$INITRD_DI" "rescue/enable=true $APPEND_DI"
-	Syslinux_install_entry "rescuegui" "$VMLINUZ_GI" "$INITRD_GI" "rescue/enable=true $APPEND_GI"
-	Syslinux_install_entry "auto" "$VMLINUZ_DI" "$INITRD_DI" "auto=true $APPEND_DI"
-	Syslinux_install_entry "autogui" "$VMLINUZ_GI" "$INITRD_GI" "auto=true $APPEND_GI"
+	Syslinux_install_entry "linux" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
+	Syslinux_install_entry "install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
+	Syslinux_install_entry "installgui" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
+	Syslinux_install_entry "expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
+	Syslinux_install_entry "expertgui" "${VMLINUZ_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
+	Syslinux_install_entry "rescue" "${VMLINUZ_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
+	Syslinux_install_entry "rescuegui" "${VMLINUZ_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
+	Syslinux_install_entry "auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true ${APPEND_DI}"
+	Syslinux_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true ${APPEND_GI}"
 fi
 
-LIVE_LINUX_INSTALL="`echo ${LIVE_LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_INSTALL="`echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
 
 # Assembling memtest configuration
 if [ -f "${DESTDIR_LIVE}"/memtest ]
 then
 	KERNEL_PATH="/`basename ${DESTDIR_LIVE}`/"
+
 	# pxelinux and syslinux << 3.36 lacks support to file/path
 	if [ "${LIVE_BINARY_IMAGES}" = "net" ] || [ "`basename ${DESTDIR_LIVE}`" = "binary" ]
 	then
 		KERNEL_PATH=""
 	fi
 
-	MEMTEST="`echo LABEL ${KERNEL_PATH}memtest\n\tkernel memtest | sed -e 's#//#/#g'`"
+	MEMTEST="LABEL ${KERNEL_PATH}memtest\n\tkernel memtest"
+	MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
 fi
 
 case "${LIVE_BINARY_IMAGES}" in
@@ -306,7 +326,7 @@
 		fi
 
 		# Configure syslinux templates
-		sed -i -e "s at LIVE_LINUX_LIVE@${LINUX}@" -e "s at LIVE_LINUX_INSTALL@${LIVE_LINUX_INSTALL}@" -e "s at LIVE_MEMTEST@${MEMTEST}@" binary/isolinux/isolinux.cfg
+		sed -i -e "s at LINUX_LIVE@${LINUX_LIVE}@" -e "s at LINUX_INSTALL@${LINUX_INSTALL}@" -e "s at MEMTEST@${MEMTEST}@" binary/isolinux/isolinux.cfg
 		sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/isolinux/isolinux.cfg
 		sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/isolinux/f1.txt
 		sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/isolinux/f10.txt
@@ -317,19 +337,26 @@
 		# Working arround syslinux 8.3 limitation
 		if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
 		then
+			NUMBER="0"
+
+			# FIXME: This has a bug *iff* flavours = 686 686-bigmem (note the order).
+
 			for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
 			do
-				NUMBER=$(($NUMBER + 1))
+				NUMBER="$(($NUMBER + 1))"
 
 				mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
 				mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
-				sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/isolinux/isolinux.cfg
+				sed -i -e "s/vmlinuz-.*-${FLAVOUR}$/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR} /initrd${NUMBER}.img /g" binary/isolinux/isolinux.cfg
 			done
 		else
 			mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
 			mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
 			sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" binary/isolinux/isolinux.cfg
 		fi
+
+		# Remove whitespaces
+		sed -i -e 's/\ $//g' binary/isolinux/isolinux.cfg
 		;;
 
 	net)
@@ -360,7 +387,7 @@
 		fi
 
 		# Configure syslinux templates
-		sed -i -e "s at LIVE_LINUX_LIVE@${LINUX}@" -e "s at LIVE_LINUX_INSTALL@${LIVE_LINUX_INSTALL}@" -e "s at LIVE_MEMTEST@${MEMTEST}@" tftpboot/pxelinux.cfg/default
+		sed -i -e "s at LINUX_LIVE@${LINUX_LIVE}@" -e "s at LINUX_INSTALL@${LINUX_INSTALL}@" -e "s at MEMTEST@${MEMTEST}@" tftpboot/pxelinux.cfg/default
 		sed -i -e "s/LIVE_NET_SERVER/${LIVE_NET_SERVER}/" -e "s#LIVE_NET_PATH#${LIVE_NET_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" tftpboot/pxelinux.cfg/default
 		sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" tftpboot/pxelinux.cfg/f1.txt
 		sed -i -e "s/LIVE_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt
@@ -371,19 +398,24 @@
 		# Working arround syslinux 8.3 limitation
 		if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
 		then
+			NUMBER="0"
+
 			for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
 			do
-				NUMBER=$(($NUMBER + 1))
+				NUMBER="$(($NUMBER + 1))"
 
 				mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
 				mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
-				sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" binary/isolinux/isolinux.cfg
+				sed -i -e "s/vmlinuz-.*-${FLAVOUR}$/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR} /initrd${NUMBER}.img /g" binary/isolinux/isolinux.cfg
 			done
 		else
 			mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
 			mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
 			sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" binary/isolinux/isolinux.cfg
 		fi
+
+		# Remove whitespaces
+		sed -i -e 's/\ $//g' binary/isolinux/isolinux.cfg
 		;;
 
 	tar|usb-hdd)
@@ -419,7 +451,7 @@
 		fi
 
 		# Configure syslinux templates
-		sed -i -e "s at LIVE_LINUX_LIVE@${LINUX}@" -e "s at LIVE_LINUX_INSTALL@${LIVE_LINUX_INSTALL}@" -e "s at LIVE_MEMTEST@${MEMTEST}@" "${DESTDIR}"/syslinux.cfg
+		sed -i -e "s at LINUX_LIVE@${LINUX_LIVE}@" -e "s at LINUX_INSTALL@${LINUX_INSTALL}@" -e "s at MEMTEST@${MEMTEST}@" "${DESTDIR}"/syslinux.cfg
 		sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${DESTDIR}"/syslinux.cfg
 		sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${DESTDIR}"/f1.txt
 		sed -i -e "s/LIVE_VERSION/${VERSION}/" "${DESTDIR}"/f10.txt
@@ -430,17 +462,22 @@
 		# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
 		if [ "${LIVE_DISTRIBUTION}" = "etch" ] && [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
 		then
+			NUMBER="0"
+
 			for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
 			do
-				NUMBER=$(($NUMBER + 1))
+				NUMBER="$(($NUMBER + 1))"
 				mv "${DESTDIR_LIVE}"/vmlinuz-*-${FLAVOUR} "${DESTDIR_LIVE}"/vmlinuz${NUMBER}
 				mv "${DESTDIR_LIVE}"/initrd.img-*-${FLAVOUR} "${DESTDIR_LIVE}"/initrd${NUMBER}.img
-				sed -i -e "s/vmlinuz-.*-${FLAVOUR}/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR}/initrd${NUMBER}.img/g" "${DESTDIR}"/syslinux.cfg
+				sed -i -e "s/vmlinuz-.*-${FLAVOUR}$/vmlinuz${NUMBER}/g" -e "s/initrd.img-.*-${FLAVOUR} /initrd${NUMBER}.img /g" "${DESTDIR}"/syslinux.cfg
 			done
 		else
 			mv "${DESTDIR_LIVE}"/vmlinuz-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
 			mv "${DESTDIR_LIVE}"/initrd.img-*-${LIVE_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
 			sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" "${DESTDIR}"/syslinux.cfg
+
+			# Remove whitespaces
+			sed -i -e 's/\ $//g' "${DESTDIR}"/syslinux.cfg
 		fi
 		;;
 esac

Modified: dists/trunk/live-helper/helpers/lh_source
===================================================================
--- dists/trunk/live-helper/helpers/lh_source	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_source	2007-06-29 15:27:54 UTC (rev 2274)
@@ -40,6 +40,7 @@
 # Preparing images
 lh_source_debian-live ${*}
 lh_source_debian ${*}
+lh_source_disk ${*}
 lh_source_md5sum ${*}
 
 # Building images

Added: dists/trunk/live-helper/helpers/lh_source_disk
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_disk	                        (rev 0)
+++ dists/trunk/live-helper/helpers/lh_source_disk	2007-06-29 15:27:54 UTC (rev 2274)
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# lh_source_disk (1) - install disk information into source
+# Copyright (C) 2006-2007 Daniel Baumann <daniel at debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Including common functions
+LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+
+for FUNCTION in "${LH_BASE}"/functions/*.sh
+do
+	. "${FUNCTION}"
+done
+
+# Setting static variables
+DESCRIPTION="install disk information into source"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/bootstrap
+Read_conffile config/chroot
+Read_conffile config/binary
+Read_conffile config/source
+Set_defaults
+
+if [ "${LIVE_SOURCE_IMAGES}" != "iso" ]
+then
+	exit 0
+fi
+
+Echo_message "Begin installing disk information..."
+
+# Requiring stage file
+Require_stagefile .stage/bootstrap
+
+# Checking stage file
+Check_stagefile .stage/source_disk
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+mkdir -p source/.disk
+
+echo "Debian GNU/Linux \"${LIVE_DISTRIBUTION}\" - Official ${LIVE_ARCHITECTURE} LIVE Source `date +%Y%m%d-%H:%M`" > source/.disk/info
+
+# Creating stage file
+Create_stagefile .stage/source_disk


Property changes on: dists/trunk/live-helper/helpers/lh_source_disk
___________________________________________________________________
Name: svn:executable
   + *

Modified: dists/trunk/live-helper/helpers/lh_source_md5sum
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_md5sum	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/helpers/lh_source_md5sum	2007-06-29 15:27:54 UTC (rev 2274)
@@ -60,7 +60,19 @@
 # Calculating md5sums
 cd source
 find . -type f | sort | xargs md5sum > ../md5sum.txt
-mv ../md5sum.txt ./
+
+cat > md5sum.txt << EOF
+This file contains the list of md5 checksums of all files on this medium.
+
+You can verify them automatically with the 'integrity-check' boot parameter,
+or, manually with: 'md5sum -c md5sum.txt'.
+
+
+EOF
+
+cat ../md5sum.txt >> md5sum.txt
+rm -f ../md5sum.txt
+
 cd "${OLDPWD}"
 
 # Creating stage file

Modified: dists/trunk/live-helper/templates/syslinux/isolinux.cfg
===================================================================
--- dists/trunk/live-helper/templates/syslinux/isolinux.cfg	2007-06-28 21:48:50 UTC (rev 2273)
+++ dists/trunk/live-helper/templates/syslinux/isolinux.cfg	2007-06-29 15:27:54 UTC (rev 2274)
@@ -14,11 +14,11 @@
 
 DEFAULT live
 
-LIVE_LINUX_LIVE
+LINUX_LIVE
 
-LIVE_LINUX_INSTALL
+LINUX_INSTALL
 
-LIVE_MEMTEST
+MEMTEST
 
 #LABEL floppy
 #	localboot 0x00




More information about the Debian-live-changes mailing list