From 5e517c2dd8404f40f8c1439cedd07571df1a540c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 22 Oct 2007 19:25:08 +0200 Subject: [PATCH] Big buildd update --- buildd/README | 6 -- buildd/TODO | 4 - buildd/cleanup.sh | 18 +++- buildd/functions.sh | 114 +++++++++++++++++++++++ buildd/grml-buildd.conf | 24 +++++ buildd/grml-live_autobuild_grml-large_etch.sh | 5 +- buildd/grml-live_autobuild_grml-large_sid.sh | 5 +- buildd/grml-live_autobuild_grml-medium_etch.sh | 10 +- buildd/grml-live_autobuild_grml-medium_sid.sh | 9 +- buildd/grml-live_autobuild_grml-small_etch.sh | 7 +- buildd/grml-live_autobuild_grml-small_sid.sh | 4 +- buildd/grml-live_autobuild_grml64-large_etch.sh | 11 ++- buildd/grml-live_autobuild_grml64-large_sid.sh | 5 +- buildd/grml-live_autobuild_grml64-medium_etch.sh | 5 +- buildd/grml-live_autobuild_grml64-medium_sid.sh | 5 +- buildd/grml-live_autobuild_grml64-small_etch.sh | 5 +- buildd/grml-live_autobuild_grml64-small_sid.sh | 5 +- buildd/main.sh | 86 ----------------- buildd/upload_isos.sh | 18 +++- debian/changelog | 4 + debian/rules | 3 +- 21 files changed, 216 insertions(+), 137 deletions(-) delete mode 100644 buildd/README delete mode 100644 buildd/TODO create mode 100755 buildd/functions.sh create mode 100644 buildd/grml-buildd.conf delete mode 100755 buildd/main.sh diff --git a/buildd/README b/buildd/README deleted file mode 100644 index 18059ce..0000000 --- a/buildd/README +++ /dev/null @@ -1,6 +0,0 @@ -This directory provides files used for autobuilding grml-ISOs on a daily base, -like what http://daily.grml.org/ provides. If you plan to use those files -you definitely have to adjust them according to your needs, it should just -provide an idea of what can be done using grml-live. - - -- Michael Prokop , Sun Oct 7 13:04:05 CEST 2007 diff --git a/buildd/TODO b/buildd/TODO deleted file mode 100644 index e8dfa3b..0000000 --- a/buildd/TODO +++ /dev/null @@ -1,4 +0,0 @@ -TODO for autobuild infrastructure ---------------------------------- - -Unify scripts in a core configuration file. diff --git a/buildd/cleanup.sh b/buildd/cleanup.sh index 0a1e620..43d36cf 100755 --- a/buildd/cleanup.sh +++ b/buildd/cleanup.sh @@ -1,21 +1,29 @@ #!/bin/sh -# Filename: cleanup.sh +# Filename: /usr/share/grml-live/buildd/buildd/cleanup.sh # Purpose: clean up daily builds directory - remove old files # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Don Okt 18 00:32:36 CEST 2007 [mika] +# Latest change: YDATE [mika] ################################################################################ set -e +. /etc/grml/grml-buildd.conf + +[ -n "$RECIPIENT" ] || RECIPIENT=root@localhost + +[ -n "$MIRROR_DIRECTORY" ] || exit 1 +cd $MIRROR_DIRECTORY || exit 2 + # we want to always keep a few images, no matter how old they are # but get rid of the oldest ones first of course :) # so: how many images do we want to keep? DAYS=3 REMOVE_ME="" -for flavour in grml-medium_etch grml-medium_sid grml64-medium_etch grml64-medium_sid grml64_sid grml_sid ; do +for flavour in grml-small_etch grml-small_sid grml-medium_etch grml-medium_sid grml_sid grml_etch \ + grml64-small_etch grml64-small_sid grml64-medium_etch grml64-medium_sid grml64_sid grml64_etch ; do FILE_COUNT=$(ls -1 $flavour*.iso | wc -l) if [ "$FILE_COUNT" -gt "$DAYS" ] ; then FILES=$(ls -1 $flavour*.iso | tail -"$DAYS") @@ -30,13 +38,13 @@ done # move them before we really delete them: for file in $REMOVE_ME ; do - test -f ${file} && mv $file .delete + test -f ${file} && rm -f $file test -f ${file}.md5 && mv ${file}.md5 .delete done # inform on successful removal: if [ "$(echo "$REMOVE_ME" | tr -d ' ' )" != "" ] ; then - echo "deleted files $REMOVE_ME" | mail -s "daily-builds cleanup script" root@localhost + echo "deleted files $REMOVE_ME" | mail -s "daily-builds cleanup script" $RECIPIENT fi ## END OF FILE ################################################################# diff --git a/buildd/functions.sh b/buildd/functions.sh new file mode 100755 index 0000000..3a5366c --- /dev/null +++ b/buildd/functions.sh @@ -0,0 +1,114 @@ +#!/bin/sh +# Filename: /usr/share/grml-live/buildd/buildd/functions.sh +# Purpose: main function file for grml-live buildd +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Mon Oct 22 19:19:26 CEST 2007 [mika] +################################################################################ + +die() { + [ -n "$1" ] && echo "$1">&2 + exit 1 +} + +. /etc/grml/grml-buildd.conf || die "Could not source /etc/grml/grml-buildd.conf. Exiting." + +type -p mutt 1>/dev/null 2>&1 || die "mutt binary not found. Exiting." + +# exit if important variables aren't set: +[ -n "$STORAGE" ] || die "\$STORAGE is not set. Exiting." +[ -n "$SUITE" ] || die "\$SUITE is not set. Exiting." +[ -n "$CLASSES" ] || die "\$CLASSES is not set. Exiting." +[ -n "$NAME" ] || die "\$NAME is not set. Exiting." +[ -n "$ISO_NAME" ] || die "\$ISO_NAME is not set. Exiting." + +# some defaults: +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 +DATE=$(date +%Y%m%d) +TMP_DIR=$(mktemp -d) +MUTT_HEADERS=$(mktemp) +[ -n "$TMP_DIR" ] || die "Could not create \$TMP_DIR. Exiting." +[ -n "$MUTT_HEADERS" ] || die "Could not create $\MUTT_HEADERS. Exiting." +[ -n "$ARCH" ] && GRML_LIVE_ARCH="-a $ARCH" + +# make sure we have same safe defaults: +[ -n "$OUTPUT_DIR" ] || OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$" +[ -n "$ISO_DIR" ] || ISO_DIR=$STORAGE/grml-isos +[ -n "$RECIPIENT" ] || RECIPIENT=root@localhost +[ -n "$ATTACHMENT" ] || ATTACHMENT=$TMP_DIR/grml-live-logs_$DATE.tar.gz +[ -n "$LOGFILES" ] || LOGFILES=/var/log/fai/dirinstall/grml +[ -n "$FROM" ] || FROM=root@localhost + +echo "my_hdr From: grml-live autobuild daemon <$FROM>" > $MUTT_HEADERS + +# execute grml-live: +grml_live_run() { +grml-live -F $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ + -g $NAME -v $DATE -r grml-live-autobuild -i $ISO_NAME \ + 1>$LOGFILES/grml-live.stdout \ + 2>$LOGFILES/grml-live.stderr ; RC=$? + +if [ "$RC" = "0" ] ; then + RC_INFO=success +else + RC_INFO=error +fi +} + +# create log archive: +create_logs() { +( cd / && tar zcf $ATTACHMENT var/log/fai/dirinstall/grml 1>/dev/null ) +} + +# store information of ISO size: +iso_details() { +if ! [ -f "$OUTPUT_DIR/grml_isos/$ISO_NAME" ] ; then + ISO_DETAILS="There was an error creating $ISO_NAME" +else + ISO_DETAILS=$(ls -lh $OUTPUT_DIR/grml_isos/$ISO_NAME) +fi +} + +# send status mail: +send_mail() { +echo -en "Automatically generated mail by $SCRIPTNAME + +$ISO_DETAILS + +Return code of grml-live run was: $RC + +The following errors have been noticed (several might be warnings only): + +$(grep error $LOGFILES/* | grep -ve liberror -ve libgpg-error || echo "* nothing") + +The following warnings have been noticed: + +$(grep warn $LOGFILES/* || echo "* nothing") + +Find details in the attached logs." | \ +mutt -s "$SCRIPTNAME [${DATE}] - $RC_INFO" \ + -a $ATTACHMENT \ + $RECIPIENT +} + +# make sure we store the final iso: +store_iso() { + [ -d "$ISO_DIR" ] || mkdir "$ISO_DIR" + mv $OUTPUT_DIR/grml_isos/$ISO_NAME $ISO_DIR +} + +# allow clean exit: +bailout() { + if [ "$RC" = "0" ] ; then + rm -rf "$TMP_DIR" "$MUTT_HEADERS" "$OUTPUT_DIR" + else + rm -f "$MUTT_HEADERS" + echo "building ISO failed, keeping build files [${OUTPUT_DIR} / ${TMP_DIR}]">&2 + fi + +} + +trap bailout 1 2 3 15 + +## END OF FILE ################################################################# diff --git a/buildd/grml-buildd.conf b/buildd/grml-buildd.conf new file mode 100644 index 0000000..df185b7 --- /dev/null +++ b/buildd/grml-buildd.conf @@ -0,0 +1,24 @@ +# Filename: /etc/grml/grml-buildd.conf +# Purpose: configuration file for grml-live buildd +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Mon Oct 22 19:18:59 CEST 2007 [mika] +################################################################################ + +# where do you want to store chroot/ISOs/...? Must be set! +#STORAGE=/grml-live/ + +# who should get notification mails? +# default: root@localhost +#RECIPIENT=root@localhost + +# what do you want to use for "From:" in notification mails? +# default: root@localhost +#FROM=root@localhost + +# which directory should be cleaned up? +# used for example inside /usr/share/grml-live/buildd/buildd/cleanup.sh +#MIRROR_DIRECTORY=/home/ftp/www.grml.org/daily + +## END OF FILE ################################################################# diff --git a/buildd/grml-live_autobuild_grml-large_etch.sh b/buildd/grml-live_autobuild_grml-large_etch.sh index 4dfb6a6..39bfdd5 100755 --- a/buildd/grml-live_autobuild_grml-large_etch.sh +++ b/buildd/grml-live_autobuild_grml-large_etch.sh @@ -1,8 +1,7 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml_etch_$DATE.iso SUITE=etch CLASSES='GRMLBASE,GRML_FULL,LATEX_CLEANUP,RELEASE,I386' @@ -10,6 +9,8 @@ NAME=grml SCRIPTNAME="$(basename $0)" ARCH=i386 +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml-large_sid.sh b/buildd/grml-live_autobuild_grml-large_sid.sh index 3f90135..6ada83e 100755 --- a/buildd/grml-live_autobuild_grml-large_sid.sh +++ b/buildd/grml-live_autobuild_grml-large_sid.sh @@ -1,8 +1,7 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml_sid_$DATE.iso SUITE=sid CLASSES='GRMLBASE,GRML_FULL,LATEX_CLEANUP,RELEASE,I386' @@ -10,6 +9,8 @@ NAME=grml SCRIPTNAME="$(basename $0)" ARCH=i386 +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml-medium_etch.sh b/buildd/grml-live_autobuild_grml-medium_etch.sh index d4686ab..2513e76 100755 --- a/buildd/grml-live_autobuild_grml-medium_etch.sh +++ b/buildd/grml-live_autobuild_grml-medium_etch.sh @@ -1,18 +1,16 @@ #!/bin/sh - -#!/bin/sh - -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml-medium_etch_$DATE.iso SUITE=sid CLASSES='GRMLBASE,GRML_MEDIUM,RELEASE,I386' -NAME=grml +NAME=grml-medium SCRIPTNAME="$(basename $0)" ARCH=i386 +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml-medium_sid.sh b/buildd/grml-live_autobuild_grml-medium_sid.sh index 6f0b709..33e8891 100755 --- a/buildd/grml-live_autobuild_grml-medium_sid.sh +++ b/buildd/grml-live_autobuild_grml-medium_sid.sh @@ -1,15 +1,16 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml-medium_sid_$DATE.iso SUITE=sid -CLASSES='GRMLBASE,GRML_MEDIUM,RELEASE,i386' -NAME=grml +CLASSES='GRMLBASE,GRML_MEDIUM,RELEASE,I386' +NAME=grml-medium SCRIPTNAME="$(basename $0)" ARCH=i386 +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml-small_etch.sh b/buildd/grml-live_autobuild_grml-small_etch.sh index 304c3c2..8a22d7c 100755 --- a/buildd/grml-live_autobuild_grml-small_etch.sh +++ b/buildd/grml-live_autobuild_grml-small_etch.sh @@ -1,15 +1,16 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml-small_etch_$DATE.iso SUITE=etch CLASSES='GRMLBASE,GRML_SMALL,REMOVE_DOCS,I386' -NAME=grml +NAME=grml-small SCRIPTNAME="$(basename $0)" ARCH=i386 +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml-small_sid.sh b/buildd/grml-live_autobuild_grml-small_sid.sh index daaa9e8..f29b217 100755 --- a/buildd/grml-live_autobuild_grml-small_sid.sh +++ b/buildd/grml-live_autobuild_grml-small_sid.sh @@ -5,11 +5,11 @@ DATE=$(date +%Y%m%d) ISO_NAME=grml-small_sid_$DATE.iso SUITE=sid CLASSES='GRMLBASE,GRML_SMALL,REMOVE_DOCS,I386' -NAME=grml +NAME=grml-small SCRIPTNAME="$(basename $0)" ARCH=i386 -. main.sh || exit 1 +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml64-large_etch.sh b/buildd/grml-live_autobuild_grml64-large_etch.sh index 062a2e2..d0d1a07 100755 --- a/buildd/grml-live_autobuild_grml64-large_etch.sh +++ b/buildd/grml-live_autobuild_grml64-large_etch.sh @@ -1,14 +1,15 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml64_etch_$DATE.iso SUITE=etch CLASSES='GRMLBASE,GRML_FULL,LATEX_CLEANUP,AMD64' NAME=grml64 SCRIPTNAME="$(basename $0)" +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run @@ -20,4 +21,8 @@ send_mail store_iso -bailout +if [ "$RC" = "0" ] ; then + bailout +else + echo "building ISO failed, keeping build files [${OUTPUT_DIR}]" +fi diff --git a/buildd/grml-live_autobuild_grml64-large_sid.sh b/buildd/grml-live_autobuild_grml64-large_sid.sh index 0eef2c4..61cc257 100755 --- a/buildd/grml-live_autobuild_grml64-large_sid.sh +++ b/buildd/grml-live_autobuild_grml64-large_sid.sh @@ -1,14 +1,15 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml64_sid_$DATE.iso SUITE=sid CLASSES='GRMLBASE,GRML_FULL,LATEX_CLEANUP,AMD64' NAME=grml64 SCRIPTNAME="$(basename $0)" +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml64-medium_etch.sh b/buildd/grml-live_autobuild_grml64-medium_etch.sh index 89284e4..22340dd 100755 --- a/buildd/grml-live_autobuild_grml64-medium_etch.sh +++ b/buildd/grml-live_autobuild_grml64-medium_etch.sh @@ -1,14 +1,15 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml64-medium_etch_$DATE.iso SUITE=etch CLASSES='GRMLBASE,GRML_MEDIUM,AMD64' NAME=grml64-medium SCRIPTNAME="$(basename $0)" +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml64-medium_sid.sh b/buildd/grml-live_autobuild_grml64-medium_sid.sh index e45eeb5..b3110f4 100755 --- a/buildd/grml-live_autobuild_grml64-medium_sid.sh +++ b/buildd/grml-live_autobuild_grml64-medium_sid.sh @@ -1,14 +1,15 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml64-medium_sid_$DATE.iso SUITE=sid CLASSES='GRMLBASE,GRML_MEDIUM,AMD64' NAME=grml64-medium SCRIPTNAME="$(basename $0)" +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml64-small_etch.sh b/buildd/grml-live_autobuild_grml64-small_etch.sh index d7bc0b1..070a8af 100755 --- a/buildd/grml-live_autobuild_grml64-small_etch.sh +++ b/buildd/grml-live_autobuild_grml64-small_etch.sh @@ -1,14 +1,15 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml64-small_etch_$DATE.iso SUITE=etch CLASSES='GRMLBASE,GRML_SMALL,REMOVE_DOCS,AMD64' NAME=grml64-small SCRIPTNAME="$(basename $0)" +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/grml-live_autobuild_grml64-small_sid.sh b/buildd/grml-live_autobuild_grml64-small_sid.sh index 1e651a4..1f98671 100755 --- a/buildd/grml-live_autobuild_grml64-small_sid.sh +++ b/buildd/grml-live_autobuild_grml64-small_sid.sh @@ -1,14 +1,15 @@ #!/bin/sh -. main.sh || exit 1 - # settings for grml_live_run: +DATE=$(date +%Y%m%d) ISO_NAME=grml64-small_sid_$DATE.iso SUITE=sid CLASSES='GRMLBASE,GRML_SMALL,REMOVE_DOCS,AMD64' NAME=grml64-small SCRIPTNAME="$(basename $0)" +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 + # execute grml-live: grml_live_run diff --git a/buildd/main.sh b/buildd/main.sh deleted file mode 100755 index c76e099..0000000 --- a/buildd/main.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# Filename: main.sh -# Purpose: main configuration and function file for grml-live buildd -# Authors: grml-team (grml.org), (c) Michael Prokop -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2 or any later version. -# Latest change: Don Okt 18 00:32:02 CEST 2007 [mika] -################################################################################ - -# configuration: -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 -DATE=$(date +%Y%m%d) -STORAGE=/grml-live/ -OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$" -TMP_DIR=$(mktemp -d) -MUTT_HEADERS=$(mktemp) -ATTACHMENT=$TMP_DIR/grml-live-logs_$DATE.tar.gz -[ -n "$ARCH" ] && GRML_LIVE_ARCH="-a $ARCH" -[ -n "$TMP_DIR" ] || exit 10 -[ -n "$MUTT_HEADERS" ] || exit 20 -RECIPIENT=root@localhost -ISO_DIR=/grml-live/grml-isos -echo "my_hdr From: grml-live autobuild daemon " > $MUTT_HEADERS - -# execute grml-live: -grml_live_run() { -grml-live -F $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ - -g $NAME -v $DATE -r grml-live-autobuild -i $ISO_NAME \ - 1>/var/log/fai/dirinstall/grml/grml-live.stdout \ - 2>/var/log/fai/dirinstall/grml/grml-live.stderr ; RC=$? - -if [ "$RC" = "0" ] ; then - RC=success -else - RC=error -fi -} - -create_logs() { -# create log archive: -tar zcf $ATTACHMENT /var/log/fai/dirinstall/grml 1>/dev/null -} - -iso_details() { -if ! [ -f "$OUTPUT_DIR/grml_isos/$ISO_NAME" ] ; then - ISO_DETAILS="There was an error creating $ISO_NAME" -else - ISO_DETAILS=$(ls -lh $OUTPUT_DIR/grml_isos/$ISO_NAME) -fi -} - -send_mail() { -# send status mail: -echo -en "Automatically generated mail by $SCRIPTNAME - -$ISO_DETAILS - -Return code of grml-live run was: $RC - -The following errors have been noticed (several might be warnings only): - -$(grep error /var/log/fai/dirinstall/grml/* | grep -ve liberror -ve libgpg-error) - -The following warnings have been noticed: - -$(grep warn /var/log/fai/dirinstall/grml/*) - -Find details in the attached logs." | \ -mutt -s "grml-live_autobuild_grml-large_sid.sh [${DATE}] - $RC" \ - -a $ATTACHMENT \ - $RECIPIENT -} - -store_iso() { -# make sure we store the final iso: -[ -d "$ISO_DIR" ] || mkdir "$ISO_DIR" -mv $OUTPUT_DIR/grml_isos/$ISO_NAME $ISO_DIR -} - -bailout() { - rm -rf "$TMP_DIR" "$MUTT_HEADERS" "$OUTPUT_DIR" -} - -trap bailout 1 2 3 15 - -## END OF FILE ################################################################# diff --git a/buildd/upload_isos.sh b/buildd/upload_isos.sh index 9f709dd..9755452 100755 --- a/buildd/upload_isos.sh +++ b/buildd/upload_isos.sh @@ -1,10 +1,22 @@ #!/bin/sh -. main.sh || exit 1 +# Filename: /usr/share/grml-live/buildd/buildd/upload_isos.sh +# Purpose: upload grml ISOs to a rsync server +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Mon Oct 22 19:11:33 CEST 2007 [mika] +################################################################################ + +. /usr/share/grml-live/buildd/buildd/functions.sh || exit 1 +[ -n "$RSYNC_MIRROR" ] || exit 2 +cd $ISO_DIR || exit 3 + umask 002 -cd /srv/grml-isos || exit 1 for file in *.iso ; do [ -f "${file}.md5" ] || md5sum $file > ${file}.md5 chmod 664 $file chmod 664 ${file}.md5 done -rsync --partial -az --quiet $ISO_DIR/* grml-build@debian.netcologne.de:/home/ftp/www.grml.org/daily/ +rsync --partial -az --quiet $ISO_DIR/* $RSYNC_MIRROR + +## END OF FILE ################################################################# diff --git a/debian/changelog b/debian/changelog index 2a11c15..da52c5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ grml-live (0.0.7) unstable; urgency=low + * Reworked buildd concept. Now we have a seperate + /usr/share/grml-live/buildd/functions.sh for generic + stuff and /etc/grml/grml-buildd.conf as configuration + file. * Log executed grml-live command line. * Set $SECONDS to unknown if $start_seconds is not set. * Add new packages to GRML_FULL: diff --git a/debian/rules b/debian/rules index 6ccd240..b9633bf 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,8 @@ install: build cp -a etc debian/grml-live/ cp -a examples debian/grml-live/usr/share/doc/grml-live/ cp -a templates debian/grml-live/usr/share/grml-live/ - cp -a buildd debian/grml-live/usr/share/grml-live/examples/ + cp -a buildd/*.sh debian/grml-live/usr/share/grml-live/examples/ + install -o root -m 640 buildd/grml-buildd.conf debian/grml-live/etc/grml/grml-buildd.conf install -o root -m 755 grml-live debian/grml-live/usr/sbin/grml-live # Build architecture-independent files here. -- 2.1.4