RFR: 8371076: jpackage will wrongly overwrite the plist file in the embedded runtime when executed with the "--app-image" option
Alexey Semenyuk
asemenyuk at openjdk.org
Fri Oct 31 19:04:55 UTC 2025
- Fix MacPackagingPipeline.
- Fix AppImageSigner: this is the follow-up for MacPackagingPipeline fix. Without fixing AppImageSigner AppImagePackageTest.testEmpty test fails. It happened that the test passed because jpackage wrongly created the plist file for the embedded runtime in the case of the predefined app image. The test passed because of the bug in jpackage fixed in this PR.
- Add test cases for predefined app image packaging to the CustomInfoPListTest test. They had been failing before MacPackagingPipeline was fixed.
Supplementary changes:
- Get rid of duplicated `createInputRuntimeImage()` and `createRuntimeBundle()` functions.
- Improve `MacHelper.writeFaPListFragment()` to work with a predefined app image.
- Add optional tracing to the packaging pipeline (turned off by default, must edit static fields to enable in custom builds).
- PListReader: add find methods that return an Optional instead of throwing an exception when the requested key is not found; update unit tests.
-------------
Commit messages:
- MacPackagingPipeline: fix the issue with writing info plist file for the embedded runtime when bundling predefined app image; AppImageSigner: should not attempt to sign embedded runtime bundle if it is not valid (missing). AppImagePackageTest.testEmpty test fails unless AppImageSigner is fixed.
- CustomInfoPListTest: better test coverage; shorten test case names
- RuntimePackageTest, SigningRuntimeImagePackageTest: use JPackageCommand.createInputRuntimeImage() and MacHelper.createRuntimeBundle()
- MacHelper: add createRuntimeBundle(); make writeFaPListFragment() work with a predefined app image.
- PackagingPipeline: add debug capabilities
- JPackageCommand: fix setDefaultAppName(); remove redundant "throws IOException" from createInputRuntimeImage()
- XmlUtils: rename mergeXmls() into concatXml(); WixLauncherAsService: follow-up change.
- PListReader: add find methods that return an Optional instead of throwing an exception when the requested key is not found; add toXmlConsumer(); update unit tests.
Changes: https://git.openjdk.org/jdk/pull/28089/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28089&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8371076
Stats: 519 lines in 12 files changed: 274 ins; 118 del; 127 mod
Patch: https://git.openjdk.org/jdk/pull/28089.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28089/head:pull/28089
PR: https://git.openjdk.org/jdk/pull/28089
More information about the core-libs-dev
mailing list