[PATCH] Allow to override build date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to 389-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux