From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Timestamps in tarballs created by 'patch-and-repack' Date: Wed, 15 Jul 2015 16:30:19 +0200 Message-ID: <87k2u1mr2c.fsf@gnu.org> References: <87y4iitus4.fsf@netris.org> <87pp3utrk1.fsf@netris.org> <87lheithka.fsf@netris.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]:35399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFNhb-00019Y-Uy for guix-devel@gnu.org; Wed, 15 Jul 2015 10:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFNhW-0000DV-Db for guix-devel@gnu.org; Wed, 15 Jul 2015 10:30:27 -0400 In-Reply-To: <87lheithka.fsf@netris.org> (Mark H. Weaver's message of "Tue, 14 Jul 2015 20:01:25 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver skribis: > Mark H Weaver writes: > >> Mark H Weaver writes: >> >>> However, this raises a deeper problem: all of the outputs of >>> 'patch-and-repack' contain non-deterministic timestamps, and these >>> timestamps can cause problems with future builds. >>> >>> Would it be sufficient to simply zero out all of the timestamps before >>> repacking? >> >> I looked into this a bit more. In addition to timestamps, the other >> impure bits getting into tar files are the names and numeric ids of the >> owner and groups. Section 4.3.1 (Overriding File Metadata) of the GNU >> tar manual describes how to override these when creating an archive. >> >> My guess is that the following options would be sufficient to make the >> generated tar archives deterministic: >> >> --mtime=3D@0 --owner=3Droot:0 --group=3Droot:0 > > This seems to work well, so I've added these flags when creating > tarballs in commits 2e9511dfbdb5ddd78c2f205c4ca7fc23738d79f8 and > c09e6a5f5e2a77beff89d68069f3037c1b6310e5 in core-updates. That sounds like the right thing (it=E2=80=99s also what is used in gnu/system/install.scm for the binary tarball.) Thanks for noticing and fixing it! Ludo=E2=80=99.