bug#20314: [PATCH] Make output of mdate-sh deterministic

2017-09-22 Thread Mathieu Lirzin
Hello Paul,

Paul Eggert  writes:

> Unfortunately that patch to Automake's mdate-sh is not portable, as
> TZ='UTC' is not a portable setting for the TZ environment
> variable. POSIX says you're supposed to use something like TZ='UTC0'
> instead. Although TZ='UTC' works when glibc is used, this is not
> necessarily true on other POSIX platforms.
>
> I noticed this problem when recent Automake changes were merged into
> Gnulib, and installed the attached patch to the Automake master branch
> to fix this. Please review any other patches you may be using for
> reproducible builds, and fix them to use TZ='UTC0' instead of
> TZ='UTC'. Thanks.
>
> For reference, here's the POSIX spec for TZ:
>
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
>
> and look for "TZ".

Thanks for fixing that and for the reference.

> From 5b240b3b36766045a47a6ad89ae5f4550e81d534 Mon Sep 17 00:00:00 2001
> From: Paul Eggert 
> Date: Thu, 21 Sep 2017 20:08:48 -0700
> Subject: [PATCH] * lib/mdate.sh (TZ): Use portable setting.

nitpick: I would prefer your future commit messages to include a summary
line before the list of modified files.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37





bug#20314: [PATCH] Make output of mdate-sh deterministic

2017-09-21 Thread Paul Eggert
Unfortunately that patch to Automake's mdate-sh is not portable, as TZ='UTC' is 
not a portable setting for the TZ environment variable. POSIX says you're 
supposed to use something like TZ='UTC0' instead. Although TZ='UTC' works when 
glibc is used, this is not necessarily true on other POSIX platforms.


I noticed this problem when recent Automake changes were merged into Gnulib, and 
installed the attached patch to the Automake master branch to fix this. Please 
review any other patches you may be using for reproducible builds, and fix them 
to use TZ='UTC0' instead of TZ='UTC'. Thanks.


For reference, here's the POSIX spec for TZ:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03

and look for "TZ".
From 5b240b3b36766045a47a6ad89ae5f4550e81d534 Mon Sep 17 00:00:00 2001
From: Paul Eggert 
Date: Thu, 21 Sep 2017 20:08:48 -0700
Subject: [PATCH] * lib/mdate.sh (TZ): Use portable setting.

---
 lib/mdate-sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/mdate-sh b/lib/mdate-sh
index 6dd5b21e7..34de97554 100755
--- a/lib/mdate-sh
+++ b/lib/mdate-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2017-09-19.11; # UTC
+scriptversion=2017-09-22.02; # UTC
 
 # Copyright (C) 1995-2017 Free Software Foundation, Inc.
 # written by Ulrich Drepper , June 1995
@@ -75,7 +75,7 @@ LC_TIME=C
 export LC_TIME
 
 # Use UTC to get reproducible result.
-TZ=UTC
+TZ=UTC0
 export TZ
 
 # GNU ls changes its time format in response to the TIME_STYLE
-- 
2.13.5



bug#20314: [PATCH] Make output of mdate-sh deterministic

2017-09-17 Thread Mathieu Lirzin
Hello Eric,

Eric Dorland  writes:

> This is a good change but it's not enough unfortunately to make it
> reproducible.  mdate-sh also needs to support SOURCE_DATE_EPOCH. I'm
> working on a patch for that.

Thanks for working on that.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37





bug#20314: [PATCH] Make output of mdate-sh deterministic

2017-09-16 Thread Eric Dorland
This is a good change but it's not enough unfortunately to make it
reproducible.  mdate-sh also needs to support SOURCE_DATE_EPOCH. I'm
working on a patch for that.

* Mathieu Lirzin (m...@gnu.org) wrote:
> Hello,
> 
> Reiner Herrmann  writes:
> 
> > mdate-sh pretty-prints the modification time of a file.
> > But it's output can vary depending on the timezone of
> > the caller. Someone in timezone GMT-12 will get a different
> > result (day) than someone in timezone GMT+12.
> >
> > As this output is also used to create/update stamp files,
> > which influence the further build process, the build result
> > can vary.
> > To enable reproducible builds and to have a more deterministic
> > build behavior, this change fixes the timezone to UTC.
> >
> > Signed-off-by: Reiner Herrmann 
> > ---
> >  lib/mdate-sh | 6 +-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> 
> Applied with slight modifications in commit
> 7c25c996d1c7c212a5981aa0e9c4434b6f33f7b8
> 
> Thanks.
> 

-- 
Eric Dorland 
43CF 1228 F726 FD5B 474C  E962 C256 FBD5 0022 1E93


signature.asc
Description: PGP signature


bug#20314: [PATCH] Make output of mdate-sh deterministic

2017-09-16 Thread Mattia Rizzolo
On Fri, Sep 15, 2017 at 12:34:54PM +0200, Mathieu Lirzin wrote:
> Applied with slight modifications in commit
> 7c25c996d1c7c212a5981aa0e9c4434b6f33f7b8

Great, thank you!

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


bug#20314: [PATCH] Make output of mdate-sh deterministic

2017-09-15 Thread Mathieu Lirzin
Hello,

Reiner Herrmann  writes:

> mdate-sh pretty-prints the modification time of a file.
> But it's output can vary depending on the timezone of
> the caller. Someone in timezone GMT-12 will get a different
> result (day) than someone in timezone GMT+12.
>
> As this output is also used to create/update stamp files,
> which influence the further build process, the build result
> can vary.
> To enable reproducible builds and to have a more deterministic
> build behavior, this change fixes the timezone to UTC.
>
> Signed-off-by: Reiner Herrmann 
> ---
>  lib/mdate-sh | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>

Applied with slight modifications in commit
7c25c996d1c7c212a5981aa0e9c4434b6f33f7b8

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37