[Qa-jenkins-scm] [jenkins.debian.net] 01/02: always use mktemp with '-t -XXXX'

Holger Levsen holger at moszumanska.debian.org
Wed Dec 16 15:56:02 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 d2478fbb8818ac2f4bc09e77ad5353f322e3607b
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Dec 16 14:39:59 2015 +0100

    always use mktemp with '-t -XXXX'
---
 bin/common-functions.sh                 | 2 +-
 bin/find_dpkg_trigger_cycles.sh         | 2 +-
 bin/live-build.sh                       | 2 +-
 bin/reproducible_build.sh               | 2 +-
 bin/reproducible_build_archlinux_pkg.sh | 2 +-
 bin/reproducible_build_rpm.sh           | 2 +-
 bin/reproducible_coreboot.sh            | 4 ++--
 bin/reproducible_freebsd.sh             | 2 +-
 bin/reproducible_netbsd.sh              | 4 ++--
 bin/reproducible_openwrt.sh             | 4 ++--
 update_jdn.sh                           | 2 +-
 11 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index b79c538..f27dac7 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -107,7 +107,7 @@ publish_changes_to_userContent() {
 	fi
 	VERSION=$(basename $CHANGES | cut -d "_" -f2)
 	TARGET="/var/lib/jenkins/userContent/$SRCPKG"
-	NEW_CONTENT=$(mktemp -d)
+	NEW_CONTENT=$(mktemp -d -t new-content-XXXXXXXX)
 	for DEB in $(dcmd --deb $CHANGES) ; do
 		dpkg --extract $DEB ${NEW_CONTENT} 2>/dev/null
 	done
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh
index 6a2cd0d..1e9736b 100755
--- a/bin/find_dpkg_trigger_cycles.sh
+++ b/bin/find_dpkg_trigger_cycles.sh
@@ -170,7 +170,7 @@ curl --retry 3 --retry-delay 10 --globoff "http://binarycontrol.debian.net/?q=&p
 	| sort \
 	| while read pkg url; do
 	echo "working on $pkg..." >&2
-	tmpdir=`mktemp -d --tmpdir="$scratch"`
+	tmpdir=`mktemp -d --tmpdir="$scratch" -t dpkg-trigger-cycles-curl-XXXXXXXX`
 	# curl is allowed to fail with exit status 23 because we want to stop
 	# downloading immediately after control.tar.gz has been extracted
 	( curl --retry 3 --retry-delay 10 --location --silent "$url" || [ "$?" -eq 23 ] || ( echo "curl failed">&2 && exec /srv/jenkins/bin/abort.sh ) ) \
diff --git a/bin/live-build.sh b/bin/live-build.sh
index 3082db6..116f17a 100755
--- a/bin/live-build.sh
+++ b/bin/live-build.sh
@@ -11,7 +11,7 @@ cleanup_all() {
 	sudo rm -rf --one-file-system $TMPDIR
 }
 
-TMPDIR=$(mktemp --tmpdir=/srv/live-build -d)
+TMPDIR=$(mktemp --tmpdir=/srv/live-build -d -t live-build-XXXXXXXX)
 cd $TMPDIR
 trap cleanup_all INT TERM EXIT
 
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 7377335..338c207 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -715,7 +715,7 @@ build_rebuild() {
 # below is what controls the world
 #
 
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # where everything actually happens
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-debian-XXXXXXXX)  # where everything actually happens
 trap cleanup_all INT TERM EXIT
 cd $TMPDIR
 
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 0dab2b3..b60aaf8 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -213,7 +213,7 @@ remote_build() {
 # below is what controls the world
 #
 
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # where everything actually happens
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX)  # where everything actually happens
 trap cleanup_all INT TERM EXIT
 cd $TMPDIR
 
diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh
index 6b12d29..bc06f60 100755
--- a/bin/reproducible_build_rpm.sh
+++ b/bin/reproducible_build_rpm.sh
@@ -169,7 +169,7 @@ remote_build() {
 # below is what controls the world
 #
 
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # where everything actually happens
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-rpm-XXXXXXXX)  # where everything actually happens
 trap cleanup_all INT TERM EXIT
 cd $TMPDIR
 
diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index 7c8fe40..d04d08c 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -41,8 +41,8 @@ save_coreboot_results() {
 #
 # main
 #
-TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t coreboot-XXXXXXXX)  # used to build on tmpfs
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # accessable in schroots, used to compare results
+TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t rbuild-coreboot-build-XXXXXXXX)  # used to build on tmpfs
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-coreboot-results-XXXXXXXX)  # accessable in schroots, used to compare results
 DATE=$(date -u +'%Y-%m-%d')
 START=$(date +'%s')
 trap cleanup_tmpdirs INT TERM EXIT
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index 70524d0..a66504d 100755
--- a/bin/reproducible_freebsd.sh
+++ b/bin/reproducible_freebsd.sh
@@ -96,7 +96,7 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
 	RSCP="scp -r freebsd-jenkins.debian.net"
 	TMPBUILDDIR=/usr/src
 	$RSSH 'sudo rm -rf /usr/src ; sudo mkdir /usr/src ; sudo chown jenkins /usr/src'  ### this is tmpfs on linux, we should move this to tmpfs on FreeBSD too
