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
parent 73108165ca
commit ec8aff4f49
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) _LB_CONFIG=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])config=[-a-z]+' | cut -f 2 -d '=' | head -n1)
# Standard options # 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) LB_DISTRIBUTION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Advanced bootstrap options # Advanced bootstrap options
@ -123,7 +123,7 @@ else
sed -e "s/BUILD/${_BUILD}/g" \ sed -e "s/BUILD/${_BUILD}/g" \
-e "s/EMAIL/${_EMAIL}/" \ -e "s/EMAIL/${_EMAIL}/" \
-e "s/QUEUENUM/${_QUEUENUM}/" \ -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_DISTRIBUTION/${LB_DISTRIBUTION}/" \
-e "s#_LB_CONFIG#${_LB_CONFIG}#" \ -e "s#_LB_CONFIG#${_LB_CONFIG}#" \
-e "s/_LB_CGIPACKAGES/${_LB_CGIPACKAGES}/" \ -e "s/_LB_CGIPACKAGES/${_LB_CGIPACKAGES}/" \
@ -169,7 +169,7 @@ _LB_CGIPACKAGES="${_LB_CGIPACKAGES}"
_LB_CONFIG="${_LB_CONFIG}" _LB_CONFIG="${_LB_CONFIG}"
# Standard options # Standard options
LB_BINARY_IMAGES="${LB_BINARY_IMAGES}" LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE}"
LB_DISTRIBUTION="${LB_DISTRIBUTION}" LB_DISTRIBUTION="${LB_DISTRIBUTION}"
# Advanced bootstrap options # Advanced bootstrap options
@ -202,7 +202,7 @@ LB_SOURCE="${LB_SOURCE}"
EOF 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: 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 fi
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html

View File

@ -96,7 +96,7 @@ Check_multiarchitectures ()
if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ] if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ]
then then
# First, only support multiarch on iso # First, only support multiarch on iso
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
iso*) iso*)
# Assemble multi-arch # Assemble multi-arch
case "${LB_CURRENT_ARCHITECTURE}" in case "${LB_CURRENT_ARCHITECTURE}" in

View File

@ -792,11 +792,11 @@ Set_defaults ()
# Setting image type # Setting image type
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) 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 esac
@ -901,7 +901,7 @@ Set_defaults ()
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ] if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then then
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
iso*) iso*)
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}" _LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;; ;;
@ -1200,7 +1200,7 @@ Check_defaults ()
esac esac
fi fi
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
hdd*) hdd*)
# grub or yaboot + hdd # grub or yaboot + hdd
case "${LB_BOOTLOADER}" in case "${LB_BOOTLOADER}" in

View File

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

View File

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

View File

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

View File

@ -106,7 +106,7 @@ case "${LB_INITRAMFS}" in
esac esac
# Setting destination directory # Setting destination directory
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
iso*|tar) iso*|tar)
case "${LB_INITRAMFS}" in case "${LB_INITRAMFS}" in
casper) casper)
@ -218,7 +218,7 @@ fi
mkdir -p binary/boot/grub mkdir -p binary/boot/grub
cp -r "${TEMPLATES}"/* binary/boot/grub cp -r "${TEMPLATES}"/* binary/boot/grub
case ${LB_BINARY_IMAGES} in case ${LIVE_IMAGE_TYPE} in
iso*) 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" 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 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults Set_defaults
if ! In_list hdd "${LB_BINARY_IMAGES}" if ! In_list hdd "${LIVE_IMAGE_TYPE}"
then then
exit 0 exit 0
fi fi

View File

@ -46,7 +46,7 @@ then
cd "${OLDPWD}" cd "${OLDPWD}"
# Removing symlinks # Removing symlinks
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
hdd*) hdd*)
find binary -type l | xargs rm -f 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 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults Set_defaults
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
iso) iso)
IMAGE="binary.iso" IMAGE="binary.iso"
;; ;;
@ -55,7 +55,7 @@ Create_lockfile .lock
# Checking depends # Checking depends
Check_package chroot/usr/bin/xorriso xorriso Check_package chroot/usr/bin/xorriso xorriso
if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
then then
Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common
fi fi
@ -76,7 +76,7 @@ fi
XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes" XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes"
# Handle xorriso live-build specific options # Handle xorriso live-build specific options
if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ] if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
then then
XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16" XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16"
fi fi

View File

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

View File

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

View File

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

View File

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

View File

@ -139,7 +139,7 @@ case "${LB_INITRAMFS}" in
esac esac
# Setting destination directory # Setting destination directory
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
iso*) iso*)
case "${LB_INITRAMFS}" in case "${LB_INITRAMFS}" in
casper) casper)
@ -241,7 +241,7 @@ fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')" 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*) iso*|hdd*)
# Copying yaboot # Copying yaboot
mkdir -p binary/yaboot mkdir -p binary/yaboot
@ -258,7 +258,7 @@ case "${LB_BINARY_IMAGES}" in
cp -r "${TEMPLATES}"/* binary/yaboot cp -r "${TEMPLATES}"/* binary/yaboot
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
hdd*) hdd*)
mv binary/yaboot/yaboot.conf binary/yaboot/yaboot.conf.tmp mv binary/yaboot/yaboot.conf binary/yaboot/yaboot.conf.tmp
echo "root=/dev/ram" > binary/yaboot/yaboot.conf 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 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults Set_defaults
if [ "${LB_BINARY_IMAGES}" != "iso" ] && [ "${LB_BINARY_IMAGES}" != "iso-hybrid" ] if [ "${LIVE_IMAGE_TYPE}" != "iso" ] && [ "${LIVE_IMAGE_TYPE}" != "iso-hybrid" ]
then then
exit 0 exit 0
fi fi
@ -57,7 +57,7 @@ Restore_cache cache/packages.binary
# Installing depends # Installing depends
Install_package Install_package
case "${LB_BINARY_IMAGES}" in case "${LIVE_IMAGE_TYPE}" in
iso) iso)
_IMAGES="binary.iso" _IMAGES="binary.iso"
;; ;;

View File

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

View File

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

View File

@ -12,7 +12,7 @@
<table> <table>
<tr><td>Email: </td><td>EMAIL</td></tr> <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>--distribution: </td><td>LB_DISTRIBUTION</td></tr>
<tr><td>--config: </td><td>_LB_CONFIG</td></tr> <tr><td>--config: </td><td>_LB_CONFIG</td></tr>
<tr><td>cgipackages.list.chroot: </td><td>_LB_CGIPACKAGES</td><tr> <tr><td>cgipackages.list.chroot: </td><td>_LB_CGIPACKAGES</td><tr>