[rb-general] Reproducing zip files under various toolchains

Bernhard M. Wiedemann bernhardout at lsmod.de
Thu Sep 20 17:09:31 CEST 2018


On 20/09/2018 09.08, Eli Schwartz wrote:
> I'd like to point out, the current docs explicitly state "Tar will be
> used as the main example but these tips apply to other archive formats
> as well." The implication is that it's surely possible to achieve the
> same results with other tar implementations, but it might be necessary
> to figure out the right switches yourself.

zip files have much of the same problems and the standard zip utility
does not have sort or mtime options.
zip -X $(find dir) helps a bit and strip-nondeterminism can normalize
mtimes.
7z can also create zip files and sorts by default.

Java's jar and war files are also zip files, but there you cannot easily
use shell workarounds.

At least python-3.7 sorts tar and zip entries since
https://github.com/python/cpython/pull/2263

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20180920/1131c5b6/attachment.sig>


More information about the rb-general mailing list