summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-11 20:18:12 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-11 20:18:12 +0100
commit3dd2c02a9fc7e0ad1172d768cffb63163e4d670b (patch)
tree9ab12c17949d7600cc648089651c2f04790cbc96
parent0c9abe46890ade7662eb323ce1cfe3bbd83df180 (diff)
downloadjenkins.debian.net-3dd2c02a9fc7e0ad1172d768cffb63163e4d670b.tar.xz
reproducible fedora rpms: better cleanup
-rw-r--r--TODO9
-rwxr-xr-xbin/reproducible_build_rpm.sh6
2 files changed, 7 insertions, 8 deletions
diff --git a/TODO b/TODO
index 4b1d4f51..7e1638e4 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 6a4369a5..24071dbb 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