[syslinux:master] libinstaller: Use SOURCE_DATE_EPOCH for synthesized modification time stamps

syslinux-bot for Lukas Schwaighofer lukas at schwaighofer.name
Sat Nov 4 09:54:14 PDT 2017


Commit-ID:  523250bbd841597bfd60009771f9afa09a324dc7
Gitweb:     http://www.syslinux.org/commit/523250bbd841597bfd60009771f9afa09a324dc7
Author:     Lukas Schwaighofer <lukas at schwaighofer.name>
AuthorDate: Sat, 4 Nov 2017 11:36:41 -0400
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Sat, 4 Nov 2017 11:37:02 -0400

libinstaller: Use SOURCE_DATE_EPOCH for synthesized modification time stamps

Patches bin2c.pl to use the value of SOURCE_DATE_EPOCH instead of real
modification time stamp (only if SOURCE_DATE_EPOCH is set).

Author: Lukas Schwaighofer <lukas at schwaighofer.name>
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>

---
 libinstaller/bin2c.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libinstaller/bin2c.pl b/libinstaller/bin2c.pl
index 07c11dd..c79a506 100755
--- a/libinstaller/bin2c.pl
+++ b/libinstaller/bin2c.pl
@@ -71,8 +71,11 @@ if ($align != 0) {
 
 printf "\n};\n\nconst unsigned int %s_len = %u;\n", $table_name, $total_len;
 
- at st = stat STDIN;
-
-printf "\nconst int %s_mtime = %d;\n", $table_name, $st[9];
+if (defined $ENV{'SOURCE_DATE_EPOCH'}) {
+    printf "\nconst int %s_mtime = %s;\n", $table_name, $ENV{'SOURCE_DATE_EPOCH'};
+} else {
+    @st = stat STDIN;
+    printf "\nconst int %s_mtime = %d;\n", $table_name, $st[9];
+}
 
 exit 0;


More information about the Syslinux-commits mailing list