GNU bug report logs -
#20314
mdate-sh has undeterministic output
Previous Next
Reported by: Eric Dorland <eric <at> debian.org>
Date: Sun, 12 Apr 2015 18:51:02 UTC
Severity: normal
Tags: fixed, patch
Done: Mathieu Lirzin <mthl <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20314 in the body.
You can then email your comments to 20314 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Sun, 12 Apr 2015 18:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eric Dorland <eric <at> debian.org>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Sun, 12 Apr 2015 18:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
* Reiner Herrmann (reiner <at> reiner-h.de) wrote:
> Source: automake-1.14
> Version: 1:1.14.1-4
> Severity: wishlist
> User: reproducible-builds <at> lists.alioth.debian.org
> Usertags: toolchain
> Tags: upstream
> X-Debbugs-CC: reproducible-builds <at> lists.alioth.debian.org
>
> Hi!
>
> While working on Debian's “reproducible builds” effort [1], we have
> noticed that the output of mdate-sh (which is part of automake, and
> shipped by some upstream source tarballs) can produce different
> output depending on the timezone.
> Different output of mdate-sh can then lead to further differences
> in the build process [2].
>
> We already forwarded a patch to automake-patches <at> gnu.org, but it
> hasn't appeared yet in their mailing list archive (which looks a little
> dead with no new mails since January).
> The patch [3] fixes the timezone used by mdate-sh to UTC, which will
> always produce the same output independent of the timezone of the caller.
>
> Regards,
> Reiner
>
> [1]: https://wiki.debian.org/ReproducibleBuilds
> [2]: https://wiki.debian.org/ReproducibleBuilds/TimezoneVarianceBecauseOfAutomakeMdate
> [3]: https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20150406/001380.html
>
--
Eric Dorland <eric <at> kuroneko.ca>
43CF 1228 F726 FD5B 474C E962 C256 FBD5 0022 1E93
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Sun, 12 Apr 2015 20:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20314 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Control: tags -1 patch
Patch forwarded upstream.
* Reiner Herrmann (reiner <at> reiner-h.de) wrote:
> Source: automake-1.14
> Version: 1:1.14.1-4
> Severity: wishlist
> User: reproducible-builds <at> lists.alioth.debian.org
> Usertags: toolchain
> Tags: upstream
> X-Debbugs-CC: reproducible-builds <at> lists.alioth.debian.org
>
> Hi!
>
> While working on Debian's “reproducible builds” effort [1], we have
> noticed that the output of mdate-sh (which is part of automake, and
> shipped by some upstream source tarballs) can produce different
> output depending on the timezone.
> Different output of mdate-sh can then lead to further differences
> in the build process [2].
>
> We already forwarded a patch to automake-patches <at> gnu.org, but it
> hasn't appeared yet in their mailing list archive (which looks a little
> dead with no new mails since January).
> The patch [3] fixes the timezone used by mdate-sh to UTC, which will
> always produce the same output independent of the timezone of the caller.
>
> Regards,
> Reiner
>
> [1]: https://wiki.debian.org/ReproducibleBuilds
> [2]: https://wiki.debian.org/ReproducibleBuilds/TimezoneVarianceBecauseOfAutomakeMdate
> [3]: https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20150406/001380.html
>
--
Eric Dorland <eric <at> kuroneko.ca>
43CF 1228 F726 FD5B 474C E962 C256 FBD5 0022 1E93
[signature.asc (application/pgp-signature, inline)]
Added tag(s) patch.
Request was from
Eric Dorland <eric <at> kuroneko.ca>
to
control <at> debbugs.gnu.org
.
(Sun, 12 Apr 2015 21:12:02 GMT)
Full text and
rfc822 format available.
Changed bug title to 'mdate-sh has undeterministic output' from 'Bug#782345: automake: mdate-sh has undeterministic output'
Request was from
Eric Dorland <eric <at> kuroneko.ca>
to
control <at> debbugs.gnu.org
.
(Sun, 12 Apr 2015 21:12:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Fri, 15 Sep 2017 10:36:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 20314 <at> debbugs.gnu.org (full text, mbox):
Hello,
Reiner Herrmann <reiner <at> reiner-h.de> 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 <reiner <at> reiner-h.de>
> ---
> 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
Added tag(s) fixed.
Request was from
Mathieu Lirzin <mthl <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 15 Sep 2017 10:39:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
20314 <at> debbugs.gnu.org and Eric Dorland <eric <at> debian.org>
Request was from
Mathieu Lirzin <mthl <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 15 Sep 2017 10:39:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Sat, 16 Sep 2017 16:46:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 20314 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 (application/pgp-signature, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Sun, 17 Sep 2017 01:58:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 20314 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 (mthl <at> gnu.org) wrote:
> Hello,
>
> Reiner Herrmann <reiner <at> reiner-h.de> 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 <reiner <at> reiner-h.de>
> > ---
> > lib/mdate-sh | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
>
> Applied with slight modifications in commit
> 7c25c996d1c7c212a5981aa0e9c4434b6f33f7b8
>
> Thanks.
>
--
Eric Dorland <eric <at> kuroneko.ca>
43CF 1228 F726 FD5B 474C E962 C256 FBD5 0022 1E93
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Sun, 17 Sep 2017 08:51:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 20314 <at> debbugs.gnu.org (full text, mbox):
Hello Eric,
Eric Dorland <eric <at> kuroneko.ca> 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
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Fri, 22 Sep 2017 03:22:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 20314 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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".
[0001-lib-mdate.sh-TZ-Use-portable-setting.patch (text/x-patch, attachment)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#20314
; Package
automake
.
(Fri, 22 Sep 2017 08:44:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 20314 <at> debbugs.gnu.org (full text, mbox):
Hello Paul,
Paul Eggert <eggert <at> cs.ucla.edu> 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 <eggert <at> cs.ucla.edu>
> 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 archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 20 Oct 2017 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 38 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.