RFR: 8276743: Make openjdk build Zip Archive generation "reproducible"

Andrew Leonard aleonard at openjdk.java.net
Tue Nov 9 15:10:42 UTC 2021


On Tue, 9 Nov 2021 15:00:59 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> And have you verified that running with `zip -X` is not enough? I remember checking into this before, but I don't remember the conclusions. The purpose is to leave out some extra information, such as time stamps, but it might not be enough to guarantee reproducible builds.

Correct, I have tried that already, that does remove the extended timestamp information, and as long as the input source is already correctly timestamped it works to a point, that point being the "file ordering" is not-deterministic and I think is dependent on how the OS file queries returns files. From history this is what I tried: https://github.com/andrew-m-leonard/jdk-1/blob/f18b5826b9ae3e7e5750190a669edcfd8bb8b2cc/make/common/ZipArchive.gmk#L166

> Also, the name is not really a correct description at this point. Maybe a straight `MakeZipReproducible` instead or something like that?

MakeZipReproducible sounds good.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6311



More information about the build-dev mailing list