GNU bug report logs - #72232
"make dist" is not reproducible

Previous Next

Package: coreutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Sun, 21 Jul 2024 16:19:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#72232: closed ("make dist" is not reproducible)
Date: Sun, 21 Jul 2024 17:46:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 21 Jul 2024 18:44:04 +0100
with message-id <0eb59e0c-7647-4bee-b2f2-beeff52af755 <at> draigBrady.com>
and subject line Re: bug#72232: "make dist" is not reproducible
has caused the debbugs.gnu.org bug report #72232,
regarding "make dist" is not reproducible
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
72232: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72232
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Bruno Haible <bruno <at> clisp.org>
To: bug-coreutils <at> gnu.org
Cc: Simon Josefsson <simon <at> josefsson.org>
Subject: "make dist" is not reproducible
Date: Sun, 21 Jul 2024 18:18:06 +0200
Hi,

Subsequent runs of "make dist" in the same environment produce tarballs with
different contents.

How to reproduce:

In a git checkout of coreutils, do:

$ echo snapshot > .tarball-version
$ ./configure; make -k maintainer-clean
$ ./bootstrap
$ ./configure; make dist
$ mkdir 1; (cd 1 && tar xf ../*.tar.gz)
$ make; make dist
$ mkdir 2; (cd 2 && tar xf ../*.tar.gz)
$ diff -r -q 1 2

The last command produces a difference:

$ diff -r -q 1 2
Files 1/coreutils-snapshot/.timestamp and 2/coreutils-snapshot/.timestamp differ
$ cat 1/coreutils-snapshot/.timestamp
1721577765
$ cat 2/coreutils-snapshot/.timestamp
1721577832

Can this be avoided? Can the contents of '.timestamp' always be the same?
(Wouldn't it be enough to give it a different modification time, each time?)

Bruno





[Message part 3 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Bruno Haible <bruno <at> clisp.org>, 72232-done <at> debbugs.gnu.org
Cc: Simon Josefsson <simon <at> josefsson.org>
Subject: Re: bug#72232: "make dist" is not reproducible
Date: Sun, 21 Jul 2024 18:44:04 +0100
[Message part 4 (text/plain, inline)]
On 21/07/2024 17:18, Bruno Haible wrote:
> Hi,
> 
> Subsequent runs of "make dist" in the same environment produce tarballs with
> different contents.
> 
> How to reproduce:
> 
> In a git checkout of coreutils, do:
> 
> $ echo snapshot > .tarball-version
> $ ./configure; make -k maintainer-clean
> $ ./bootstrap
> $ ./configure; make dist
> $ mkdir 1; (cd 1 && tar xf ../*.tar.gz)
> $ make; make dist
> $ mkdir 2; (cd 2 && tar xf ../*.tar.gz)
> $ diff -r -q 1 2
> 
> The last command produces a difference:
> 
> $ diff -r -q 1 2
> Files 1/coreutils-snapshot/.timestamp and 2/coreutils-snapshot/.timestamp differ
> $ cat 1/coreutils-snapshot/.timestamp
> 1721577765
> $ cat 2/coreutils-snapshot/.timestamp
> 1721577832
> 
> Can this be avoided? Can the contents of '.timestamp' always be the same?
> (Wouldn't it be enough to give it a different modification time, each time?)

Right, we should be able to adjust this.
The .timestamp file was added to support reproducible _builds_:
https://github.com/coreutils/coreutils/commit/c1b3d6587
https://reproducible-builds.org/docs/source-date-epoch/

We can just rely on the timestamp of the .tarball-version
to support reproducible _tarballs_.
That's done in the attached, which I'll apply later.

Marking this as done.

thanks,
Pádraig
[coreutils-repro-dist.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.