Bug#818128: nethack: please make the build reproducible
James Cowgill
jcowgill at debian.org
Mon Mar 14 21:52:22 UTC 2016
Hi,
On Mon, 2016-03-14 at 00:37 +0100, Reiner Herrmann wrote:
> While working on the "reproducible builds" effort [1], we have noticed
> that nethack could not be built reproducibly.
Thanks for the patch. It'll be applied at some point.
> There are three issues that prevent building it reproducibly:
> - the nhdat file is not reproducible, because the order of archive
> members varies depending on the locale. Setting LC_ALL to C expands
> the files in DATDLB always in the same way.
OK that seems reasonable.
> - makedefs uses the current date/time for the build date that gets
> embedded. By using $SOURCE_DATE_EPOCH, the date from the latest
> changelog entry is used instead.
OK, but should this be tm = gmtime((time_t *) &clocktim); ?
ie: drop the call to asctime.
> +@@ -1281,7 +1284,7 @@
> + Fprintf(ofp, "\n");
> + #ifdef AMIGA
> + {
> +- struct tm *tm = localtime((time_t *) &clocktim);
> ++ struct tm *tm = asctime(gmtime((time_t *) &clocktim));
> + Fprintf(ofp, "#define AMIGA_VERSION_STRING ");
> + Fprintf(ofp, "\"\\0$VER: NetHack %d.%d.%d (%d.%d.%d)\"\n",
> + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, tm->tm_mday,
> - parallel building causes that src/objects.o and src/monst.o are build
> either from within src/ or from util/ (as those files are used by
> nethack and by makedefs), which results in a different build path
> embedded into the binary. This is solved by building makedefs
> explicitely before nethack.
I have a feeling this caused the strange "random" build failure on
amd64. Hopefully I can get upstream to fix it properly at some point.
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20160314/54fe52d7/attachment.sig>
More information about the Pkg-games-devel
mailing list