Moving off binary image type into new config tree format.

This commit is contained in:
Daniel Baumann 2012-12-19 10:52:13 +01:00 committed by Daniel Baumann
parent c73a5a0ee0
commit f5acab633c
19 changed files with 38 additions and 39 deletions

View File

@ -67,7 +67,7 @@ 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
@ -123,7 +123,7 @@ 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}/" \
@ -169,7 +169,7 @@ _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
@ -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 ${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
fi
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html

View File

@ -96,7 +96,7 @@ Check_multiarchitectures ()
if [ "$(echo ${LB_ARCHITECTURES} | 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

View File

@ -792,11 +792,11 @@ Set_defaults ()
# Setting image type
case "${LB_ARCHITECTURES}" 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
@ -901,7 +901,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}"
;;
@ -1200,7 +1200,7 @@ Check_defaults ()
esac
fi
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
hdd*)
# grub or yaboot + hdd
case "${LB_BOOTLOADER}" in

View File

@ -74,7 +74,7 @@ Restore_cache cache/packages.binary
Install_package
# Setting destination directory
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
netboot)
DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURES}"
;;
@ -94,7 +94,7 @@ case "${LB_DEBIAN_INSTALLER}" in
DI_IMAGE_TYPE="netboot"
;;
*)
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
netboot)
DI_IMAGE_TYPE="netboot"
;;
@ -769,7 +769,7 @@ EOF
DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION}"
fi
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
hdd)
case "${LB_BINARY_FILESYSTEM}" in
fat*|ntfs)

View File

@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*|hdd*)
;;
*)

View File

@ -132,7 +132,7 @@ case "${LB_INITRAMFS}" in
esac
# Setting destination directory
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*|tar)
case "${LB_INITRAMFS}" in
casper)
@ -245,7 +245,7 @@ fi
mkdir -p binary/boot/grub
cp -r "${TEMPLATES}"/* binary/boot/grub
case ${LB_BINARY_IMAGES} in
case ${LIVE_IMAGE_TYPE} in
iso*)
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
;;

View File

@ -106,7 +106,7 @@ case "${LB_INITRAMFS}" in
esac
# Setting destination directory
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*|tar)
case "${LB_INITRAMFS}" in
casper)
@ -218,7 +218,7 @@ fi
mkdir -p binary/boot/grub
cp -r "${TEMPLATES}"/* binary/boot/grub
case ${LB_BINARY_IMAGES} in
case ${LIVE_IMAGE_TYPE} in
iso*)
FILES="chroot/usr/lib/grub/i386-pc/*.mod chroot/usr/lib/grub/i386-pc/*.lst chroot/usr/lib/grub/i386-pc/efiemu??.o chroot/usr/share/grub/*.pf2"
;;

View File

@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
if ! In_list hdd "${LB_BINARY_IMAGES}"
if ! In_list hdd "${LIVE_IMAGE_TYPE}"
then
exit 0
fi

View File

@ -46,7 +46,7 @@ then
cd "${OLDPWD}"
# Removing symlinks
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
hdd*)
find binary -type l | xargs rm -f
;;

View File

@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso)
IMAGE="binary.iso"
;;
@ -55,7 +55,7 @@ Create_lockfile .lock
# Checking depends
Check_package chroot/usr/bin/xorriso xorriso
if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
then
Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common
fi
@ -76,7 +76,7 @@ fi
XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes"
# Handle xorriso live-build specific options
if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
then
XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16"
fi

View File

@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
if ! In_list netboot "${LB_BINARY_IMAGES}"
if ! In_list netboot "${LIVE_IMAGE_TYPE}"
then
exit 0
fi

View File

@ -30,7 +30,7 @@ then
fi
# Check image type
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*|hdd*|tar)
;;
@ -191,7 +191,7 @@ fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*|hdd*)
# Copying silo
mkdir -p binary/boot

View File

@ -48,7 +48,7 @@ Check_architectures amd64 i386
Check_crossarchitectures
# Assembling image specifics
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*)
_BOOTLOADER="isolinux"

View File

@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
if ! In_list tar "${LB_BINARY_IMAGES}"
if ! In_list tar "${LIVE_IMAGE_TYPE}"
then
exit 0
fi

View File

@ -139,7 +139,7 @@ case "${LB_INITRAMFS}" in
esac
# Setting destination directory
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*)
case "${LB_INITRAMFS}" in
casper)
@ -241,7 +241,7 @@ fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso*|hdd*)
# Copying yaboot
mkdir -p binary/yaboot
@ -258,7 +258,7 @@ case "${LB_BINARY_IMAGES}" in
cp -r "${TEMPLATES}"/* binary/yaboot
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
hdd*)
mv binary/yaboot/yaboot.conf binary/yaboot/yaboot.conf.tmp
echo "root=/dev/ram" > binary/yaboot/yaboot.conf

View File

@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
if [ "${LB_BINARY_IMAGES}" != "iso" ] && [ "${LB_BINARY_IMAGES}" != "iso-hybrid" ]
if [ "${LIVE_IMAGE_TYPE}" != "iso" ] && [ "${LIVE_IMAGE_TYPE}" != "iso-hybrid" ]
then
exit 0
fi
@ -57,7 +57,7 @@ Restore_cache cache/packages.binary
# Installing depends
Install_package
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
iso)
_IMAGES="binary.iso"
;;

View File

@ -38,7 +38,7 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
case "${LB_BINARY_IMAGES}" in
case "${LIVE_IMAGE_TYPE}" in
netboot)
if [ ! -f chroot/sbin/mount.cifs ]
then

View File

@ -562,7 +562,7 @@ Local_arguments ()
;;
-b|--binary-images)
LB_BINARY_IMAGES="${2}"
LIVE_IMAGE_TYPE="${2}"
shift 2
;;
@ -1302,10 +1302,6 @@ cat > config/binary << EOF
# (Default: ${LB_BINARY_FILESYSTEM})
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
# \$LB_BINARY_IMAGES: set image type
# (Default: ${LB_BINARY_IMAGES})
LB_BINARY_IMAGES="${LB_BINARY_IMAGES}"
# \$LB_APT_INDICES: set apt/aptitude generic indices
# (Default: ${LB_APT_INDICES})
LB_APT_INDICES="${LB_APT_INDICES}"
@ -1491,6 +1487,9 @@ fi
# New style configuration
Set_configuration "config/control" "Configuration-Version" "${LIVE_CONFIGURATION_VERSION}"
echo "" >> config/control
Set_configuration "config/control" "Image" "binary"
Set_configuration "config/control" "Type" "${LIVE_IMAGE_TYPE}"
# Creating stage file
Create_stagefile .build/config

View File

@ -12,7 +12,7 @@
<table>
<tr><td>Email: </td><td>EMAIL</td></tr>
<tr><td>--binary-image: </td><td>LB_BINARY_IMAGES</td></tr>
<tr><td>--binary-image: </td><td>LIVE_IMAGE_TYPE</td></tr>
<tr><td>--distribution: </td><td>LB_DISTRIBUTION</td></tr>
<tr><td>--config: </td><td>_LB_CONFIG</td></tr>
<tr><td>cgipackages.list.chroot: </td><td>_LB_CGIPACKAGES</td><tr>