[Qa-jenkins-scm] [jenkins.debian.net] 03/03: reproducible archlinux+rpms:_don't create TMPDIR when it's not clear we'll run in master mode

Holger Levsen holger at moszumanska.debian.org
Sun Dec 20 21:58:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 1445f8f82b2e644e08a2d64f3092dd622ac3acf3
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Dec 20 22:58:20 2015 +0100

    reproducible archlinux+rpms:_don't create TMPDIR when it's not clear we'll run in master mode
---
 TODO                                    | 5 +++--
 bin/reproducible_build_archlinux_pkg.sh | 8 +++-----
 bin/reproducible_build_rpm.sh           | 8 +++-----
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/TODO b/TODO
index e2df2cb..a0b6aac 100644
--- a/TODO
+++ b/TODO
@@ -302,12 +302,13 @@ The plan is to run a jenkins.d.o host, which is maintained by DSA, but we are ma
 
 * describe archlinux setup…!
 * move /var/lib/schroot to /srv/workspace aka tmpfs
+* maintenance job:
+** check for archlinux schroot sessions which should not be there and delete them. complain if that fails.
+** properly clean schroot sessions, check on pb3…
 * setup_archlinux_schroot job:
 ** needs to be made idempotent
 ** needs to download bootstrap.tar.gz sig and verify
 ** once this has been done, run it more often than once a year
-* maintenance job:
-** check for archlinux schroot sessions which should not be there and delete them. complain if that fails.
 * arch build.sh:
 ** introduce more variations: USER
 ** confirm the others are really working
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index d7540df..3706567 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 2010f46..a2e7598 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list