-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
None
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
openjdk 23
windows, linux
A DESCRIPTION OF THE PROBLEM :
Currently the output of jar is non reproducible, for example
----
mkdir out; touch out/a
export SOURCE_DATE_EPOCH=1;jar --create --file classes.jar -C out .
touch out/a;
export SOURCE_DATE_EPOCH=1;jar --create --file classes2.jar -C out .
----
classes.jar and classes2.jar will differ.
It is possible to use --date with JDK 19 or newer but it is not supported by older versions of jar, at that point it might be easier to use strip-nondeterminism to support multiple environments.
https://reproducible-builds.org/docs/source-date-epoch/
Already explains why it is a good idea to support the environment variable (if the output of a command is not already reproducible).
openjdk 23
windows, linux
A DESCRIPTION OF THE PROBLEM :
Currently the output of jar is non reproducible, for example
----
mkdir out; touch out/a
export SOURCE_DATE_EPOCH=1;jar --create --file classes.jar -C out .
touch out/a;
export SOURCE_DATE_EPOCH=1;jar --create --file classes2.jar -C out .
----
classes.jar and classes2.jar will differ.
It is possible to use --date with JDK 19 or newer but it is not supported by older versions of jar, at that point it might be easier to use strip-nondeterminism to support multiple environments.
https://reproducible-builds.org/docs/source-date-epoch/
Already explains why it is a good idea to support the environment variable (if the output of a command is not already reproducible).
- duplicates
-
JDK-8276766 Enable jar and jmod to produce deterministic timestamped content
- Resolved
- relates to
-
JDK-8276766 Enable jar and jmod to produce deterministic timestamped content
- Resolved