From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#26734: Snippets (even empty ones) of tar sources reset the timestamps of all files Date: Tue, 02 May 2017 15:00:16 +0200 Message-ID: <87h913h0rj.fsf@gnu.org> References: <874lx4d6j7.fsf@lassieur.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5XQR-0001wQ-UL for bug-guix@gnu.org; Tue, 02 May 2017 09:01:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5XQM-0004FS-9f for bug-guix@gnu.org; Tue, 02 May 2017 09:01:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52225) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d5XQM-0004FJ-7R for bug-guix@gnu.org; Tue, 02 May 2017 09:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d5XQL-0007vd-Sm for bug-guix@gnu.org; Tue, 02 May 2017 09:01:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <874lx4d6j7.fsf@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Mon, 01 May 2017 15:57:00 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 26734@debbugs.gnu.org Hi! Cl=C3=A9ment Lassieur 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=E2=80=99s expected to trigger a full rebuild, so this should be f= ixed in =E2=80=98core-updates=E2=80=99. I guess we=E2=80=99ll have to collect the timestamps of all non-symlink fil= es=C2=B9 in step #1 and to reapply them with =E2=80=98set-file-time=E2=80=99 from (g= uix build utils) after step #2. Thoughts? Would you like to do that? Thanks, Ludo=E2=80=99. =C2=B9 Because Guile provides bindings for =E2=80=98utime=E2=80=99, which d= oes not support setting timestamps on symlinks.