diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2018-12-07 21:48:58 -0500 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2018-12-07 21:48:58 -0500 |
commit | 2d9030f4da7b849bcea57c6a4e54852b1e7a24b9 (patch) | |
tree | a21e4d4e2cbba626c7bd85e2e365ac28e96a9515 | |
parent | a5d2271c474b11967e29238e9ce1bd1a1e171735 (diff) | |
download | librebootfr-2d9030f4da7b849bcea57c6a4e54852b1e7a24b9.tar.gz librebootfr-2d9030f4da7b849bcea57c6a4e54852b1e7a24b9.zip |
Export reproducible-builds related variables
-rwxr-xr-x | libreboot | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -63,7 +63,7 @@ libreboot_usage() { printf 1>&2 '%s\n' ' TOOLS_FORCE - Tools to always perform actions for' printf 1>&2 '%s\n' ' RELEASE_KEY - GPG key to use for release' printf 1>&2 '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys' - printf 1>&2 '%s\n' ' LIBFAKETIME_PATH - Path to the libfaketime shared library' + printf 1>&2 '%s\n' ' LIBFAKETIME_PATH - Path to libfaketime' printf 1>&2 '%s\n' ' TASKS - Number of simultaneous tasks to run' printf 1>&2 '%s\n' ' VERSION - Version string to use' @@ -220,6 +220,8 @@ libreboot_setup_reproducible_builds_variables() { else RANDOM_SEED="$RANDOM" # True randomness is unnecessary fi + + export RANDOM_SEED fi # Also used by GCC, but as an environment variable @@ -231,9 +233,11 @@ libreboot_setup_reproducible_builds_variables() { else SOURCE_DATE_EPOCH="$(date +%s)" fi + + export SOURCE_DATE_EPOCH fi - # Relevant only when libfaketime is preloaded + # Relevant only when libfaketime path is given in $BUILD_SYSTEM.conf if [[ -n "$LIBFAKETIME_PATH" ]]; then BUILD_DATE_FMT="%Y-%m-%d %H:%M:%S" BUILD_DATE="$(date -u -d "@$SOURCE_DATE_EPOCH" "+$BUILD_DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$BUILD_DATE_FMT" 2>/dev/null || date -u "+$BUILD_DATE_FMT")" @@ -241,6 +245,8 @@ libreboot_setup_reproducible_builds_variables() { LC_ALL='C.UTF-8' LD_PRELOAD="$LIBFAKETIME_PATH" TZ='UTC' + + export BUILD_DATE_FMT BUILD_DATE FAKETIME LC_ALL LD_PRELOAD TZ fi } |