[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 3 commits: reproducible alpine: build inside aports checkout
Mattia Rizzolo
gitlab at salsa.debian.org
Tue Dec 3 17:29:11 GMT 2019
Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net
Commits:
44d048d1 by kpcyrd at 2019-12-03T16:51:19Z
reproducible alpine: build inside aports checkout
- - - - -
6d3ee8af by kpcyrd at 2019-12-03T16:51:19Z
reproducible alpine: add missing git pull
- - - - -
3b55b4d3 by kpcyrd at 2019-12-03T17:26:52Z
reproducible alpine: patch and install abuild to be reproducible
- - - - -
2 changed files:
- bin/reproducible_build_alpine_pkg.sh
- bin/reproducible_setup_alpine_schroot.sh
Changes:
=====================================
bin/reproducible_build_alpine_pkg.sh
=====================================
@@ -121,6 +121,7 @@ first_build() {
echo "Date: $(date -u)"
echo "============================================================================="
local SESSION="alpine-$SRCPACKAGE-$(basename $TMPDIR)"
+ local SRCDIR="/var/lib/jenkins/aports/$REPOSITORY/$SRCPACKAGE"
local BUILDDIR="/tmp/alpine-$SRCPACKAGE-$(basename $TMPDIR)"
local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log
local FUTURE_STATE="disabled"
@@ -134,7 +135,6 @@ first_build() {
#schroot --run-session -c $SESSION --directory /tmp -u root -- ln -sfT dash /usr/bin/sh
echo "MAKEFLAGS=-j$NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/abuild.conf
schroot --run-session -c $SESSION --directory "/var/lib/jenkins/aports" -- git pull
- schroot --run-session -c $SESSION --directory /tmp -- cp -vr "/var/lib/jenkins/aports/$REPOSITORY/$SRCPACKAGE" "$BUILDDIR"
# modify timezone, LANG, LC_ALL in the 1st build.
schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc <<-__END__
export TZ="/usr/share/zoneinfo/Etc/GMT+12"
@@ -154,7 +154,7 @@ first_build() {
echo $VERSION > $TMPDIR/b1/$SRCPACKAGE/build1.version
# nicely run abuild with a timeout of $TIMEOUT hours
timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
- schroot --run-session -c $SESSION --directory "$BUILDDIR" -- bash -l -c "abuild -rP $BUILDDIR 2>&1" | tee -a $LOG
+ schroot --run-session -c $SESSION --directory "$SRCDIR" -- bash -l -c "abuild -rP $BUILDDIR 2>&1" | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -eq 124 ] ; then
echo "$(date -u) - abuild was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
@@ -193,6 +193,7 @@ second_build() {
echo "Date: $(date -u)"
echo "============================================================================="
local SESSION="alpine-$SRCPACKAGE-$(basename $TMPDIR)"
+ local SRCDIR="/var/lib/jenkins/aports/$REPOSITORY/$SRCPACKAGE"
local BUILDDIR="/tmp/alpine-$SRCPACKAGE-$(basename $TMPDIR)"
local LOG=$TMPDIR/b2/$SRCPACKAGE/build2.log
NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
@@ -205,7 +206,7 @@ second_build() {
echo "============================================================================="
schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-alpine
echo "MAKEFLAGS=-j$NEW_NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/abuild.conf
- schroot --run-session -c $SESSION --directory /tmp -- cp -vr "/var/lib/jenkins/aports/$REPOSITORY/$SRCPACKAGE" "$BUILDDIR"
+ schroot --run-session -c $SESSION --directory "/var/lib/jenkins/aports" -- git pull
# add more variations in the 2nd build: TZ (differently), LANG, LC_ALL, umask
schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc <<-__END__
export TZ="/usr/share/zoneinfo/Etc/GMT-14"
@@ -226,7 +227,7 @@ second_build() {
echo $VERSION > $TMPDIR/b2/$SRCPACKAGE/build2.version
# nicely run abuild with a timeout of $TIMEOUT hours
timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
- schroot --run-session -c $SESSION --directory "$BUILDDIR" -- bash -l -c "abuild -rP $BUILDDIR 2>&1" | tee -a $LOG
+ schroot --run-session -c $SESSION --directory "$SRCDIR" -- bash -l -c "abuild -rP $BUILDDIR 2>&1" | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -eq 124 ] ; then
echo "$(date -u) - abuild was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
=====================================
bin/reproducible_setup_alpine_schroot.sh
=====================================
@@ -167,6 +167,61 @@ fi
echo "$(date -u) - cloning aports repo"
$USERCMD sh -c "$GIT_OPTIONS git clone https://git.alpinelinux.org/aports.git /var/lib/jenkins/aports"
+# build and install a patched abuild
+$USERCMD sh -c "cd /var/lib/jenkins/aports/main/abuild && git apply - && abuild -r && apk add ~/packages/main/x86_64/abuild-3.5.0_rc2-r1.apk && git checkout ." <<-__END__
+ZGlmZiAtLWdpdCBhL21haW4vYWJ1aWxkLzAwMDItcmVwcm8ucGF0Y2ggYi9tYWluL2FidWlsZC8w
+MDAyLXJlcHJvLnBhdGNoCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAwLi41ZmYy
+MjAxMwotLS0gL2Rldi9udWxsCisrKyBiL21haW4vYWJ1aWxkLzAwMDItcmVwcm8ucGF0Y2gKQEAg
+LTAsMCArMSw1MyBAQAorRnJvbSBiNTE0YTRlNTZkNGQxN2RhNTNiYmU1YTJkMjAzZjYxNmY5YTlm
+MzcxIE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQorRnJvbToga3BjeXJkIDxnaXRAcnh2LmNjPgor
+RGF0ZTogTW9uLCAyIERlYyAyMDE5IDE4OjA5OjU2ICswMTAwCitTdWJqZWN0OiBbUEFUQ0hdIGFi
+dWlsZDogc2V0IGZpeGVkIGF0aW1lIGFuZCBjdGltZSBpbiB0YXIKKworLS0tCisgYWJ1aWxkLmlu
+IHwgMTYgKysrKysrKysrKysrLS0tLQorIDEgZmlsZSBjaGFuZ2V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DMzY2I5N2VjMzJmN2Q3YmY4MzljNDU2MGQ4ZWM5ZTM2Zjc1NzMxMDli
+YTU2ZWI3YTAyZmMyMjYyYWNkZDNjNzg1ZTEwMDg5MzVmYWM1OTlkNzNlMmZlOTkzMCAgMDAwMi1y
+ZXByby5wYXRjaCIK
+__END__
+
echo "============================================================================="
echo "schroot $TARGET set up successfully in $SCHROOT_BASE/$TARGET - exiting now."
echo "============================================================================="
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/7587e5684e8dfb93f3180b200c45574fcec6bce9...3b55b4d38e7a3eee0666301ce5872db976e8280d
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/7587e5684e8dfb93f3180b200c45574fcec6bce9...3b55b4d38e7a3eee0666301ce5872db976e8280d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20191203/37a46f79/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list