[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Timestamps in tarballs created by 'patch-and-repack'
From: |
Ludovic Courtès |
Subject: |
Re: Timestamps in tarballs created by 'patch-and-repack' |
Date: |
Wed, 15 Jul 2015 16:30:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> Mark H Weaver <address@hidden> writes:
>
>> Mark H Weaver <address@hidden> 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:
>>
>> address@hidden --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’.