rzo1 opened a new pull request, #338:
URL: https://github.com/apache/openjpa/pull/338

   [OPENJPA-3088](https://issues.apache.org/jira/browse/OPENJPA-3088): makes 
the build reproducible, so the release artifacts can be rebuilt from the tag 
and the source release in the Maven staging repository and in ATR is the same 
file.
   
   Two release builds of the same commit (`-Dbuilddocs -DperformRelease 
-Papache-release`) differed in three places:
   
   - **Jar manifests:** `Implementation-Build` and `Implementation-Date` held 
the time of the build, from `buildnumber-maven-plugin` and in the locale of the 
machine. `Implementation-Date` is now `project.build.outputTimestamp`; 
`Implementation-Build` and the plugin are removed. Nothing in the code reads 
either entry.
   - **Manual:** every HTML page had a "Last updated" footer with the time of 
the checkout, the PDF had the build time, and the copyright year came from the 
build clock. They now come from the output timestamp.
   - **Assemblies:** they stored the file permissions of the working tree, so 
`openjpa-parent-x.y.z-source-release.zip` changed with the umask. They now 
store `0644` for files and `0755` for directories. The two shell scripts in the 
source release (`dev-tools/atr/check-release.sh`, 
`openjpa-integration/tck/run-tck32.sh`) therefore are not executable in the 
zip; the binary archive has no scripts.
   
   `project.build.outputTimestamp` is declared in the root `pom.xml`, set to 
the 4.2.0 release time; `release:prepare` sets it from now on.
   
   Verification:
   
   - All 343 jars and archives of two release builds with docs are identical; 
the builds ran in different directories and time zones, under umask 022 and 002.
   - The source release has the same SHA-256 under umask 022, 002 and 077.
   - `artifact:compare` against an installed first build reports 82 matching 
files and no difference.
   
   The builds ran with `-DskipTests` on JDK 25. Under a umask stricter than 022 
the jars (not the assemblies) still differ, as `maven-jar-plugin` stores the 
permissions of the build tree; `RELEASING.md` says so in the new "Reproducible 
builds" section, which also describes how to check a build and a release.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to