Commit d2478fbb authored by Holger Levsen's avatar Holger Levsen

always use mktemp with '-t -XXXX'

parent 97c2469c
......@@ -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
......
......@@ -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 ) ) \
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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')
......
......@@ -427,7 +427,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
# samuel, lunar and josch committed with several commiters, only display one
grep -v -e "samuel.thibault@ens-lyon.org" -e Lunar -e "j.schauer@email.de" -e "mattia@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/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment