diff options
author | Daniel Baumann <daniel@debian.org> | 2012-12-19 21:48:49 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-12-20 12:27:49 +0100 |
commit | 4118eb4c1e2dc23a6e7b33695883c1d6f03c06d4 (patch) | |
tree | 62e5adb3b0cc080fa8c58eec1b9de63343ff2c6f /scripts/build | |
parent | 3cbe97f28ed5c07f2e5a73d920637410b68ed486 (diff) | |
download | vyos-live-build-4118eb4c1e2dc23a6e7b33695883c1d6f03c06d4.tar.gz vyos-live-build-4118eb4c1e2dc23a6e7b33695883c1d6f03c06d4.zip |
Moving off binary image parent archive areas into new config tree format.
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/binary_debian-installer | 8 | ||||
-rwxr-xr-x | scripts/build/chroot_archives | 48 | ||||
-rwxr-xr-x | scripts/build/chroot_linux-image | 6 | ||||
-rwxr-xr-x | scripts/build/config | 7 |
4 files changed, 33 insertions, 36 deletions
diff --git a/scripts/build/binary_debian-installer b/scripts/build/binary_debian-installer index 229850403..c8d4e4657 100755 --- a/scripts/build/binary_debian-installer +++ b/scripts/build/binary_debian-installer @@ -419,7 +419,7 @@ then FIRMWARE_PACKAGES="" - _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LIVE_IMAGE_ARCHITECTURE}.gz; done)" + _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LIVE_IMAGE_ARCHITECTURE}.gz; done)" rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LIVE_IMAGE_ARCHITECTURE} @@ -430,7 +430,7 @@ then FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LIVE_IMAGE_ARCHITECTURE} | sort -u)" done - if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" + if echo ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" then # FIXME: should check that we're building on debian through e.g. a 'derivative-is-based-on' variable or somesuch. # Manually add firmware-linux/non-free meta package @@ -502,7 +502,7 @@ then mv chroot/binary.deb ./ - for _ARCHIVE_AREA in $(echo ${LB_PARENT_ARCHIVE_AREAS} ${LIVE_IMAGE_ARCHIVE_AREAS}) + for _ARCHIVE_AREA in $(echo ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} ${LIVE_IMAGE_ARCHIVE_AREAS}) do mkdir -p binary/pool/${_ARCHIVE_AREA} done @@ -753,7 +753,7 @@ cd /root/binary && apt-ftparchive \ -o APT::FTPArchive::Release::Codename="${LB_PARENT_DISTRIBUTION}" \ -o APT::FTPArchive::Release::Date="$(date -R)" \ -o APT::FTPArchive::Release::Architectures="${LIVE_IMAGE_ARCHITECTURE}" \ - -o APT::FTPArchive::Release::Components="${LB_PARENT_ARCHIVE_AREAS}" \ + -o APT::FTPArchive::Release::Components="${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" \ -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \ release dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION} > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/Release EOF diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives index a74f3714d..77679911d 100755 --- a/scripts/build/chroot_archives +++ b/scripts/build/chroot_archives @@ -69,12 +69,12 @@ case "${1}" in # Configure custom sources.list cat > chroot/etc/apt/${_PARENT_FILE} << EOF -deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS} +deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} EOF if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi if [ "${LB_DERIVATIVE}" = "true" ] @@ -101,11 +101,11 @@ EOF ;; *) - echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi ;; esac @@ -132,11 +132,11 @@ EOF ;; ubuntu) - echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi ;; esac @@ -144,11 +144,11 @@ EOF if [ "${LB_UPDATES}" = "true" ] then - echo "deb ${LB_PARENT_MIRROR_CHROOT_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_CHROOT_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_CHROOT_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_CHROOT_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi if [ "${LB_DERIVATIVE}" = "true" ] && [ "${LB_MIRROR_CHROOT_UPDATES}" != "none" ] @@ -168,11 +168,11 @@ EOF debian) if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ] then - echo "deb ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi fi ;; @@ -224,7 +224,7 @@ EOF then sed -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \ -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + -e "s|@ARCHIVE_AREAS@|${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}|g" \ "${_FILE}" > "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" fi done @@ -269,7 +269,7 @@ EOF sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ -e "s|@ARCHIVE_AREAS@|${LIVE_IMAGE_ARCHIVE_AREAS}|g" \ - -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + -e "s|@PARENT_ARCHIVE_AREAS@|${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}|g" \ "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ] @@ -639,12 +639,12 @@ EOF # Configure custom sources.list cat > chroot/etc/apt/${_PARENT_FILE} << EOF -deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS} +deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} EOF if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi if [ "${LB_DERIVATIVE}" = "true" ] @@ -671,11 +671,11 @@ EOF ;; *) - echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi ;; esac @@ -702,11 +702,11 @@ EOF ;; ubuntu) - echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}-security ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi ;; esac @@ -714,11 +714,11 @@ EOF if [ "${LB_UPDATES}" = "true" ] then - echo "deb ${LB_PARENT_MIRROR_BINARY_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_BINARY_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_BINARY_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_BINARY_UPDATES} ${LB_PARENT_DISTRIBUTION}-updates ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi if [ "${LB_DERIVATIVE}" = "true" ] && [ "${LB_MIRROR_BINARY_UPDATES}" != "none" ] @@ -738,11 +738,11 @@ EOF debian) if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ] then - echo "deb ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ] then - echo "deb-src ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} + echo "deb-src ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE} fi fi ;; @@ -785,7 +785,7 @@ EOF then sed -e "s|@DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + -e "s|@ARCHIVE_AREAS@|${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}|g" \ "${_FILE}" > "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" fi done @@ -830,7 +830,7 @@ EOF sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ -e "s|@ARCHIVE_AREAS@|${LIVE_IMAGE_ARCHIVE_AREAS}|g" \ - -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + -e "s|@PARENT_ARCHIVE_AREAS@|${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}|g" \ "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ] diff --git a/scripts/build/chroot_linux-image b/scripts/build/chroot_linux-image index 91121e353..4145bb955 100755 --- a/scripts/build/chroot_linux-image +++ b/scripts/build/chroot_linux-image @@ -63,7 +63,7 @@ then FIRMWARE_PACKAGES="" - _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LIVE_IMAGE_ARCHITECTURE}.gz; done)" + _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LIVE_IMAGE_ARCHITECTURE}.gz; done)" rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LIVE_IMAGE_ARCHITECTURE} @@ -74,7 +74,7 @@ then FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LIVE_IMAGE_ARCHITECTURE} | sort -u)" done - if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" + if echo ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" then # FIXME: should check that we're building on debian through e.g. a 'derivative-is-based-on' variable or somesuch. # Manually add firmware-linux/non-free meta package @@ -104,7 +104,7 @@ then done # Some known licenses required to be accepted - if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" + if echo ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" then cat >> chroot/root/packages.chroot.cfg << EOF diff --git a/scripts/build/config b/scripts/build/config index 89cc2cd87..c4fd34649 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -496,7 +496,7 @@ Local_arguments () ;; --parent-archive-areas) - LB_PARENT_ARCHIVE_AREAS="${2}" + LIVE_IMAGE_PARENT_ARCHIVE_AREAS="${2}" shift 2 ;; @@ -1210,10 +1210,6 @@ LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER}" # (Default: empty) LB_ARCHIVES="${LB_ARCHIVES}" -# \$LB_PARENT_ARCHIVE_AREAS: select archive areas to use -# (Default: ${LB_PARENT_ARCHIVE_AREAS}) -LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS}" - # \$LB_BOOTSTRAP_QEMU_ARCHITECTURES: architectures to use foreign bootstrap # (Default: ${LB_BOOTSTRAP_QEMU_ARCHITECTURES}) LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" @@ -1493,6 +1489,7 @@ echo "" >> config/control Set_configuration "config/control" "Name" "${LIVE_IMAGE_NAME}" Set_configuration "config/control" "Architecture" "${LIVE_IMAGE_ARCHITECTURE}" Set_configuration "config/control" "Archive-Areas" "${LIVE_IMAGE_ARCHIVE_AREAS}" +Set_configuration "config/control" "Parent-Archive-Areas" "${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" Set_configuration "config/control" "Type" "${LIVE_IMAGE_TYPE}" # Creating stage file |