bug#20314: Bug#782345: automake: mdate-sh has undeterministic output

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#20314: Bug#782345: automake: mdate-sh has undeterministic output

Eric Dorland
* Reiner Herrmann ([hidden email]) wrote:

> Source: automake-1.14
> Version: 1:1.14.1-4
> Severity: wishlist
> User: [hidden email]
> Usertags: toolchain
> Tags: upstream
> X-Debbugs-CC: [hidden email]
>
> 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 [hidden email], 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 <[hidden email]>
43CF 1228 F726 FD5B 474C  E962 C256 FBD5 0022 1E93

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

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".

0001-lib-mdate.sh-TZ-Use-portable-setting.patch (941 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Mathieu Lirzin
Hello Paul,

Paul Eggert <[hidden email]> 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 <[hidden email]>
> 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