unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 8bd6a3aeda0f787f78eab24fad38097637e8dac9 1569 bytes (raw)
name: packages/patches/enblend-enfuse-reproducible.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
# HG changeset patch
# User Bernhard M. Wiedemann <bwiedemann@suse.de>
# Date 1502609999 -7200
#      Sun Aug 13 09:39:59 2017 +0200
# Node ID a98e00eed893f62dd8349fc2894abca3aff4b33a
# Parent  41ce01b7d413b3654211da0147857e7d6a1495de
Facilitate reproducible builds
by allowing to externally hold constant the build date and time.
See
        https://reproducible-builds.org/specs/source-date-epoch/

Backport asap.

diff -r 41ce01b7d413 -r a98e00eed893 NEWS
--- a/NEWS	Sun Aug 13 09:39:56 2017 +0200
+++ b/NEWS	Sun Aug 13 09:39:59 2017 +0200
@@ -48,6 +48,12 @@
           https://github.com/akrzemi1/Optional
   where only "optional.hpp" is needed.
 
+- The environment variable SOURCE_DATE_EPOCH overrides the build
+  timestamp as recorded by the signatures.  See
+          https://reproducible-builds.org/specs/source-date-epoch/
+  for details.
+
+
 
 * Version 4.2  "Compressor Road"
 
diff -r 41ce01b7d413 -r a98e00eed893 src/DefaultSig.pm
--- a/src/DefaultSig.pm	Sun Aug 13 09:39:56 2017 +0200
+++ b/src/DefaultSig.pm	Sun Aug 13 09:39:59 2017 +0200
@@ -109,9 +109,10 @@
 sub update_date_and_time {
     my $self = shift;
 
+    my $now = $ENV{SOURCE_DATE_EPOCH} || time;
     my ($second, $minute, $hour,
         $day_of_month, $month, $year,
-        $day_of_week) = $self->is_using_gmt() ? gmtime : localtime;
+        $day_of_week) = $self->is_using_gmt() ? gmtime($now) : localtime($now);
 
     $self->{DATE} = $self->format_date($day_of_month, $month, $year + 1900, $day_of_week,
                                        $self->weekdays->[$day_of_week],

debug log:

solving 8bd6a3aeda0f787f78eab24fad38097637e8dac9 ...
found 8bd6a3aeda0f787f78eab24fad38097637e8dac9 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).