diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:09 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | 97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179 (patch) | |
tree | d7facbbbf53b1a5bc0fa92f671f5b1e29a7e3200 /examples | |
parent | 7c68e6ebca01f64501453fa53941ac77b9c2c335 (diff) | |
download | live-build-97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179.zip live-build-97c3a13dcc9becf93cb7c2aa89ea3e00f06b9179.tar.gz |
Adding live-helper 1.0~a10-1.
Diffstat (limited to 'examples')
26 files changed, 1105 insertions, 628 deletions
diff --git a/examples/beryl-hook.sh b/examples/beryl-hook.sh deleted file mode 100755 index a58056d..0000000 --- a/examples/beryl-hook.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# This is a hook for live-helper(7) to install beryl and enable aixgl. -# It was originally written by Inigo Tejedor Arrondo <inigo@navarrux.org>. -# -# To enable it, copy this hook into your config/chroot_localhooks directory. -# At boot prompt, type 'live aixgl', press enter and have fun. - -# Import archive signing key -wget -O - http://debian.beryl-project.org/root@lupine.me.uk.gpg | apt-key add - - -# Update indices -apt-get update - -# Install packages -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 - PACKAGES="${PACKAGES} emerald emerald-themes heliodor" -fi - -if [ -f /usr/bin/kstart ] -then - PACKAGES="${PACKAGES} aquamarine" -fi - -apt-get install --yes ${PACKAGES} - -# Add init script -cat > /etc/init.d/aixgl << EOF -#!/bin/sh - -if cat /proc/cmdline | grep aixgl > /dev/null -then - echo "Configuring xorg for aixgl..." - - echo "" >> /etc/X11/xorg.conf - echo "# Added by beryl-hook.sh" >> /etc/X11/xorg.conf - echo "Section \"Extensions\"" >> /etc/X11/xorg.conf - echo " Option \"Composite\" \"Enable\"" >> /etc/X11/xorg.conf - echo "EndSection" >> /etc/X11/xorg.conf - - sed -i -e "s/Section \"Device\""/"Section \"Device\"\n\t Option \"XAANoOffscreenPixmaps\" \"true\"\n\t Option \"AddARGBGLXVisuals\" \"on\"\n\t Option \"AllowGLXWithComposite\" \"true\"/" -e "s/Section \"Module\""/"Section \"Module\"\n\t Load \"i2c\"\n\t Load \"int10\"\n\t Load \"xtrap\"\n\t Load \"vbe\"/" /etc/X11/xorg.conf -fi -EOF - -chmod 0755 /etc/init.d/aixgl -update-rc.d aixgl defaults diff --git a/examples/cron/daily.sh b/examples/cron/daily.sh new file mode 100755 index 0000000..3d93a33 --- /dev/null +++ b/examples/cron/daily.sh @@ -0,0 +1,166 @@ +#!/bin/sh -x + +set -e + +BUILD="daily" + +# Begin custom defaults +AUTOBUILD="enabled" + +DATE="`date +%Y%m%d`" +DESTDIR="/srv/debian-unofficial/ftp/debian-live" +TEMPDIR="/srv/tmp/live-helper" + +OPTIONS="--binary-indices disabled" + +ARCHITECTURES="`dpkg --print-architecture`" +DISTRIBUTIONS="sid" +MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" +MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" +MIRROR_BINARY="http://ftp.debian.org/debian/" +MIRROR_BINARY_SECURITY="http://security.debian.org/" +PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +# End custom defaults + +# Checking for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Checking 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 + +# Checking for autobuild +if [ "${AUTOBUILD}" != "enabled" ] +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 + +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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} >> "${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-helper + 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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b usb-hdd -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} >> "${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 diff --git a/examples/cron/etch+beryl.sh b/examples/cron/etch+beryl.sh new file mode 100755 index 0000000..a3d3def --- /dev/null +++ b/examples/cron/etch+beryl.sh @@ -0,0 +1,175 @@ +#!/bin/sh -x + +set -e + +BUILD="etch+beryl" + +# Begin custom defaults +AUTOBUILD="enabled" + +DATE="r0_1.0~a10-1" +DESTDIR="/srv/debian-unofficial/ftp/debian-live" +TEMPDIR="/srv/tmp/live-helper" + +OPTIONS="--binary-indices disabled" + +ARCHITECTURES="`dpkg --print-architecture`" +DISTRIBUTIONS="etch" +MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" +MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" +MIRROR_BINARY="http://ftp.debian.org/debian/" +MIRROR_BINARY_SECURITY="http://security.debian.org/" +PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +# End custom defaults + +# Checking for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Checking 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 + +# Checking for autobuild +if [ "${AUTOBUILD}" != "enabled" ] +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 + +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-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt ] + then + # Creating build directory + mkdir -p "${TEMPDIR}"/debian-live + + cd "${TEMPDIR}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Beryl hook + mkdir -p debian-live/config/chroot_local-hooks + cp /usr/share/live-helper/examples/hooks/beryl.sh debian-live/config/chroot_local-hooks/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/sources.list/beryl debian-live/config/chroot_sources/beryl.build + cp /usr/share/live-helper/examples/sources.list/beryl debian-live/config/chroot_sources/beryl.image + + # Generating images + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} >> "${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-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt + mv "${TEMPDIR}"/debian-live/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-etch+beryl-${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-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}.iso + mv "${TEMPDIR}"/debian-live/source.tar "${DESTDIR}"/"${BUILD}"-builds/${DATE}/source/debian-live-etch+beryl-source-${PACKAGES_LIST}.tar + fi + + if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt ] + then + # Workaround of missing multi-binary support in live-helper + 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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b usb-hdd -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} >> "${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-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt + cp "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-etch+beryl-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-etch+beryl-${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-etch+beryl-${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 diff --git a/examples/cron/etch.sh b/examples/cron/etch.sh new file mode 100755 index 0000000..a53452c --- /dev/null +++ b/examples/cron/etch.sh @@ -0,0 +1,166 @@ +#!/bin/sh -x + +set -e + +BUILD="etch" + +# Begin custom defaults +AUTOBUILD="enabled" + +DATE="r0_1.0~a10-1" +DESTDIR="/srv/debian-unofficial/ftp/debian-live" +TEMPDIR="/srv/tmp/live-helper" + +OPTIONS="--binary-indices disabled" + +ARCHITECTURES="`dpkg --print-architecture`" +DISTRIBUTIONS="etch" +MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" +MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" +MIRROR_BINARY="http://ftp.debian.org/debian/" +MIRROR_BINARY_SECURITY="http://security.debian.org/" +PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +# End custom defaults + +# Checking for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Checking 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 + +# Checking for autobuild +if [ "${AUTOBUILD}" != "enabled" ] +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 + +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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} >> "${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-helper + 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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b usb-hdd -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} >> "${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 diff --git a/examples/cron/snapshots.sh b/examples/cron/snapshots.sh new file mode 100755 index 0000000..199dc29 --- /dev/null +++ b/examples/cron/snapshots.sh @@ -0,0 +1,130 @@ +#!/bin/sh + +# Needs: build-essential fakeroot lsb-release svn [...] + +# Static variables +PACKAGES="live-helper live-initramfs live-webbuilder" + +DEBEMAIL="debian-live-devel@lists.alioth.debian.org" +EMAIL="debian-live-devel@lists.alioth.debian.org" +DEBFULLNAME="Debian Live Autobuilder" +NAME="Debian Live Autobuilder" + +export DEBEMAIL EMAIL DEBFULLNAME NAME + +TEMPDIR="/srv/tmp/svn-snapshots" +SERVER="/srv/debian-unofficial/ftp/debian-live/debian-snapshots" + +DATE_START="`date -R`" + +# Checking lock file +if [ -f "${SERVER}"/Archive-Update-in-Progress ] +then + echo "E: locked." + exit 1 +fi + +# Creating server directory +if [ ! -d "${SERVER}" ] +then + mkdir -p "${SERVER}" +fi + +# Creating lock trap +trap "test -f ${SERVER}/Archive-Update-in-Progress && rm -f ${SERVER}/Archive-Update-in-Progress; exit 0" 0 1 2 3 9 15 + +# Creating lock file +echo "${DATE_START}" > "${SERVER}"/Archive-Update-in-Progress + +# Processing packages +for PACKAGE in ${PACKAGES} +do + # Cleaning build directory + if [ -d "${TEMPDIR}" ] + then + rm -rf "${TEMPDIR}" + fi + + # Creating build directory + mkdir -p "${TEMPDIR}" + + # Getting sources + cd "${TEMPDIR}" + svn co svn://svn.debian.org/debian-live/dists/trunk/${PACKAGE} ${PACKAGE} + + # Getting version + cd "${TEMPDIR}"/${PACKAGE} + VERSION="`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | awk -F- '{ print $1 }'`" + + # Getting revision + cd "${TEMPDIR}"/${PACKAGE} + REVISION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`" + + # Check for existing package + if [ ! -f "${SERVER}"/${PACKAGE}_${VERSION}~${REVISION}.dsc ] || [ "${1}" = "--force" ] + then + UPDATE_INDICES="true" + + # Renaming directory + mv "${TEMPDIR}"/${PACKAGE} "${TEMPDIR}"/${PACKAGE}-${VERSION}~${REVISION} + + # Building package + cd "${TEMPDIR}"/${PACKAGE}-${VERSION}~${REVISION} + find . -type d -name .svn | xargs rm -rf + dch --force-bad-version --newversion ${VERSION}~${REVISION} --distribution UNRELEASED Autobuild snapshot of SVN r${REVISION}. + dpkg-buildpackage -rfakeroot -sa -uc -us + + # Removing sources + rm -rf "${TEMPDIR}"/${PACKAGE}-${VERSION}~${REVISION} + + # Creating directory + if [ ! -d "${SERVER}" ] + then + mkdir -p "${SERVER}" + fi + + # Removing old packages + if ls "${SERVER}"/"${PACKAGE}"* &> /dev/null + then + rm -f "${SERVER}"/"${PACKAGE}"* + fi + + # Moving packages + mv "${TEMPDIR}"/${PACKAGE}* "${SERVER}" + else + # Remove sources + rm -rf "${TEMPDIR}"/${PACKAGE} + fi +done + +if [ "${UPDATE_INDICES}" = "true" ] +then + LAST_UPDATE="`date -R`" + + cd "${SERVER}" + + # Updating binary indices + apt-ftparchive packages ./ > Packages + gzip -9 -c Packages > Packages.gz + + # Updating source indices + apt-ftparchive sources ./ > Sources + gzip -9 -c Sources > Sources.gz +fi + +# Reading timestamp +if [ -z "${LAST_UPDATE}" ] +then + LAST_UPDATE="`awk -F: '/Last update:/ { print $2":"$3":"$4 }' ${SERVER}/LAST_BUILD | sed -e 's/ //'`" +fi + +# Writing timestamp +cat > "${SERVER}"/LAST_BUILD << EOF +Last run begin: ${DATE_START} +Last run end: `date -R` + +Last update: ${LAST_UPDATE} +EOF + +# Removing build directory +rm -rf "${TEMPDIR}" diff --git a/examples/cron/weekly.sh b/examples/cron/weekly.sh new file mode 100755 index 0000000..98bd7ff --- /dev/null +++ b/examples/cron/weekly.sh @@ -0,0 +1,166 @@ +#!/bin/sh -x + +set -e + +BUILD="weekly" + +# Begin custom defaults +AUTOBUILD="enabled" + +DATE="`date +%Y%m%d`" +DESTDIR="/srv/debian-unofficial/ftp/debian-live" +TEMPDIR="/srv/tmp/live-helper" + +OPTIONS="--binary-indices disabled" + +ARCHITECTURES="`dpkg --print-architecture`" +DISTRIBUTIONS="lenny" +MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" +MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" +MIRROR_BINARY="http://ftp.debian.org/debian/" +MIRROR_BINARY_SECURITY="http://security.debian.org/" +PACKAGES_LISTS="standard gnome-desktop kde-desktop xfce-desktop" +# End custom defaults + +# Checking for live-helper availability +if [ ! -x /usr/bin/make-live ] +then + exit 0 +fi + +# Checking 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 + +# Checking for autobuild +if [ "${AUTOBUILD}" != "enabled" ] +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 + +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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b iso -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} >> "${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-helper + 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}" + echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + + # Generating images + make-live -b usb-hdd -s generic --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} >> "${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 diff --git a/examples/daily-cron.sh b/examples/daily-cron.sh deleted file mode 100755 index 9dbe245..0000000 --- a/examples/daily-cron.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt -make-live -b usb-hdd -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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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-hdd-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/etch+beryl-cron.sh b/examples/etch+beryl-cron.sh deleted file mode 100755 index 372f7e2..0000000 --- a/examples/etch+beryl-cron.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/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~a8-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 - - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - make-live -b usb-hdd -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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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-hdd-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 deleted file mode 100755 index 0e526f7..0000000 --- a/examples/etch-cron.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/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~a8-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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - make-live -b usb-hdd -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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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-hdd-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/hooks/beryl.sh b/examples/hooks/beryl.sh new file mode 100755 index 0000000..e201d81 --- /dev/null +++ b/examples/hooks/beryl.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install beryl and enable aiglx. +# It was originally written by Inigo Tejedor Arrondo <inigo@navarrux.org>. +# +# To enable it, copy this hook into your config/chroot_local-hooks directory. +# for forcing aiglx activation type at boot prompt "live forceaiglx" +# for forcing aiglx deactivation type "live noaiglx" + +# Importing archive signing key +wget -O - http://debian.beryl-project.org/root@lupine.me.uk.gpg | apt-key add - + +# Updating indices +apt-get update + +# Installing packages +PACKAGES="beryl beryl-core beryl-manager beryl-plugins beryl-settings beryl-settings-bindings beryl-settings-simple mesa-utils" + +dpkg -s gnome-core > /dev/null 2>&1 && PACKAGES="${PACKAGES} emerald emerald-themes heliodor" +dpkg -s kde-core > /dev/null 2>&1 && PACKAGES="${PACKAGES} aquamarine" + +apt-get install --yes ${PACKAGES} + +# Adding init script +cat > /etc/init.d/aiglx << EOF +#!/bin/sh +activate_3d() +{ + activate_aiglx + activate_beryl +} + +activate_aiglx() +{ + echo "" >> /etc/X11/xorg.conf + echo "# Added by beryl-hook.sh" >> /etc/X11/xorg.conf + echo "Section \"Extensions\"" >> /etc/X11/xorg.conf + echo " Option \"Composite\" \"Enable\"" >> /etc/X11/xorg.conf + echo "EndSection" >> /etc/X11/xorg.conf + + sed -i -e "s/Section \"Device\""/"Section \"Device\"\n\t Option \"XAANoOffscreenPixmaps\" \"true\"\n\t Option \"AddARGBGLXVisuals\" \"on\"\n\t Option \"AllowGLXWithComposite\" \"true\"/" -e "s/Section \"Module\""/"Section \"Module\"\n\t Load \"i2c\"\n\t Load \"int10\"\n\t Load \"xtrap\"\n\t Load \"vbe\"/" /etc/X11/xorg.conf +} + +activate_beryl() +{ + # http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html + ! [ -d /etc/xdg/autostart ] && mkdir -p /etc/xdg/autostart + +cat > /etc/xdg/autostart/beryl-manager.desktop << EOS +[Desktop Entry] +Encoding=UTF-8 +Name=Beryl Manager +GenericName=3D Window Manager +Comment=Beryl Manager daemon +Icon= +Exec=beryl-starter +Terminal=false +Type=Application +Categories= +EOS + +cat > /usr/local/bin/beryl-starter << EOS +#!/bin/sh +glxinfo > /dev/null 2>&1 && beryl-manager +EOS + +chmod 0755 /usr/local/bin/beryl-starter +} + +if ! cat /proc/cmdline | grep noaiglx > /dev/null +then + echo "Configuring xorg for aiglx..." + activate_3d +fi +EOF + +chmod 0755 /etc/init.d/aiglx +update-rc.d aiglx defaults diff --git a/examples/hooks/ipw2100.sh b/examples/hooks/ipw2100.sh new file mode 100755 index 0000000..fc9e033 --- /dev/null +++ b/examples/hooks/ipw2100.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ipw2100 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "contrib" sections and the 686 flavour. +# +# e.g with make-live : --sections "main contrib" --kernel-flavour 686 + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant --non-inter --quiet auto-install ipw2100 +module-assistant clean ipw2100 + +# Installing firmware (http://ipw2100.sourceforge.net/firmware.php) +# grabbing 0.55 (Wed May 16 15:17:38 -- matth) +wget --referer "http://ipw2100.sourceforge.net/firmware.php" "http://ipw2100.sourceforge.net/firmware.php?i_agree_to_the_license=yes&f=ipw2100-fw-1.3.tgz" -O /tmp/ipw2100-fw-1.3.tgz + +cd /tmp +tar xfvz ipw2100-fw-1.3.tgz +mv ipw2100-1.3* /lib/firmware +rm -f ipw2100-fw-1.3.tgz +cd ${OLDPWD} diff --git a/examples/hooks/ipw2200.sh b/examples/hooks/ipw2200.sh new file mode 100755 index 0000000..fd2fc99 --- /dev/null +++ b/examples/hooks/ipw2200.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install nvidia-legacy drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "contrib" sections and the 686 flavour. +# +# e.g with make-live : --sections "main contrib" --kernel-flavour 686 + +# Updating indices +apt-get update + +# Building kernel mdoule +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant --non-inter --quiet auto-install ipw2200 +module-assistant clean ipw2200 + +# Installing firmware (http://ipw2200.sourceforge.net/firmware.php) +# grabbing 3.0 (Wed May 16 15:17:38 -- matth) +wget --referer "http://ipw2200.sourceforge.net/firmware.php" "http://ipw2200.sourceforge.net/firmware.php?i_agree_to_the_license=yes&f=ipw2200-fw-3.0.tgz" -O /tmp/ipw2200-fw-3.0.tgz + +cd /tmp +tar xfvz ipw2200-fw-3.0.tgz +cp ipw2200-fw-3.0/*.fw /lib/firmware/ +rm -rf ipw2200-fw-3.0* +cd ${OLDPWD} diff --git a/examples/hooks/ipw3945.sh b/examples/hooks/ipw3945.sh new file mode 100755 index 0000000..04d235b --- /dev/null +++ b/examples/hooks/ipw3945.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ipw3945 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "non-free" sections +# +# e.g with make-live : --sections "main non-free" + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install ipw3945 # interactive mode for now +module-assistant clean ipw3945 + +apt-get install ipw3945d firmware-ipw3945 + +# hackish, autorun regulatory daemon, update-rc.d will reject that +ln -s /etc/init.d/ipw3945d /etc/rc2.d/S19ipw3945d diff --git a/examples/hooks/madwifi.sh b/examples/hooks/madwifi.sh new file mode 100755 index 0000000..f45b968 --- /dev/null +++ b/examples/hooks/madwifi.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install madwifi drivers +# To enable it, copy this hook into your config/chroot_localhooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "non-free" sections +# +# e.g with make-live : --sections "main non-free" + +# NOTE: it runs in interactive mode + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install madwifi +module-assistant clean madwifi + +# Installing aditional stuff +apt-get install --yes madwifi-tools madwifi-doc diff --git a/examples/hooks/nvidia-legacy.sh b/examples/hooks/nvidia-legacy.sh new file mode 100755 index 0000000..cc1ceb4 --- /dev/null +++ b/examples/hooks/nvidia-legacy.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install nvidia-legacy drivers +# To enable it, copy this hook into your config/chroot_localhooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "contrib non-free" sections. +# +# e.g with make-live : --sections "main contrib non-free" + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant nvidia-kernel-common +module-assistant update +module-assistant --non-inter --quiet auto-install nvidia-kernel-legacy +module-assistant clean nvidia-kernel-legacy + +# Installing aditional stuff +apt-get install --yes nvidia-glx-legacy nvidia-xconfig discover + +# fixup (#421028) +if [ -f /usr/lib/xorg/modules/drivers/nvidia_drv.o ] +then + cd /usr/lib/xorg/modules/drivers + gcc -shared -o nvidia_drv.so nvidia_drv.o + cd ${OLDPWD} +fi + +# Adding init script +cat > /etc/init.d/nvidia-debian-live << EOF +#!/bin/sh +# script that modify xorg configuration enabling +# the nvidia proprietary module if the card is detected +# as an NVidia + +if discover --type-summary display | grep -i nvidia +then + # forcing depth to 24, bad detection on some card (e.g my GeForce4 440 Go) + echo "Configuring Xorg for nvidia ..." + nvidia-xconfig -d 24 +else + # not with nvidia h/w ? remove those GLX diversions + # (FIXME) + apt-get --quiet --yes remove nvidia-glx-legacy +fi +EOF + +chmod 0755 /etc/init.d/nvidia-debian-live +update-rc.d nvidia-debian-live defaults diff --git a/examples/hooks/rt2570.sh b/examples/hooks/rt2570.sh new file mode 100755 index 0000000..bbf79c1 --- /dev/null +++ b/examples/hooks/rt2570.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ralink rt2570 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# NOTE: it runs in interactive mode + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install rt2570-source +module-assistant clean rt2570-source diff --git a/examples/hooks/rt2x00.sh b/examples/hooks/rt2x00.sh new file mode 100755 index 0000000..8c5153c --- /dev/null +++ b/examples/hooks/rt2x00.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ralink rt2x00 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# NOTE: it runs in interactive mode + +# Updating indices +apt-get update + +# Building kernel modules +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install rt2x00-source +module-assistant clean rt2x00-source + +# Installing firmware for rt73usb +wget "http://www.ralinktech.com.tw/data/RT73_Linux_STA_Drv1.0.4.0.tar.gz" -O /tmp/RT73_Linux_STA_Drv1.0.4.0.tar.gz + +cd /tmp +tar xfvz RT73_Linux_STA_Drv1.0.4.0.tar.gz +cp RT73_Linux_STA_Drv1.0.4.0/Module/rt73.bin /lib/firmware +rm -rf RT73_Linux_STA_Drv* +cd ${OLDPWD} diff --git a/examples/hooks/sun-java5.sh b/examples/hooks/sun-java5.sh new file mode 100755 index 0000000..987b0b2 --- /dev/null +++ b/examples/hooks/sun-java5.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install sun-java. +# +# To enable it, copy this hook into your config/chroot_local-hooks directory and +# don't forget to enable non-free in LIVE_SECTIONS. +# +# live-helper sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not +# ask any questions while installing packages. Suns redistribution terms for +# Java do not allow this, therefore we need to overwrite DEBIAN_FRONTEND for +# this apt-get call only. + +DEBIAN_FRONTEND="dialog" apt-get install --yes sun-java5-bin sun-java5-demo \ + sun-java5-doc sun-java5-fonts sun-java5-jdk sun-java5-jre \ + sun-java5-plugin sun-java5-source diff --git a/examples/java-hook.sh b/examples/hooks/sun-java6.sh index 77c931b..f400b4d 100755 --- a/examples/java-hook.sh +++ b/examples/hooks/sun-java6.sh @@ -2,7 +2,7 @@ # This is a hook for live-helper(7) to install sun-java. # -# To enable it, copy this hook into your config/chroot_localhooks directory and +# To enable it, copy this hook into your config/chroot_local-hooks directory and # don't forget to enable non-free in LIVE_SECTIONS. # # live-helper sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not diff --git a/examples/beryl.sources.list b/examples/sources.list/beryl index 8295230..9c1cd2e 100644 --- a/examples/beryl.sources.list +++ b/examples/sources.list/beryl @@ -2,9 +2,9 @@ ## 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. +## as e.g. beryl.bootstrap and once as beryl.binary. +## Additionally, you need to copy the beryl.sh file to your +## config/chroot_local-hooks directory. ## ## Remeber to also import http://debian.beryl-project.org/root@lupine.me.uk.gpg ## into your trusted keyring. diff --git a/examples/bpo.sources.list b/examples/sources.list/debian-backports index 461c66f..04362f0 100644 --- a/examples/bpo.sources.list +++ b/examples/sources.list/debian-backports @@ -2,7 +2,7 @@ ## Debian Etch backports repository. ## ## To enable it, copy this file to your config/chroot_sources directory, once -## as e.g. bpo.build and once as bpo.image. +## as e.g. debian-backports.bootstrap and once as debian-backports.binary. # Debian backports for Etch deb http://www.backports.org/debian/ etch-backports main diff --git a/examples/edu.sources.list b/examples/sources.list/debian-edu index 79acacd..9fb05e1 100644 --- a/examples/edu.sources.list +++ b/examples/sources.list/debian-edu @@ -2,7 +2,7 @@ ## 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. +## as e.g. edu.bootstrap and once as edu.binary. ## ## Remeber to add debian-edu-archive-keyring to your package selection. diff --git a/examples/fai.sources.list b/examples/sources.list/fai index 2c6e80f..7d2d7ec 100644 --- a/examples/fai.sources.list +++ b/examples/sources.list/fai @@ -2,7 +2,7 @@ ## 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. +## as e.g. fai.bootstrap and once as fai.binary. # FAI - Fully Automated Install deb http://www.informatik.uni-koeln.de/fai/download/ etch koeln diff --git a/examples/live.sources.list b/examples/sources.list/live-backports index 98212f1..3c1a2c1 100644 --- a/examples/live.sources.list +++ b/examples/sources.list/live-backports @@ -2,7 +2,7 @@ ## Debian Live Etch backports repository. ## ## To enable it, copy this file to your config/chroot_sources directory, once -## as e.g. live.build and once as live.image. +## as e.g. live-backports.bootstrap and once as live-backports.binary. ## ## Remeber to add debian-unofficial-archive-keyring to your package selection. diff --git a/examples/sources.list/live-snapshot b/examples/sources.list/live-snapshot new file mode 100644 index 0000000..763deda --- /dev/null +++ b/examples/sources.list/live-snapshot @@ -0,0 +1,9 @@ +## This is a sources.list for live-helper(7) to use packages from the +## Debian Live Snapshot repository. +## +## To enable it, copy this file to your config/chroot_sources directory, once +## as e.g. live-snapshots.bootstrap and once as live-snapshots.binary. + +# Debian Live Snapshots +deb http://live.debian.net/debian-snapshots/ ./ +deb-src http://live.debian.net/debian-snapshots/ ./ diff --git a/examples/weekly-cron.sh b/examples/weekly-cron.sh deleted file mode 100755 index 4d87671..0000000 --- a/examples/weekly-cron.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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}" - echo "Begin: `date -R`" > "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - make-live -b usb-hdd -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 - echo "End: `date -R`" >> "${AUTOBUILD_TEMPDIR}"/debian-live/log.txt - 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-hdd-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-hdd-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 |