Skip to content
Commits on Source (2)
......@@ -626,8 +626,9 @@ EOF
else
echo "BUILDDIR=/build" >> "$TMPCFG"
fi
set +e
# remember to change the sudoers setting if you change the following command
( sudo timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice \
sudo timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice \
/usr/sbin/pbuilder --build \
--configfile $TMPCFG \
--debbuildopts "-b --buildinfo-id=${ARCH}" \
......@@ -635,15 +636,13 @@ EOF
--buildresult $TMPDIR/b1 \
--logfile b1/build.log \
${SRCPACKAGE}_${EVERSION}.dsc
) 2>&1 | log_file -
local PRESULT=${PIPESTATUS[0]}
local PRESULT=$?
set -e
if ! "$DEBUG" ; then set +x ; fi
rm $TMPCFG
case $PRESULT in
124)
msg="pbuilder was killed by timeout after 18h."
log_error "$msg"
echo "$(date -u) - $msg" | tee -a b1/build.log
echo "$(date -u) - pbuilder was killed by timeout after 18h." | tee -a b1/build.log
exit 3
;;
1) # FTBFS, for whatever reason.
......@@ -766,28 +765,15 @@ remote_build() {
check_node_is_up $NODE $PORT $SLEEPTIME
set +e
ssh -o "BatchMode = yes" -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR} "$VERSION"
local RESULT=$?
case $RESULT in
148) # 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
handle_E404
;;
2|3)
handle_ftbfs
;;
0) # build succcessfully completed
;;
*)
handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} on ${SUITE}/${ARCH}"
;;
esac
local BUILD_RESULT=$?
rsync -e "ssh -o 'BatchMode = yes' -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
RESULT=$?
if [ $RESULT -ne 0 ] ; then
local RSYNC_RESULT=$?
if [ $RSYNC_RESULT -ne 0 ] ; then
log_warning "rsync from $NODE failed, sleeping 2m before re-trying..."
sleep 2m
rsync -e "ssh -o 'BatchMode = yes' -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
RESULT=$?
if [ $RESULT -ne 0 ] ; then
local RSYNC_RESULT=$?
if [ $RSYNC_RESULT -ne 0 ] ; then
handle_remote_error "when rsyncing remote build #$BUILDNR results from $NODE"
fi
fi
......@@ -798,6 +784,19 @@ remote_build() {
if [ $BUILDNR -eq 1 ] ; then
log_file $TMPDIR/b1/build.log
fi
case $BUILD_RESULT in
148) # 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
handle_E404
;;
2|3)
handle_ftbfs
;;
0) # build succcessfully completed
;;
*)
handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} on ${SUITE}/${ARCH}"
;;
esac
}
check_installed_build_depends() {
......