Update upstream's Configure script to make the build reproducible by not embedding the build time. (Closes: #831021)
Chris Lamb
3 years ago
0 | From: Chris Lamb <lamby@debian.org> | |
1 | Date: Wed, 23 Sep 2020 12:08:17 +0100 | |
2 | Subject: Make the build reproducible | |
3 | ||
4 | --- | |
5 | Configure | 4 +++- | |
6 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
7 | ||
8 | diff --git a/Configure b/Configure | |
9 | index b3fd8f9..3ccc4cc 100755 | |
10 | --- a/Configure | |
11 | +++ b/Configure | |
12 | @@ -17,6 +17,8 @@ | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | ||
16 | +use POSIX qw(strftime); | |
17 | + | |
18 | require './perl/question.pl'; | |
19 | require './perl/filemagic.pl'; | |
20 | require './perl/gethost.pl'; | |
21 | @@ -63,7 +65,7 @@ sub make_config { | |
22 | print "Creating src/config.h ... "; | |
23 | ||
24 | $ENV{'LC_TIME'} = "C"; | |
25 | - local($dateandtime) = `date`; | |
26 | + local($dateandtime) = strftime("%a %b %e %H:%M:%S UTC %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time)); | |
27 | chop($dateandtime); | |
28 | ||
29 | open(CF, "src/config.h.in"); |