-	TMPDIR=$($RSSH 'TMPDIR=/srv/reproducible-results mktemp -d')  # used to compare results
+	TMPDIR=$($RSSH 'TMPDIR=/srv/reproducible-results mktemp -d -t rbuild-freebsd-XXXXXXXX')  # used to compare results
 	DATE=$(date -u +'%Y-%m-%d')
 	START=$(date +'%s')
 	trap cleanup_tmpdirs INT TERM EXIT
diff --git a/bin/reproducible_netbsd.sh b/bin/reproducible_netbsd.sh
index 4b5da46..939fea3 100755
--- a/bin/reproducible_netbsd.sh
+++ b/bin/reproducible_netbsd.sh
@@ -36,8 +36,8 @@ save_netbsd_results() {
 #
 # main
 #
-TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t netbsd-XXXXXXXX)  # used to build on tmpfs
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # accessable in schroots, used to compare results
+TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t rbuild-netbsd-build-XXXXXXXX)  # used to build on tmpfs
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-netbsd-results-XXXXXXXX)  # accessable in schroots, used to compare results
 DATE=$(date -u +'%Y-%m-%d')
 START=$(date +'%s')
 trap cleanup_tmpdirs INT TERM EXIT
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index c5e3588..284ba44 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -156,8 +156,8 @@ build_two_times() {
 #
 # main
 #
-TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t openwrt-XXXXXXXX)  # used to build on tmpfs
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # accessable in schroots, used to compare results
+TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t rbuild-openwrt-build-XXXXXXXX)  # used to build on tmpfs
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-openwrt-results-XXXXXXXX)  # accessable in schroots, used to compare results
 BANNER_HTML=$(mktemp --tmpdir=$TMPDIR)
 DATE=$(date -u +'%Y-%m-%d')
 START=$(date +'%s')
diff --git a/update_jdn.sh b/update_jdn.sh
index 8b859d4..f6e323a 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -427,7 +427,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
 	# samuel, lunar and josch committed with several commiters, only display one
 	grep -v -e "samuel.thibault at ens-lyon.org" -e Lunar -e "j.schauer at email.de" -e "mattia at mapreri.org" $TMPFILE | sudo tee -a /var/lib/jenkins/userContent/THANKS > /dev/null
 	rm $TMPFILE
-	TMPDIR=$(mktemp -d)
+	TMPDIR=$(mktemp -d -t update-jdn-XXXXXXXX)
 	sudo cp -pr userContent $TMPDIR/
 	sudo chown -R jenkins.jenkins $TMPDIR
 	sudo cp -pr $TMPDIR/userContent  /var/lib/jenkins/

-- 
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