summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_setup_pbuilder.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-12 21:31:12 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-14 21:55:26 +0200
commit7fc7fb0c59266664b8c700e21859a7fbcc3d5052 (patch)
treea18c9e48228f06f39c2679208f88008cd5c8a502 /bin/reproducible_setup_pbuilder.sh
parented7f36ad6ac69972414ff11eea911a22a25d26f1 (diff)
downloadjenkins.debian.net-7fc7fb0c59266664b8c700e21859a7fbcc3d5052.tar.xz
reproducible: define $TEMPDIR as /tmp/reproducible and teach all the to create temporary files under TEMPDIR (except for builders, they have their own TMPDIR), to avoid polluting /tmp
Diffstat (limited to 'bin/reproducible_setup_pbuilder.sh')
-rwxr-xr-xbin/reproducible_setup_pbuilder.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index 1134f779..837f3b4f 100755
--- a/bin/reproducible_setup_pbuilder.sh
+++ b/bin/reproducible_setup_pbuilder.sh
@@ -82,8 +82,8 @@ setup_pbuilder() {
PACKAGES="$@"
EXTRA_PACKAGES="locales-all"
echo "$(date) - creating /var/cache/pbuilder/${NAME}.tgz now..."
- TMPFILE=$(mktemp)
- LOG=$(mktemp)
+ TMPFILE=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXXX)
+ LOG=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXX)
if [ "$SUITE" = "experimental" ] ; then
SUITE=unstable
echo "echo 'deb $MIRROR experimental main' > /etc/apt/sources.list.d/experimental.list" > ${TMPFILE}
@@ -105,7 +105,7 @@ setup_pbuilder() {
for PKG in ${PACKAGES} ; do
grep "http://reproducible.alioth.debian.org/debian/ ./ Packages" ${LOG} \
| grep -v grep | grep "${PKG} " \
- || ( echo ; echo "Package ${PKG} is not installed at all or probably rather not in our version, so removing the chroot and exiting now." ; sudo rm -v /var/cache/pbuilder/${NAME}-new.tgz ; exit 1 )
+ || ( echo ; echo "Package ${PKG} is not installed at all or probably rather not in our version, so removing the chroot and exiting now." ; sudo rm -v /var/cache/pbuilder/${NAME}-new.tgz ; rm $TMPFILE $LOG ; exit 1 )
done
sudo mv /var/cache/pbuilder/${NAME}-new.tgz /var/cache/pbuilder/${NAME}.tgz
# create stamp file to record initial creation date