diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-04-06 18:43:41 +0100 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-04-23 16:54:31 +0000 |
commit | 83d9145257220d39e487021e993344adafe71b8a (patch) | |
tree | dfccbf1f040b287f198dc414b3a19f25af59805a | |
parent | 41738b1932f0830a2b7eb92e62540a2246105a11 (diff) | |
download | vyos-live-build-83d9145257220d39e487021e993344adafe71b8a.tar.gz vyos-live-build-83d9145257220d39e487021e993344adafe71b8a.zip |
config: s/LIVE_IMAGE_NAME/LB_IMAGE_NAME/
no backwards compatibility hack for reading the old var from existing
saved config used because this was previously stored in the alternate
format config/build file.
Gbp-Dch: Short
-rwxr-xr-x | functions/configuration.sh | 3 | ||||
-rwxr-xr-x | scripts/build/binary_checksums | 2 | ||||
-rwxr-xr-x | scripts/build/binary_hdd | 6 | ||||
-rwxr-xr-x | scripts/build/binary_iso | 4 | ||||
-rwxr-xr-x | scripts/build/binary_manifest | 4 | ||||
-rwxr-xr-x | scripts/build/binary_netboot | 12 | ||||
-rwxr-xr-x | scripts/build/binary_onie | 4 | ||||
-rwxr-xr-x | scripts/build/binary_tar | 12 | ||||
-rwxr-xr-x | scripts/build/binary_zsync | 10 | ||||
-rwxr-xr-x | scripts/build/clean | 26 | ||||
-rwxr-xr-x | scripts/build/config | 6 | ||||
-rwxr-xr-x | scripts/build/source_checksums | 2 | ||||
-rwxr-xr-x | scripts/build/source_hdd | 12 | ||||
-rwxr-xr-x | scripts/build/source_iso | 6 | ||||
-rwxr-xr-x | scripts/build/source_tar | 24 |
15 files changed, 67 insertions, 66 deletions
diff --git a/functions/configuration.sh b/functions/configuration.sh index de7ac0f9b..6bab8b2f7 100755 --- a/functions/configuration.sh +++ b/functions/configuration.sh @@ -59,7 +59,8 @@ Prepare_config () LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION}}" LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}" - LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME:-live-image}" + LB_IMAGE_NAME="${LB_IMAGE_NAME:-live-image}" + LIVE_IMAGE_NAME="${LB_IMAGE_NAME}" #for backwards compatibility with hooks LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}" if [ -z "${LB_ARCHITECTURE}" ]; then diff --git a/scripts/build/binary_checksums b/scripts/build/binary_checksums index 2797fa7f7..3d79aab91 100755 --- a/scripts/build/binary_checksums +++ b/scripts/build/binary_checksums @@ -75,7 +75,7 @@ done # File list cd binary -find . | sed -e 's|^.||g' | grep "^/" | sort > ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.contents +find . | sed -e 's|^.||g' | grep "^/" | sort > ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents cd "${OLDPWD}" # Creating stage file diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd index 5a5abc977..a7979965d 100755 --- a/scripts/build/binary_hdd +++ b/scripts/build/binary_hdd @@ -85,9 +85,9 @@ Restore_package_cache binary Install_package # Remove old binary -if [ -f ${LIVE_IMAGE_NAME}.img ] +if [ -f ${LB_IMAGE_NAME}.img ] then - rm -f ${LIVE_IMAGE_NAME}.img + rm -f ${LB_IMAGE_NAME}.img fi case "${LB_BINARY_FILESYSTEM}" in @@ -344,7 +344,7 @@ if $MAKEDEV; then mv chroot/dev.tmp chroot/dev fi -mv chroot/binary.img ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.img +mv chroot/binary.img ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.img # Saving cache Save_package_cache binary diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso index 9952b0c51..c260bdbe8 100755 --- a/scripts/build/binary_iso +++ b/scripts/build/binary_iso @@ -23,11 +23,11 @@ Init_config_data "${@}" case "${LIVE_IMAGE_TYPE}" in iso) - IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.iso" + IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso" ;; iso-hybrid) - IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso" + IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso" ;; *) diff --git a/scripts/build/binary_manifest b/scripts/build/binary_manifest index eb85ef181..e032cd844 100755 --- a/scripts/build/binary_manifest +++ b/scripts/build/binary_manifest @@ -54,9 +54,9 @@ cp chroot.packages.live "binary/${INITFS}/filesystem.${SUFFIX}" echo "$(diff chroot.packages.live chroot.packages.install | awk '/^< / { print $2 }')" \ > "binary/${INITFS}/filesystem.${SUFFIX}-remove" -cp chroot.packages.live ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.packages +cp chroot.packages.live ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.packages -cp chroot.files ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.files +cp chroot.files ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.files # Creating stage file Create_stagefile diff --git a/scripts/build/binary_netboot b/scripts/build/binary_netboot index 14a6d9bc3..a324e7fc1 100755 --- a/scripts/build/binary_netboot +++ b/scripts/build/binary_netboot @@ -42,7 +42,7 @@ Check_stagefile Acquire_lockfile # Remove old binary -rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.xz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.xz +rm -f ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.gz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.bz2 ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.xz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.xz # Creating image file ROOT_DIR=${LB_MODE}-live @@ -57,23 +57,23 @@ cd binary.tmp mkdir tftpboot/live mv */live/vmlinuz* */live/initrd* tftpboot/live -tar cf ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar * +tar cf ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar * case "${LB_COMPRESSION}" in bzip2) - bzip2 ${BZIP2_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar + bzip2 ${BZIP2_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ;; gzip) - gzip ${GZIP_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar + gzip ${GZIP_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ;; lzip) - lzip ${LZIP_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar + lzip ${LZIP_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ;; xz) - xz ${XZ_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar + xz ${XZ_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ;; none) diff --git a/scripts/build/binary_onie b/scripts/build/binary_onie index fcc74b569..356e2b6e2 100755 --- a/scripts/build/binary_onie +++ b/scripts/build/binary_onie @@ -29,10 +29,10 @@ fi case "${LIVE_IMAGE_TYPE}" in iso) - IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.iso" + IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso" ;; iso-hybrid) - IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso" + IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso" ;; *) exit 0 diff --git a/scripts/build/binary_tar b/scripts/build/binary_tar index fba1486ed..c6e074e34 100755 --- a/scripts/build/binary_tar +++ b/scripts/build/binary_tar @@ -37,25 +37,25 @@ Check_stagefile Acquire_lockfile # Remove old binary -rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.lz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar +rm -f ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.bz2 ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.gz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.lz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar -tar cf ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar binary +tar cf ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar binary case "${LB_COMPRESSION}" in bzip2) - bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar + bzip2 ${BZIP2_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar ;; gzip) - gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar + gzip ${GZIP_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar ;; lzip) - lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar + lzip ${LZIP_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar ;; xz) - xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar + xz ${XZ_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar ;; none) diff --git a/scripts/build/binary_zsync b/scripts/build/binary_zsync index d8f1e645a..499d7bead 100755 --- a/scripts/build/binary_zsync +++ b/scripts/build/binary_zsync @@ -53,23 +53,23 @@ Install_package case "${LIVE_IMAGE_TYPE}" in iso) - _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.iso" + _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso" ;; iso-hybrid) - _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso" + _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso" ;; hdd) - _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.img" + _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.img" ;; netboot) - _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar*" + _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar*" ;; tar) - _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURE}.tar*" + _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar*" ;; esac diff --git a/scripts/build/clean b/scripts/build/clean index 1e10e35f6..616897996 100755 --- a/scripts/build/clean +++ b/scripts/build/clean @@ -91,13 +91,13 @@ do --binary) umount -f binary.tmp > /dev/null 2>&1 || true rm -rf binary.tmp binary.deb binary.udeb - rm -f ${LIVE_IMAGE_NAME}*.iso - rm -f ${LIVE_IMAGE_NAME}*.img - rm -f ${LIVE_IMAGE_NAME}*.tar.gz - rm -f ${LIVE_IMAGE_NAME}*.zsync* - rm -f ${LIVE_IMAGE_NAME}.sh - rm -f ${LIVE_IMAGE_NAME}*.contents ${LIVE_IMAGE_NAME}*.packages ${LIVE_IMAGE_NAME}*.files - rm -f ${LIVE_IMAGE_NAME}*.iso-ONIE.bin + rm -f ${LB_IMAGE_NAME}*.iso + rm -f ${LB_IMAGE_NAME}*.img + rm -f ${LB_IMAGE_NAME}*.tar.gz + rm -f ${LB_IMAGE_NAME}*.zsync* + rm -f ${LB_IMAGE_NAME}.sh + rm -f ${LB_IMAGE_NAME}*.contents ${LB_IMAGE_NAME}*.packages ${LB_IMAGE_NAME}*.files + rm -f ${LB_IMAGE_NAME}*.iso-ONIE.bin rm -f MD5SUMS SHA1SUMS SHA256SUMS SHA512SUMS rm -f md5sum.txt sha1sum.txt sha256sum.txt sha512sum.txt @@ -127,12 +127,12 @@ do ;; --source) - rm -f ${LIVE_IMAGE_NAME}-source*.iso - rm -f ${LIVE_IMAGE_NAME}-source*.img - rm -f ${LIVE_IMAGE_NAME}-source*.tar - rm -f ${LIVE_IMAGE_NAME}-source*.tar.gz - rm -f ${LIVE_IMAGE_NAME}-source*.list - rm -f ${LIVE_IMAGE_NAME}-source-selection.txt + rm -f ${LB_IMAGE_NAME}-source*.iso + rm -f ${LB_IMAGE_NAME}-source*.img + rm -f ${LB_IMAGE_NAME}-source*.tar + rm -f ${LB_IMAGE_NAME}-source*.tar.gz + rm -f ${LB_IMAGE_NAME}-source*.list + rm -f ${LB_IMAGE_NAME}-source-selection.txt rm -rf source diff --git a/scripts/build/config b/scripts/build/config index f588c4745..b78557476 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -553,7 +553,7 @@ Local_arguments () ;; --image-name) - LIVE_IMAGE_NAME="${2}" + LB_IMAGE_NAME="${2}" shift 2 ;; @@ -1030,8 +1030,8 @@ LB_MODE="${LB_MODE}" # \$LB_SYSTEM: set system type LB_SYSTEM="${LB_SYSTEM}" -# \$LIVE_IMAGE_NAME: set base name of the image -LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME}" +# \$LB_IMAGE_NAME: set base name of the image +LB_IMAGE_NAME="${LB_IMAGE_NAME}" # \$APT_OPTIONS: set options to use with apt APT_OPTIONS="${APT_OPTIONS}" diff --git a/scripts/build/source_checksums b/scripts/build/source_checksums index 06157c162..fe289e396 100755 --- a/scripts/build/source_checksums +++ b/scripts/build/source_checksums @@ -79,7 +79,7 @@ EOF # File list cd ${DIRECTORY} - find . | sed -e 's|^.||g' | grep "^/" | sort > ../../${LIVE_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents + find . | sed -e 's|^.||g' | grep "^/" | sort > ../../${LB_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents cd "${OLDPWD}" done diff --git a/scripts/build/source_hdd b/scripts/build/source_hdd index 6b10e64d8..613bdc96f 100755 --- a/scripts/build/source_hdd +++ b/scripts/build/source_hdd @@ -51,15 +51,15 @@ Check_package host /sbin/losetup mount Install_package # Remove old source -if [ -f ${LIVE_IMAGE_NAME}-source.img ] +if [ -f ${LB_IMAGE_NAME}-source.img ] then - rm -f ${LIVE_IMAGE_NAME}-source.img + rm -f ${LB_IMAGE_NAME}-source.img fi # Everything which comes here needs to be cleaned up, DU_DIM="$(du -ms source | cut -f1)" REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})" -dd if=/dev/zero of=${LIVE_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM} +dd if=/dev/zero of=${LB_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM} MAKEDEV=false FREELO="$(losetup -f)" if [ ! -b chroot/${FREELO} ] @@ -90,12 +90,12 @@ case "${LB_BINARY_FILESYSTEM}" in esac Echo_warning "!!! The following error/warning messages can be ignored !!!" -Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 0 +Losetup $FREELO ${LB_IMAGE_NAME}-source.img 0 Chroot chroot "parted -s ${FREELO} mklabel msdos" || true Chroot chroot "parted -a optimal -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true Lodetach ${FREELO} -Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 1 +Losetup $FREELO ${LB_IMAGE_NAME}-source.img 1 case "${LB_BINARY_FILESYSTEM}" in ext2|ext3|ext4) @@ -134,7 +134,7 @@ Lodetach ${FREELO} Echo_warning "!!! The above error/warning messages can be ignored !!!" FREELO="$(losetup -f)" -Losetup "$FREELO" ${LIVE_IMAGE_NAME}-source.img 0 +Losetup "$FREELO" ${LB_IMAGE_NAME}-source.img 0 Chroot chroot "parted -s ${FREELO} set 1 lba off" || true Lodetach ${FREELO} diff --git a/scripts/build/source_iso b/scripts/build/source_iso index 1c5c296d8..3c9c08125 100755 --- a/scripts/build/source_iso +++ b/scripts/build/source_iso @@ -53,9 +53,9 @@ Check_package chroot /usr/bin/xorriso xorriso Install_package # Remove old iso image -if [ -f ${LIVE_IMAGE_NAME}-source.iso ] +if [ -f ${LB_IMAGE_NAME}-source.iso ] then - rm -f ${LIVE_IMAGE_NAME}-source.iso + rm -f ${LB_IMAGE_NAME}-source.iso fi # Handle xorriso generic options @@ -107,7 +107,7 @@ Chroot chroot "sh source.sh" # Move image mv chroot/source ./ -mv chroot/source.iso ${LIVE_IMAGE_NAME}-source.iso +mv chroot/source.iso ${LB_IMAGE_NAME}-source.iso rm -f chroot/source.sh # Removing depends diff --git a/scripts/build/source_tar b/scripts/build/source_tar index 4293ace36..74a4331a3 100755 --- a/scripts/build/source_tar +++ b/scripts/build/source_tar @@ -43,31 +43,31 @@ Check_stagefile Acquire_lockfile # Remove old source -rm -f ${LIVE_IMAGE_NAME}-source.debian.tar.bz2 ${LIVE_IMAGE_NAME}-source.debian.tar.gz ${LIVE_IMAGE_NAME}-source.debian.tar.lz ${LIVE_IMAGE_NAME}-source.debian.tar -rm -f ${LIVE_IMAGE_NAME}-source.live.tar.bz2 ${LIVE_IMAGE_NAME}-source.live.tar.gz ${LIVE_IMAGE_NAME}-source.live.tar.lz ${LIVE_IMAGE_NAME}-source.live.tar +rm -f ${LB_IMAGE_NAME}-source.debian.tar.bz2 ${LB_IMAGE_NAME}-source.debian.tar.gz ${LB_IMAGE_NAME}-source.debian.tar.lz ${LB_IMAGE_NAME}-source.debian.tar +rm -f ${LB_IMAGE_NAME}-source.live.tar.bz2 ${LB_IMAGE_NAME}-source.live.tar.gz ${LB_IMAGE_NAME}-source.live.tar.lz ${LB_IMAGE_NAME}-source.live.tar -tar cf ${LIVE_IMAGE_NAME}-source.debian.tar source/debian -tar cf ${LIVE_IMAGE_NAME}-source.live.tar source/live +tar cf ${LB_IMAGE_NAME}-source.debian.tar source/debian +tar cf ${LB_IMAGE_NAME}-source.live.tar source/live case "${LB_COMPRESSION}" in bzip2) - bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar - bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar + bzip2 ${BZIP2_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar + bzip2 ${BZIP2_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar ;; gzip) - gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar - gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar + gzip ${GZIP_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar + gzip ${GZIP_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar ;; lzip) - lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar - lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar + lzip ${LZIP_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar + lzip ${LZIP_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar ;; xz) - xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar - xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar + xz ${XZ_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar + xz ${XZ_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar ;; none) |