Skip to content

Commit

Permalink
save-build-env: Strip out non-reproducible variables
Browse files Browse the repository at this point in the history
Bash provides access to the time and a random data via variables. We
don't want to persist these values when generating a binpkg.

Bug: https://bugs.gentoo.org/914441
Signed-off-by: Raul E Rangel <[email protected]>
  • Loading branch information
Raul E Rangel committed Apr 24, 2024
1 parent e35c9b0 commit a0b9d04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/save-ebuild-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ __save_ebuild_env() {
# identical, so strip them from the binpkg. It's also not needed
# for installing / removing a package.
unset MAKEOPTS NINJAOPTS

# These variables are constantly changing. Strip them so we
# don't introduce non-reproducible data into the binpkg.
unset EPOCHREALTIME EPOCHSECONDS SRANDOM
fi

# misc variables inherited from the calling environment
Expand Down

0 comments on commit a0b9d04

Please sign in to comment.