From 7fc7fb0c59266664b8c700e21859a7fbcc3d5052 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 12 Jun 2015 21:31:12 +0200 Subject: 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 --- bin/reproducible_maintenance.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/reproducible_maintenance.sh') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 63e8398b..49817707 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -89,9 +89,9 @@ if [ ! -z "$FAILED_BUILDS" ] ; then fi # find+terminate processes which should not be there -HAYSTACK=$(mktemp) -RESULT=$(mktemp) -TOKILL=$(mktemp) +HAYSTACK=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXX) +RESULT=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXX) +TOKILL=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXX) PBUIDS="1234 1111 2222" ps axo pid,user,size,pcpu,cmd > $HAYSTACK for i in $PBUIDS ; do @@ -152,7 +152,7 @@ QUERY=" AND p.date_build_started < datetime('now', '-36 hours') ORDER BY p.date_scheduled " -PACKAGES=$(mktemp) +PACKAGES=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX) sqlite3 -init $INIT ${PACKAGES_DB} "$QUERY" > $PACKAGES 2> /dev/null || echo "Warning: SQL query '$QUERY' failed." if grep -q '|' $PACKAGES ; then echo @@ -179,7 +179,7 @@ if [ ! -z "$LOCKFILES" ] ; then fi # find packages which have been removed from the archive -PACKAGES=$(mktemp) +PACKAGES=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXX) QUERY="SELECT name, suite, architecture FROM removed_packages LIMIT 25" sqlite3 -init $INIT ${PACKAGES_DB} "$QUERY" > $PACKAGES 2> /dev/null || echo "Warning: SQL query '$QUERY' failed." -- cgit v1.2.3-70-g09d2