diff --git a/README.rst b/README.rst index 89f48b741..5ab611f3d 100644 --- a/README.rst +++ b/README.rst @@ -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 `_. +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 diff --git a/build.sh b/build.sh index 22b47bfe8..b76e3eb3e 100755 --- a/build.sh +++ b/build.sh @@ -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"