From 3c048ec876c0965a97af77ac1fa2f6aca6d9123c Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 11 Jul 2016 12:19:53 +0200 Subject: [PATCH 250/257] reproduce.sh: Hardcode the number of xz threads to 2 Due to some upstream change hardcoding it to something is required now to get reproducible results when using systems with a different number of cores. Obtained from: ElectroBSD --- reproduce.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reproduce.sh b/reproduce.sh index 125d9fa407a1..6eb83f54c451 100755 --- a/reproduce.sh +++ b/reproduce.sh @@ -51,6 +51,13 @@ REPRODUCE_SH="$(realpath "${0}")" # If the source files changed, the result will not be reproducible! RESUME_BUILD="${RESUME_BUILD-false}" +# Number of threads to use when compressing with xz. +# +# The upstream default is 0 (auto-tune) which results +# in unreproducible results when using systems with a +# different number of cores. +XZ_THREADS="${XZ_THREADS-2}" + announce_status() { local msg \ timestamp @@ -90,7 +97,8 @@ reproduce_all_the_things() { make -C "${SRC_DIR}/release" clean fi announce_status "Starting to build the release" - time make -C "${SRC_DIR}/release" memstick NO_FSCHG="yes" || return 1 + time make -C "${SRC_DIR}/release" \ + memstick XZ_THREADS=${XZ_THREADS} NO_FSCHG="yes" || return 1 announce_status "Done with release memstick for ${REPRO_SEED}" @@ -130,7 +138,7 @@ respawn_with_clean_environment() { exec env -i PATH="/sbin:/bin:/usr/sbin:/usr/bin" HOME="/root" \ LC_COLLATE=C SHELL=/bin/sh ALREADY_RESPAWNED=1 \ MAX_MAKE_JOBS="${MAX_MAKE_JOBS}" RESUME_BUILD="${RESUME_BUILD}" \ - DIRECTORY_PREFIX="${DIRECTORY_PREFIX}" \ + DIRECTORY_PREFIX="${DIRECTORY_PREFIX}" XZ_THREADS=${XZ_THREADS} \ REPRO_SEED="${REPRO_SEED}" SRCCONF=/dev/null /bin/sh "${REPRODUCE_SH}" } -- 2.11.0