[SCM] live-helper branch, upstream, updated. upstream/2.0_a3-1-g5fb210e

Daniel Baumann daniel at debian.org
Tue Jan 19 19:42:57 UTC 2010


The following commit has been merged in the upstream branch:
commit 5fb210e954105b0e9568e264150fc4eda81c81f0
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Jan 19 20:39:44 2010 +0100

    Adding upstream version 2.0~a4.

diff --git a/functions/common.sh b/functions/common.sh
index 84aa93c..72fdf5b 100755
--- a/functions/common.sh
+++ b/functions/common.sh
@@ -9,7 +9,7 @@
 
 PROGRAM="$(basename ${0})"
 PACKAGE="live-helper"
-VERSION="2.0~a3-1"
+VERSION="2.0~a4-1"
 CONFIG_VERSION="$(echo ${VERSION} | awk -F- '{ print $1 }')"
 
-PATH="${PWD}/scripts:${PATH}"
+PATH="${PWD}/auto/helpers:${PATH}"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 6be994b..e45b38f 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -32,7 +32,7 @@ Set_defaults ()
 				;;
 
 			ubuntu)
-				LH_DISTRIBUTION="jaunty"
+				LH_DISTRIBUTION="karmic"
 				;;
 		esac
 	fi
diff --git a/functions/exit.sh b/functions/exit.sh
index 928fd6e..f29dbf7 100755
--- a/functions/exit.sh
+++ b/functions/exit.sh
@@ -20,10 +20,19 @@ Exit ()
 	# Always exit true in case we are not able to unmount
 	# (e.g. due to running processes in chroot from user customizations)
 	Echo_message "Begin unmounting filesystems..."
-	for DIRECTORY in $(awk -v dir="${PWD}/chroot/" '$2 ~ dir { print $2 }' /proc/mounts | sort -r)
-	do
-		umount ${DIRECTORY} > /dev/null 2>&1 || true
-	done
+
+	if [ -e /proc/mounts ]
+	then
+		for DIRECTORY in $(awk -v dir="${PWD}/chroot/" '$2 ~ dir { print $2 }' /proc/mounts | sort -r)
+		do
+			umount ${DIRECTORY} > /dev/null 2>&1 || true
+		done
+	else
+		for DIRECTORY in /dev/pts /dev /proc /selinux /sys
+		do
+			umount -f chroot/${DIRECTORY} > /dev/null 2>&1 || true
+		done
+	fi
 
 	return ${VALUE}
 }
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 7612810..c65b7b5 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -84,7 +84,7 @@ ${LH_ROOT_COMMAND} rm -rf chroot/chroot
 ${LH_ROOT_COMMAND} rm -rf chroot.tmp
 
 # Copying new chroot
-if [ -d cache/stages_bootstrap ]
+if [ -d cache/stages_bootstrap ] && [ "${LH_CHROOT_FILESYSTEM}" != "plain" ]
 then
 	${LH_ROOT_COMMAND} mv chroot chroot.tmp
 	${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 7f5af95..cb1af38 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -323,12 +323,30 @@ then
 	case "${LH_ARCHITECTURE}" in
 		amd64)
 			DI_REQ_PACKAGES="lilo grub"
-			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-amd64"
+
+			case "${LH_MODE}" in
+				ubuntu)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-generic"
+					;;
+
+				*)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-amd64"
+					;;
+			esac
 			;;
 
 		i386)
 			DI_REQ_PACKAGES="elilo lilo grub"
-			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-486 linux-image-2.6-686"
+
+			case "${LH_MODE}" in
+				ubuntu)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-generic"
+					;;
+
+				*)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-486 linux-image-2.6-686"
+					;;
+			esac
 			;;
 
 		sparc)
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 2c06ff4..b9c6d26 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -147,11 +147,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					rm -f .lock
 					mv chroot/chroot chroot.tmp
 
+					lh chroot_linux-image remove ${*}
 					lh chroot_sources remove ${*}
 					lh chroot_apt remove ${*}
 					lh chroot_hostname remove ${*}
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
+					lh chroot_sysv-rc remove ${*}
+					lh chroot_dpkg remove ${*}
+					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
 					lh chroot_selinuxfs remove ${*}
 					lh chroot_proc remove ${*}
