Use regular chroots instead of source chroots for normal commands

In preparation to a move to file-based schroot instead of directory
ones.
Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 64f663a4
......@@ -66,11 +66,11 @@ po2xml() {
# build-depends for the installation-guide package installed.
# The d-i_schroot-sid-create job creates it.
#
schroot --directory $BUILDDIR/manual -c source:jenkins-d-i-sid sh ./scripts/merge_xml en
schroot --directory $BUILDDIR/manual -c source:jenkins-d-i-sid sh ./scripts/update_pot
schroot --directory $BUILDDIR/manual -c source:jenkins-d-i-sid sh ./scripts/update_po $1
schroot --directory $BUILDDIR/manual -c source:jenkins-d-i-sid sh ./scripts/revert_pot
schroot --directory $BUILDDIR/manual -c source:jenkins-d-i-sid sh ./scripts/create_xml $1
schroot --directory $BUILDDIR/manual -c chroot:jenkins-d-i-sid sh ./scripts/merge_xml en
schroot --directory $BUILDDIR/manual -c chroot:jenkins-d-i-sid sh ./scripts/update_pot
schroot --directory $BUILDDIR/manual -c chroot:jenkins-d-i-sid sh ./scripts/update_po $1
schroot --directory $BUILDDIR/manual -c chroot:jenkins-d-i-sid sh ./scripts/revert_pot
schroot --directory $BUILDDIR/manual -c chroot:jenkins-d-i-sid sh ./scripts/create_xml $1
}
build_language() {
......@@ -88,7 +88,7 @@ build_language() {
# The d-i_schroot-sid-create job creates it.
#
set -x
schroot --directory $BUILDDIR/manual/build -c source:jenkins-d-i-sid make languages=$1 architectures=$ARCH destination=$BUILDDIR/manual/build/$FORMAT/ formats=$FORMAT
schroot --directory $BUILDDIR/manual/build -c chroot:jenkins-d-i-sid make languages=$1 architectures=$ARCH destination=$BUILDDIR/manual/build/$FORMAT/ formats=$FORMAT
set +x
if ( [ "$FORMAT" = "pdf" ] && [ ! -f pdf/$1.$ARCH/install.$1.pdf ] ) || \
( [ "$FORMAT" = "html" ] && [ ! -f html/$1.$ARCH/index.html ] ) ; then
......
......@@ -379,12 +379,12 @@ call_diffoscope_on_changes_files() {
set -x # to debug diffoscope/schroot problems
# TEMP is recognized by python's tempfile module to create temp stuff inside
local TEMP=$(mktemp --tmpdir=$TMPDIR -d dbd-tmp-XXXXXXX)
DIFFOSCOPE="$(schroot --directory $TMPDIR -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1 || true)"
DIFFOSCOPE="$(schroot --directory $TMPDIR -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1 || true)"
LOG_RESULT=$(echo $DIFFOSCOPE | grep '^E: 15binfmt: update-binfmts: unable to open' || true)
if [ ! -z "$LOG_RESULT" ] ; then
echo "$(date -u) - schroot jenkins-reproducible-${DBDSUITE}-diffoscope not available, will sleep 2min and retry."
sleep 2m
DIFFOSCOPE="$(schroot --directory $TMPDIR -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1 || echo 'diffoscope_version_not_available')"
DIFFOSCOPE="$(schroot --directory $TMPDIR -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1 || echo 'diffoscope_version_not_available')"
fi
log_info "$DIFFOSCOPE will be used to compare the two builds:"
set +e
......@@ -392,7 +392,7 @@ call_diffoscope_on_changes_files() {
# remember to also modify the retry diffoscope call 15 lines below
( timeout $TIMEOUT nice schroot \
--directory $TMPDIR \
-c source:jenkins-reproducible-${DBDSUITE}-diffoscope \
-c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope \
-- sh -c "export TMPDIR=$TEMP ; diffoscope \
--html $TMPDIR/${DBDREPORT} \
--text $TMPDIR/$DBDTXT \
......@@ -409,7 +409,7 @@ call_diffoscope_on_changes_files() {
# remember to also modify the retry diffoscope call 15 lines above
( timeout $TIMEOUT nice schroot \
--directory $TMPDIR \
-c source:jenkins-reproducible-${DBDSUITE}-diffoscope \
-c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope \
-- sh -c "export TMPDIR=$TEMP ; diffoscope \
--html $TMPDIR/${DBDREPORT} \
--text $TMPDIR/$DBDTXT \
......@@ -532,10 +532,10 @@ download_source() {
set +e
local TMPLOG=$(mktemp --tmpdir=$TMPDIR)
if [ "$MODE" != "master" ] ; then
schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE}=${VERSION} 2>&1 | tee ${TMPLOG}
schroot --directory $TMPDIR -c chroot:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE}=${VERSION} 2>&1 | tee ${TMPLOG}
else
# the build master only needs to the the .dsc file
schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE}=${VERSION} | grep \.dsc|cut -d " " -f1|xargs -r wget --timeout=180 --tries=3 2>&1 | tee ${TMPLOG}
schroot --directory $TMPDIR -c chroot:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE}=${VERSION} | grep \.dsc|cut -d " " -f1|xargs -r wget --timeout=180 --tries=3 2>&1 | tee ${TMPLOG}
fi
local ENGLISH_RESULT=$(egrep 'E: (Unable to find a source package for|Failed to fetch.*(Unable to connect to|Connection failed|Size mismatch|Cannot initiate the connection to|Bad Gateway|Service Unavailable))' ${TMPLOG})
local FRENCH_RESULT=$(egrep 'E: (Unable to find a source package for|impossible de récupérer.*(Unable to connect to|Échec de la connexion|Size mismatch|Cannot initiate the connection to|Bad Gateway|Service Unavailable))' ${TMPLOG})
......
......@@ -410,7 +410,7 @@ if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz 2>/dev/null|| true)" ] ; the
elif [ -f $TMPDIR/b1/$SRCPACKAGE/$ARTIFACT ] && [ -f $TMPDIR/b2/$SRCPACKAGE/$ARTIFACT ] ; then
# run diffoscope on the results
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
echo "$(date -u) - Running $DIFFOSCOPE now..."
call_diffoscope $SRCPACKAGE $ARTIFACT
else
......
......@@ -237,7 +237,7 @@ if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.rpm 2>/dev/null|| true)" ] ; then
remote_build 2
# run diffoscope on the results
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
echo "$(date -u) - Running $DIFFOSCOPE now..."
cd $TMPDIR/b1/$SRCPACKAGE
for ARTIFACT in *.rpm ; do
......
......@@ -155,7 +155,7 @@ rm -r $TMPBUILDDIR/coreboot
# run diffoscope on the results
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
echo "============================================================================="
echo "$(date -u) - Running $DIFFOSCOPE on coreboot images."
echo "============================================================================="
......
......@@ -41,7 +41,7 @@ save_freebsd_results() {
run_diffoscope_on_results() {
TIMEOUT="60m"
DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
echo "============================================================================="
echo "$(date -u) - Running $DIFFOSCOPE on FreeBSD (branch $FREEBSD_TARGET at ${FREEBSD_VERSION}) build results."
echo "============================================================================="
......
......@@ -91,7 +91,7 @@ rm -rf "$TMPBUILDDIR/lede"
# run diffoscope on the results
# (this needs refactoring rather badly)
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c "source:jenkins-reproducible-${DBDSUITE}-diffoscope" diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c "chroot:jenkins-reproducible-${DBDSUITE}-diffoscope" diffoscope -- --version 2>&1)"
echo "============================================================================="
echo "$(date -u) - Running $DIFFOSCOPE on LEDE images and packages."
echo "============================================================================="
......
......@@ -127,7 +127,7 @@ set -x
# run diffoscope on the results
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
echo "============================================================================="
echo "$(date -u) - Running $DIFFOSCOPE on NetBSD build results..."
echo "============================================================================="
......
......@@ -87,7 +87,7 @@ rm -rf $TMPBUILDDIR/openwrt
# run diffoscope on the results
# (this needs refactoring rather badly)
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
echo "============================================================================="
echo "$(date -u) - Running $DIFFOSCOPE on OpenWrt images and packages."
echo "============================================================================="
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment