[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-directory-devel
Subject:    =?utf-8?q?=5B389-devel=5D?= [PATCH] Allow to override build date
From:       "Bernhard M. Wiedemann" <bwiedemann () suse ! de>
Date:       2017-08-08 6:00:11
Message-ID: 20170808060011.8022-1-bwiedemann () suse ! de
[Download RAW message or body]

in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
 buildnum.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildnum.pl b/buildnum.pl
index 6d8804f..8db83da 100755
--- a/buildnum.pl
+++ b/buildnum.pl
@@ -31,7 +31,7 @@ if ($opt_H) {exitHelp();}
 $platdir = $opt_p;
 
 # Get current time
-@now = gmtime;
+@now = gmtime($ENV{SOURCE_DATE_EPOCH} || time);
 
 # Format buildnum as YYYY.DDD.HHMM
 $year = $now[5] + 1900;
-- 
2.12.3
_______________________________________________
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-leave@lists.fedoraproject.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic