[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#34223] Fixing timestamps in archives.

From: Julien Lepiller
Subject: [bug#34223] Fixing timestamps in archives.
Date: Sun, 17 Feb 2019 08:42:09 +0100
User-agent: K-9 Mail for Android

Le 16 février 2019 23:35:50 GMT+01:00, "Ludovic Courtès" <address@hidden> a 
écrit :
>Hi Tim,
>Sorry for the delay!
>Tim Gesthuizen <address@hidden> skribis:
>> as discussed before I have looked into the problems of timestamps in
>> zip files.
>> I looked at the way this is solved in ant-build-system with jar files
>> and thought that this could be done in a more elegant way.
>> Because of this I wrote a simple frontend for LibArchive in C that
>> repacks archives and sets their timestamps to zero and disables
>> compression as it is done in the ant-build-system.
>> Creative as I am the program is called repack.
>> You find a git repository attached with the history of the repack
>> The attached patches add repack to Guix and use it for pwsafe and the
>> ant-build-system.
>Nice work!  It’s great that libarchive doesn’t need to actually extract
>the zip file to operate on it.
>Overall I think the approach of factorizing archive-timestamp-resetting
>in one place and using it everywhere (‘ant-build-system’ and all) is
>right thing to do.
>However, I’m not sure whether we should introduce a new program for
>purpose.  I believe ‘strip-nondeterminism’¹ (in Perl) by fellow
>Reproducible Builds hackers also addresses this problem, so it may be
>wiser to use it.
>But really, since (guix build utils) already implements a significant
>subset of ‘strip-nondeterminism’, it would be even better if could
>to shell out to a C or Perl program.
>I played a bit with this idea and, as an example, the attached file
>allows you to traverse the list of entries in a zip file (it uses
>‘guile-bytestructures’).  Specifically, you can get the list of file
>names in a zip file by running:
>  (call-with-input-file ""
>    (lambda (port)
>      (fold-entries cons '() port)))
>Resetting timestamps should be just as simple.
>How about taking this route?

One of the reasons why we extract jar files is to remove compression, because 
the content might have store references that would be hidden, so grafting for 
instance wouldn't work.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]