RFR: 8264449: Enable reproducible builds with SOURCE_DATE_EPOCH [v12]

Kevin Rushforth kcr at openjdk.org
Wed Apr 5 14:18:36 UTC 2023


On Wed, 5 Apr 2023 00:29:40 GMT, John Neffenger <jgneff at openjdk.org> wrote:

> > 2. The format of `VersionInfo.BUILD_TIMESTAMP`, which is used in constructing the `javafx.runtime.version` System property for dev builds, has changed to an ISO date -- `2023-04-04T15:11:59Z` rather than `2023-04-04-151159`. Since the `:` is not legal for Java version strings, it is possible (though unlikely), that some app is parsing this in a way that might run into problems. This should probably be fixed.
> 
> It always bothered me that developer builds get a timestamp suffix while the official builds do not, even when built from the same Git tag. For example:
> ...

We could consider a future RFE to adjust the format of the version string, although I note that the JDK also adds the date code to the version string only for developer builds.


> 
> ```
> $ cat opt/javafx-sdk-20/lib/javafx.properties 
> javafx.version=20
> javafx.runtime.version=20+19
> javafx.runtime.build=19
> $ cat /snap/openjfx/current/sdk/lib/javafx.properties 
> javafx.version=20
> javafx.runtime.version=20+19-2023-03-07-164252
> javafx.runtime.build=19
> ```
> 
> That makes it impossible for a developer to reproduce an identical copy of the official build.

No it doesn't. What it does mean is that they would need to set the following properties to the same values that were used for the official build:


HUDSON_JOB_NAME
HUDSON_BUILD_NUMBER
PROMOTED_BUILD_NUMBER
MILESTONE_FCS


and, of course:


CONF=Release


> Would it be more appropriate to use the output of `git describe`? For example, below is the command's output for this pull request branch and for the `21+11` tag:
> 
> ```
> $ git describe
> 21+11-25-ge42a070947
> $ git describe allow-reproducible-builds 
> 21+11-25-ge42a070947
> $ git describe 21+11
> 21+11

Not for the version string, but we could consider a future RFE to add something along these lines to the `lib/javafx.properties` file (which is the closest thing we have to the JDK's `release` file).

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

PR Comment: https://git.openjdk.org/jfx/pull/446#issuecomment-1497566465


More information about the openjfx-dev mailing list