diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index b54cb2b817afa8ff85c4d284eeaa48ef8b921d8a..efa24c9acb1641e542eaa2bf0ca4f0b6755dab0a 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -568,6 +568,15 @@ first_build() { echo "Date: $(date)" echo "Date UTC: $(date -u)" echo "=============================================================================" + if [ "${ARCH}" = "armhf" ]; then + # Reduce parallelism on armhf systems with a lot of cores to + # reduce swapping on highly parallel builds. Also ensure first + # build is always an odd number of CPUs for good measure. + case $NUM_CPU in + 2|4) NUM_CPU=3 ;; + *) NUM_CPU=5 ;; + esac + fi local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR) cat > "$TMPCFG" << EOF BUILDUSERID=1111 @@ -625,7 +634,15 @@ second_build() { echo "=============================================================================" set -x local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR) - NEW_NUM_CPU=$NUM_CPU # on amd64+i386 we vary this based on node choices (by design), on armhf only sometimes. + # on amd64+i386 we vary this based on node choices (by design) + if [ "${ARCH}" = "armhf" ]; then + # Reduce parallelism on armhf systems with a lot of cores to + # reduce swapping on highly parallel builds. Keep second build + # with even number of cores. + case $NUM_CPU in + 8) NUM_CPU=6 ;; + esac + fi # differ locale+language depending on the architecture (mostly for readability by different people…) case $ARCH in armhf) locale=it_CH diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 3a3df370c9c06db1be5f2135018a0550ce2aa450..0e84a190ce35b9f31dd3f03cdee6025e7d082319 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -494,7 +494,7 @@ write_variation_table() { write_page "build path/build/1st/\$pkg-\$ver (not varied for stretch/buster)/build/2/\$pkg-\$ver/2nd (not varied for stretch/buster)" write_page "user's login shell/bin/sh/bin/bash" write_page "user's GECOSfirst user,first room,first work-phone,first home-phone,first othersecond user,second room,second work-phone,second home-phone,second other" - write_page "env DEB_BUILD_OPTIONSDEB_BUILD_OPTIONS=\"parallel=XXX\"
  XXX on amd64: 16 or 15
  XXX on i386: 10 or 9
  XXX on armhf: 8, 4 or 2DEB_BUILD_OPTIONS=\"parallel=YYY\"
  YYY on amd64: 16 or 15 (!= the first build)
  YYY on i386: 10 or 9 (!= the first build)
  YYY is the same as XXX on arm64
  YYY on armhf: 8, 4, or 2 (not varied systematically)" + write_page "env DEB_BUILD_OPTIONSDEB_BUILD_OPTIONS=\"parallel=XXX\"
  XXX on amd64: 16 or 15
  XXX on i386: 10 or 9
  XXX on armhf: 5 or 3DEB_BUILD_OPTIONS=\"parallel=YYY\"
  YYY on amd64: 16 or 15 (!= the first build)
  YYY on i386: 10 or 9 (!= the first build)
  YYY is the same as XXX on arm64
  YYY on armhf: 2, 4, or 6" write_page "UTS namespaceshared with the hostmodified using /usr/bin/unshare --uts" elif [ "$1" = "Arch Linux" ] ; then write_page "env USERjenkinsbuild 2"