[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Allow to override build date
From: |
Bernhard M. Wiedemann |
Subject: |
[PATCH] Allow to override build date |
Date: |
Sat, 22 Jul 2017 18:15:55 +0200 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hi,
I found this patch in the Debian bugtracker
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826158
and also want it for the openSUSE GNU/Linux distribution
so it might as well go upstream:
Indecription: Reproducible info output
Honour the SOURCE_DATE_EPOCH environment variable to get a reproducible
@today value for info output when it is set.
See https://reproducible-builds.org/specs/source-date-epoch/
Author: Alexis Bienvenüe <address@hidden>
===================================================================
--- texinfo-6.3.orig/tp/Texinfo/Common.pm
+++ texinfo-6.3/tp/Texinfo/Common.pm
@@ -1205,7 +1205,7 @@ sub expand_today($)
return {'text' => 'a sunny day'};
}
my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
- = localtime(time);
+ = ($ENV{SOURCE_DATE_EPOCH} ? gmtime($ENV{SOURCE_DATE_EPOCH}) :
localtime(time));
$year += ($year < 70) ? 2000 : 1900;
return $self->gdt('{month} {day}, {year}',
{ 'month' => $self->gdt($MONTH_NAMES[$mon]),
--
Bernhard M. Wiedemann
Cloud Software Developer and Sysadmin
SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746
(AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
- [PATCH] Allow to override build date,
Bernhard M. Wiedemann <=