From 939f0e92a560b4d21f8a06da09d78e03ce0e18ec Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 20 Jul 2017 14:48:40 -0700 Subject: [PATCH] Allow configure.pl to recognize $SOURCE_DATE_EPOCH Signed-off-by: Tom Eastep --- Shorewall-core/configure.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl index 7b4b62057..88f443f8e 100755 --- a/Shorewall-core/configure.pl +++ b/Shorewall-core/configure.pl @@ -173,7 +173,12 @@ my $outfile; open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!"; -printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d %04d %02d:%02d:%02d\n", VERSION, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0]; +if ( $ENV{SOURCE_DATE_EPOCH} ) { + printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s\n", VERSION, `date --utc --date=\"\@$ENV{SOURCE_DATE_EPOCH}\"`; +} else { + printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d %04d %02d:%02d:%02d\n", VERSION, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0]; +} + print $outfile "# rc file: $rcfilename\n#\n"; print $outfile "# Input: @ARGV\n#\n" if @ARGV;