Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
tor-browser-build
Commits
b5e9b4ad
Verified
Commit
b5e9b4ad
authored
Mar 05, 2020
by
boklm
Browse files
Bug 33535: Patch openssl to use SOURCE_DATE_EPOCH for copyright year
parent
5954b384
Changes
3
Hide whitespace changes
Inline
Side-by-side
projects/openssl/build
View file @
b5e9b4ad
...
...
@@ -15,6 +15,7 @@ export CC='gcc -m32'
[
%
END
-%
]
[
%
IF
c
(
"var/windows"
)
-%
]
patch
-
p1
<
$
rootdir
/
escape
-
openssldir
.
patch
patch
-
p1
<
$
rootdir
/
use
-
SOURCE_DATE_EPOCH
.
patch
[
%
END
-%
]
export
SOURCE_DATE_EPOCH
=
'[% c("timestamp") %]'
.
/
Configure
[
%
c
(
'var/configure_opts'
)
%
]
...
...
projects/openssl/config
View file @
b5e9b4ad
...
...
@@ -31,3 +31,5 @@ input_files:
sha256sum
:
1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
-
filename
:
escape-openssldir.patch
enable
:
'
[%
c("var/windows")
%]'
-
filename
:
use-SOURCE_DATE_EPOCH.patch
enable
:
'
[%
c("var/windows")
%]'
projects/openssl/use-SOURCE_DATE_EPOCH.patch
0 → 100644
View file @
b5e9b4ad
From a1625535fc5127ab8e94043280ef7a983bcfc161 Mon Sep 17 00:00:00 2001
From: Nicolas Vigier <boklm@torproject.org>
Date: Thu, 5 Mar 2020 20:39:05 +0100
Subject: [PATCH] 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/
---
util/mkrc.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/mkrc.pl b/util/mkrc.pl
index 6762bc4a56..e15c071af7 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 = [localtime($ENV{SOURCE_DATE_EPOCH} || time())]->[5] + 1900;
print <<___;
#include <winver.h>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment