[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible fedora rpms: better cleanup

Holger Levsen holger at moszumanska.debian.org
Fri Dec 11 19:18:30 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 3dd2c02a9fc7e0ad1172d768cffb63163e4d670b
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Dec 11 20:18:12 2015 +0100

    reproducible fedora rpms: better cleanup
---
 TODO                          | 9 ++++-----
 bin/reproducible_build_rpm.sh | 6 +++---
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/TODO b/TODO
index 4b1d4f5..7e1638e 100644
--- a/TODO
+++ b/TODO
@@ -282,6 +282,8 @@ This is about Debian, below are more todo entries for other projects…
 ==== reproducible Fedora
 
 * build script
+** maintenance should do maintenance too, to avoid blocking: if stamp file is older than 6h, do mock --update
+** how to allow more than one mock builder per node? using schroots?
 ** how to get a list of packages?
 ** no variations introduced yet:
 *** use '-j$NUM_CPU' and 'NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)'
@@ -289,16 +291,13 @@ This is about Debian, below are more todo entries for other projects…
 * other bits:
 ** use modified rpmbuild package
 * hosts/pb-build3/etc/yum/repos.d/* is really not sooo good but works…
-* build rawhide instead of fedora-23?
+* build rawhide too (once fedora-23 builds nicely)
 ** when adding rawhide make sure this is not needed: 'yumdownloader --enablerepo=fedora-23-src --source sudo'
 
 * more notes:
-** http://blog.packagecloud.io/eng/2015/05/11/building-rpm-packages-with-mock/
-** http://blog.packagecloud.io/eng/2015/04/20/working-with-source-rpms/
 ** https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds
 ** http://miroslav.suchy.cz/blog/archives/2015/05/28/increase_mock_performance_-_build_packages_in_memory/index.html
-** https://iuscommunity.org/pages/ConfiguringADedicatedRPMDevelopmentBox.html
-** http://geek.co.il/2010/03/14/how-to-build-a-chroot-jail-environment-for-centos
+** manually create a fedora chroot using rpm, wget + yum: http://geek.co.il/2010/03/14/how-to-build-a-chroot-jail-environment-for-centos
 
 ==== reproducible Arch Linux
 
diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh
index 6a4369a..24071db 100755
--- a/bin/reproducible_build_rpm.sh
+++ b/bin/reproducible_build_rpm.sh
@@ -81,7 +81,7 @@ first_build() {
 	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=$RESULTDIR $SRC_RPM 2>&1 | tee -a $LOG
+		mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after --rebuild -v $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
@@ -102,7 +102,7 @@ second_build() {
 	# 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=$RESULTDIR $SRC_RPM 2>&1 | tee -a $LOG
+		mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after --rebuild -v $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
@@ -178,7 +178,7 @@ if [ "$1" = "1" ] || [ "$1" = "2" ] ; then
 		second_build
 	fi
 	# preserve results and delete build directory
-	mv -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/$SRCPACKAGE/*.rpm $TMPDIR/b$MODE/$SRCPACKAGE/ || ls /tmp/$SRCPACKAGE-$(basename $TMPDIR)/$SRCPACKAGE/
+	mv -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/*.rpm $TMPDIR/b$MODE/$SRCPACKAGE/ || ls /tmp/$SRCPACKAGE-$(basename $TMPDIR)/
 	rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)/
 	echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME done."
 	exit 0

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