This is basically Andrew's old patch that was backed out, with a single change: I'm using ZipFile instead of ZipInputStream to read in the original zip. The latter is not capable of reading the extended attributes that contain the unix permissions. (Why this is so, is not fully clear to me. What's worse, it's by no means clear from the documentation. We should probably file a follow-up bug to improve the Javadoc for ZipInputStream, warning the users to stay away if they can.)
I have also added the possibility to opt-out of reproducible building by an argument to SetupZipArchive. This is used in the closed Oracle part of the build, where we create some temporary zip files that are later discarded, and not part of the deliverables. This saves us some unnecessary overhead. ------------- Commit messages: - Allow user to override reproducible building of zip file - Use ZipFile instead of ZipInputStream, which can handle Unix permissions - 8276743: Make openjdk build Zip Archive generation "reproducible" Changes: https://git.openjdk.java.net/jdk/pull/6673/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6673&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8277069 Stats: 262 lines in 4 files changed: 255 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/6673.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6673/head:pull/6673 PR: https://git.openjdk.java.net/jdk/pull/6673