GNU bug report logs

#26734 Snippets (even empty ones) of tar sources reset the timestamps of all files

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #8 received at 26734@debbugs.gnu.org (full text, mbox, reply):

Received: (at 26734) by debbugs.gnu.org; 2 May 2017 13:00:31 +0000
From debbugs-submit-bounces@debbugs.gnu.org Tue May 02 09:00:31 2017
Received: from localhost ([127.0.0.1]:50424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1d5XPr-0007uj-6b
	for submit@debbugs.gnu.org; Tue, 02 May 2017 09:00:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58989)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@gnu.org>) id 1d5XPq-0007uS-2h
 for 26734@debbugs.gnu.org; Tue, 02 May 2017 09:00:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@gnu.org>) id 1d5XPf-00048b-64
 for 26734@debbugs.gnu.org; Tue, 02 May 2017 09:00:24 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58060)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@gnu.org>)
 id 1d5XPf-00048X-31; Tue, 02 May 2017 09:00:19 -0400
Received: from [193.50.110.185] (port=51588 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@gnu.org>)
 id 1d5XPe-00077R-JA; Tue, 02 May 2017 09:00:18 -0400
From: ludo@gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement@lassieur.org>
Subject: Re: bug#26734: Snippets (even empty ones) of tar sources reset the
 timestamps of all files
References: <874lx4d6j7.fsf@lassieur.org>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 13 Floréal an 225 de la Révolution
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Tue, 02 May 2017 15:00:16 +0200
In-Reply-To: <874lx4d6j7.fsf@lassieur.org> ("Clément
 Lassieur"'s message of "Mon, 01 May 2017 15:57:00 +0200")
Message-ID: <87h913h0rj.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 26734
Cc: 26734@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)
Hi!

Clément Lassieur <clement@lassieur.org> skribis:

> I think the code is in guix/packages.scm (patch-and-repack).  Here is my
> understanding of what happens: the presence of the snippet leads to 3
> things:
>
> 1. extraction of the archive,
> 2. modification of some files (because of patches or snippet),
> 3. compression of the archive.
>
> Step 3 sets all timestamps to zero so to avoid non-determinism in the
> archive.  We obviously don't want archives to depend on the time of
> their creation.  But I believe we should only reset the timestamps of
> the files we modified in step 2.  Unmodified files should stay
> unmodified.

I agree.

> What's the point?  Well, while working on the 0ad package, I realized
> that building with 32 cores would always fail with a snippet (even if it
> is empty) and always succeed without a snippet.  It took me a few hours
> to understand this, and I put a comment in the 0ad package.  Maybe it is
> a 0ad bug (some tricky race condition that depends of file timestamps),
> but I believe it is also a Guix bug: an empty snippet should not change
> in any way the binary output of a package.

Yeah I was bitten by the same problem recently.

> I tried to patch 'patch-and-repack', but it triggers a full
> rebuild...  WDYT?

Right, it’s expected to trigger a full rebuild, so this should be fixed
in ‘core-updates’.

I guess we’ll have to collect the timestamps of all non-symlink files¹
in step #1 and to reapply them with ‘set-file-time’ from (guix build
utils) after step #2.

Thoughts?  Would you like to do that?

Thanks,
Ludo’.

¹ Because Guile provides bindings for ‘utime’, which does not support
  setting timestamps on symlinks.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Tue Sep 9 11:09:15 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.