GNU bug report logs - #26734
Snippets (even empty ones) of tar sources reset the timestamps of all files

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Clément Lassieur <clement@HIDDEN>; dated Mon, 1 May 2017 13:58:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 26734 <at> debbugs.gnu.org:


Received: (at 26734) by debbugs.gnu.org; 3 May 2017 22:01:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 03 18:01:36 2017
Received: from localhost ([127.0.0.1]:53300 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d62L1-0006YR-SW
	for submit <at> debbugs.gnu.org; Wed, 03 May 2017 18:01:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54807)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1d62Kz-0006YD-1Q
 for 26734 <at> debbugs.gnu.org; Wed, 03 May 2017 18:01:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1d62Kq-0005bk-Ov
 for 26734 <at> debbugs.gnu.org; Wed, 03 May 2017 18:01:27 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52193)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1d62Kq-0005bd-Kv; Wed, 03 May 2017 18:01:24 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:40394 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1d62Kp-0006od-Vq; Wed, 03 May 2017 18:01:24 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Mark H Weaver <mhw@HIDDEN>
Subject: Re: bug#26734: Snippets (even empty ones) of tar sources reset the
 timestamps of all files
References: <874lx4d6j7.fsf@HIDDEN> <87h913h0rj.fsf@HIDDEN>
 <87d1brmm8m.fsf@HIDDEN> <87fugmxqng.fsf@HIDDEN>
 <87r305iphr.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 15 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
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: Thu, 04 May 2017 00:01:21 +0200
In-Reply-To: <87r305iphr.fsf@HIDDEN> (Mark H. Weaver's message of "Wed, 03
 May 2017 17:45:20 -0400")
Message-ID: <87r305ppla.fsf@HIDDEN>
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 <at> debbugs.gnu.org,
 =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Mark H Weaver <mhw@HIDDEN> skribis:

> ludo@HIDDEN (Ludovic Court=C3=A8s) writes:
>
>> BTW, what timestamps to we put on the modified files?  We want that to
>> be deterministic so we cannot use the build time.  We cannot use a date
>> in the future, either.  We cannot use Jan. 1 1970 either because that
>> means that modified files may now be older than the unmodified files,
>> which may break build systems; for the same reason, we cannot leave the
>> mtime of modified files unchanged.
>>
>> Now that I think about it, it=E2=80=99s not clear to me what can be done=
 without
>> breaking something.
>>
>> Thoughts?
>
> We could set the timestamp of modified files to be 1 second newer than
> the newest file in the original source archive.

Sounds like a good idea.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#26734; Package guix. Full text available.

Message received at 26734 <at> debbugs.gnu.org:


Received: (at 26734) by debbugs.gnu.org; 3 May 2017 21:45:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 03 17:45:39 2017
Received: from localhost ([127.0.0.1]:53278 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d625b-0006AX-L3
	for submit <at> debbugs.gnu.org; Wed, 03 May 2017 17:45:39 -0400
Received: from world.peace.net ([50.252.239.5]:44901)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mhw@HIDDEN>) id 1d625Z-0006AK-V9
 for 26734 <at> debbugs.gnu.org; Wed, 03 May 2017 17:45:38 -0400
Received: from pool-72-93-31-169.bstnma.east.verizon.net ([72.93.31.169]
 helo=jojen)
 by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mhw@HIDDEN>)
 id 1d625U-0003AV-0K; Wed, 03 May 2017 17:45:32 -0400
From: Mark H Weaver <mhw@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#26734: Snippets (even empty ones) of tar sources reset the
 timestamps of all files
References: <874lx4d6j7.fsf@HIDDEN> <87h913h0rj.fsf@HIDDEN>
 <87d1brmm8m.fsf@HIDDEN> <87fugmxqng.fsf@HIDDEN>
