unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: Timestamps in tarballs created by 'patch-and-repack'
Date: Wed, 15 Jul 2015 16:30:19 +0200	[thread overview]
Message-ID: <87k2u1mr2c.fsf@gnu.org> (raw)
In-Reply-To: <87lheithka.fsf@netris.org> (Mark H. Weaver's message of "Tue, 14 Jul 2015 20:01:25 -0400")

Mark H Weaver <mhw@netris.org> skribis:

> Mark H Weaver <mhw@netris.org> writes:
>
>> Mark H Weaver <mhw@netris.org> 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=@0 --owner=root:0 --group=root: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’s also what is used in
gnu/system/install.scm for the binary tarball.)

Thanks for noticing and fixing it!

Ludo’.

      reply	other threads:[~2015-07-15 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 19:15 Timestamps in tarballs created by 'patch-and-repack' Mark H Weaver
2015-07-14 20:25 ` Mark H Weaver
2015-07-15  0:01   ` Mark H Weaver
2015-07-15 14:30     ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2u1mr2c.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).