[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible-archlinux: set SOURCE_DATE_EPOCH
Holger Levsen
holger at layer-acht.org
Sat Nov 18 23:31:14 UTC 2017
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 05ff09c0f9a4f36f4afcfafd13b2ec94d068add8
Author: kpcyrd <git at rxv.cc>
Date: Sun Nov 19 00:11:45 2017 +0100
reproducible-archlinux: set SOURCE_DATE_EPOCH
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_build_archlinux_pkg.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 578c6d2..199bbbc 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -135,7 +135,7 @@ first_build() {
echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc
# nicely run makepkg 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/$SRCPACKAGE/trunk" -- bash -l -c 'makepkg --syncdeps --noconfirm 2>&1' | tee -a $LOG
+ schroot --run-session -c $SESSION --directory "$BUILDDIR/$SRCPACKAGE/trunk" -- bash -l -c 'SOURCE_DATE_EPOCH='$SOURCE_DATE_EPOCH' makepkg --syncdeps --noconfirm 2>&1' | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -eq 124 ] ; then
echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
@@ -191,7 +191,7 @@ second_build() {
__END__
# nicely run makepkg 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/$SRCPACKAGE/trunk" -- bash -l -c 'makepkg --syncdeps --noconfirm 2>&1' | tee -a $LOG
+ schroot --run-session -c $SESSION --directory "$BUILDDIR/$SRCPACKAGE/trunk" -- bash -l -c 'SOURCE_DATE_EPOCH='$SOURCE_DATE_EPOCH' makepkg --syncdeps --noconfirm 2>&1' | tee -a $LOG
PRESULT=${PIPESTATUS[0]}
if [ $PRESULT -eq 124 ] ; then
echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
@@ -232,7 +232,7 @@ remote_build() {
cleanup_all
exec /srv/jenkins/bin/abort.sh
fi
- ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh $BUILDNR $REPOSITORY ${SRCPACKAGE} ${TMPDIR}
+ ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh $BUILDNR $REPOSITORY ${SRCPACKAGE} ${TMPDIR} ${SOURCE_DATE_EPOCH}
RESULT=$?
if [ $RESULT -ne 0 ] ; then
ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true
@@ -280,12 +280,14 @@ trap cleanup_all INT TERM EXIT
if [ "$1" = "" ] ; then
MODE="master"
TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX) # where everything actually happens
+ SOURCE_DATE_EPOCH=$(date +%s)
cd $TMPDIR
elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
MODE="$1"
REPOSITORY="$2"
SRCPACKAGE="$3"
TMPDIR="$4"
+ SOURCE_DATE_EPOCH="$5"
[ -d $TMPDIR ] || mkdir -p $TMPDIR
cd $TMPDIR
mkdir -p b$MODE/$SRCPACKAGE
--
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