@@ -164,11 +168,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_proc install ${*}
 					lh chroot_selinuxfs install ${*}
 					lh chroot_sysfs install ${*}
+					lh chroot_debianchroot install ${*}
+					lh chroot_dpkg install ${*}
+					lh chroot_sysv-rc install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
 					lh chroot_apt install ${*}
 					lh chroot_sources install ${*}
+					lh chroot_linux-image install ${*}
 
 					touch .lock
 				else
@@ -221,11 +229,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					rm -f .lock
 					mv chroot/chroot chroot.tmp
 
+					lh chroot_linux-image remove ${*}
 					lh chroot_sources remove ${*}
 					lh chroot_apt remove ${*}
 					lh chroot_hostname remove ${*}
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
+					lh chroot_sysv-rc remove ${*}
+					lh chroot_dpkg remove ${*}
+					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
 					lh chroot_selinuxfs remove ${*}
 					lh chroot_proc remove ${*}
@@ -238,11 +250,17 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_proc install ${*}
 					lh chroot_selinuxfs install ${*}
 					lh chroot_sysfs install ${*}
+					lh chroot_debianchroot install ${*}
+					lh chroot_dpkg install ${*}
+					lh chroot_sysv-rc install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
 					lh chroot_apt install ${*}
 					lh chroot_sources install ${*}
+					lh chroot_linux-image install ${*}
+
+					touch .lock
 				else
 					rm -rf chroot/chroot
 				fi
@@ -323,11 +341,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					rm -f .lock
 					mv chroot/chroot chroot.tmp
 
+					lh chroot_linux-image remove ${*}
 					lh chroot_sources remove ${*}
 					lh chroot_apt remove ${*}
 					lh chroot_hostname remove ${*}
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
+					lh chroot_sysv-rc remove ${*}
+					lh chroot_dpkg remove ${*}
+					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
 					lh chroot_selinuxfs remove ${*}
 					lh chroot_proc remove ${*}
@@ -340,11 +362,15 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_proc install ${*}
 					lh chroot_selinuxfs install ${*}
 					lh chroot_sysfs install ${*}
+					lh chroot_debianchroot install ${*}
+					lh chroot_dpkg install ${*}
+					lh chroot_sysv-rc install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
 					lh chroot_apt install ${*}
 					lh chroot_sources install ${*}
+					lh chroot_linux-image install ${*}
 
 					touch .lock
 				else
diff --git a/helpers/lh_build b/helpers/lh_build
index 7d5abf0..835ad8e 100755
--- a/helpers/lh_build
+++ b/helpers/lh_build
@@ -13,9 +13,9 @@ set -e
 . "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
 
 # Read meta config
-if [ "${1}" != "noautoconfig" ] && [ -x scripts/build ]
+if [ "${1}" != "noautoconfig" ] && [ -x auto/build ]
 then
-	./scripts/build ${@}
+	./auto/build ${@}
 fi
 
 if [ "${1}" = "noautoconfig" ]
diff --git a/helpers/lh_chroot b/helpers/lh_chroot
index df14a0f..65c5e65 100755
--- a/helpers/lh_chroot
+++ b/helpers/lh_chroot
@@ -47,6 +47,7 @@ lh chroot_preseed ${*}
 lh chroot_local-preseed ${*}
 lh chroot_tasks ${*}
 lh chroot_packageslists ${*}
+lh chroot_local-packageslists ${*}
 lh chroot_packages ${*}
 lh chroot_local-packages ${*}
 lh chroot_install-packages ${*}
diff --git a/helpers/lh_chroot_devpts b/helpers/lh_chroot_devpts
index 75edab2..9248595 100755
--- a/helpers/lh_chroot_devpts
+++ b/helpers/lh_chroot_devpts
@@ -67,9 +67,11 @@ case "${1}" in
 		# Unmounting /dev/pts
 		if [ "${LH_USE_FAKEROOT}" != "true" ]
 		then
