[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible fedora: fixup some things from rebasing this of the archlinux build script…

Holger Levsen holger at moszumanska.debian.org
Fri Dec 11 16:34:26 UTC 2015


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 7278033f9ae9f2ced89c1801cb4e6b134913684d
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Dec 11 17:34:11 2015 +0100

    reproducible fedora: fixup some things from rebasing this of the archlinux build script…
---
 bin/reproducible_build_rpm.sh | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh
index 37c74e6..6c6ec2c 100755
--- a/bin/reproducible_build_rpm.sh
+++ b/bin/reproducible_build_rpm.sh
@@ -14,7 +14,7 @@ set -e
 
 cleanup_all() {
 	cd
-	# delete makepkg build dir
+	# delete mock result dir
 	if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then
 		rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)
 	fi
@@ -50,14 +50,13 @@ choose_package() {
 		if [ ! -d $BASE/rpm/$RELEASE/$ARCH/$PKG ] || [ ! -z $(find $BASE/rpm/$RELEASE/$ARCH/ -name $PKG -mtime +$MIN_AGE) ] ; then
 			SRCPACKAGE=$PKG
 			echo "$(date -u ) - building package $PKG from '$RELEASE' on '$ARCH' now..."
-				# very simple locking…
-				mkdir -p $BASE/rpm/$RELEASE/$ARCH/$PKG
-				touch $BASE/rpm/$RELEASE/$ARCH/$PKG
-				# break out of the loop and then out of this function too,
-				# to build this package…
-				break
-			fi
-		done
+			# very simple locking…
+			mkdir -p $BASE/rpm/$RELEASE/$ARCH/$PKG
+			touch $BASE/rpm/$RELEASE/$ARCH/$PKG
+			# break out of the loop and then out of this function too,
+			# to build this package…
+			break
+		fi
 	done
 	if [ -z $SRCPACKAGE ] ; then
 		echo "$(date -u ) - no package found to be build, sleeping 6h."
@@ -78,11 +77,11 @@ first_build() {
 	echo "============================================================================="
 	set -x
 	download_package
-	local BUILDDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
+	local RESULTDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
 	local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log
 	# nicely run mock with a timeout of 4h
 	timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
-		mock -r $RELEASE-$ARCH --resultdir=. $SRC_RPM 2>&1 | tee -a $LOG
+		mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR $SRC_RPM 2>&1 | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
 		echo "$(date -u) - mock was killed by timeout after 4h." | tee -a $LOG
@@ -98,12 +97,12 @@ second_build() {
 	echo "============================================================================="
 	set -x
 	download_package
-	local BUILDDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
+	local RESULTDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
 	local LOG=$TMPDIR/b2/$SRCPACKAGE/build2.log
 	# NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
 	# nicely run mock with a timeout of 4h
 	timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
-		mock -r $RELEASE-$ARCH --resultdir=. $SRC_RPM 2>&1 | tee -a $LOG
+		mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR $SRC_RPM 2>&1 | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
 		echo "$(date -u) - mock was killed by timeout after 4h." | tee -a $LOG

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