Hei, jar and jmod got --date in JDK 19 and javadoc has -notimestamp, but jpackage has nothing comparable, so the packages it builds differ on every run. Would you be open to adding a --date option, or a -notimestamp switch?
jpackage could pass it on to the tools it drives. dpkg-deb already honours SOURCE_DATE_EPOCH, and rpmbuild does too once a few macros are defined, which jpackage could add next to the --define arguments it already passes. With those set by hand and the same runtime image, two runs gave me identical .deb and .rpm files. Setting SOURCE_DATE_EPOCH yourself works from a shell, but not when jpackage runs through the ToolProvider API: a call cannot be given its own environment, so a build tool has to fork jpackage instead. An option would behave the same either way. The option could be documented to be a best effort. I understand that not all targets might support this. The bundled runtime image is not reproducible yet either, see JDK-8392531. Thanks, Rafael
