Bug#1145915: googletest: please make the build reproducible
Chris Lamb
lamby at debian.org
Thu Aug 27 20:07:16 BST 2026
Source: googletest
Version: 1.18.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
googletest could not be built reproducibly.
This is because the testsuite bumps the modification time of the
test/ directory to the current time (which later gets clamped back to
SOURCE_DATE_EPOCH), so if the tests are skipped via nocheck, then this
directory will retain its original, upstream timestamp.
Patch attached that ensures this directory always has the same
timestamp, regardless of whether the tests are run or not.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/rules 2026-08-27 10:51:57.011901464 -0700
--- b/debian/rules 2026-08-27 11:55:00.526163232 -0700
@@ -23,6 +23,9 @@
find googletest -iname __pycache__ -type d | xargs rm -rf
override_dh_install-indep:
+ # If we ran the tests, we adjusted the mtimes of this dir, so force it
+ # to a fixed time for reproducibility
+ touch -d@$(SOURCE_DATE_EPOCH) googletest/test
dh_install
find debian -iname '*.py' -print0 | xargs -0 chmod -x
More information about the Reproducible-bugs
mailing list