[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Arch Linux: build in /tmp/archlinux-ci/$SRCPACKAGE... instead of /tmp/$SRCPACKAGE...
Holger Levsen (@holger)
gitlab at salsa.debian.org
Fri Mar 31 21:20:42 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
83d7c78f by Holger Levsen at 2023-03-31T22:20:28+02:00
reproducible Arch Linux: build in /tmp/archlinux-ci/$SRCPACKAGE... instead of /tmp/$SRCPACKAGE...
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_build_archlinux_pkg.sh
Changes:
=====================================
bin/reproducible_build_archlinux_pkg.sh
=====================================
@@ -20,8 +20,8 @@ cleanup_all() {
schroot --end-session -c archlinux-$SRCPACKAGE-$(basename $TMPDIR) > /dev/null 2>&1 || true
fi
# delete makepkg build dir
- if [ -n $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then
- sudo rm -rf --one-file-system /tmp/$SRCPACKAGE-$(basename $TMPDIR)
+ if [ -n $SRCPACKAGE ] && [ -d /tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR) ] ; then
+ sudo rm -rf --one-file-system /tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR)
fi
# delete main work dir (only on master)
if [ "$MODE" = "master" ] ; then
@@ -121,7 +121,7 @@ first_build() {
echo "Date: $(date -u)"
echo "============================================================================="
local SESSION="archlinux-$SRCPACKAGE-$(basename $TMPDIR)"
- local BUILDDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
+ local BUILDDIR="/tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR)"
local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log
local FUTURE_STATE="disabled"
local MAKEPKG_ENV_VARS="SOURCE_DATE_EPOCH='$SOURCE_DATE_EPOCH' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'"
@@ -139,7 +139,7 @@ first_build() {
schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
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/makepkg.conf
- schroot --run-session -c $SESSION --directory /tmp -- mkdir $BUILDDIR
+ schroot --run-session -c $SESSION --directory /tmp -- mkdir -p $BUILDDIR
schroot --run-session -c $SESSION --directory "$BUILDDIR" -- env GIT_SSL_NO_VERIFY=1 asp checkout "$SRCPACKAGE" 2>&1 | tee -a $LOG || echo "Error: failed to download PKGBUILD for $SRCPACKAGE from $REPOSITORY" | tee -a $LOG
# $SRCPACKAGE is actually the binary package
ACTUAL_SRCPACKAGE=$(ls "$BUILDDIR")
@@ -209,7 +209,7 @@ second_build() {
echo "Date: $(date -u)"
echo "============================================================================="
local SESSION="archlinux-$SRCPACKAGE-$(basename $TMPDIR)"
- local BUILDDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
+ local BUILDDIR="/tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR)"
local LOG=$TMPDIR/b2/$SRCPACKAGE/build2.log
NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
local FUTURE_STATE="disabled"
@@ -227,7 +227,7 @@ second_build() {
echo "============================================================================="
schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
echo "MAKEFLAGS=-j$NEW_NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/makepkg.conf
- schroot --run-session -c $SESSION --directory /tmp -- mkdir $BUILDDIR
+ schroot --run-session -c $SESSION --directory /tmp -- mkdir -p $BUILDDIR
schroot --run-session -c $SESSION --directory "$BUILDDIR" -- env GIT_SSL_NO_VERIFY=1 asp checkout "$SRCPACKAGE" 2>&1 | tee -a $LOG || echo "Error: failed to download PKGBUILD for $SRCPACKAGE from $REPOSITORY" | tee -a $LOG
# $SRCPACKAGE is actually the binary package
ACTUAL_SRCPACKAGE=$(ls "$BUILDDIR")
@@ -364,9 +364,9 @@ elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
fi
# preserve results and delete build directory
- if [ -n "$(ls /tmp/$SRCPACKAGE-$(basename $TMPDIR)/*/trunk/*.pkg.tar.zst)" ] ; then
+ if [ -n "$(ls /tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR)/*/trunk/*.pkg.tar.zst)" ] ; then
# copying is enough here, we delete after this if block anyway
- cp --preserve=timestamps -v /tmp/$SRCPACKAGE-$(basename $TMPDIR)/*/trunk/*.pkg.tar.zst $TMPDIR/b$MODE/$SRCPACKAGE/
+ cp --preserve=timestamps -v /tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR)/*/trunk/*.pkg.tar.zst $TMPDIR/b$MODE/$SRCPACKAGE/
else
echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME didn't build a package!"
# debug
@@ -374,7 +374,7 @@ elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
ls -Rl
fi
- sudo rm -rf --one-file-system /tmp/$SRCPACKAGE-$(basename $TMPDIR)
+ sudo rm -rf --one-file-system /tmp/archlinux-ci/$SRCPACKAGE-$(basename $TMPDIR)
echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME done."
exit 0
fi
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/83d7c78f023de1e8ef12b3fcf25ba92cfa0ff294
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/83d7c78f023de1e8ef12b3fcf25ba92cfa0ff294
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/20230331/4de2cf9a/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list