summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpcyrd <git@rxv.cc>2017-11-19 00:11:45 +0100
committerHolger Levsen <holger@layer-acht.org>2017-11-18 23:31:04 +0000
commit05ff09c0f9a4f36f4afcfafd13b2ec94d068add8 (patch)
tree5155206ff87b28ffd0687dfa4b0a7b1f0dd0da1d
parent26159e8373bc5163f0344c45bb9960e1b4595825 (diff)
downloadjenkins.debian.net-05ff09c0f9a4f36f4afcfafd13b2ec94d068add8.tar.xz
reproducible-archlinux: set SOURCE_DATE_EPOCH
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xbin/reproducible_build_archlinux_pkg.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 578c6d29..199bbbc6 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