RFR: 8363980: [macos] Add JDK specific keys/values to Info.plist of embedded runtime
Alexey Semenyuk
asemenyuk at openjdk.org
Thu Oct 30 23:07:04 UTC 2025
On Thu, 30 Oct 2025 22:59:42 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> We still need to add file to "bin" for Linux. I will change it to:
>>
>> // Need to make the code in rpm spec happy as it assumes there is
>> // always something in application image.
>> includeBin |= TKit.isLinux();
>>
>> if (includeBin) {
>> createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("bin", "bulk")));
>> }
>
>> We still need to add file to "bin" for Linux. I will change it to:
>
> I simplified the body of the `setFakeRuntime()` function as follows:
>
> addPrerequisiteAction(cmd -> {
> Path fakeRuntimeDir = TKit.createTempDirectory("fake_runtime");
>
> TKit.trace(String.format("Init fake runtime in [%s] directory",
> fakeRuntimeDir));
>
> if (TKit.isOSX()) {
> // Make MacAppImageBuilder happy
> createBulkFile.accept(fakeRuntimeDir.resolve(Path.of(
> "lib/jli/libjli.dylib")));
> }
>
> // Make sure fake runtime takes some disk space.
> // Package bundles with 0KB size are unexpected and considered
> // an error by PackageTest.
> createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("lib", "bulk")));
>
> cmd.setArgumentValue("--runtime-image", fakeRuntimeDir);
> });
>
>
> And ran Windows and Linux tests that use it. All passed.
>
> WinOSConditionTest:
>
> [18:44:19.893] TRACE: assertStringListEquals(): Check jpackage didn't modify ${RUNTIME_IMAGE}=[C:\jpackage-tests\WinOSConditionTest\test\fake_runtime-0]
> [18:44:19.893] TRACE: assertStringListEquals(1, #)
> [18:44:19.894] TRACE: assertStringListEquals(2, lib#)
> [18:44:19.894] TRACE: assertStringListEquals(3, lib\bulk#2025-10-30T22:44:17.6191874Z)
> [18:44:19.894] TRACE: assertTrue(): Check [WinOSConditionTest\test\output\WinOSConditionTest-1.0.msi] path exists
>
>
> AppAboutUrlTest.testDefaults (DEB):
>
> [18:49:22.115] TRACE: assertStringListEquals(): Check jpackage didn't modify ${RUNTIME_IMAGE}=[/jpackage-tests/AppAboutUrlTest/testDefaults/fake_runtime]
> [18:49:22.120] TRACE: assertStringListEquals(1, #)
> [18:49:22.120] TRACE: assertStringListEquals(2, lib#)
> [18:49:22.120] TRACE: assertStringListEquals(3, lib/bulk#2025-10-30T22:49:20.128409727Z)
> [18:49:22.120] TRACE: assertTrue(): Check [AppAboutUrlTest/testDefaults/output/defaultsappabouturltest_1.0_amd64.deb] path exists
>
>
> AppAboutUrlTest.testDefaults (RPM):
>
> [18:56:37.897] TRACE: assertStringListEquals(): Check jpackage didn't modify ${RUNTIME_IMAGE}=[/jpackage-tests/AppAboutUrlTest/testDefaults/fake_runtime]
> [18:56:37.898] TRACE: assertStringListEquals(1, #)
> [18:56:37.898] TRACE: assertStringListEquals(2, lib#)
> [18:56:37.898] TRACE: assertStringListEquals(3, lib/bulk#2025-10-30T22:56:37.204554597Z)
> [18:56:37.898] TRACE: assertTrue(): Check [AppAboutUrlTest/testDefaults/output/defaultsappabouturltest-1.0-1.x86_64.rpm] path e...
The diff:
diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java
index fcd940e725e..73af859b6ac 100644
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java
@@ -307,24 +307,16 @@ public JPackageCommand setFakeRuntime() {
TKit.trace(String.format("Init fake runtime in [%s] directory",
fakeRuntimeDir));
- Files.createDirectories(fakeRuntimeDir);
-
- if (TKit.isLinux()) {
- // Need to make the code in rpm spec happy as it assumes there is
- // always something in application image.
- fakeRuntimeDir.resolve("bin").toFile().mkdir();
- }
-
if (TKit.isOSX()) {
// Make MacAppImageBuilder happy
createBulkFile.accept(fakeRuntimeDir.resolve(Path.of(
"lib/jli/libjli.dylib")));
}
- // Mak sure fake runtime takes some disk space.
+ // Make sure fake runtime takes some disk space.
// Package bundles with 0KB size are unexpected and considered
// an error by PackageTest.
- createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("bin", "bulk")));
+ createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("lib", "bulk")));
cmd.setArgumentValue("--runtime-image", fakeRuntimeDir);
});
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28033#discussion_r2479736389
More information about the core-libs-dev
mailing list