From 1445f8f82b2e644e08a2d64f3092dd622ac3acf3 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 20 Dec 2015 22:58:20 +0100 Subject: reproducible archlinux+rpms:_don't create TMPDIR when it's not clear we'll run in master mode --- bin/reproducible_build_archlinux_pkg.sh | 8 +++----- bin/reproducible_build_rpm.sh | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index d7540df2..3706567a 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -253,21 +253,19 @@ remote_build() { # # below is what controls the world # - -TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX) # where everything actually happens -trap cleanup_all INT TERM EXIT -cd $TMPDIR - TIMEOUT=8 # maximum time in hours for a single build DATE=$(date -u +'%Y-%m-%d %H:%M') START=$(date +'%s') DUMMY=$(mktemp -t archlinux-dummy-XXXXXXXX) +trap cleanup_all INT TERM EXIT # # determine mode # if [ "$1" = "" ] ; then MODE="master" + TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX) # where everything actually happens + cd $TMPDIR elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then MODE="$1" REPOSITORY="$2" diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh index 2010f46f..a2e7598d 100755 --- a/bin/reproducible_build_rpm.sh +++ b/bin/reproducible_build_rpm.sh @@ -182,16 +182,12 @@ remote_build() { # # below is what controls the world # - -TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-rpm-XXXXXXXX) # where everything actually happens -trap cleanup_all INT TERM EXIT -cd $TMPDIR - TIMEOUT=8 # maximum time in hours for a single build DATE=$(date -u +'%Y-%m-%d %H:%M') START=$(date +'%s') DUMMY=$(mktemp -t rpm-dummy-XXXXXXXX) RPM_STAMPS=/srv/reproducible-results/.rpm_stamp +trap cleanup_all INT TERM EXIT # # determine mode @@ -218,6 +214,8 @@ if [ "$1" = "1" ] || [ "$1" = "2" ] ; then exit 0 fi MODE="master" +TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-rpm-XXXXXXXX) # where everything actually happens +cd $TMPDIR # # main - only used in master-mode -- cgit v1.2.3-70-g09d2