Date: Wed, 03 May 2017 17:45:20 -0400
In-Reply-To: <87fugmxqng.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Wed, 03 May 2017 10:58:59 +0200")
Message-ID: <87r305iphr.fsf@HIDDEN>
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-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 26734
Cc: 26734 <at> debbugs.gnu.org,
 =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

ludo@HIDDEN (Ludovic Court=C3=A8s) writes:

> BTW, what timestamps to we put on the modified files?  We want that to
> be deterministic so we cannot use the build time.  We cannot use a date
> in the future, either.  We cannot use Jan. 1 1970 either because that
> means that modified files may now be older than the unmodified files,
> which may break build systems; for the same reason, we cannot leave the
> mtime of modified files unchanged.
>
> Now that I think about it, it=E2=80=99s not clear to me what can be done =
without
> breaking something.
>
> Thoughts?

We could set the timestamp of modified files to be 1 second newer than
the newest file in the original source archive.

      Mark




Information forwarded to bug-guix@HIDDEN:
bug#26734; Package guix. Full text available.

Message received at 26734 <at> debbugs.gnu.org:


Received: (at 26734) by debbugs.gnu.org; 3 May 2017 08:59:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 03 04:59:13 2017
Received: from localhost ([127.0.0.1]:51901 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d5q7t-0005tC-8i
	for submit <at> debbugs.gnu.org; Wed, 03 May 2017 04:59:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37017)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1d5q7r-0005sz-Q6
 for 26734 <at> debbugs.gnu.org; Wed, 03 May 2017 04:59:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1d5q7i-0008P9-JW
 for 26734 <at> debbugs.gnu.org; Wed, 03 May 2017 04:59:06 -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.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43725)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1d5q7i-0008P5-GD; Wed, 03 May 2017 04:59:02 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:54484 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1d5q7h-0000Qc-NH; Wed, 03 May 2017 04:59:02 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#26734: Snippets (even empty ones) of tar sources reset the
 timestamps of all files
References: <874lx4d6j7.fsf@HIDDEN> <87h913h0rj.fsf@HIDDEN>
 <87d1brmm8m.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 14 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
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: Wed, 03 May 2017 10:58:59 +0200
In-Reply-To: <87d1brmm8m.fsf@HIDDEN> (=?utf-8?Q?=22Cl=C3=A9ment?=
 Lassieur"'s message of "Tue, 02 May 2017 15:17:29 +0200")
Message-ID: <87fugmxqng.fsf@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Cl=C3=A9ment Lassieur <clement@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> Cl=C3=A9ment Lassieur <clement@HIDDEN> skribis:
>>
>>> 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 b=
e fixed
>> in =E2=80=98core-updates=E2=80=99.
>
> Yes, but is there a way to test the patch on one package without having
> first to rebuild everything?

I would add a snippet in =E2=80=98gnu-make-boot0=E2=80=99, which is the fir=
st package
being built, and then run:

  ./pre-inst-env guix build -S --rounds=3D2 \
    -e '(@@ (gnu packages commencement) gnu-make-boot0)'

>> I guess we=E2=80=99ll have to collect the timestamps of all non-symlink =
files=C2=B9
>> in step #1 and to reapply them with =E2=80=98set-file-time=E2=80=99 from=
 (guix build
>> utils) after step #2.
>
> Does that mean that symlinks will still have their timestamps changed?

No, that means symlinks will still have their timestamps unchanged.  :-)

BTW, what timestamps to we put on the modified files?  We want that to
be deterministic so we cannot use the build time.  We cannot use a date
in the future, either.  We cannot use Jan. 1 1970 either because that
means that modified files may now be older than the unmodified files,
which may break build systems; for the same reason, we cannot leave the
mtime of modified files unchanged.

Now that I think about it, it=E2=80=99s not clear to me what can be done wi=
thout
breaking something.

Thoughts?

