build.sh: SBUILD_OPTS for passing extra options like "--arch=" to sbuild

This commit is contained in:
Michael R. Crusoe 2021-10-07 12:44:38 +02:00
parent 9e40ad0061
commit 1e19746632
No known key found for this signature in database
GPG Key ID: 3C26763F6C67E6E2
2 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,9 @@ To set up a suitable build environment for ``./build.sh``::
An explanation of this, plus more recipes, can be found on the `sbuild wiki
page <https://wiki.debian.org/sbuild>`_.
If you need to pass additional options to sbuild, like "--arch=i386", then set
the SBUILD_OPTS environment variable.
Normally, ``./build.sh`` will fail early if not all the build dependencies are
available in your local apt cache. If you are packaging a large dependency tree
however, to avoid many round-trips through NEW it is possible to bypass this

View File

@ -14,6 +14,8 @@
# Release to something other than unstable, e.g. experimental
# CHROOT=$chroot
# Build using another schroot than debcargo-unstable-amd64-sbuild
# SBUILD_OPTS=
# will pass to sbuild; for example SBUILD_OPTS=--arch=i386
set -e
SCRIPTDIR="$(dirname $(readlink -f "$0"))"
@ -154,6 +156,7 @@ SBUILD_CONFIG="$SCRIPTDIR/dev/sbuildrc" sbuild --no-source --arch-any --arch-all
"${EXTRA_DEBS_AUTOPKGTEST_OPTS[@]}" \
"${AUTOPKGTEST_OPTS[@]}" \
"${LINTIAN_OPTS[@]}" \
${SBUILD_OPTS} \
"$SRCNAME.dsc"
if [ "$SKIP_AUTOPKGTEST" != 1 ]; then
report "analyzing autopkgtest log: $BUILDNAME.test.log"