commit:     81a8ae90a23652973d094440ef6d08dd34ee32d1
Author:     Raul E Rangel <rrangel <AT> chromium <DOT> org>
AuthorDate: Wed Apr 24 18:49:02 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 16 03:21:43 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=81a8ae90

save-build-env: Strip out non-reproducible variables

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 <rrangel <AT> chromium.org>
Part-of: https://github.com/gentoo/portage/pull/1311
Closes: https://github.com/gentoo/portage/pull/1311
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/save-ebuild-env.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 7e6bd6120e..73b245121c 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -47,6 +47,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
 
        MAPFILE+=(

Reply via email to