diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:51 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (patch) | |
tree | 621dc56a00a65ab0eb1fd4e7d42ad4e45d718741 /examples | |
parent | 4739146fc6c4de8b16418517bb882312c475195c (diff) | |
download | live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.zip live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.tar.gz |
Adding live-helper 1.0~a7-1.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/beryl-hook.sh | 14 | ||||
-rw-r--r-- | examples/beryl.sources.list | 14 | ||||
-rwxr-xr-x | examples/daily-cron.sh | 136 | ||||
-rw-r--r-- | examples/edu.sources.list | 11 | ||||
-rwxr-xr-x | examples/etch+beryl-cron.sh | 146 | ||||
-rwxr-xr-x | examples/etch-cron.sh | 136 | ||||
-rw-r--r-- | examples/fai.sources.list | 9 | ||||
-rwxr-xr-x | examples/weekly-cron.sh | 136 |
8 files changed, 590 insertions, 12 deletions
diff --git a/examples/beryl-hook.sh b/examples/beryl-hook.sh index f1658a5..a58056d 100755 --- a/examples/beryl-hook.sh +++ b/examples/beryl-hook.sh @@ -6,17 +6,6 @@ # To enable it, copy this hook into your config/chroot_localhooks directory. # At boot prompt, type 'live aixgl', press enter and have fun. -# Update sources.list -cat >> /etc/apt/sources.list << EOF -# beryl-project -deb http://debian.beryl-project.org/ etch main -EOF - -if grep deb-src /etc/apt/sources.list -then - echo "deb-src http://debian.beryl-project.org/ etch main" >> /etc/apt/sources.list -fi - # Import archive signing key wget -O - http://debian.beryl-project.org/root@lupine.me.uk.gpg | apt-key add - @@ -24,7 +13,8 @@ wget -O - http://debian.beryl-project.org/root@lupine.me.uk.gpg | apt-key add - apt-get update # Install packages -PACKAGES="beryl beryl-core beryl-manager beryl-plugins beryl-plugins-unsupported beryl-settings beryl-settings-bindings beryl-settings-simple" +PACKAGES="beryl beryl-core beryl-manager beryl-plugins beryl-settings beryl-settings-bindings beryl-settings-simple" +#beryl-plugins-unsupported if [ -f /usr/bin/gnome-session ] then diff --git a/examples/beryl.sources.list b/examples/beryl.sources.list new file mode 100644 index 0000000..8295230 --- /dev/null +++ b/examples/beryl.sources.list @@ -0,0 +1,14 @@ +## This is a sources.list for live-helper(7) to use packages from the +## Beryl Etch repository. +## +## To enable it, copy this file to your config/chroot_sources directory, once +## as e.g. beryl.build and once as beryl.image. +## Additionally, you need to copy the beryl-hook.sh file to your +## config/chroot_localhooks directory. +## +## Remeber to also import http://debian.beryl-project.org/root@lupine.me.uk.gpg +## into your trusted keyring. + +# Beryl packages for Etch +deb http://debian.beryl-project.org/ etch main +deb-src http://debian.beryl-project.org/ etch main diff --git a/examples/daily-cron.sh b/examples/daily-cron.sh new file mode 100755 index 0000000..49156c5 --- /dev/null +++ b/examples/daily-cron.sh @@ -0,0 +1,136 @@ +#!/bin/sh -x + +set -e + +BUILD="daily" + +AUTOBUILD_ARCHITECTURES="`dpkg --print-architecture`" +AUTOBUILD_DISTRIBUTIONS="sid" +AUTOBUILD_PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +AUTOBUILD_OPTIONS="--apt-recommends disabled" + +AUTOBUILD_DATE="`date +%Y%m%d`" +AUTOBUILD_DESTDIR="/srv/debian-unofficial/ftp/debian-live" +AUTOBUILD_TEMPDIR="/srv/tmp" + +AUTOBUILD_MIRROR="http://ftp.de.debian.org/debian/" +AUTOBUILD_MIRROR_SECURITY="http://ftp.de.debian.org/debian-security/" + +# Check for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Check for live-helper defaults +#if [ -r /etc/default/live-helper ] +#then +# . /etc/default/live-helper +#else +# echo "E: /etc/default/live-helper missing." +# exit 1 +#fi + +# Check for autobuild +#if [ "${AUTOBUILD}" != "enabled" ] +#then +# exit 0 +#fi + +# Check for build directory +if [ ! -d "${AUTOBUILD_TEMPDIR}" ] +then + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live +else + # FIXME: maybe we should just remove the left overs. + echo "E: ${AUTOBUILD_TEMPDIR} needs cleanup." + exit 1 +fi + +for ARCHITECTURE in ${AUTOBUILD_ARCHITECTURES} +do + for DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} + do + for PACKAGES_LIST in ${AUTOBUILD_PACKAGES_LISTS} + do + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt ] + then + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source enabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso ] && [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt + mv "${AUTOBUILD_TEMPDIR}"/debian-live/packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.iso + + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source + mv "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source/debian-live-${DISTRIBUTION}-source-${PACKAGES_LIST}.tar + fi + + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt ] + then + # Workaround of missing multi-binary support in live-helper + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp + rm -rf "${AUTOBUILD_TEMPDIR}"/debian-live/binary* "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_* + mkdir "${AUTOBUILD_TEMPDIR}"/debian-live/binary + mv "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_chroot + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_rootfs + + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b usb -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source disabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt + cp "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.img + fi + + # Cleanup + cd "${AUTOBUILD_TEMPDIR}"/debian-live + lh_clean + done + done +done + +# Cleanup +if [ -e "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc/version ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc +fi + +if [ -d "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys/kernel ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys +fi + +rm -rf "${AUTOBUILD_TEMPDIR}" + +# md5sums +for DIRECTORY in "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/* +do + cd "${DIRECTORY}" + md5sum * > MD5SUMS +done + +# Current symlink +rm -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current +ln -s ${AUTOBUILD_DATE} "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current diff --git a/examples/edu.sources.list b/examples/edu.sources.list new file mode 100644 index 0000000..79acacd --- /dev/null +++ b/examples/edu.sources.list @@ -0,0 +1,11 @@ +## This is a sources.list for live-helper(7) to use packages from the +## Debian Edu/Skolelinux repository. +## +## To enable it, copy this file to your config/chroot_sources directory, once +## as e.g. edu.build and once as edu.image. +## +## Remeber to add debian-edu-archive-keyring to your package selection. + +# Debian Edu/Skolelinux +deb http://ftp.skolelinux.org/skolelinux/ etch-test local +deb-src http://ftp.skolelinux.org/skolelinux/ etch-test local diff --git a/examples/etch+beryl-cron.sh b/examples/etch+beryl-cron.sh new file mode 100755 index 0000000..69e2ba8 --- /dev/null +++ b/examples/etch+beryl-cron.sh @@ -0,0 +1,146 @@ +#!/bin/sh -x + +set -e + +BUILD="etch+beryl" + +AUTOBUILD_ARCHITECTURES="`dpkg --print-architecture`" +AUTOBUILD_DISTRIBUTIONS="etch" +AUTOBUILD_PACKAGES_LISTS="gnome-desktop kde-desktop xfce-desktop" +AUTOBUILD_OPTIONS="--apt-recommends disabled" + +AUTOBUILD_DATE="r0_1.0~a7-1" +AUTOBUILD_DESTDIR="/srv/debian-unofficial/ftp/debian-live" +AUTOBUILD_TEMPDIR="/srv/tmp" + +AUTOBUILD_MIRROR="http://ftp.de.debian.org/debian/" +AUTOBUILD_MIRROR_SECURITY="http://ftp.de.debian.org/debian-security/" + +# Check for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Check for live-helper defaults +#if [ -r /etc/default/live-helper ] +#then +# . /etc/default/live-helper +#else +# echo "E: /etc/default/live-helper missing." +# exit 1 +#fi + +# Check for autobuild +#if [ "${AUTOBUILD}" != "enabled" ] +#then +# exit 0 +#fi + +# Check for build directory +if [ ! -d "${AUTOBUILD_TEMPDIR}" ] +then + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live +else + # FIXME: maybe we should just remove the left overs. + echo "E: ${AUTOBUILD_TEMPDIR} needs cleanup." + exit 1 +fi + +for ARCHITECTURE in ${AUTOBUILD_ARCHITECTURES} +do + for DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} + do + for PACKAGES_LIST in ${AUTOBUILD_PACKAGES_LISTS} + do + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt ] + then + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + + # Beryl hook + mkdir -p debian-live/config/chroot_localhooks + cp /usr/share/live-helper/examples/beryl-hook.sh debian-live/config/chroot_localhooks/beryl.sh + mkdir -p debian-live/config/chroot_sources + wget http://debian.beryl-project.org/root@lupine.me.uk.gpg -O debian-live/config/chroot_sources/beryl.build.gpg + wget http://debian.beryl-project.org/root@lupine.me.uk.gpg -O debian-live/config/chroot_sources/beryl.image.gpg + cp /usr/share/live-helper/examples/beryl.sources.list debian-live/config/chroot_sources/beryl.build + cp /usr/share/live-helper/examples/beryl.sources.list debian-live/config/chroot_sources/beryl.image + + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source enabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso ] && [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt + mv "${AUTOBUILD_TEMPDIR}"/debian-live/packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}.iso + + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source + mv "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source/debian-live-etch+beryl-source-${PACKAGES_LIST}.tar + fi + + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt ] + then + # Workaround of missing multi-binary support in live-helper + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp + rm -rf "${AUTOBUILD_TEMPDIR}"/debian-live/binary* "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_* + mkdir "${AUTOBUILD_TEMPDIR}"/debian-live/binary + mv "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_chroot + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_rootfs + + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b usb -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source disabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt + cp "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}.img + fi + + # Cleanup + cd "${AUTOBUILD_TEMPDIR}"/debian-live + lh_clean + done + done +done + +# Cleanup +if [ -e "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc/version ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc +fi + +if [ -d "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys/kernel ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys +fi + +rm -rf "${AUTOBUILD_TEMPDIR}" + +# md5sums +for DIRECTORY in "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/* +do + cd "${DIRECTORY}" + md5sum * > MD5SUMS +done + +# Current symlink +rm -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current +ln -s ${AUTOBUILD_DATE} "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current diff --git a/examples/etch-cron.sh b/examples/etch-cron.sh new file mode 100755 index 0000000..d5ec6e7 --- /dev/null +++ b/examples/etch-cron.sh @@ -0,0 +1,136 @@ +#!/bin/sh -x + +set -e + +BUILD="etch" + +AUTOBUILD_ARCHITECTURES="`dpkg --print-architecture`" +AUTOBUILD_DISTRIBUTIONS="etch" +AUTOBUILD_PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +AUTOBUILD_OPTIONS="--apt-recommends disabled" + +AUTOBUILD_DATE="r0_1.0~a7-1" +AUTOBUILD_DESTDIR="/srv/debian-unofficial/ftp/debian-live" +AUTOBUILD_TEMPDIR="/srv/tmp" + +AUTOBUILD_MIRROR="http://ftp.de.debian.org/debian/" +AUTOBUILD_MIRROR_SECURITY="http://ftp.de.debian.org/debian-security/" + +# Check for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Check for live-helper defaults +#if [ -r /etc/default/live-helper ] +#then +# . /etc/default/live-helper +#else +# echo "E: /etc/default/live-helper missing." +# exit 1 +#fi + +# Check for autobuild +#if [ "${AUTOBUILD}" != "enabled" ] +#then +# exit 0 +#fi + +# Check for build directory +if [ ! -d "${AUTOBUILD_TEMPDIR}" ] +then + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live +else + # FIXME: maybe we should just remove the left overs. + echo "E: ${AUTOBUILD_TEMPDIR} needs cleanup." + exit 1 +fi + +for ARCHITECTURE in ${AUTOBUILD_ARCHITECTURES} +do + for DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} + do + for PACKAGES_LIST in ${AUTOBUILD_PACKAGES_LISTS} + do + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt ] + then + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source enabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso ] && [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt + mv "${AUTOBUILD_TEMPDIR}"/debian-live/packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.iso + + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source + mv "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source/debian-live-${DISTRIBUTION}-source-${PACKAGES_LIST}.tar + fi + + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt ] + then + # Workaround of missing multi-binary support in live-helper + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp + rm -rf "${AUTOBUILD_TEMPDIR}"/debian-live/binary* "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_* + mkdir "${AUTOBUILD_TEMPDIR}"/debian-live/binary + mv "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_chroot + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_rootfs + + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b usb -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source disabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt + cp "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.img + fi + + # Cleanup + cd "${AUTOBUILD_TEMPDIR}"/debian-live + lh_clean + done + done +done + +# Cleanup +if [ -e "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc/version ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc +fi + +if [ -d "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys/kernel ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys +fi + +rm -rf "${AUTOBUILD_TEMPDIR}" + +# md5sums +for DIRECTORY in "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/* +do + cd "${DIRECTORY}" + md5sum * > MD5SUMS +done + +# Current symlink +rm -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current +ln -s ${AUTOBUILD_DATE} "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current diff --git a/examples/fai.sources.list b/examples/fai.sources.list new file mode 100644 index 0000000..2c6e80f --- /dev/null +++ b/examples/fai.sources.list @@ -0,0 +1,9 @@ +## This is a sources.list for live-helper(7) to use packages from the +## FAI - Fully Automated Install repository. +## +## To enable it, copy this file to your config/chroot_sources directory, once +## as e.g. fai.build and once as fai.image. + +# FAI - Fully Automated Install +deb http://www.informatik.uni-koeln.de/fai/download/ etch koeln +deb-src http://www.informatik.uni-koeln.de/fai/download/ etch koeln diff --git a/examples/weekly-cron.sh b/examples/weekly-cron.sh new file mode 100755 index 0000000..18780eb --- /dev/null +++ b/examples/weekly-cron.sh @@ -0,0 +1,136 @@ +#!/bin/sh -x + +set -e + +BUILD="weekly" + +AUTOBUILD_ARCHITECTURES="`dpkg --print-architecture`" +AUTOBUILD_DISTRIBUTIONS="lenny" +AUTOBUILD_PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +AUTOBUILD_OPTIONS="--apt-recommends disabled" + +AUTOBUILD_DATE="`date +%Y%m%d`" +AUTOBUILD_DESTDIR="/srv/debian-unofficial/ftp/debian-live" +AUTOBUILD_TEMPDIR="/srv/tmp" + +AUTOBUILD_MIRROR="http://ftp.de.debian.org/debian/" +AUTOBUILD_MIRROR_SECURITY="http://ftp.de.debian.org/debian-security/" + +# Check for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Check for live-helper defaults +#if [ -r /etc/default/live-helper ] +#then +# . /etc/default/live-helper +#else +# echo "E: /etc/default/live-helper missing." +# exit 1 +#fi + +# Check for autobuild +#if [ "${AUTOBUILD}" != "enabled" ] +#then +# exit 0 +#fi + +# Check for build directory +if [ ! -d "${AUTOBUILD_TEMPDIR}" ] +then + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live +else + # FIXME: maybe we should just remove the left overs. + echo "E: ${AUTOBUILD_TEMPDIR} needs cleanup." + exit 1 +fi + +for ARCHITECTURE in ${AUTOBUILD_ARCHITECTURES} +do + for DISTRIBUTION in ${AUTOBUILD_DISTRIBUTIONS} + do + for PACKAGES_LIST in ${AUTOBUILD_PACKAGES_LISTS} + do + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt ] + then + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source enabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso ] && [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-log.txt + mv "${AUTOBUILD_TEMPDIR}"/debian-live/packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.iso "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.iso + + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source + mv "${AUTOBUILD_TEMPDIR}"/debian-live/source.tar "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/source/debian-live-${DISTRIBUTION}-source-${PACKAGES_LIST}.tar + fi + + if [ ! -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt ] + then + # Workaround of missing multi-binary support in live-helper + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp + rm -rf "${AUTOBUILD_TEMPDIR}"/debian-live/binary* "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_* + mkdir "${AUTOBUILD_TEMPDIR}"/debian-live/binary + mv "${AUTOBUILD_TEMPDIR}"/debian-live/casper.tmp "${AUTOBUILD_TEMPDIR}"/debian-live/binary/casper + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_chroot + touch "${AUTOBUILD_TEMPDIR}"/debian-live/.stage/binary_rootfs + + # Generating images + mkdir -p "${AUTOBUILD_TEMPDIR}"/debian-live + cd "${AUTOBUILD_TEMPDIR}" + make-live -b usb -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-build ${AUTOBUILD_MIRROR} --mirror-build-security ${AUTOBUILD_MIRROR_SECURITY} --source disabled ${AUTOBUILD_OPTIONS} > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt 2>&1 + fi + + if [ -f "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img ] + then + # Moving logs + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log + mv "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-log.txt + cp "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-iso-packages.txt "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${AUTOBUILD_DATE}-usb-packages.txt + + # Moving images + mkdir -p "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE} + mv "${AUTOBUILD_TEMPDIR}"/debian-live/binary.img "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/${ARCHITECTURE}/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}.img + fi + + # Cleanup + cd "${AUTOBUILD_TEMPDIR}"/debian-live + lh_clean + done + done +done + +# Cleanup +if [ -e "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc/version ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/proc +fi + +if [ -d "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys/kernel ] +then + umount "${AUTOBUILD_TEMPDIR}"/debian-live/chroot/sys +fi + +rm -rf "${AUTOBUILD_TEMPDIR}" + +# md5sums +for DIRECTORY in "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/${AUTOBUILD_DATE}/* +do + cd "${DIRECTORY}" + md5sum * > MD5SUMS +done + +# Current symlink +rm -f "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current +ln -s ${AUTOBUILD_DATE} "${AUTOBUILD_DESTDIR}"/"${BUILD}"-builds/current |