From 1ad6c347c0ce08cfde59c6f64166715dd0ccd048 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 12 Dec 2015 10:45:37 +0100 Subject: reproducible archlinux: refactor and kill build after 8 (instead of 4) hours --- bin/reproducible_build_archlinux_pkg.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin/reproducible_build_archlinux_pkg.sh') diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index 89ad2241..6d79dd5c 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -124,12 +124,12 @@ first_build() { schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/$REPOSITORY/$SRCPACKAGE $BUILDDIR/ # just set timezone in the 1st build echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc - # nicely run makepkg with a timeout of 4h - timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \ + # nicely run makepkg with a timeout of $TIMEOUT hours + timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \ schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then - echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG + echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG fi schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi @@ -158,12 +158,12 @@ second_build() { export LC_ALL="fr_CH.UTF-8" umask 0002 __END__ - # nicely run makepkg with a timeout of 4h - timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \ + # nicely run makepkg with a timeout of $TIMEOUT hours + timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \ schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then - echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG + echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG fi schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi -- cgit v1.2.3-54-g00ecf