GNU bug report logs -
#27773
[PATCH] Allow to override build date
Previous Next
Full log
View this message in rfc822 format
and use gmtime to not be influenced by timezone settings
in order to make builds reproducible.
While working on the reproducible builds effort, I found that
when building the automake package for openSUSE Linux,
there were slight differences between each build
See https://reproducible-builds.org/ for why this is matters
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
doc/help2man | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/help2man b/doc/help2man
index e651b8d2d..4a9f75064 100755
--- a/doc/help2man
+++ b/doc/help2man
@@ -217,7 +217,7 @@ $version_text ||= get_option_value $ARGV[0], $version_option;
# the English version expands to the month as a word and the full year. It
# is used on the footer of the generated manual pages. If in doubt, you may
# just use %x as the value (which should be the full locale-specific date).
-my $date = enc strftime _("%B %Y"), localtime;
+my $date = enc strftime _("%B %Y"), gmtime($ENV{SOURCE_DATE_EPOCH} || time());
(my $program = $ARGV[0]) =~ s!.*/!!;
my $package = $program;
my $version;
--
2.12.3
This bug report was last modified 8 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.