diff options
author | Daniel Baumann <daniel@debian.org> | 2010-10-06 19:06:35 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:26 +0100 |
commit | 94552aa2838d54e7f20960abe4e04538938b45fd (patch) | |
tree | d785df6a503d5827ead1a7400044acaa9419dfe5 /examples | |
parent | 7d35aee7d0ec0037cd2b515d6851b0a527ca4234 (diff) | |
download | vyos-live-build-94552aa2838d54e7f20960abe4e04538938b45fd.tar.gz vyos-live-build-94552aa2838d54e7f20960abe4e04538938b45fd.zip |
Removing cron examples, autobuild is handled by live-autobuild now.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/cron/cron.daily | 155 | ||||
-rw-r--r-- | examples/cron/default | 16 | ||||
-rwxr-xr-x | examples/cron/images.sh | 215 |
3 files changed, 0 insertions, 386 deletions
diff --git a/examples/cron/cron.daily b/examples/cron/cron.daily deleted file mode 100755 index 561075687..000000000 --- a/examples/cron/cron.daily +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/sh - -set -e - -BUILD="daily" -HOST="$(hostname)" - -# Checking for live-build availability -if [ ! -x /usr/bin/lb ] -then - exit 0 -fi - -# Checking for live-build defaults -if [ -r /etc/default/live-build_autobuild ] -then - . /etc/default/live-build_autobuild -else - echo "E: /etc/default/live-build_autobuild missing." - exit 1 -fi - -# Checking for autobuild -if [ "${AUTOBUILD}" != "true" ] -then - exit 0 -fi - -# Checking for build directory -if [ ! -d "${TEMPDIR}" ] -then - mkdir -p "${TEMPDIR}"/debian-live -else - # FIXME: maybe we should just remove the left overs. - echo "E: ${TEMPDIR} needs cleanup." - exit 1 -fi - -echo "$(date +%b\ %d\ %H:%M:%S) ${HOST} live-build: begin daily build." >> /var/log/live - -for ARCHITECTURE in ${ARCHITECTURES} -do - for DISTRIBUTION in ${DISTRIBUTIONS} - do - for PACKAGES_LIST in ${PACKAGES_LISTS} - do - if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt ] - then - # Creating build directory - mkdir -p "${TEMPDIR}"/debian-live - - cd "${TEMPDIR}"/debian-live - echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt - - # Generating images - lh_config -b iso -s tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source true ${OPTIONS} - lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - - echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt - fi - - if [ -f "${TEMPDIR}"/debian-live/binary.iso ] && [ -f "${TEMPDIR}"/debian-live/source.tar ] - then - # Creating log directory - mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log - - # Moving logs - mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt - - # Creating images directory - mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} - mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/source - - # Moving images - mv "${TEMPDIR}"/debian-live/binary.iso "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.iso - mv "${TEMPDIR}"/debian-live/source.tar "${DESTDIR}"/"${BUILD}"-builds/${DATE}/source/debian-live-${DISTRIBUTION}-source-${PACKAGES_LIST}.tar - fi - - if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt ] - then - # Workaround of missing multi-binary support in live-build - mv "${TEMPDIR}"/debian-live/binary/casper "${TEMPDIR}"/debian-live/casper.tmp - rm -rf "${TEMPDIR}"/debian-live/binary* "${TEMPDIR}"/debian-live/.stage/binary_* - mkdir "${TEMPDIR}"/debian-live/binary - mv "${TEMPDIR}"/debian-live/casper.tmp "${TEMPDIR}"/debian-live/binary/casper - touch "${TEMPDIR}"/debian-live/.stage/binary_chroot - touch "${TEMPDIR}"/debian-live/.stage/binary_rootfs - - # Creating build directory - mkdir -p "${TEMPDIR}"/debian-live - - cd "${TEMPDIR}"/debian-live - echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt - - # Generating images - lh_config -b usb-hdd -s tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source false ${OPTIONS} - lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - - echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt - fi - - if [ -f "${TEMPDIR}"/debian-live/binary.img ] - then - # Creating log directory - mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log - - # Moving logs - mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt - cp "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-packages.txt - - # Creating image directory - mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} - - # Moving images - mv "${TEMPDIR}"/debian-live/binary.img "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.img - fi - - # Cleanup - cd "${TEMPDIR}"/debian-live - lh_clean - done - - # Cleanup - cd "${TEMPDIR}"/debian-live - lh_clean purge - done -done - -# Cleaning up -if [ -f "${TEMPDIR}"/debian-live/chroot/proc/version ] -then - umount "${TEMPDIR}"/debian-live/chroot/proc -fi - -if [ -d "${TEMPDIR}"/debian-live/chroot/sys/kernel ] -then - umount "${TEMPDIR}"/debian-live/chroot/sys -fi - -# Removing build directory -rm -rf "${TEMPDIR}" - -# Creating md5sums -for DIRECTORY in "${DESTDIR}"/"${BUILD}"-builds/${DATE}/* -do - cd "${DIRECTORY}" - md5sum * > MD5SUMS -done - -# Creating current symlink -rm -f "${DESTDIR}"/"${BUILD}"-builds/current -ln -s ${DATE} "${DESTDIR}"/"${BUILD}"-builds/current - -echo "$(date +%b\ %d\ %H:%M:%S) ${HOST} live-build: end daily build." >> /var/log/live diff --git a/examples/cron/default b/examples/cron/default deleted file mode 100644 index 1778b5e89..000000000 --- a/examples/cron/default +++ /dev/null @@ -1,16 +0,0 @@ -# Defaults for /etc/cron.daily/live-build_autobuild - -AUTOBUILD="false" - -DATE="$(date +%Y%m%d)" -DESTDIR="/srv/debian-live" -TEMPDIR="/srv/tmp/live-build" - -OPTIONS="--binary-indices false" - -ARCHITECTURES="$(dpkg --print-architecture)" -DISTRIBUTIONS="sid" -MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/" -MIRROR_BINARY="http://ftp.debian.org/debian/" -MIRROR_BINARY_SECURITY="http://security.debian.org/" -PACKAGES_LISTS="standard rescue gnome-desktop kde-desktop xfce-desktop" diff --git a/examples/cron/images.sh b/examples/cron/images.sh deleted file mode 100755 index 022eaa4dc..000000000 --- a/examples/cron/images.sh +++ /dev/null @@ -1,215 +0,0 @@ -#!/bin/sh - -set -e - -# Static variables -DISTRIBUTIONS="${DISTRIBUTIONS:-lenny squeeze sid}" -FLAVOURS="${FLAVOURS:-standard rescue gnome-desktop kde-desktop lxde-desktop xfce-desktop}" -SOURCE="${SOURCE:-true}" - -MIRROR="${MIRROR:-http://cdn.debian.net/debian/}" -MIRROR_SECURITY="${MIRROR_SECURITY:-http://security.debian.org/}" - -# Dynamic variables -ARCHITECTURE="$(dpkg --print-architecture)" -DATE="$(date +%Y%m%d)" - -Set_defaults () -{ - # Distribution defaults - APT_RECOMMENDS="true" - BINARY_INDICES="true" - DEBIAN_INSTALLER="live" - TASKSEL="tasksel" - - # Distribution specific options (ugly!) - case "${DISTRIBUTION}" in - lenny) - APT_RECOMMENDS="false" - BINARY_INDICES="true" - DEBIAN_INSTALLER="false" - TASKSEL="aptitude" - - case "${ARCHITECTURE}" in - amd64) - case "${FLAVOUR}" in - gnome-desktop) - BINARY_INDICES="false" - - mkdir -p config/chroot_local-hooks - cd config/chroot_local-hooks - echo "apt-get remove --yes --purge openoffice.org-help-en-us" > package-removals - echo "apt-get remove --yes --purge epiphany-browser epiphany-browser-data epiphany-extensions epiphany-gecko" >> package-removals - echo "apt-get remove --yes --purge gnome-user-guide" >> package-removals - cd - - ;; - - kde-desktop) - BINARY_INDICES="false" - ;; - esac - ;; - - i386) - case "${FLAVOUR}" in - gnome-desktop|kde-desktop) - BINARY_INDICES="false" - KERNEL="-k 686" - ;; - esac - ;; - esac - ;; - - squeeze) - DEBIAN_INSTALLER_DISTRIBUTION="daily" - - LIVE_BOOT="2.0.6-1" - LIVE_CONFIG="2.0.7-1" - LIVE_INSTALLER="26" - DI_LAUNCHER="3" - - mkdir -p config/chroot_local-packages - cd config/chroot_local-packages - - # live-boot - if [ -n "${LIVE_BOOT}" ] - then - wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_${LIVE_BOOT}.dsc - wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_${LIVE_BOOT}.diff.gz - wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_$(echo ${LIVE_BOOT} | awk -F- '{ print $1 }').orig.tar.gz - wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot_${LIVE_BOOT}_all.deb - wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-boot-initramfs-tools_${LIVE_BOOT}_all.deb - wget -c http://live.debian.net/archive/packages/live-boot/${LIVE_BOOT}/live-initramfs_${LIVE_BOOT}_all.deb - fi - - # live-config - if [ -n "${LIVE_CONFIG}" ] - then - wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_${LIVE_CONFIG}.dsc - wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_${LIVE_CONFIG}.diff.gz - wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_$(echo ${LIVE_CONFIG} | awk -F- '{ print $1 }').orig.tar.gz - wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config_${LIVE_CONFIG}_all.deb - wget -c http://live.debian.net/archive/packages/live-config/${LIVE_CONFIG}/live-config-sysvinit_${LIVE_CONFIG}_all.deb - fi - - cd ${OLDPWD} - - mkdir -p config/binary_local-udebs - cd config/binary_local-udebs - - # live-installer - if [ -n "${LIVE_INSTALLER}" ] - then - wget -c http://ftp.debian.org/debian/pool/main/l/live-installer/live-installer_${LIVE_INSTALLER}.dsc - wget -c http://ftp.debian.org/debian/pool/main/l/live-installer/live-installer_${LIVE_INSTALLER}.tar.gz - wget -c http://ftp.debian.org/debian/pool/main/l/live-installer/live-installer_${LIVE_INSTALLER}_${ARCHITECTURE}.udeb - wget -c http://ftp.debian.org/debian/pool/main/b/base-installer/base-installer_1.113.dsc - wget -c http://ftp.debian.org/debian/pool/main/b/base-installer/base-installer_1.113.tar.gz - wget -c http://ftp.debian.org/debian/pool/main/b/base-installer/base-installer_1.113_all.udeb - wget -c http://ftp.debian.org/debian/pool/main/b/base-installer/bootstrap-base_1.113_${ARCHITECTURE}.udeb - fi - - cd - - - mkdir -p config/chroot_local-packages - cd config/chroot_local-packages - - # debian-installer-launcher - if [ -n "${DI_LAUNCHER}" ] - then - wget http://ftp.debian.org/debian/pool/main/d/debian-installer-launcher/debian-installer-launcher_${DI_LAUNCHER}.dsc - wget http://ftp.debian.org/debian/pool/main/d/debian-installer-launcher/debian-installer-launcher_${DI_LAUNCHER}.tar.gz - wget http://ftp.debian.org/debian/pool/main/d/debian-installer-launcher/debian-installer-launcher_${DI_LAUNCHER}_all.deb - fi - - cd - - ;; - esac -} - -# Build images -for DISTRIBUTION in ${DISTRIBUTIONS} -do - rm -rf cache/stages* - - for FLAVOUR in ${FLAVOURS} - do - if [ -e .stage ] - then - lb clean - fi - - if [ -e config ] - then - rm -f config/* || true - rmdir --ignore-fail-on-non-empty config/* || true - fi - - rm -rf cache/packages* - rm -rf cache/stages_rootfs - - Set_defaults - - lb config \ - --apt-recommends ${APT_RECOMMENDS} \ - --binary-indices ${BINARY_INDICES} \ - --bootstrap cdebootstrap \ - --cache-stages "bootstrap rootfs" \ - --debian-installer ${DEBIAN_INSTALLER} \ - --debian-installer-distribution ${DEBIAN_INSTALLER_DISTRIBUTION} \ - --distribution ${DISTRIBUTION} \ - --mirror-bootstrap ${MIRROR} \ - --mirror-chroot ${MIRROR} \ - --mirror-chroot-security ${MIRROR_SECURITY} \ - --packages-lists ${FLAVOUR} \ - --tasksel ${TASKSEL} ${KERNEL} - - lb build 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.log - - mv binary*.iso debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso - mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.list - mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.iso.packages - - if [ "${ARCHITECTURE}" != "powerpc" ] - then - lb clean --binary - lb config --binary-images usb-hdd - lb binary 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.log - - mv binary.img debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img - mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.list - mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.img.packages - fi - - if [ "${ARCHITECTURE}" != "powerpc" ] - then - lb clean - rm -rf cache/stages_rootfs - lb config --binary-images net - - lb build 2>&1 | tee debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.log - - mv binary-net.tar.gz debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz - mv binary.list debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.list - mv binary.packages debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.tar.gz.packages - - mv binary/*/filesystem.squashfs debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.squashfs - for memtest in tftpboot/debian-live/${ARCHITECTURE}/memtest*; do cp -f ${memtest} debian-live-${DISTRIBUTION}-${ARCHITECTURE}.$(basename ${memtest}); done || true - for kernel in tftpboot/debian-live/${ARCHITECTURE}/vmlinuz*; do cp -f ${kernel} debian-live-${DISTRIBUTION}-${ARCHITECTURE}.$(basename ${kernel}); done - for initrd in tftpboot/debian-live/${ARCHITECTURE}/initrd*; do cp ${initrd} debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${FLAVOUR}.$(basename ${initrd}); done - fi - - if [ "${SOURCE}" = "true" ] - then - lb config --source true - - lb source 2>&1 | tee debian-live-${DISTRIBUTION}-source-${FLAVOUR}.log - - mv source.debian.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian.tar.gz - mv source.debian.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian.tar.gz.list - mv source.debian-live.tar.gz debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian-live.tar.gz - mv source.debian-live.list debian-live-${DISTRIBUTION}-source-${FLAVOUR}.debian-live.tar.gz.list - fi - done -done |