Commit 3c998422 authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 4.0~a6.

parent bfeee4e6
......@@ -22,8 +22,8 @@ fi
_HOSTNAME="$(hostname -f)"
# Turn on debug if enabled
if [ "${_DEBUG}" = "enabled" ]
# Turn on debug if true
if [ "${_DEBUG}" = "true" ]
then
set -x
fi
......@@ -67,12 +67,12 @@ else
_LB_CONFIG=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])config=[-a-z]+' | cut -f 2 -d '=' | head -n1)
# Standard options
LB_BINARY_IMAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_images=[-a-z]+' | cut -f 2 -d '=' | head -n1)
LIVE_IMAGE_TYPE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_images=[-a-z]+' | cut -f 2 -d '=' | head -n1)
LB_DISTRIBUTION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Advanced bootstrap options
LB_ARCHITECTURES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])architectures=[0-9a-z]+' | cut -f 2 -d '=' | head -n1)
LB_ARCHIVE_AREAS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])archive_areas=[a-z]+' | cut -f 2 -d '=' | head -n1)
LIVE_IMAGE_ARCHITECTURE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])architectures=[0-9a-z]+' | cut -f 2 -d '=' | head -n1)
LIVE_IMAGE_ARCHIVE_AREAS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])archive_areas=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Advanced chroot options
LB_CHROOT_FILESYSTEM=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])chroot_filesystem=[0-9a-z]+' | cut -f 2 -d '=' | head -n1)
......@@ -123,12 +123,12 @@ else
sed -e "s/BUILD/${_BUILD}/g" \
-e "s/EMAIL/${_EMAIL}/" \
-e "s/QUEUENUM/${_QUEUENUM}/" \
-e "s/LB_BINARY_IMAGES/${LB_BINARY_IMAGES}/" \
-e "s/LIVE_IMAGE_TYPE/${LIVE_IMAGE_TYPE}/" \
-e "s/LB_DISTRIBUTION/${LB_DISTRIBUTION}/" \
-e "s#_LB_CONFIG#${_LB_CONFIG}#" \
-e "s/_LB_CGIPACKAGES/${_LB_CGIPACKAGES}/" \
-e "s/LB_ARCHITECTURES/${LB_ARCHITECTURES}/" \
-e "s/LB_ARCHIVE_AREAS/${LB_ARCHIVE_AREAS}/" \
-e "s/LIVE_IMAGE_ARCHITECTURE/${LIVE_IMAGE_ARCHITECTURE}/" \
-e "s/LIVE_IMAGE_ARCHIVE_AREAS/${LIVE_IMAGE_ARCHIVE_AREAS}/" \
-e "s/LB_CHROOT_FILESYSTEM/${LB_CHROOT_FILESYSTEM}/" \
-e "s/LB_LINUX_FLAVOURS/${LB_LINUX_FLAVOURS}/" \
-e "s/LB_SECURITY/${LB_SECURITY}/" \
......@@ -169,12 +169,12 @@ _LB_CGIPACKAGES="${_LB_CGIPACKAGES}"
_LB_CONFIG="${_LB_CONFIG}"
# Standard options
LB_BINARY_IMAGES="${LB_BINARY_IMAGES}"
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE}"
LB_DISTRIBUTION="${LB_DISTRIBUTION}"
# Advanced bootstrap options
LB_ARCHITECTURES="${LB_ARCHITECTURES}"
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
LIVE_IMAGE_ARCHITECTURE="${LIVE_IMAGE_ARCHITECTURE}"
LIVE_IMAGE_ARCHIVE_AREAS="${LIVE_IMAGE_ARCHIVE_AREAS}"
# Advanced chroot options
LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
......@@ -202,7 +202,7 @@ LB_SOURCE="${LB_SOURCE}"
EOF
echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: add web build (${_BUILD}) from ${REMOTE_ADDR}." >> /var/log/live
echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LB_BINARY_IMAGES}|distribution ${LB_DISTRIBUTION}|config ${_LB_CONFIG}|cgipackages ${_LB_CGIPACKAGES}|architectures ${LB_ARCHITECTURES}|archive_areas ${LB_ARCHIVE_AREAS}|chroot_filesystem ${LB_CHROOT_FILESYSTEM}|linux_flavours ${LB_LINUX_FLAVOURS}|security ${LB_SECURITY}|apt_indices ${LB_APT_INDICES}|bootappend_install ${LB_BOOTAPPEND_INSTALL}|bootappend_live ${LB_BOOTAPPEND_LIVE}|bootloader ${LB_BOOTLOADER}|debian_installer ${LB_DEBIAN_INSTALLER}|iso_application ${LB_ISO_APPLICATION}|iso_preparer ${LB_ISO_PREPARER}|iso_publisher ${LB_ISO_PUBLISHER}|iso_volume ${LB_ISO_VOLUME}|memtest ${LB_MEMTEST}|net_path ${LB_NET_ROOT_PATH}|net_server ${LB_NET_ROOT_SERVER}|source_images ${LB_SOURCE_IMAGES}|sources ${LB_SOURCE}" >> /var/log/live
echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LIVE_IMAGE_TYPE}|distribution ${LB_DISTRIBUTION}|config ${_LB_CONFIG}|cgipackages ${_LB_CGIPACKAGES}|architectures ${LIVE_IMAGE_ARCHITECTURE}|archive_areas ${LIVE_IMAGE_ARCHIVE_AREAS}|chroot_filesystem ${LB_CHROOT_FILESYSTEM}|linux_flavours ${LB_LINUX_FLAVOURS}|security ${LB_SECURITY}|apt_indices ${LB_APT_INDICES}|bootappend_install ${LB_BOOTAPPEND_INSTALL}|bootappend_live ${LB_BOOTAPPEND_LIVE}|bootloader ${LB_BOOTLOADER}|debian_installer ${LB_DEBIAN_INSTALLER}|iso_application ${LB_ISO_APPLICATION}|iso_preparer ${LB_ISO_PREPARER}|iso_publisher ${LB_ISO_PUBLISHER}|iso_volume ${LB_ISO_VOLUME}|memtest ${LB_MEMTEST}|net_path ${LB_NET_ROOT_PATH}|net_server ${LB_NET_ROOT_SERVER}|source_images ${LB_SOURCE_IMAGES}|sources ${LB_SOURCE}" >> /var/log/live
fi
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html
......@@ -20,15 +20,15 @@ else
fi
# Exit if disabled
if [ "${_WEBBUILD}" != "enabled" ]
if [ "${_WEBBUILD}" != "true" ]
then
exit 0
fi
_HOSTNAME="$(hostname -f)"
# Turn on debug if enabled
if [ "${_DEBUG}" = "enabled" ]
# Turn on debug if true
if [ "${_DEBUG}" = "true" ]
then
set -x
fi
......@@ -90,7 +90,7 @@ then
then
cd "${_BUILD_PATH}"
# Do config with git and stack on config file params to build
lb config --distribution "${LB_DISTRIBUTION}" --architectures "${LB_ARCHITECTURES}" --archive-areas "${LB_ARCHIVE_AREAS}" --chroot-filesystem "${LB_CHROOT_FILESYSTEM}" --linux-flavours "${LB_LINUX_FLAVOURS}" --security "${LB_SECURITY}" --apt-indices "${LB_APT_INDICES}" --bootappend-install "${LB_BOOTAPPEND_INSTALL}" --bootappend-live "${LB_BOOTAPPEND_LIVE}" --bootloader "${LB_BOOTLOADER}" --debian-installer "${LB_DEBIAN_INSTALLER}" --iso-application "${LB_ISO_APPLICATION}" --iso-preparer "${LB_ISO_PREPARER}" --iso-publisher "${LB_ISO_PUBLISHER}" --iso-volume "${LB_ISO_VOLUME}" --memtest "${LB_MEMTEST}" --net-root-path "${LB_NET_ROOT_PATH}" --net-root-server "${LB_NET_ROOT_SERVER}" --source-images "${LB_SOURCE_IMAGES}" --source "${LB_SOURCE}"
lb config --distribution "${LB_DISTRIBUTION}" --architectures "${LIVE_IMAGE_ARCHITECTURE}" --archive-areas "${LIVE_IMAGE_ARCHIVE_AREAS}" --chroot-filesystem "${LB_CHROOT_FILESYSTEM}" --linux-flavours "${LB_LINUX_FLAVOURS}" --security "${LB_SECURITY}" --apt-indices "${LB_APT_INDICES}" --bootappend-install "${LB_BOOTAPPEND_INSTALL}" --bootappend-live "${LB_BOOTAPPEND_LIVE}" --bootloader "${LB_BOOTLOADER}" --debian-installer "${LB_DEBIAN_INSTALLER}" --iso-application "${LB_ISO_APPLICATION}" --iso-preparer "${LB_ISO_PREPARER}" --iso-publisher "${LB_ISO_PUBLISHER}" --iso-volume "${LB_ISO_VOLUME}" --memtest "${LB_MEMTEST}" --net-root-path "${LB_NET_ROOT_PATH}" --net-root-server "${LB_NET_ROOT_SERVER}" --source-images "${LB_SOURCE_IMAGES}" --source "${LB_SOURCE}"
_ERRORCONFIG="${?}"
else
echo "Config stage skipped. The git clone produced an error: ${_ERRORGIT}" > "${_BUILD_PATH}"/log
......@@ -115,10 +115,10 @@ then
if [ "${_ERRORGIT}" -eq "0" ] && [ "${_ERRORCONFIG}" -eq "0" ] && [ "${_ERRORBUILD}" -eq "0" ]
then
_STATUS="maybe-successful"
echo "${REMOTE_ADDR} - - `date +[%d/%b/%Y:%H:%m:%S\ %z]` \"${_BUILD} ${LB_ARCHITECTURES}/${LB_DISTRIBUTION}/${_LB_CGIPACKAGES}\" 200 - \"-\" \"\"">>/var/log/live-cgi.builds
echo "${REMOTE_ADDR} - - `date +[%d/%b/%Y:%H:%m:%S\ %z]` \"${_BUILD} ${LIVE_IMAGE_ARCHITECTURE}/${LB_DISTRIBUTION}/${_LB_CGIPACKAGES}\" 200 - \"-\" \"\"">>/var/log/live-cgi.builds
else
_STATUS="maybe-failed"
echo "${REMOTE_ADDR} - - `date +[%d/%b/%Y:%H:%m:%S\ %z]` \"${_BUILD} ${LB_ARCHITECTURES}/${LB_DISTRIBUTION}/${_LB_CGIPACKAGES}\" 404 - \"-\" \"\"">>/var/log/live-cgi.builds
echo "${REMOTE_ADDR} - - `date +[%d/%b/%Y:%H:%m:%S\ %z]` \"${_BUILD} ${LIVE_IMAGE_ARCHITECTURE}/${LB_DISTRIBUTION}/${_LB_CGIPACKAGES}\" 404 - \"-\" \"\"">>/var/log/live-cgi.builds
fi
sed -e "s/BUILD/${_BUILD}/g" \
......
# Defaults for /etc/cron.daily/live-build-cgi
_WEBBUILD="disabled"
_WEBBUILD="false"
_MODE="debian"
_DEBUG="disabled"
_DEBUG="false"
_DESTDIR="/srv/debian-live/build/www"
_TEMPLATES="/usr/share/live/build/templates/cgi/${_MODE}"
......
......@@ -15,7 +15,7 @@ Check_architectures ()
for ARCHITECTURE in ${ARCHITECTURES}
do
if [ "$(echo ${LB_ARCHITECTURES} | grep ${ARCHITECTURE})" ]
if [ "$(echo ${LIVE_IMAGE_ARCHITECTURE} | grep ${ARCHITECTURE})" ]
then
VALID="true"
break
......@@ -70,7 +70,7 @@ Check_crossarchitectures ()
;;
esac
if [ "${LB_ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
if [ "${LIVE_IMAGE_ARCHITECTURE}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
then
if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
......@@ -93,10 +93,10 @@ Check_crossarchitectures ()
Check_multiarchitectures ()
{
if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ]
if [ "$(echo ${LIVE_IMAGE_ARCHITECTURE} | wc -w)" -gt "1" ]
then
# First, only support multiarch on iso
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*)
# Assemble multi-arch
case "${LB_CURRENT_ARCHITECTURE}" in
......
......@@ -12,4 +12,7 @@ PROGRAM="live-build"
VERSION="$(if [ -e ${LIVE_BUILD}/VERSION ]; then cat ${LIVE_BUILD}/VERSION; else cat /usr/share/live/build/VERSION; fi)"
CONFIG_VERSION="$(echo ${VERSION} | awk -F- '{ print $1 }')"
# FIXME
LIVE_BUILD_VERSION="${CONFIG_VERSION}"
PATH="${PWD}/local/bin:${PATH}"
......@@ -16,7 +16,7 @@ Get_conffiles ()
else
for FILE in ${@}
do
FILES="${FILES} ${FILE} ${FILE}.${LB_ARCHITECTURES} ${FILE}.${DISTRIBUTION}"
FILES="${FILES} ${FILE} ${FILE}.${LIVE_IMAGE_ARCHITECTURE} ${FILE}.${DISTRIBUTION}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||')"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${DISTRIBUTION}"
......
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program 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.
Get_configuration ()
{
_CONFIGURATION_FILE="${1}"
_FIELD_NAME="${2}"
if [ -e "${_CONFIGURATION_FILE}" ]
then
_FIELD_BODY="$(grep ^${_FIELD_NAME}: ${_CONFIGURATION_FILE} | awk '{ $1=""; print $0 }' | sed -e 's|^ ||')"
fi
echo ${_FIELD_BODY}
}
Set_configuration ()
{
_CONFIGURATION_FILE="${1}"
_FIELD_NAME="${2}"
_FIELD_BODY="${3}"
if grep -qs "^${_FIELD_NAME}:" "${_CONFIGURATION_FILE}"
then
# Update configuration
sed -i -e "s|^${_FIELD_NAME}:.*$|${_FIELD_NAME}: ${_FIELD_BODY}|" "${_CONFIGURATION_FILE}"
else
# Append configuration
echo "${_FIELD_NAME}: ${_FIELD_BODY}" >> "${_CONFIGURATION_FILE}"
fi
}
......@@ -8,8 +8,83 @@
## under certain conditions; see COPYING for details.
New_configuration ()
{
## Runtime
# Image: Architecture
if [ -x "/usr/bin/dpkg" ]
then
CURRENT_IMAGE_ARCHITECTURE="$(dpkg --print-architecture)"
else
case "$(uname -m)" in
x86_64)
CURRENT_IMAGE_ARCHITECTURE="amd64"
;;
i?86)
CURRENT_IMAGE_ARCHITECTURE="i386"
;;
*)
Echo_warning "Unable to determine current architecture, using ${CURRENT_IMAGE_ARCHITECTURE}"
;;
esac
fi
## Configuration
# Configuration-Version
LIVE_CONFIGURATION_VERSION="$(Get_configuration config/control Configuration-Version)"
LIVE_CONFIGURATION_VERSION="${LIVE_CONFIGURATION_VERSION:-${LIVE_BUILD_VERSION}}"
export LIVE_CONFIGURATION_VERSION
# Image: Name
LIVE_IMAGE_NAME="$(Get_configuration config/control Name)"
LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME:-live-image}"
export LIVE_IMAGE_NAME
# Image: Architecture (FIXME: Support and default to 'any')
LIVE_IMAGE_ARCHITECTURE="$(Get_configuration config/control Architecture)"
LIVE_IMAGE_ARCHITECTURE="${LIVE_IMAGE_ARCHITECTURE:-${CURRENT_IMAGE_ARCHITECTURE}}"
export LIVE_IMAGE_ARCHITECTURE
# Image: Archive Areas
LIVE_IMAGE_ARCHIVE_AREAS="$(Get_configuration config/control Archive-Areas)"
case "${LB_MODE}" in
progress-linux)
LIVE_IMAGE_ARCHIVE_AREAS="${LIVE_IMAGE_ARCHIVE_AREAS:-main contrib non-free}"
;;
ubuntu)
LIVE_IMAGE_ARCHIVE_AREAS="${LIVE_IMAGE_ARCHIVE_AREAS:-main restricted}"
;;
*)
LIVE_IMAGE_ARCHIVE_AREAS="${LIVE_IMAGE_ARCHIVE_AREAS:-main}"
;;
esac
export LIVE_IMAGE_ARCHIVE_AREAS
# Image: Archive Areas
LIVE_IMAGE_PARENT_ARCHIVE_AREAS="$(Get_configuration config/control Parent-Archive-Areas)"
LIVE_IMAGE_PARENT_ARCHIVE_AREAS="${LIVE_IMAGE_PARENT_ARCHIVE_AREAS:-${LIVE_IMAGE_ARCHIVE_AREAS}}"
export LIVE_IMAGE_PARENT_ARCHIVE_AREAS
# Image: Type
LIVE_IMAGE_TYPE="$(Get_configuration config/control Type)"
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
export LIVE_IMAGE_TYPE
}
Set_defaults ()
{
# FIXME
New_configuration
## config/common
if [ -e local/live-build ]
......@@ -260,8 +335,9 @@ Set_defaults ()
fi
fi
if [ "${LB_ARCHITECTURE}" = "i386" ] && [ "$(uname -m)" = "x86_64" ]
if [ "${LIVE_IMAGE_ARCHITECTURE}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ]
then
# Use linux32 when building amd64 images on i386
_LINUX32="linux32"
else
_LINUX32=""
......@@ -299,34 +375,6 @@ Set_defaults ()
## config/bootstrap
# Setting architecture value
if [ -z "${LB_ARCHITECTURES}" ]
then
if [ -x "/usr/bin/dpkg" ]
then
LB_ARCHITECTURES="$(dpkg --print-architecture)"
else
case "$(uname -m)" in
sparc|powerpc)
LB_ARCHITECTURES="$(uname -m)"
;;
x86_64)
LB_ARCHITECTURES="amd64"
;;
*)
if [ -e /lib64 ]
then
LB_ARCHITECTURES="amd64"
else
LB_ARCHITECTURES="i386"
fi
Echo_warning "Can't determine architecture, assuming ${LB_ARCHITECTURES}"
;;
esac
fi
fi
# Setting mirror to fetch packages from
case "${LB_MODE}" in
debian)
......@@ -345,7 +393,7 @@ Set_defaults ()
;;
ubuntu)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://archive.ubuntu.com/ubuntu/}"
;;
......@@ -380,7 +428,7 @@ Set_defaults ()
;;
ubuntu)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-http://security.ubuntu.com/ubuntu/}"
;;
......@@ -402,7 +450,7 @@ Set_defaults ()
;;
ubuntu)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_MIRROR_CHROOT_UPDATES="${LB_MIRROR_CHROOT_UPDATES:-http://archive.ubuntu.com/ubuntu/}"
;;
......@@ -456,7 +504,7 @@ Set_defaults ()
;;
ubuntu)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://archive.ubuntu.com/ubuntu/}"
;;
......@@ -488,7 +536,7 @@ Set_defaults ()
;;
ubuntu)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-http://security.ubuntu.com/ubuntu/}"
;;
......@@ -515,7 +563,7 @@ Set_defaults ()
;;
ubuntu)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_MIRROR_BINARY_UPDATES="${LB_MIRROR_BINARY_UPDATES:-http://archive.ubuntu.com/ubuntu/}"
;;
......@@ -562,24 +610,6 @@ Set_defaults ()
;;
esac
# Setting archive areas value
case "${LB_MODE}" in
progress-linux)
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main contrib non-free}"
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
;;
ubuntu)
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main restricted}"
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
;;
*)
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main}"
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
;;
esac
## config/chroot
# Setting chroot filesystem
......@@ -594,7 +624,6 @@ Set_defaults ()
# Setting distribution hooks
LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-disable-kexec-tools \
remove-adjtime-configuration \
remove-apt-sources-lists \
remove-backup-files \
remove-dbus-machine-id \
remove-gnome-icon-cache \
......@@ -609,6 +638,7 @@ Set_defaults ()
update-glx-alternative \
update-mlocate-database \
update-nvidia-alternative}"
#remove-apt-sources-lists
# Setting interactive shell/X11/Xnest
LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
......@@ -625,7 +655,7 @@ Set_defaults ()
esac
# Setting linux flavour string
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
armel)
case "${LB_MODE}" in
ubuntu)
......@@ -684,7 +714,7 @@ Set_defaults ()
ia64)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
Echo_error "Architecture ${LIVE_IMAGE_ARCHITECTURE} not supported in the ${LB_MODE} mode."
exit 1
;;
......@@ -697,7 +727,7 @@ Set_defaults ()
powerpc)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
Echo_error "Architecture ${LIVE_IMAGE_ARCHITECTURE} not supported in the ${LB_MODE} mode."
exit 1
;;
......@@ -714,7 +744,7 @@ Set_defaults ()
s390)
case "${LB_MODE}" in
progress-linux|ubuntu)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
Echo_error "Architecture ${LIVE_IMAGE_ARCHITECTURE} not supported in the ${LB_MODE} mode."
exit 1
;;
......@@ -727,7 +757,7 @@ Set_defaults ()
sparc)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
Echo_error "Architecture ${LIVE_IMAGE_ARCHITECTURE} not supported in the ${LB_MODE} mode."
exit 1
;;
......@@ -738,7 +768,7 @@ Set_defaults ()
;;
*)
Echo_error "Architecture(s) ${LB_ARCHITECTURES} not yet supported (FIXME)"
Echo_error "Architecture(s) ${LIVE_IMAGE_ARCHITECTURE} not yet supported (FIXME)"
exit 1
;;
esac
......@@ -779,7 +809,7 @@ Set_defaults ()
## config/binary
# Setting image filesystem
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
sparc)
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-ext4}"
;;
......@@ -790,13 +820,13 @@ Set_defaults ()
esac
# Setting image type
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_BINARY_IMAGES="${LB_BINARY_IMAGES:-iso-hybrid}"
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
;;
*)
LB_BINARY_IMAGES="${LB_BINARY_IMAGES:-iso}"
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso}"
;;
esac
......@@ -814,7 +844,7 @@ Set_defaults ()
# Setting bootloader
if [ -z "${LB_BOOTLOADER}" ]
then
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
LB_BOOTLOADER="syslinux"
;;
......@@ -901,7 +931,7 @@ Set_defaults ()
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*)
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
......@@ -1031,7 +1061,7 @@ Set_defaults ()
;;
*)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
......@@ -1055,7 +1085,7 @@ Set_defaults ()
;;
*)
case "${LB_ARCHITECTURES}" in
case "${LIVE_IMAGE_ARCHITECTURE}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
......@@ -1140,32 +1170,40 @@ Set_defaults ()
Check_defaults ()
{
if [ "${LB_CONFIG_VERSION}" ]
if [ -n "${LIVE_BUILD_VERSION}" ]
then
# We're only checking when we're actually running the checks
# that's why the check for emptyness of the version;
# however, as live-build always declares LB_CONFIG_VERSION
# however, as live-build always declares LIVE_BUILD_VERSION
# internally, this is safe assumption (no cases where it's unset,
# except when bootstrapping the functions/defaults etc.).
CURRENT_CONFIG_VERSION="$(echo ${LB_CONFIG_VERSION} | awk -F. '{ print $1 }')"
if [ ${CURRENT_CONFIG_VERSION} -ne 4 ]
CURRENT_CONFIGURATION_VERSION="$(echo ${LIVE_CONFIGURATION_VERSION} | awk -F. ' { print $1 }')"
if [ -n "${CURRENT_CONFIGURATION_VERSION}" ]
then
if [ ${CURRENT_CONFIG_VERSION} -ge 5 ]
then
Echo_error "This config tree is too new for this version of live-build (${VERSION})."
Echo_error "Aborting build, please get a new version of live-build."
CORRECT_VERSION="$(echo ${LIVE_BUILD_VERSION} | awk -F. '{ print $1 }')"
TOO_NEW_VERSION="$((${CORRECT_VERSION} + 1))"
TOO_OLD_VERSION="$((${CORRECT_VERSION} - 1))"
exit 1
elif [ ${CURRENT_CONFIG_VERSION} -le 3 ]
if [ ${CURRENT_CONFIGURATION_VERSION} -ne ${CORRECT_VERSION} ]
then
Echo_error "This config tree is too old for this version of live-build (${VERSION})."
Echo_error "Aborting build, please regenerate the config tree."
if [ ${CURRENT_CONFIGURATION_VERSION} -ge ${TOO_NEW_VERSION} ]
then
Echo_error "This config tree is too new for live-build (${VERSION})."
Echo_error "Aborting build, please update live-build."
exit 1
elif [ ${CURRENT_CONFIGURATION_VERSION} -le ${TOO_OLD_VERSION} ]
then
Echo_error "This config tree is too old for live-build (${VERSION})."
Echo_error "Aborting build, please update the configuration."
exit 1
else
Echo_warning "This config tree does not specify a format version or has an unknown version number."
Echo_warning "Continuing build, but it could lead to errors or different results. Please regenerate the config tree."
exit 1
else
Echo_warning "This configuration does not specify a version or has a unknown version."
Echo_warning "Continuing build, please correct the configuration."
fi
fi
fi
fi
......@@ -1191,7 +1229,7 @@ Check_defaults ()
esac
fi
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
hdd*)
# grub or yaboot + hdd
case "${LB_BOOTLOADER}" in
......
......@@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 2012\-12\-17 4.0~a5\-1 "Debian Live Project"
.TH LIVE\-BUILD 1 2012\-12\-23 4.0~a6\-1 "Debian Live Project"
.SH NAME
\fBlb\fP \- wrapper for live\-build programs
......