[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian: fail the job if stamp file is from the future

Holger Levsen holger at moszumanska.debian.org
Sun Apr 3 14:26:50 UTC 2016


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 8e4e3d74f2133dd8cf48d88879a20205566a0f72
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Apr 3 16:26:44 2016 +0200

    reproducible debian: fail the job if stamp file is from the future
---
 bin/reproducible_setup_pbuilder.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index 5065d03..55f2f3d 100755
--- a/bin/reproducible_setup_pbuilder.sh
+++ b/bin/reproducible_setup_pbuilder.sh
@@ -126,6 +126,13 @@ setup_pbuilder() {
 BASETGZ=/var/cache/pbuilder/$SUITE-reproducible-base.tgz
 STAMP=/var/log/jenkins/$SUITE-reproducible-base.tgz.stamp
 OLDSTAMP=$(find $STAMP -mtime +1 -exec ls -lad {} \; || echo "nostamp")
+NOW=$(mktemp)
+if [ $STAMP -nt $NOW ] ; then
+	echo "$STAMP file was created in the future, please investigate..."
+	rm $NOW > /dev/null
+	exit 1
+fi
+rm $NOW > /dev/null
 if [ -n "$OLDSTAMP" ] || [ ! -f $BASETGZ ] || [ ! -f $STAMP ] ; then
 	if [ ! -f $BASETGZ ] ; then
 		echo "No $BASETGZ exists, creating a new one..."

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