summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@torproject.org>2020-03-05 20:39:05 +0100
committerMatt Caswell <matt@openssl.org>2020-05-15 11:45:53 +0100
commit4268df6608684ea179a15e79e7a6213dfd255833 (patch)
treebfc96f2e893f3f19a1a62e3321b43d74fe01565b /util
parentdf943912046aee2e5e541949dbdbafa38819f195 (diff)
If SOURCE_DATE_EPOCH is defined, use it for copyright year
Using the date from SOURCE_DATE_EPOCH instead of the current date makes it possible to reproduce a build that was built on a different year: https://reproducible-builds.org/specs/source-date-epoch/ This is fixing an issue we had while building Tor Browser: https://trac.torproject.org/projects/tor/ticket/33535 CLA: trivial Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/11296) (cherry picked from commit 11d7d903447ab866d037fb8bba4ceb49c7d89191)
Diffstat (limited to 'util')
-rwxr-xr-xutil/mkrc.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/mkrc.pl b/util/mkrc.pl
index 6762bc4a56..ee61b9e598 100755
--- a/util/mkrc.pl
+++ b/util/mkrc.pl
@@ -46,7 +46,7 @@ if ( $filename =~ /openssl/i ) {
$vft = "VFT_APP";
}
-my $YEAR = [localtime()]->[5] + 1900;
+my $YEAR = [gmtime($ENV{SOURCE_DATE_EPOCH} || time())]->[5] + 1900;
print <<___;
#include <winver.h>