-			if Find_files chroot/dev/pts/*
+			if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
 			then
 				${LH_ROOT_COMMAND} umount chroot/dev/pts
+			else
+				${LH_ROOT_COMMAND} umount -f chroot/dev/pts > /dev/null 2>&1 || true
 			fi
 		fi
 
diff --git a/helpers/lh_chroot_dpkg b/helpers/lh_chroot_dpkg
index 7fd6e67..bf2950a 100755
--- a/helpers/lh_chroot_dpkg
+++ b/helpers/lh_chroot_dpkg
@@ -66,7 +66,10 @@ EOF
 		Create_lockfile .lock
 
 		# Restore start-stop-daemon program
-		mv chroot/sbin/start-stop-daemon.orig chroot/sbin/start-stop-daemon
+		if [ -e chroot/sbin/start-stop-daemon.orig ]
+		then
+			mv chroot/sbin/start-stop-daemon.orig chroot/sbin/start-stop-daemon
+		fi
 
 		# Removing stage file
 		rm -f .stage/chroot_dpkg
diff --git a/helpers/lh_chroot_packageslists b/helpers/lh_chroot_local-packageslists
similarity index 59%
copy from helpers/lh_chroot_packageslists
copy to helpers/lh_chroot_local-packageslists
index 464369d..5e51ed9 100755
--- a/helpers/lh_chroot_packageslists
+++ b/helpers/lh_chroot_local-packageslists
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# lh_chroot_packageslists(1) - queue install of packages lists into chroot
+# lh_chroot_local-packageslists(1) - queue install of local packages lists into chroot
 # Copyright (C) 2006-2009 Daniel Baumann <daniel at debian.org>
 #
 # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -13,7 +13,7 @@ set -e
 . "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
 
 # Setting static variables
-DESCRIPTION="$(Echo 'queue install of packages lists into chroot')"
+DESCRIPTION="$(Echo 'queue install of local packages lists into chroot')"
 HELP=""
 USAGE="${PROGRAM} [--force]"
 
@@ -23,13 +23,13 @@ Arguments "${@}"
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-Echo_message "Begin queueing installation of packages lists..."
+Echo_message "Begin queueing installation of local packages lists..."
 
 # Requiring stage file
 Require_stagefile .stage/config .stage/bootstrap
 
 # Checking stage file
-Check_stagefile .stage/chroot_packageslists
+Check_stagefile .stage/chroot_local-packageslists
 
 # Checking lock file
 Check_lockfile .lock
@@ -37,16 +37,15 @@ Check_lockfile .lock
 # Creating lock file
 Create_lockfile .lock
 
-if [ -n "${LH_PACKAGES_LISTS}" ] && [ "${LH_PACKAGES_LISTS}" != "none" ]
+if ls config/chroot_local-packageslists/*.list > /dev/null 2>&1
 then
-
-	for LIST in ${LH_PACKAGES_LISTS}
+	for LIST in config/chroot_local-packageslists/*.list
 	do
-		# Generating package list
-		Expand_packagelist "${LIST}" "config/chroot_local-packageslists" \
+		# Generating local package list
+		Expand_packagelist "$(basename ${LIST})" "config/chroot_local-packageslists" \
 			>> chroot/root/chroot_packages
 	done
 
 	# Creating stage file
-	Create_stagefile .stage/chroot_packageslists
+	Create_stagefile .stage/chroot_local-packageslists
 fi
diff --git a/helpers/lh_chroot_packageslists b/helpers/lh_chroot_packageslists
index 464369d..3ec26fb 100755
--- a/helpers/lh_chroot_packageslists
+++ b/helpers/lh_chroot_packageslists
@@ -43,8 +43,7 @@ then
 	for LIST in ${LH_PACKAGES_LISTS}
 	do
 		# Generating package list
-		Expand_packagelist "${LIST}" "config/chroot_local-packageslists" \
-			>> chroot/root/chroot_packages
+		Expand_packagelist "${LIST}" >> chroot/root/chroot_packages
 	done
 
 	# Creating stage file
diff --git a/helpers/lh_clean b/helpers/lh_clean
index 29bddbd..8f74209 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -10,9 +10,9 @@
 set -e
 
 # Read meta config
-if [ "${1}" != "noautoconfig" ] && [ -x scripts/clean ]
+if [ "${1}" != "noautoconfig" ] && [ -x auto/clean ]
 then
-	./scripts/clean ${@}
+	./auto/clean ${@}
 fi
 
 if [ "${1}" = "noautoconfig" ]
@@ -59,9 +59,9 @@ do
 			LH=1 "${0}" noautoconfig --stage
 			LH=1 "${0}" noautoconfig --source
 
-			if [ -d scripts ]
+			if [ -d auto ]
 			then
-				rmdir --ignore-fail-on-non-empty scripts
+				rmdir --ignore-fail-on-non-empty auto
 			fi
 			;;
 
@@ -111,7 +111,7 @@ do
 			LH=1 "${0}" --all
 			LH=1 "${0}" --cache
 
-			if [ -e scripts/config ]
+			if [ -e auto/config ]
 			then
 				rm -f .stage/config
 			fi
diff --git a/helpers/lh_config b/helpers/lh_config
index da417a3..83a8242 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -10,9 +10,9 @@
 set -e
 
 # Read meta config
-if [ "${1}" != "noautoconfig" ] && [ -x scripts/config ]
+if [ "${1}" != "noautoconfig" ] && [ -x auto/config ]
 then
-	./scripts/config ${@}
+	./auto/config ${@}
 fi
 
 if [ "${1}" = "noautoconfig" ]
@@ -210,14 +210,14 @@ Local_arguments ()
 					rmdir --ignore-fail-on-non-empty config
 				fi
 
-				if [ -d scripts/functions ]
+				if [ -d auto/functions ]
 				then
-					rmdir --ignore-fail-on-non-empty scripts/functions
+					rmdir --ignore-fail-on-non-empty auto/functions
 				fi
 
-				if [ -d scripts ]
+				if [ -d auto ]
 				then
-					rmdir --ignore-fail-on-non-empty scripts
+					rmdir --ignore-fail-on-non-empty auto
 				fi
 
 				exit 0
@@ -381,7 +381,15 @@ Local_arguments ()
 
 			-d|--distribution)
 				LH_DISTRIBUTION="${2}"
+				BACKPORTS="false"
 				shift 2
+
+				case "${LH_DISTRIBUTION}" in
+					lenny-backports)
+						LH_DISTRIBUTION="lenny"
+						BACKPORTS="true"
+						;;
+				esac
 				;;
 
 			-m|--mirror-bootstrap)
@@ -1246,7 +1254,7 @@ LH_SOURCE="${LH_SOURCE}"
 LH_SOURCE_IMAGES="${LH_SOURCE_IMAGES}"
 EOF
 
-mkdir -p scripts/functions
+mkdir -p auto/functions
 
 if [ "${CONFIG}" = "clone" ] # FIXME
 then
@@ -1263,5 +1271,34 @@ then
 	fi
 fi
 
+if [ "${BACKPORTS}" = "true" ]
+then
+	# Adding sources.list entry
+
+cat > config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot << EOF
+# Backports Maintainers
+deb http://backports.debian-maintainers.org/ ${LH_DISTRIBUTION}/backports main contrib non-free
+deb-src http://backports.debian-maintainers.org/ ${LH_DISTRIBUTION}/backports main contrib non-free
+EOF
+
+	cp config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot config/chroot_sources/${LH_DISTRIBUTION}-backports.binary
+
+	# Adding apt preferences
+	if ! grep -qs "^Pin: release o=backports.debian-maintainerns.org" config/chroot_apt/preferences
+	then
+
+cat >> config/chroot_apt/preferences << EOF
+Package: *
+Pin: release o=backports.debian-maintainerns.org
+Pin-Priority: 999
+EOF
+
+	fi
+
+	# Addding archive signing key
+	wget -q http://backports.debian-maintainers.org/project/openpgp/archive-key.asc -O config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot.gpg
+	cp config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot.gpg config/chroot_sources/${LH_DISTRIBUTION}-backports.binary.gpg
+fi
+
 # Creating stage file
 Create_stagefile .stage/config
diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live
index 391f75e..10ba580 100755
--- a/helpers/lh_source_debian-live
+++ b/helpers/lh_source_debian-live
@@ -52,9 +52,9 @@ fi
 mkdir -p source/debian-live
 cp -a config source/debian-live
 
-if Find_files scripts/*
+if Find_files auto/*
 then
-	cp -a scripts source/debian-live
+	cp -a auto source/debian-live
 fi
 
 # Create tarball
diff --git a/lists/debian-live b/lists/debian-live
index e2dd585..3643780 100644
--- a/lists/debian-live
+++ b/lists/debian-live
@@ -12,11 +12,17 @@ dosfstools genisoimage memtest86+ memtest86 mtools parted squashfs-tools genext2
 
 # kernel
 #if DISTRIBUTION lenny squeeze sid
-aufs-tools aufs-source
+aufs-tools
+#endif
+#if DISTRIBUTION lenny
+aufs-source
 #endif
 qemu kqemu-source
 kvm kvm-source
-squashfs-tools squashfs-source
+squashfs-tools
+#if DISTRIBUTION lenny
+squashfs-source
+#endif
 #linux-headers-2.6-all
 
 # netboot/pxe
diff --git a/lists/lxde b/lists/lxde
index 2adf8b1..5d1537e 100644
--- a/lists/lxde
+++ b/lists/lxde
@@ -3,5 +3,11 @@
 ## LH: LXDE
 #include <standard-x11>
 
-lxde lxnm
+lxde
+#if DISTRIBUTION lenny
+lxnm
+#endif
+#if DISTRIBUTION squeeze sid
+wicd
+#endif
 gdm desktop-base
diff --git a/lists/rescue b/lists/rescue
index f42bbf2..9acc6f2 100644
--- a/lists/rescue
+++ b/lists/rescue
@@ -91,7 +91,6 @@ ifenslave-2.6
 ifrename
 ethtool
 ipcalc
-mailx
 mii-diag
 minicom
 gkermit
diff --git a/live-helper.sh b/live-helper.sh
index 626ba3f..59d475f 100755
--- a/live-helper.sh
+++ b/live-helper.sh
@@ -9,9 +9,9 @@ do
 done
 
 # Source local functions
-if ls scripts/functions/*.sh > /dev/null 2>&1
+if ls auto/functions/* > /dev/null 2>&1
 then
-	for FUNCTION in scripts/functions/*.sh
+	for FUNCTION in auto/functions/*
 	do
 		. "${FUNCTION}"
 	done
diff --git a/manpages/lh_config.en.1 b/manpages/lh_config.en.1
index 904caa8..a38d368 100644
--- a/manpages/lh_config.en.1
+++ b/manpages/lh_config.en.1
@@ -368,7 +368,7 @@ sets the IP or hostname that will be configured in the bootloader configuration
 .IP "\fB\-\-net\-tarball\fR bzip2|gzip|tar|none" 4
 defines the format of the netboot image. Choosing tar results in a not compressed tarball, bzip2 and gzip in a bzip2 resp. gzip compressed tarball. Choosing none leads to no tarball at all, the plain binary directory is considered the output in this case. Default is gzip.
 .IP "\-p|\fB\-\-packages\-lists\fR \fIFILE\fR" 4
-defines which lists available in /usr/share/live-helper/lists should be used. By default, this is set to standard. Note that in case you have local packages lists, you also need to list them here. Putting them into config/chroot_local-packageslists is not enough.
+defines which lists available in /usr/share/live-helper/lists should be used. By default, this is set to standard. Note that in case you have local packages lists, you don't need to list them here. Putting them into config/chroot_local-packageslists is enough.
 .IP "\fB\-\-packages\fR \fIPACKAGE\fR|\fI""PACKAGES""\fR" 4
 defines one or more packages to be installed in the live system. This is a quick and convenient place to add a few packages when building an image (limited by the max length of shell). Packages that should be permanently installed should be put into a local packages list.
 .IP "\fB\-\-root-command\fR sudo" 4

-- 
live-helper



More information about the debian-live-changes mailing list