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 <egg...@cs.ucla.edu>
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 <drep...@gnu.ai.mit.edu>, 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

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to