RFR: 7903539: Please make jtreg build date reproducible

Christian Stein cstein at openjdk.org
Fri Sep 1 15:28:07 UTC 2023


On Fri, 1 Sep 2023 07:49:04 GMT, Vladimir Petko <vpetko at openjdk.org> wrote:

> This PR is an upstream of the patch by Chris Lamb (lamby at debian.org)[1].
> 
> Testing:
> 
> $ export SOURCE_DATE_EPOCH=1
> $ bash make/build.sh 
> ...
> $ cp build/images/jtreg/lib/jtreg.jar 1.jar
> $ bash make/build.sh 
> ...
> $ strip-nondeterminism build/images/jtreg/lib/jtreg.jar 
> $ strip-nondeterminism 1.jar 
> $ diff 1.jar build/images/jtreg/lib/jtreg.jar 
> $ jar xvf 1.jar
> $ cat META-INF/MANIFEST.MF 
> Manifest-Version: 1.0
> Main-class: com.sun.javatest.regtest.Main
> Class-Path: javatest.jar asmtools.jar
> jtreg-Name: jtreg
> jtreg-VersionString: 7.3.1-dev+0
> jtreg-Version: 7.3.1
> jtreg-Milestone: dev
> jtreg-Build: 0
> jtreg-BuildJavaVersion: Java(TM) 2 SDK, Version 17.0.8+7-Ubuntu-123.04
> jtreg-BuildDate: January 01, 1970
> Created-By: 17.0.8 (Private Build)
> 
> 
> 
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038957

Looks good to me.

Could you please add a note to the `CHANGELOG.md` file?

Question: what about additionally using `jar --date ...` when creating the archive?

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

Marked as reviewed by cstein (Committer).

PR Review: https://git.openjdk.org/jtreg/pull/170#pullrequestreview-1607176577


More information about the jtreg-dev mailing list