dashorst commented on issue #1941:
URL: https://github.com/apache/wicket/issues/1941#issuecomment-6945660741

   The Wicket release artifacts are already reproducible, and an independent 
rebuilder has been confirming it for every release since 10.1.0.
   
   ## Rebuild of 11.0.0
   
   I rebuilt `rel/wicket-11.0.0` (169175ac6e) from an exported copy in a 
different directory, with a different timezone (America/Los_Angeles) and locale 
(de_DE), on JDK 21 like the release, with `-Papache-release,release 
-Dgpg.skip`, and compared against Maven Central with `artifact:compare`. All 76 
artifacts match byte for byte: the jars, sources jars, poms, the examples war, 
the archetype and the source-release zip. Two consecutive builds of master also 
match each other (75 of 75).
   
   Two things can make a rebuild differ that are not defects in the build:
   
   - **umask.** With umask 027, 28 files differ, only in the Unix permissions 
of archive entries that Maven does not normalize: `META-INF/LICENSE`, `NOTICE` 
and `DEPENDENCIES` from the remote resources plugin, and the directory entries 
in the war and the archetype. Rebuilders use umask 022, and with 022 everything 
matches.
   - **A stale tag.** My clone still had `rel/wicket-11.0.0` on 6e2b887509, the 
first `release:prepare` attempt of 26 October; the published release is 
169175ac6e. `git fetch` does not overwrite an existing tag, so a clone that 
fetched the earlier one keeps it until `git fetch --tags --force`. Built from 
6e2b887509, 49 files differ (another `outputTimestamp`, AspectJ 1.9.25.1 
instead of 1.9.26).
   
   `project.build.outputTimestamp` needs no manual step: `release:prepare` 
writes the release date into it in each release commit.
   
   ## Reproducible Central
   
   [Reproducible 
Central](https://github.com/jvm-repo-rebuild/reproducible-central) is the Java 
part of the [Reproducible Builds](https://reproducible-builds.org/) project, 
the cross-distribution effort that also checks Debian and Arch packages. It 
keeps rebuild instructions for releases on Maven Central and publishes, per 
release, whether a rebuild from source produces the same bytes as the binaries 
in Central.
   
   **What it means.** A Wicket release is built and signed on the release 
manager's machine. The signature proves who uploaded the jars, not that they 
were built from the tagged source; a compromised build machine or a modified 
local checkout would produce a properly signed jar with different contents. A 
reproducible build closes that gap: anyone can rebuild the tag and check that 
they get the same bytes as the jar in Central. Reproducible Central does that 
check publicly, for every release, by people outside the project.
   
   **How it works.** Each release gets a 
[`.buildspec`](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/BUILDSPEC.md):
 the git repository and tag, the Maven and JDK versions, toolchains, line 
endings, umask and the build command. `rebuild.sh` runs that build in a 
container, compares every output file with the reference in Central, and 
records the result in a `.buildcompare` file (`ko=0` means all files match) 
together with a `.buildinfo` describing the build. A nightly job refreshes the 
summary page and the badge. Anyone can run the same rebuild locally with Docker 
or Podman: `./rebuild.sh 
content/org/apache/wicket/wicket-parent-11.0.0.buildspec`.
   
   **Who does it.** The project is maintained by Hervé Boutemy (@hboutemy, 
Apache Maven PMC). He added a buildspec for every Wicket release from 10.1.0 
(June 2024) to 11.0.0, usually within a day or two of the release, and the 
project's CI ran the rebuilds. Wicket has not had to do anything for this.
   
   **Wicket's status.** The [Wicket 
page](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/wicket/README.md)
 lists 14 releases, 10.1.0 to 11.0.0, all fully reproducible (75 of 75 
artifacts each). The 11.0.0 buildspec uses Maven 3.9.12, JDK 21 with toolchains 
17 and 21, and `mvn -Papache-release,release clean package -DskipTests 
-Dmaven.javadoc.skip -Dgpg.skip`, so the javadoc jars are not part of its 
comparison. Its `gitRepo` still names `git-wip-us.apache.org`, the old ASF git 
host.
   
   ## What is left
   
   The three items in the description need no further work. What could still be 
done, none of it required:
   
   - add the Reproducible Builds badge to the README and mention the rebuild in 
the release vote email, so users know the check exists;
   - update the `gitRepo` in the buildspecs to 
`https://github.com/apache/wicket.git`;
   - include the javadoc jars in the rebuild, which needs a buildspec without 
`-Dmaven.javadoc.skip`.
   


-- 
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