>> =C2=B9 Because Guile provides bindings for =E2=80=98utime=E2=80=99, whic=
h does not support
>>   setting timestamps on symlinks.
>
> If the guile binding doesn't support setting timestamps on symlinks, I
> guess we can still use another way, like a system touch.

Or we could add bindings for =E2=80=98futimes=E2=80=99.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#26734; Package guix. Full text available.

Message received at 26734 <at> debbugs.gnu.org:


Received: (at 26734) by debbugs.gnu.org; 2 May 2017 13:17:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 02 09:17:33 2017
Received: from localhost ([127.0.0.1]:50438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d5XgL-0008Jy-2k
	for submit <at> debbugs.gnu.org; Tue, 02 May 2017 09:17:33 -0400
Received: from mail.lassieur.org ([83.152.10.219]:58328)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement@HIDDEN>) id 1d5XgJ-0008Jp-Ie
 for 26734 <at> debbugs.gnu.org; Tue, 02 May 2017 09:17:31 -0400
Received: from newt (46.218.109.88 [46.218.109.88])
 by mail.lassieur.org (OpenSMTPD) with ESMTPSA id bbedd004
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Tue, 2 May 2017 13:17:29 +0000 (UTC)
References: <874lx4d6j7.fsf@HIDDEN> <87h913h0rj.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#26734: Snippets (even empty ones) of tar sources reset the
 timestamps of all files
In-reply-to: <87h913h0rj.fsf@HIDDEN>
Date: Tue, 02 May 2017 15:17:29 +0200
Message-ID: <87d1brmm8m.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26734
Cc: 26734 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Ludovic Courtès <ludo@HIDDEN> writes:

> Clément Lassieur <clement@HIDDEN> skribis:
>
>> 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’.

Yes, but is there a way to test the patch on one package without having
first to rebuild everything?

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

Does that mean that symlinks will still have their timestamps changed?
To me that is a half-solution...  Wouldn't it be easier to collect all
recently modified files (those modified by snippet and patches), and set
their timestamp to "1 January 1970", without changing the other files?
That means removing the --mtime option from tar at step 3.

> Thoughts?  Would you like to do that?

Sure :-)

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

If the guile binding doesn't support setting timestamps on symlinks, I
guess we can still use another way, like a system touch.




Information forwarded to bug-guix@HIDDEN:
bug#26734; Package guix. Full text available.

Message received at 26734 <at> debbugs.gnu.org:


Received: (at 26734) by debbugs.gnu.org; 2 May 2017 13:00:31 +0000
From debbugs-submit-bounces <at> 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 <at> debbugs.gnu.org>)
	id 1d5XPr-0007uj-6b
	for submit <at> 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@HIDDEN>) id 1d5XPq-0007uS-2h
 for 26734 <at> 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@HIDDEN>) id 1d5XPf-00048b-64
 for 26734 <at> 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@HIDDEN>)
 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@HIDDEN>)
 id 1d5XPe-00077R-JA; Tue, 02 May 2017 09:00:18 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#26734: Snippets (even empty ones) of tar sources reset the
 timestamps of all files
References: <874lx4d6j7.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 13 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
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@HIDDEN> (=?utf-8?Q?=22Cl=C3=A9ment?=
 Lassieur"'s message of "Mon, 01 May 2017 15:57:00 +0200")
Message-ID: <87h913h0rj.fsf@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Hi!

Cl=C3=A9ment Lassieur <clement@HIDDEN> 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.




Information forwarded to bug-guix@HIDDEN:
bug#26734; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 May 2017 13:57:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 01 09:57:26 2017
Received: from localhost ([127.0.0.1]:49665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d5BpI-0005GW-US
	for submit <at> debbugs.gnu.org; Mon, 01 May 2017 09:57:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement@HIDDEN>) id 1d5BpF-0005GJ-AC
 for submit <at> debbugs.gnu.org; Mon, 01 May 2017 09:57:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1d5Bp8-0005WH-RV
 for submit <at> debbugs.gnu.org; Mon, 01 May 2017 09:57:12 -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 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:53631)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <clement@HIDDEN>)
 id 1d5Bp8-0005Vz-OC
 for submit <at> debbugs.gnu.org; Mon, 01 May 2017 09:57:10 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42912)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1d5Bp7-0005s5-3U
 for bug-guix@HIDDEN; Mon, 01 May 2017 09:57:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1d5Bp2-0005Rv-NQ
 for bug-guix@HIDDEN; Mon, 01 May 2017 09:57:09 -0400
