[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian: move the temporary rbuild directories into a rbuild-debian directory

Holger Levsen holger at layer-acht.org
Fri Feb 17 11:32:04 UTC 2017


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 db442af7449a95fded588e4b3f54ec2bd69010a6
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Feb 16 16:44:09 2017 +0100

    reproducible debian: move the temporary rbuild directories into a rbuild-debian directory
    
    this is to avoid having thousands of temporary directories mixed with few non-temporary ones in /srv/reproducible-builds
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build.sh       |  3 ++-
 bin/reproducible_maintenance.sh | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 1ebc786..9cbeebe 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -882,7 +882,8 @@ build_rebuild() {
 # below is what controls the world
 #
 
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-debian-XXXXXXXX)  # where everything actually happens
+mkdir -p /srv/reproducible-results/rbuild-debian
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results/rbuild-debian -d)  # where everything actually happens
 trap cleanup_all INT TERM EXIT
 cd $TMPDIR
 
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 80a8f0f..0991985 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -181,6 +181,8 @@ fi
 set -e
 
 # delete old temp directories
+# (delete this by the end of Feb 2017 after there are no more stale dirs in
+# $REP_RESULTS and everything moved into $REP_RESULSTS/rbuild-debian/)
 echo "$(date -u) - Deleting temp directories, older than 3 days."
 OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -mtime +2 -name "tmp.*" -o -mtime +2 -name "rbuild*" -exec ls -lad {} \; || true)
 if [ ! -z "$OLDSTUFF" ] ; then
@@ -190,6 +192,16 @@ if [ ! -z "$OLDSTUFF" ] ; then
 	echo "These old directories have been deleted."
 	echo
 	DIRTY=true
+# delete old temp directories
+echo "$(date -u) - Deleting temp directories, older than 3 days."
+OLDSTUFF=$(find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec ls -lad {} \; || true)
+if [ ! -z "$OLDSTUFF" ] ; then
+	echo
+	echo "Old temp directories found in $REP_RESULTS/rbuild-debian"
+	find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec rm -rv {} \; || true
+	echo "These old directories have been deleted."
+	echo
+	DIRTY=true
 fi
 
 # delete old pbuilder build directories
@@ -348,6 +360,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
 	fi
 	rm $PACKAGES
 
+	find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec rm -rv {} \; || true
 	#
 	# delete jenkins html logs from reproducible_builder_* jobs as they are mostly redundant
 	# (they only provide the extended value of parsed console output, which we dont need here.)

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