summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:14 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:26 +0100
commit0d5ff4ca7596790f853cf637e0fe225cad810a76 (patch)
tree360ca9a49f3d82d589a4b49c98e5210dfcb3b74e /helpers
parentcd5110f6b8eb77519d704972276cfd5be6bff055 (diff)
downloadvyos-live-build-0d5ff4ca7596790f853cf637e0fe225cad810a76.tar.gz
vyos-live-build-0d5ff4ca7596790f853cf637e0fe225cad810a76.zip
Adding live-helper 1.0~a18-1.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary1
-rwxr-xr-xhelpers/lh_binary_chroot7
-rwxr-xr-xhelpers/lh_binary_debian-installer112
-rwxr-xr-xhelpers/lh_binary_grub148
-rwxr-xr-xhelpers/lh_binary_hacks56
-rwxr-xr-xhelpers/lh_binary_includes9
-rwxr-xr-xhelpers/lh_binary_iso2
-rwxr-xr-xhelpers/lh_binary_linux-image29
-rwxr-xr-xhelpers/lh_binary_memtest18
-rwxr-xr-xhelpers/lh_binary_rootfs4
-rwxr-xr-xhelpers/lh_binary_syslinux140
-rwxr-xr-xhelpers/lh_binary_yaboot152
-rwxr-xr-xhelpers/lh_chroot4
-rwxr-xr-xhelpers/lh_chroot_hacks22
-rwxr-xr-xhelpers/lh_chroot_linux-image6
-rwxr-xr-xhelpers/lh_chroot_local-packageslists2
-rwxr-xr-xhelpers/lh_chroot_localization5
-rwxr-xr-xhelpers/lh_chroot_sources6
-rwxr-xr-xhelpers/lh_chroot_sysv-rc (renamed from helpers/lh_chroot_sysvrc)8
-rwxr-xr-xhelpers/lh_config8
-rwxr-xr-xhelpers/make-live2
21 files changed, 383 insertions, 358 deletions
diff --git a/helpers/lh_binary b/helpers/lh_binary
index e45491efb..c7ab7762e 100755
--- a/helpers/lh_binary
+++ b/helpers/lh_binary
@@ -51,7 +51,6 @@ lh_binary_disk ${*}
lh_binary_includes ${*}
lh_binary_local-includes ${*}
lh_binary_local-hooks ${*}
-lh_binary_hacks ${*}
lh_binary_md5sum ${*}
# Building images
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index a62080cd9..55be65c08 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -63,7 +63,12 @@ ${LH_ROOT_COMMAND} rm -rf chroot/chroot
${LH_ROOT_COMMAND} rm -rf chroot.tmp
# Copying new chroot
-${LH_ROOT_COMMAND} cp -al chroot chroot.tmp
+#if [ "${LIVE_BINARY_INDICES}" = "enabled" ]
+#then
+ ${LH_ROOT_COMMAND} cp -a chroot chroot.tmp
+#else
+# ${LH_ROOT_COMMAND} cp -al chroot chroot.tmp
+#fi
${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
if [ -n "${LH_ROOT_COMMAND}" ]
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 4d98629f6..379a0063c 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -34,7 +34,7 @@ Set_defaults
# Setting remote d-i directories
case "${LIVE_DEBIAN_INSTALLER}" in
- netinst)
+ netboot)
DI="netboot/debian-installer/i386"
DI_GTK="netboot/gtk/debian-installer/i386"
DI_KERNEL="linux"
@@ -95,27 +95,7 @@ case "${LIVE_BINARY_IMAGES}" in
;;
esac
-# Temporary check for broken syslinux
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assemble multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- DESTDIR="${DESTDIR}.amd"
- ;;
-
- i386)
- DESTDIR="${DESTDIR}.386"
- ;;
-
- powerpc)
- DESTDIR="${DESTDIR}.ppc"
- ;;
- esac
- fi
-fi
+Check_multiarchitecture
VMLINUZ_DI="vmlinuz"
INITRD_DI="initrd.gz"
@@ -140,22 +120,69 @@ then
fi
fi
+# Debian Installer daily builds
+case "${LIVE_ARCHITECTURE}" in
+ alpha)
+ URL="http://people.debian.org/~vorlon/d-i/alpha/daily/"
+ ;;
+
+ amd64)
+ URL="http://people.debian.org/~aba/d-i/images/daily/"
+ ;;
+
+ arm)
+ URL="http://people.debian.org/~kmuto/d-i/images/daily/"
+ ;;
+
+ hppa)
+ URL="http://people.debian.org/~kyle/d-i/hppa/daily/"
+ ;;
+
+ i386)
+ URL="http://people.debian.org/~joeyh/d-i/images/daily/"
+ ;;
+
+ ia64)
+ URL="http://people.debian.org/~dannf/d-i/images/daily/"
+ ;;
+
+ m68k)
+ URL="http://people.debian.org/~smarenka/d-i/images-m68k/daily/"
+ ;;
+
+ mips)
+ URL="http://people.debian.org/~ths/d-i/mips/images/daily/"
+ ;;
+
+ mipsel)
+ URL="http://people.debian.org/~ths/d-i/mipsel/images/daily/"
+ ;;
+
+ powerpc)
+ URL="http://people.debian.org/~wouter/d-i/powerpc/daily/"
+ ;;
+
+ s390)
+ URL="http://lophos.multibuild.org/d-i/images/daily/"
+ ;;
+
+ sparc)
+ URL="http://people.debian.org/~stappers/d-i/images/daily/"
+ ;;
+
+ *)
+ Echo_error "No daily-builds found for your architecture."
+ exit 1
+ ;;
+esac
+
# Downloading debian-installer
mkdir -p "${DESTDIR_DI}"
-if [ "${LIVE_DISTRIBUTION}" = "sid" ] # FIXME arch
+if [ "${LIVE_DISTRIBUTION}" = "sid" ]
then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" http://people.debian.org/~aba/d-i/images/daily/${DI}/${DI_KERNEL}
- wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" http://people.debian.org/~aba/d-i/images/daily/${DI}/initrd.gz
- ;;
-
- i386)
- wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" http://people.debian.org/~joeyh/d-i/images/daily/${DI}/${DI_KERNEL}
- wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" http://people.debian.org/~joeyh/d-i/images/daily/${DI}/initrd.gz
- ;;
- esac
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" ${URL}/${DI}/${DI_KERNEL}
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI}/initrd.gz
else
wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/"${DI_KERNEL}"
wget --no-clobber -O "${DESTDIR}"/"${INITRD_DI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI}"/initrd.gz
@@ -166,26 +193,17 @@ if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] |
then
mkdir -p "${DESTDIR_GI}"
- if [ "${LIVE_DISTRIBUTION}" = "sid" ] # FIXME arch
+ if [ "${LIVE_DISTRIBUTION}" = "sid" ]
then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" http://people.debian.org/~aba/d-i/images/daily/${DI_GTK}/${DI_KERNEL}
- wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" http://people.debian.org/~aba/d-i/images/daily/${DI_GTK}/initrd.gz
- ;;
-
- i386)
- wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" http://people.debian.org/~joeyh/d-i/images/daily/${DI_GTK}/${DI_KERNEL}
- wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" http://people.debian.org/~joeyh/d-i/images/daily/${DI_GTK}/initrd.gz
- ;;
- esac
+ wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_GTK}/${DI_KERNEL}
+ wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_GTK}/initrd.gz
else
wget --no-clobber -O "${DESTDIR}"/"${VMLINUZ_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI_GTK}"/"${DI_KERNEL}"
wget --no-clobber -O "${DESTDIR}"/"${INITRD_GI}" "${LIVE_MIRROR_BOOTSTRAP}"/dists/"${LIVE_DISTRIBUTION}"/main/installer-"${LIVE_ARCHITECTURE}"/current/images/"${DI_GTK}"/initrd.gz
fi
fi
-if [ "${LIVE_DEBIAN_INSTALLER}" != "netinst" ]; then
+if [ "${LIVE_DEBIAN_INSTALLER}" != "netboot" ]; then
# Downloading additional packages
mkdir -p chroot/binary.deb/archives/partial
mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 8cf4ed711..b196ad10e 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -63,6 +63,36 @@ Check_package chroot/usr/sbin/grub grub
# Installing depends
Install_package
+# Local functions
+Grub_live_entry ()
+{
+ LABEL="${1}"
+ KERNEL="${2}"
+ INITRD="${3}"
+ APPEND="${4}"
+
+ LINUX_LIVE="${LINUX_LIVE}\ntitle\t\tDebian GNU/Linux - ${LABEL}"
+ LINUX_LIVE="${LINUX_LIVE}\nkernel\t\t/${KERNEL} boot=${INITFS} LIVE_BOOTAPPEND ${APPEND}"
+ LINUX_LIVE="${LINUX_LIVE}\ninitrd\t\t/${INITRD}"
+}
+
+Grub_install_entry ()
+{
+ LABEL="${1}"
+ KERNEL="${2}"
+ INITRD="${3}"
+ APPEND="${4}"
+
+ if [ "${LIVE_DISTRIBUTION}" != "etch" ] && [ "${LABEL}" != "rescue" ] && [ "${LABEL}" != "rescuegui" ]
+ then
+ APPEND="${APPEND} quiet"
+ fi
+
+ LINUX_INSTALL="${LINUX_INSTALL}\ntitle\t\tDebian GNU/Linux - ${LABEL}"
+ LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${APPEND} --"
+ LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}"
+}
+
case "${LH_INITRAMFS}" in
casper)
INITFS="casper"
@@ -95,25 +125,7 @@ case "${LIVE_BINARY_IMAGES}" in
;;
esac
-# Temporary check for broken syslinux
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assemble multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
- DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
- ;;
-
- i386)
- DESTDIR_LIVE="${DESTDIR_LIVE}.386"
- DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
- ;;
- esac
- fi
-fi
+Check_multiarchitecture
# Creating directory
mkdir -p "${DESTDIR_LIVE}"
@@ -150,7 +162,7 @@ then
live-initramfs)
if [ "${LIVE_HOSTNAME}" != "debian" ]
then
- LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} username=${LIVE_HOSTNAME}"
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} hostname=${LIVE_HOSTNAME}"
fi
;;
esac
@@ -167,51 +179,56 @@ LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
# Assembling kernel configuration
+
+# Default entries
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-//'`"
-LINUX="title\t\tDebian GNU/Linux - live\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=${INITFS} LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
-LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live (fail-safe mode)\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
+Grub_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
+Grub_live_entry "live (fail-safe mode)" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
-if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
-then
- for KERNEL in chroot/boot/vmlinuz*
- do
- if [ -z "${LINUX}" ]
- then
- LINUX="title\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (fail-safe mode)\nkernel\t\t/`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
- else
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (fail-safe mode)\nkernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}` boot=${INITFS} LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
- fi
- done
-fi
+for KERNEL in chroot/boot/vmlinuz-*
+do
+ VERSION="`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
-LINUX="`echo ${LINUX} | sed -e 's#//#/#g'`"
+ Grub_live_entry "live, kernel ${VERSION}" "`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`" "`basename ${DESTDIR_LIVE}`/initrd.img-${VERSION}"
+ Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`" "`basename ${DESTDIR_LIVE}`/initrd.img-${VERSION}" "${FAILSAFE}"
+done
+
+LINUX_LIVE="`echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`"
# Assembling debian-installer configuration
if [ "${LIVE_DEBIAN_INSTALLER}" != "disabled" ]
then
- LINUX="title\t\tLive:\nroot\n\n${LINUX}"
-
- LIVE_LINUX_INSTALL="title\t\tInstaller:\nroot"
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - install\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz vga=normal --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - installgui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz video=vesa:ywrap,mtrr vga=788 --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
-
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - expert\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz priority=low vga=normal --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - expertgui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz priority=low video=vesa:ywrap,mtrr vga=788\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
-
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - rescue\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz vga=normal rescue/enable=true --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - rescuegui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz video=vesa:ywrap,mtrr vga=788 rescue/enable=true --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
-
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - auto\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz auto=true priority=critical vga=normal --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/initrd.gz"
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\ntitle\t\tDebian GNU/Linux - autogui\nkernel\t\t/`basename ${DESTDIR_INSTALL}`/vmlinuz auto=true priority=critical video=vesa:ywrap,mtrr vga=788 --\ninitrd\t\t/`basename ${DESTDIR_INSTALL}`/gtk/initrd.gz"
+ LINUX_LIVE="title\t\tLive:\nroot\n\n${LINUX_LIVE}"
+ LINUX_INSTALL="title\t\tInstaller:\nroot"
+
+ VMLINUZ_DI="vmlinuz"
+ INITRD_DI="initrd.gz"
+ APPEND_DI="vga=normal"
+
+ VMLINUZ_GI="gtk/vmlinuz"
+ INITRD_GI="gtk/initrd.gz"
+ APPEND_GI="video=vesa:ywrap,mtrr vga=788"
+
+ Grub_install_entry "install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
+ Grub_install_entry "installgui" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
+ Grub_install_entry "expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
+ Grub_install_entry "expertgui" "${VMLINUZ_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
+ Grub_install_entry "rescue" "${VMLINUZ_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
+ Grub_install_entry "rescuegui" "${VMLINUZ_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
+ Grub_install_entry "auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
+ Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi
+LINUX_INSTALL="`echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
+
# Assembling memtest configuration
if [ -f "${DESTDIR_LIVE}"/memtest ]
then
- MEMTEST="title\t\t${LIVE_MEMTEST}\nkernel\t\t/`basename ${DESTDIR_LIVE}`/memtest"
+ MEMTEST="title\t\tOther:\nroot"
+ MEMTEST="${MEMTEST}\n\ntitle\t\t${LIVE_MEMTEST}\nkernel\t\t/`basename ${DESTDIR_LIVE}`/memtest"
MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
fi
@@ -219,7 +236,7 @@ fi
mkdir -p binary/boot/grub
cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
-# Copyring grub
+# Copying grub
case ${LIVE_BINARY_IMAGES} in
iso)
cp chroot/usr/lib/grub/*/stage2_eltorito binary/boot/grub
@@ -230,10 +247,19 @@ case ${LIVE_BINARY_IMAGES} in
;;
esac
+# Copying local configuration file
+if [ -f config/binary_grub/menu.lst ]
+then
+ cp config/binary_grub/menu.lst binary/boot/grub/menu.lst
+fi
+
# Copying splash screen
if [ -f config/binary_grub/splash.xpm.gz ]
then
LIVE_GRUB_SPLASH="config/binary_grub/splash.xpm.gz"
+elif [ -f config/binary_grub/splash.xpm ]
+then
+ LIVE_GRUB_SPLASH="config/binary_grub/splash.xpm"
fi
if [ -n "${LIVE_GRUB_SPLASH}" ]
@@ -247,22 +273,16 @@ then
sed -i -e "s/splashimage.*//" binary/boot/grub/menu.lst
else
# Overwriting splash file
- cp -f "${LIVE_GRUB_SPLASH}" binary/boot/grub/splash.xpm.gz
+ cp -f "${LIVE_GRUB_SPLASH}" binary/boot/grub
+ sed -i -e "s#splashimage.*#splashimage /boot/grub/`basename ${LIVE_GRUB_SPLASH}`#" binary/boot/grub/menu.lst
fi
fi
-# Configure grub templates
-cat >> binary/boot/grub/menu.lst << EOF
-
-title Other:
-root
-
-LIVE_MEMTEST
-EOF
-
-sed -i -e "s#LIVE_LINUX_LIVE#${LINUX}#" -e "s#LIVE_LINUX_INSTALL#${LIVE_LINUX_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
+sed -i -e "s#LINUX_LIVE#${LINUX_LIVE}#" -e "s#LINUX_INSTALL#${LINUX_INSTALL}#" -e "s#MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
+sed -i -e 's/\ $//g' binary/boot/grub/menu.lst
+
# Removing depends
Remove_package
diff --git a/helpers/lh_binary_hacks b/helpers/lh_binary_hacks
deleted file mode 100755
index 04759dbce..000000000
--- a/helpers/lh_binary_hacks
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-# lh_binary_hacks(1) - execute hacks in binary
-# Copyright (C) 2006-2007 Daniel Baumann <daniel@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/parameters.txt
-fi
-
-# Creating stage file
-Create_stagefile .stage/binary_hacks
diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes
index 666069933..14d1206e8 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -116,7 +116,6 @@ then
cp -r ${CP_OPTIONS} "${LIVE_INCLUDES}"/"${LIVE_DISTRIBUTION}"/live."${ARCH}"/* binary
fi
-
if [ "${LIVE_DEBIAN_INSTALLER}" != "disabled" ]
then
# Copying install templates
@@ -161,5 +160,13 @@ then
sed -i -e "s#DEBIAN_NAME#${DEBIAN_NAME}#g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s#DEBIAN_TOOLS#${DEBIAN_TOOLS_TXT}#g" binary/README.txt
fi
+# Cleaning up includes
+if [ -e binary/parameters.txt.${LH_INITRAMFS} ]
+then
+ mv binary/parameters.txt.${LH_INITRAMFS} binary/parameters.txt
+fi
+
+rm -f binary/parameters.txt.*
+
# Creating stage file
Create_stagefile .stage/binary_includes
diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso
index ce17db709..f57b4e511 100755
--- a/helpers/lh_binary_iso
+++ b/helpers/lh_binary_iso
@@ -114,7 +114,7 @@ case "${LIVE_BOOTLOADER}" in
;;
yaboot)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} --iso-level 2 --netatalk -hfs -probe -map yaboot/hfs.map --chrp-boot -part -no-desktop -hfs-bless binary/yaboot -hfs-volid Debian/Live_powerpc"
+ GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r --iso-level 2 --netatalk -hfs -probe -map binary/yaboot/hfs.map --chrp-boot -part -no-desktop -hfs-bless binary/yaboot -hfs-volid Debian/Live_powerpc"
if [ "${LIVE_PACKAGES_LISTS}" = "mini" ] || [ "${LIVE_PACKAGES_LISTS}" = "minimal" ]
then
diff --git a/helpers/lh_binary_linux-image b/helpers/lh_binary_linux-image
index 153e476e3..b4cee2eb6 100755
--- a/helpers/lh_binary_linux-image
+++ b/helpers/lh_binary_linux-image
@@ -46,9 +46,6 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-# Removing initrd backup files
-rm -f chroot/boot/initrd*bak*
-
# Setting destination directory
case "${LIVE_BINARY_IMAGES}" in
iso)
@@ -92,34 +89,14 @@ case "${LIVE_ARCHITECTURE}" in
;;
esac
-# Temporary check for broken syslinux
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assemble multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- DESTDIR="${DESTDIR}.amd"
- ;;
-
- i386)
- DESTDIR="${DESTDIR}.386"
- ;;
-
- powerpc)
- DESTDIR="${DESTDIR}.ppc"
- ;;
- esac
- fi
-fi
+Check_multiarchitecture
# Creating directory
mkdir -p "${DESTDIR}"
# Installing linux-image
-cp chroot/boot/"${LINUX}"* "${DESTDIR}"
-cp chroot/boot/initrd.img* "${DESTDIR}"
+cp chroot/boot/"${LINUX}"-* "${DESTDIR}"
+cp chroot/boot/initrd.img-* "${DESTDIR}"
# Creating stage file
Create_stagefile .stage/binary_linux-image
diff --git a/helpers/lh_binary_memtest b/helpers/lh_binary_memtest
index 2d413fdc1..97fa8aba4 100755
--- a/helpers/lh_binary_memtest
+++ b/helpers/lh_binary_memtest
@@ -108,23 +108,7 @@ case "${LIVE_BINARY_IMAGES}" in
;;
esac
-# Temporary check for broken syslinux
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assemble multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- DESTDIR="${DESTDIR}.amd"
- ;;
-
- i386)
- DESTDIR="${DESTDIR}.386"
- ;;
- esac
- fi
-fi
+Check_multiarchitecture
# Creating directory
mkdir -p "${DESTDIR}"
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 6f31f4eab..148a5fe1e 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -151,9 +151,9 @@ case "${LIVE_CHROOT_FILESYSTEM}" in
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -info"
fi
- if [ "${LIVE_PACKAGES_LISTS}" != "minimal" ] && [ "${LIVE_PACKAGES_LISTS}" != "mini" ]
+ 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*"
+ MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e `ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's,chroot/,,g'`"
fi
if [ -f config/binary_rootfs/squashfs.sort ]
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index bfd0c0fc5..8f8629f8b 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -63,7 +63,7 @@ Check_package chroot/usr/bin/syslinux syslinux
# Installing depends
Install_package
-# Local methods
+# Local functions
Syslinux_live_entry ()
{
LABEL="${1}"
@@ -71,17 +71,17 @@ Syslinux_live_entry ()
INITRD="${3}"
APPEND="${4}"
- # pxelinux and syslinux << 3.36 lacks support to file/path
- if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "${DIRECTORY}" != "binary" ]
+ # syslinux << 3.36 lacks support to file/path
+ if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "`basename ${DESTDIR_LIVE}`" != "binary" ]
then
- DIRECTORY="/`basename ${DESTDIR_LIVE}`"
+ DIRECTORY="`basename ${DESTDIR_LIVE}`"
KERNEL="${DIRECTORY}/${KERNEL}"
INITRD="${DIRECTORY}/${INITRD}"
fi
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"
+ LINUX_LIVE="${LINUX_LIVE}\tkernel /${KERNEL}\n"
+ LINUX_LIVE="${LINUX_LIVE}\tappend initrd=/${INITRD} boot=${INITFS} LIVE_BOOTAPPEND ${APPEND}\n"
}
Syslinux_install_entry ()
@@ -91,17 +91,23 @@ Syslinux_install_entry ()
INITRD="${3}"
APPEND="${4}"
- # pxelinux and syslinux << 3.36 lacks support to file/path
- if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "${DIRECTORY}" != "binary" ]
+ # syslinux << 3.36 lacks support to file/path
+ if [ "${LIVE_BINARY_IMAGES}" != "net" ] && [ "`basename ${DESTDIR_INSTALL}`" != "binary" ]
then
- DIRECTORY="/`basename ${DESTDIR_INSTALL}`"
+ DIRECTORY="`basename ${DESTDIR_INSTALL}`"
KERNEL="${DIRECTORY}/${KERNEL}"
INITRD="${DIRECTORY}/${INITRD}"
fi
+ # Boot in quiet mode
+ if [ "${LIVE_DISTRIBUTION}" != "etch" ] && [ "${LABEL}" != "rescue" ] && [ "${LABEL}" != "rescuegui" ]
+ then
+ APPEND="${APPEND} quiet"
+ fi
+
LINUX_INSTALL="${LINUX_INSTALL}\nLABEL ${LABEL}\n"
- LINUX_INSTALL="${LINUX_INSTALL}\tkernel ${KERNEL}\n"
- LINUX_INSTALL="${LINUX_INSTALL}\tappend initrd=${INITRD} ${APPEND} --\n"
+ LINUX_INSTALL="${LINUX_INSTALL}\tkernel /${KERNEL}\n"
+ LINUX_INSTALL="${LINUX_INSTALL}\tappend initrd=/${INITRD} ${APPEND} --\n"
}
case "${LH_INITRAMFS}" in
@@ -148,7 +154,7 @@ case "${LIVE_BINARY_IMAGES}" in
DESTDIR_INSTALL="binary/install"
- # Workaround for syslinux (<< 3.36) which doesn't support long file/path names
+ # syslinux << 3.36 lacks support for long file/path
if [ "${LIVE_DISTRIBUTION}" = "etch" ]
then
DESTDIR_LIVE="binary"
@@ -157,25 +163,7 @@ case "${LIVE_BINARY_IMAGES}" in
;;
esac
-# Temporary check for broken syslinux
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assembling multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- amd64)
- DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
- DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
- ;;
-
- i386)
- DESTDIR_LIVE="${DESTDIR_LIVE}.386"
- DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
- ;;
- esac
- fi
-fi
+Check_multiarchitecture
# Creating directory
mkdir -p "${DESTDIR_LIVE}"
@@ -223,6 +211,29 @@ then
LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} union=${LIVE_UNION_FILESYSTEM}"
fi
+if [ "${LIVE_BINARY_IMAGES}" = "net" ]
+then
+ case "${LIVE_NET_FILESYSTEM}" in
+ nfs)
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} netboot=nfs nfsroot=LIVE_NET_SERVER:LIVE_NET_PATH"
+ ;;
+
+ cifs)
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} netboot=cifs nfsroot=//LIVE_NET_SERVERLIVE_NET_PATH"
+ ;;
+
+ *)
+ Echo_error "Unsupported net filesystem"
+ exit 1
+ ;;
+ esac
+
+ if [ -n "${LIVE_NET_MOUNTOPTIONS}" ]
+ then
+ LIVE_BOOTAPPEND="${LIVE_BOOTAPPEND} nfsopts=${LIVE_NET_MOUNTOPTIONS}"
+ fi
+fi
+
LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
@@ -240,7 +251,7 @@ Syslinux_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${F
if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
then
- for KERNEL in chroot/boot/vmlinuz*
+ for KERNEL in chroot/boot/vmlinuz-*
do
KERNEL_IMAGE="`basename ${KERNEL}`"
KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//'`"
@@ -284,8 +295,8 @@ then
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 "auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
+ Syslinux_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi
LINUX_INSTALL="`echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
@@ -295,13 +306,13 @@ 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" ]
+ # syslinux << 3.36 lacks support to file/path
+ if [ "`basename ${DESTDIR_LIVE}`" = "binary" ]
then
KERNEL_PATH=""
fi
- MEMTEST="LABEL ${KERNEL_PATH}memtest\n\tkernel memtest"
+ MEMTEST="LABEL memtest\n\tkernel ${KERNEL_PATH}memtest"
MEMTEST="`echo ${MEMTEST} | sed -e 's#//#/#g'`"
fi
@@ -311,6 +322,13 @@ case "${LIVE_BINARY_IMAGES}" in
mkdir -p binary/isolinux
cp chroot/usr/lib/syslinux/isolinux.bin binary/isolinux
cp -r "${LIVE_TEMPLATES}"/syslinux/* binary/isolinux
+ mv binary/isolinux/syslinux.cfg binary/isolinux/isolinux.cfg
+
+ # Copying local configuration file
+ if [ -f config/binary_syslinux/syslinux.cfg ]
+ then
+ cp config/binary_syslinux/syslinux.cfg binary/isolinux/isolinux.cfg
+ fi
# Copying splash screen
if [ -f config/binary_syslinux/splash.rle ]
@@ -335,9 +353,6 @@ case "${LIVE_BINARY_IMAGES}" in
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
- # Remove unused files
- rm -f binary/isolinux/pxelinux.cfg
-
# Working arround syslinux 8.3 limitation
if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
then
@@ -366,12 +381,17 @@ case "${LIVE_BINARY_IMAGES}" in
net)
# Copying syslinux
cp chroot/usr/lib/syslinux/pxelinux.0 tftpboot
-
- # Install syslinux templates
mkdir -p tftpboot/pxelinux.cfg
cp -r "${LIVE_TEMPLATES}"/syslinux/* tftpboot/pxelinux.cfg
- mv tftpboot/pxelinux.cfg/pxelinux.cfg tftpboot/pxelinux.cfg/default
- sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/boot.txt
+ mv tftpboot/pxelinux.cfg/syslinux.cfg tftpboot/pxelinux.cfg/default
+
+ # Copying local configuration file
+ if [ -f config/binary_syslinux/syslinux.cfg ]
+ then
+ cp config/binary_syslinux/syslinux.cfg tftpboot/pxelinux.cfg/default
+ fi
+
+ #sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/boot.txt
# Copying splash screen
if [ -f config/binary_syslinux/splash.rle ]
@@ -392,34 +412,20 @@ case "${LIVE_BINARY_IMAGES}" in
# Configure syslinux templates
sed -i -e "s@LINUX_LIVE@${LINUX_LIVE}@" -e "s@LINUX_INSTALL@${LINUX_INSTALL}@" -e "s@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_BOOTAPPEND#${LIVE_BOOTAPPEND}#" -e "s/LIVE_NET_SERVER/${LIVE_NET_SERVER}/" -e "s#LIVE_NET_PATH#${LIVE_NET_PATH}#" 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
- # Remove unused files
- rm -f tftpboot/pxelinux.cfg/isolinux.cfg
-
# Working arround syslinux 8.3 limitation
- if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
+ if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -eq "1" ]
then
- NUMBER="0"
-
- for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
- do
- 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
- 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
+ sed -i -e "s/vmlinuz-.*-${LIVE_LINUX_FLAVOURS}/vmlinuz/g" -e "s/initrd.img-.*-${LIVE_LINUX_FLAVOURS}/initrd.img/g" tftpboot/pxelinux.cfg/default
fi
# Remove whitespaces
- sed -i -e 's/\ $//g' binary/isolinux/isolinux.cfg
+ sed -i -e 's/\ $//g' tftpboot/pxelinux.cfg/default
;;
tar|usb-hdd)
@@ -435,7 +441,12 @@ case "${LIVE_BINARY_IMAGES}" in
mkdir -p "${DESTDIR}"
cp chroot/usr/lib/syslinux/isolinux.bin "${DESTDIR}"/syslinux.bin
cp -r "${LIVE_TEMPLATES}"/syslinux/* "${DESTDIR}"
- mv "${DESTDIR}"/isolinux.cfg "${DESTDIR}"/syslinux.cfg
+
+ # Copying local configuration file
+ if [ -f config/binary_syslinux/syslinux.cfg ]
+ then
+ cp config/binary_syslinux/syslinux.cfg "${DESTDIR}"/syslinux.cfg
+ fi
# Copying splash screen
if [ -f config/binary_syslinux/splash.rle ]
@@ -460,9 +471,6 @@ case "${LIVE_BINARY_IMAGES}" in
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${DESTDIR}"/f1.txt
sed -i -e "s/LIVE_VERSION/${VERSION}/" "${DESTDIR}"/f10.txt
- # Remove unused files
- rm -f "${DESTDIR}"/pxelinux.cfg
-
# 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
diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot
index 45090da17..00bc15f2d 100755
--- a/helpers/lh_binary_yaboot
+++ b/helpers/lh_binary_yaboot
@@ -63,6 +63,44 @@ Check_package chroot/usr/lib/yaboot/yaboot yaboot
# Installing depends
Install_package
+# Local functions
+Yaboot_live_entry ()
+{
+ LABEL="${1}"
+ KERNEL="${2}"
+ INITRD="${3}"
+ APPEND="${4}"
+
+ DIRECTORY="/`basename ${DESTDIR_LIVE}`"
+
+ LINUX_LIVE="${LINUX_LIVE}\nimage=${DIRECTORY}/${KERNEL}\n"
+ LINUX_LIVE="${LINUX_LIVE}\tlabel=${LABEL}\n"
+ LINUX_LIVE="${LINUX_LIVE}\tinitrd=${DIRECTORY}/${INITRD}\n"
+ LINUX_LIVE="${LINUX_LIVE}\tappend=\"boot=${INITFS} LIVE_BOOTAPPEND ${APPEND}\"\n"
+ LINUX_LIVE="${LINUX_LIVE}\tinitrd-size=10240\n"
+}
+
+Yaboot_install_entry ()
+{
+ LABEL="${1}"
+ KERNEL="${2}"
+ INITRD="${3}"
+ APPEND="${4}"
+
+ DIRECTORY="/`basename ${DESTDIR_LIVE}`"
+
+ if [ "${LIVE_DISTRIBUTION}" != "etch" ] && [ "${LABEL}" != "rescue" ] && [ "${LABEL}" != "rescuegui" ]
+ then
+ APPEND="${APPEND} quiet"
+ fi
+
+ LINUX_INSTALL="${LINUX_INSTALL}\nimage=${DIRECTORY}/${KERNEL}\n"
+ LINUX_INSTALL="${LINUX_INSTALL}\tlabel=${LABEL}\n"
+ LINUX_INSTALL="${LINUX_INSTALL}\tinitrd=${DIRECTORY}/${INITRD}\n"
+ LINUX_INSTALL="${LINUX_INSTALL}\tappend=\"LIVE_BOOTAPPEND ${APPEND} --\"\n"
+ LINUX_INSTALL="${LINUX_INSTALL}\tinitrd-size=10240\n"
+}
+
case "${LH_INITRAMFS}" in
casper)
INITFS="casper"
@@ -76,29 +114,26 @@ esac
# 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"
;;
net|tar|usb-hdd)
- Echo_error "not supported, FIXME"
+ Echo_error "not yet supported, aborting (FIXME)."
+ exit 1
;;
esac
-# Temporary check for broken syslinux FIXME
-if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
-then
- # Assembling multi-arch
- if [ -n "${MULTIARCH}" ]
- then
- case "${LIVE_ARCHITECTURE}" in
- powerpc)
- DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
- DESTDIR_INSTALL="${DESTDIR_INSTALL}.ppc"
- ;;
- esac
- fi
-fi
+Check_multiarchitecture
# Creating directory
mkdir -p "${DESTDIR_LIVE}"
@@ -149,79 +184,74 @@ fi
LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
-FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" # FIXME
+FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly"
# Assembling kernel configuration
-if [ "${LIVE_BINARY_IMAGES}" != "net" ]
-then
- DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
- LINUX="image=/`basename ${DESTDIR_LIVE}`/`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR}`\n\tinitrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinux-//'`\n\tlabel=live\n\tappend=\"boot=${INITFS} LIVE_BOOTAPPEND\"\n\tinitrd-size=1048576\n\tread-only"
-else
- DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
- LINUX="image=`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR}`\n\tinitrd=initrd.img-`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinux-//'`\n\tlabel=live\n\tappend=\"boot=${INITFS} LIVE_BOOTAPPEND\"\n\tinitrd-size=1048576\n\tread-only"
-fi
-# FIXME
+# Default entries
+DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
+DEFAULT_KERNEL="`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR}`"
+DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinux-//'`"
+
+Yaboot_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
+Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
+
if [ "`echo ${LIVE_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
then
- for KERNEL in chroot/boot/vmlinux*
+ for KERNEL in chroot/boot/vmlinux-*
do
- if [ -z "${LINUX}" ]
- then
- if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
- then
- LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinux-//'`\n kernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinux-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- else
- LINUX="label LIVE-`basename ${KERNEL} | sed -e 's/vmlinux-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinux-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- fi
- else
- if [ "${LIVE_BINARY_IMAGES}" = "iso" ]
- then
- LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinux-//'`\n kernel /`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`\n append initrd=/`basename ${DESTDIR_LIVE}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinux-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- else
- LINUX="${LINUX}\nlabel LIVE-`basename ${KERNEL} | sed -e 's/vmlinux-//'`\n kernel `basename ${KERNEL}`\n append initrd=initrd.img-`basename ${KERNEL} | sed -e 's/vmlinux-//'` boot=${INITFS} LIVE_BOOTAPPEND"
- fi
- fi
+ KERNEL_IMAGE="`basename ${KERNEL}`"
+ KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinux-//'`"
+ INITRD="initrd.img-${KERNEL_VERSION}"
+
+ Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
+ Yaboot_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/binary//g' -e 's#//#/#g'`"
# Assembling debian-installer configuration
if [ "${LIVE_DEBIAN_INSTALLER}" != "disabled" ]
then
VMLINUZ_DI="vmlinuz"
INITRD_DI="initrd.gz"
+ APPEND_DI="vga=normal"
VMLINUZ_GI="gtk/vmlinuz"
INITRD_GI="gtk/initrd.gz"
-
- LIVE_LINUX_INSTALL="LABEL install\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_DI}\n\tappend vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_DI} -- "
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL linux\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_DI}\n\tappend vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_DI} -- "
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL installgui\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_GI}\n\tappend video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_GI} -- "
-
- LIVE_KENREL_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL expert\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_DI}\n\tappend priority=low vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_DI} -- "
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL expertgui\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_GI}\n\tappend priority=low video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_GI} -- "
-
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL rescue\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_DI}\n\tappend vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_DI} rescue/enable=true -- "
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL rescuegui\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_GI}\n\tappend video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_GI} rescue/enable=true -- "
-
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL auto\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_DI}\n\tappend auto=true priority=critical vga=normal initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_DI} -- "
- LIVE_LINUX_INSTALL="${LIVE_LINUX_INSTALL}\n\nLABEL autogui\n\tkernel /`basename ${DESTDIR_INSTALL}`/${VMLINUZ_GI}\n\tappend auto=true priority=critical video=vesa:ywrap,mtrr vga=788 initrd=/`basename ${DESTDIR_INSTALL}`/${INITRD_GI} -- "
+ APPEND_GI="video=vesa:ywrap,mtrr vga=788"
+
+ Yaboot_install_entry "linux" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
+ Yaboot_install_entry "install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
+ Yaboot_install_entry "installgui" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
+ Yaboot_install_entry "expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
+ Yaboot_install_entry "expertgui" "${VMLINUZ_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
+ Yaboot_install_entry "rescue" "${VMLINUZ_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
+ Yaboot_install_entry "rescuegui" "${VMLINUZ_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
+ Yaboot_install_entry "auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
+ Yaboot_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${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'`"
case "${LIVE_BINARY_IMAGES}" in
- iso)
+ iso|usb-hdd)
# Copying yaboot
mkdir -p binary/yaboot
cp chroot/usr/lib/yaboot/yaboot binary/yaboot
cp -r "${LIVE_TEMPLATES}"/yaboot/* binary/yaboot
+ if [ "${LIVE_BINARY_IMAGES}" = "usb-hdd" ]
+ then
+ mv binary/yaboot/yaboot.conf binary/yaboot/yaboot.conf.tmp
+ echo "root=/dev/ram" > binary/yaboot/yaboot.conf
+ cat binary/yaboot/yaboot.conf.tmp >> binary/yaboot/yaboot.conf
+ rm -f binary/yaboot/yaboot.conf.tmp
+ fi
+
# Configure yaboot templates
- sed -i -e "s#LIVE_LINUX_LIVE#${LINUX}#" -e "s#LIVE_LINUX_INSTALL#${LIVE_LINUX_INSTALL}#" binary/yaboot/yaboot.conf
+ sed -i -e "s#LINUX_LIVE#${LINUX_LIVE}#" -e "s#LINUX_INSTALL#${LINUX_INSTALL}#" binary/yaboot/yaboot.conf
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/yaboot/yaboot.conf
sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" -e "s/LIVE_VERSION/${VERSION}/" binary/yaboot/boot.msg
;;
diff --git a/helpers/lh_chroot b/helpers/lh_chroot
index 075e0e6dc..7a12d9e71 100755
--- a/helpers/lh_chroot
+++ b/helpers/lh_chroot
@@ -37,7 +37,7 @@ lh_chroot_cache restore ${*}
lh_chroot_proc install ${*}
lh_chroot_sysfs install ${*}
lh_chroot_debianchroot install ${*}
-lh_chroot_sysvrc install ${*}
+lh_chroot_sysv-rc install ${*}
lh_chroot_hosts install ${*}
lh_chroot_resolv install ${*}
lh_chroot_hostname install ${*}
@@ -68,7 +68,7 @@ lh_chroot_apt remove ${*}
lh_chroot_hostname remove ${*}
lh_chroot_resolv remove ${*}
lh_chroot_hosts remove ${*}
-lh_chroot_sysvrc remove ${*}
+lh_chroot_sysv-rc remove ${*}
lh_chroot_debianchroot remove ${*}
lh_chroot_sysfs remove ${*}
lh_chroot_proc remove ${*}
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index 5a5e65056..38bcbbad4 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -83,10 +83,32 @@ esac
# Update initramfs
Chroot "update-initramfs -k all -t -u"
+# Remove build systems clock drift
+echo "0.0 0 0.0" > chroot/etc/adjtime
+
+# Remove generated xorg.conf based on build systems configuration
+rm -f chroot/etc/X11/xorg.conf
+
+# Touch resolv.conf
+touch chroot/etc/resolv.conf
+
+# Remove cruft
+rm -f chroot/boot/initrd*bak*
+rm -f /etc/apt/trusted.gpg~
+rm -f chroot/etc/group- chroot/etc/passwd-
+rm -f chroot/etc/gshadow- chroot/etc/shadow-
+rm -f chroot/var/cache/debconf/*-old
+rm -f chroot/var/lib/dpkg/*-old
+
if [ -n "${LH_ROOT_COMMAND}" ]
then
${LH_ROOT_COMMAND} chown -R --quiet `whoami`:`whoami` chroot
fi
+if [ -d chroot/home/${LIVE_USERNAME} ]
+then
+ chown -R --quiet 999:999 chroot/home/${LIVE_USERNAME}
+fi
+
# Creating stage file
Create_stagefile .stage/chroot_hacks
diff --git a/helpers/lh_chroot_linux-image b/helpers/lh_chroot_linux-image
index 92e5eb5ca..c00d4c53b 100755
--- a/helpers/lh_chroot_linux-image
+++ b/helpers/lh_chroot_linux-image
@@ -64,6 +64,12 @@ do_initrd = Yes
warn_initrd = No
EOF
+ # Diverting update-initramfs
+ #if [ "${LH_INITRAMFS}" = "live-initramfs" ]
+ #then
+ # mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-helper
+ #fi
+
if [ "${LIVE_LINUX_PACKAGES}" != "none" ]
then
for FLAVOUR in ${LIVE_LINUX_FLAVOURS}
diff --git a/helpers/lh_chroot_local-packageslists b/helpers/lh_chroot_local-packageslists
index 3e814f674..dcebd7c7d 100755
--- a/helpers/lh_chroot_local-packageslists
+++ b/helpers/lh_chroot_local-packageslists
@@ -55,7 +55,7 @@ then
do
# Generate package list
Expand_packagelist "`basename ${PACKAGESLIST}`" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper/lists}/lists" > chroot/root/"`basename ${PACKAGESLIST}`"
-
+
# Installing package list
case "${LH_APT}" in
apt|apt-get)
diff --git a/helpers/lh_chroot_localization b/helpers/lh_chroot_localization
index 1741b589a..c31072f5b 100755
--- a/helpers/lh_chroot_localization
+++ b/helpers/lh_chroot_localization
@@ -611,7 +611,7 @@ then
# Setting packages
for LOCALIZATION in ${LOCALIZATIONS}
do
- case "${LOCALZATION}" in
+ case "${LOCALIZATION}" in
iceape)
Check_package chroot/usr/bin/iceape iceweasel-l10n-"${ICEAPE}"
;;
@@ -638,6 +638,9 @@ then
esac
done
+ Check_package chroot/usr/bin/gwenview gwenview-i18n
+ Check_package chroot/usr/bin/k3b k3b-i18n
+
# Restoring cache
Restore_cache cache/packages_localization
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index b8c9371e8..f4b14f597 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -295,12 +295,6 @@ case "${1}" in
rm -rf chroot/var/cache/apt
mkdir -p chroot/var/cache/apt/archives/partial
- # Removing old files
- rm -f chroot/var/lib/dpkg/available-old
- rm -f chroot/var/lib/dpkg/diversions-old
- rm -f chroot/var/lib/dpkg/statoverride-old
- rm -f chroot/var/lib/dpkg/status-old
-
# Removing stage file
rm -f .stage/chroot_sources
;;
diff --git a/helpers/lh_chroot_sysvrc b/helpers/lh_chroot_sysv-rc
index ed365b9eb..d77306a9c 100755
--- a/helpers/lh_chroot_sysvrc
+++ b/helpers/lh_chroot_sysv-rc
@@ -1,6 +1,6 @@
#!/bin/sh
-# lh_chroot_sysvrc(1) - manage /usr/sbin/policy-rc.d
+# lh_chroot_sysv-rc(1) - manage /usr/sbin/policy-rc.d
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -40,7 +40,7 @@ case "${1}" in
Echo_message "Configuring file /usr/sbin/policy-rc.d"
# Checking stage file
- Check_stagefile .stage/chroot_sysvrc
+ Check_stagefile .stage/chroot_sysv-rc
# Checking lock file
Check_lockfile .lock
@@ -67,7 +67,7 @@ EOF
chmod 0755 chroot/usr/sbin/policy-rc.d
# Creating stage file
- Create_stagefile .stage/chroot_sysvrc
+ Create_stagefile .stage/chroot_sysv-rc
;;
remove)
@@ -89,7 +89,7 @@ EOF
fi
# Removing stage file
- rm -f .stage/chroot_sysvrc
+ rm -f .stage/chroot_sysv-rc
;;
*)
diff --git a/helpers/lh_config b/helpers/lh_config
index 59d1ae64d..c9dc615cc 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -357,6 +357,14 @@ LIVE_ISO_VOLUME="${LIVE_ISO_VOLUME}"
# (Default: ${LIVE_MEMTEST})
LIVE_MEMTEST="${LIVE_MEMTEST}"
+# \$LIVE_NET_FILESYSTEM: set netboot filesystem
+# (Default: ${LIVE_NET_FILESYSTEM})
+LIVE_NET_FILESYSTEM="${LIVE_NET_FILESYSTEM}"
+
+# \$LIVE_NET_MOUNTOPTIONS: set nfsopts
+# (Default: empty)
+LIVE_NET_MOUNTOPTIONS="${LIVE_NET_MOUNTOPTIONS}"
+
# \$LIVE_NET_PATH: set netboot server directory
# (Default: ${LIVE_NET_PATH})
LIVE_NET_PATH="${LIVE_NET_PATH}"
diff --git a/helpers/make-live b/helpers/make-live
index 40b2617eb..08133e779 100755
--- a/helpers/make-live
+++ b/helpers/make-live
@@ -190,7 +190,7 @@ Local_arguments ()
;;
--keyring-packages)
- LIVE_KEYRING_PACKAGS="${2}"; shift 2
+ LIVE_KEYRING_PACKAGES="${2}"; shift 2
;;
--hooks)