Received: from mail.lassieur.org ([83.152.10.219]:36656)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <clement@HIDDEN>)
 id 1d5Bp2-0005RT-9m
 for bug-guix@HIDDEN; Mon, 01 May 2017 09:57:04 -0400
Received: from rodion (80.12.38.192 [80.12.38.192])
 by mail.lassieur.org (OpenSMTPD) with ESMTPSA id d91abce8
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <bug-guix@HIDDEN>;
 Mon, 1 May 2017 13:57:01 +0000 (UTC)
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: bug-guix@HIDDEN
Subject: Snippets (even empty ones) of tar sources reset the timestamps of all
 files
Date: Mon, 01 May 2017 15:57:00 +0200
Message-ID: <874lx4d6j7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.9 (/)

Please consider the following package:

--8<---------------cut here---------------start------------->8---
(define-public hello
  (package
    (name "hello")
    (version "2.10")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/hello/hello-" version
                                  ".tar.gz"))
              (sha256
               (base32
                "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))
              (modules '((guix build utils)))
              (snippet '(begin #t))))
    (build-system gnu-build-system)
    (synopsis "Hello, GNU world: An example GNU package")
    (description
     "GNU Hello prints the message \"Hello, world!\" and then exits.  It
serves as an example of standard GNU coding practices.  As such, it supports
command-line arguments, multiple languages, and so on.")
    (home-page "https://www.gnu.org/software/hello/")
    (license gpl3+)))
--8<---------------cut here---------------end--------------->8---

It is the 'hello' package with two extra lines that add an empty
snippet.

--8<---------------cut here---------------start------------->8---
(modules '((guix build utils)))
(snippet '(begin #t))
--8<---------------cut here---------------end--------------->8---

Now here is the output of 'ls -l' within the original (extracted)
'hello':

--8<---------------cut here---------------start------------->8---
-rw-r--r-- 1 clement users  93787 Nov 16  2014 ABOUT-NLS
-rw-r--r-- 1 clement users  43830 Nov 16  2014 aclocal.m4
-rw-r--r-- 1 clement users    593 Jul 19  2014 AUTHORS
drwxr-xr-x 3 clement users   4096 Nov 16  2014 build-aux/
-rw-r--r-- 1 clement users  12988 Nov 16  2014 ChangeLog
-rw-r--r-- 1 clement users  30632 Jul 19  2014 ChangeLog.O
-rw-r--r-- 1 clement users  32871 Nov 16  2014 config.in
-rwxr-xr-x 1 clement users 449922 Nov 16  2014 configure
-rw-r--r-- 1 clement users   2408 Oct  5  2014 configure.ac
drwxr-xr-x 2 clement users   4096 Nov 16  2014 contrib/
-rw-r--r-- 1 clement users  35147 Dec 12  2013 COPYING
drwxr-xr-x 2 clement users   4096 Nov 16  2014 doc/
-rw-r--r-- 1 clement users   4573 Nov 16  2014 GNUmakefile
-r--r--r-- 1 clement users   1400 Nov 16  2014 hello.1
-rw-r--r-- 1 clement users  15752 Dec 29  2013 INSTALL
drwxr-xr-x 2 clement users   4096 Nov 16  2014 lib/
drwxr-xr-x 2 clement users   4096 Nov 16  2014 m4/
-rw-r--r-- 1 clement users  63223 Nov 16  2014 maint.mk
-rw-r--r-- 1 clement users   4367 Aug  5  2014 Makefile.am
-rw-r--r-- 1 clement users 143282 Nov 16  2014 Makefile.in
drwxr-xr-x 2 clement users   4096 Nov 16  2014 man/
-rw-r--r-- 1 clement users   4023 Nov 16  2014 NEWS
drwxr-xr-x 2 clement users   4096 Nov 16  2014 po/
-rw-r--r-- 1 clement users   3582 Jul 19  2014 README
-rw-r--r-- 1 clement users   1571 Jul 19  2014 README-dev
-rw-r--r-- 1 clement users   3014 Nov 16  2014 README-release
drwxr-xr-x 2 clement users   4096 Nov 16  2014 src/
drwxr-xr-x 2 clement users   4096 Nov 16  2014 tests/
-rw-r--r-- 1 clement users    898 Jul 19  2014 THANKS
-rw-r--r-- 1 clement users     75 Jul 19  2014 TODO
--8<---------------cut here---------------end--------------->8---

And here is the same output within the modified 'hello' (with the empty
snippet):

--8<---------------cut here---------------start------------->8---
-rw-r--r-- 1 clement users  93787 Jan  1  1970 ABOUT-NLS
-rw-r--r-- 1 clement users  43830 Jan  1  1970 aclocal.m4
-rw-r--r-- 1 clement users    593 Jan  1  1970 AUTHORS
drwxr-xr-x 3 clement users   4096 Jan  1  1970 build-aux/
-rw-r--r-- 1 clement users  12988 Jan  1  1970 ChangeLog
-rw-r--r-- 1 clement users  30632 Jan  1  1970 ChangeLog.O
-rw-r--r-- 1 clement users  32871 Jan  1  1970 config.in
-rwxr-xr-x 1 clement users 449922 Jan  1  1970 configure
-rw-r--r-- 1 clement users   2408 Jan  1  1970 configure.ac
drwxr-xr-x 2 clement users   4096 Jan  1  1970 contrib/
-rw-r--r-- 1 clement users  35147 Jan  1  1970 COPYING
drwxr-xr-x 2 clement users   4096 Jan  1  1970 doc/
-rw-r--r-- 1 clement users   4573 Jan  1  1970 GNUmakefile
-r--r--r-- 1 clement users   1400 Jan  1  1970 hello.1
-rw-r--r-- 1 clement users  15752 Jan  1  1970 INSTALL
drwxr-xr-x 2 clement users   4096 Jan  1  1970 lib/
drwxr-xr-x 2 clement users   4096 Jan  1  1970 m4/
-rw-r--r-- 1 clement users  63223 Jan  1  1970 maint.mk
-rw-r--r-- 1 clement users   4367 Jan  1  1970 Makefile.am
-rw-r--r-- 1 clement users 143282 Jan  1  1970 Makefile.in
drwxr-xr-x 2 clement users   4096 Jan  1  1970 man/
-rw-r--r-- 1 clement users   4023 Jan  1  1970 NEWS
drwxr-xr-x 2 clement users   4096 Jan  1  1970 po/
-rw-r--r-- 1 clement users   3582 Jan  1  1970 README
-rw-r--r-- 1 clement users   1571 Jan  1  1970 README-dev
-rw-r--r-- 1 clement users   3014 Jan  1  1970 README-release
drwxr-xr-x 2 clement users   4096 Jan  1  1970 src/
drwxr-xr-x 2 clement users   4096 Jan  1  1970 tests/
-rw-r--r-- 1 clement users    898 Jan  1  1970 THANKS
-rw-r--r-- 1 clement users     75 Jan  1  1970 TODO
--8<---------------cut here---------------end--------------->8---

As you can see, the timestamps are not the same, although there is
nothing in the snippet.

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.

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.

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




Acknowledgement sent to Clément Lassieur <clement@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#26734; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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