Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v8]

2025-07-17 Thread Alexander Matveev
On Fri, 18 Jul 2025 00:07:00 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v9]

2025-07-17 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v7]

2025-07-17 Thread Alexander Matveev
On Wed, 16 Jul 2025 22:26:51 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v8]

2025-07-17 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-16 Thread Alexander Matveev
On Wed, 16 Jul 2025 14:30:44 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4] > >

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-16 Thread Alexander Matveev
On Wed, 16 Jul 2025 15:03:05 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3] > > s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v6]

2025-07-16 Thread Alexander Matveev
On Wed, 16 Jul 2025 20:05:51 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v7]

2025-07-16 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-16 Thread Alexander Matveev
On Wed, 16 Jul 2025 14:20:47 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4] > >

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-16 Thread Alexander Matveev
On Wed, 16 Jul 2025 02:01:57 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v6]

2025-07-16 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-15 Thread Alexander Matveev
On Tue, 15 Jul 2025 02:31:03 GMT, Alexey Semenyuk wrote: >> [19:14:45.620] jdk.jpackage.internal.model.PackagerException: >> java.lang.ClassCastException: class com.sun.proxy.jdk.proxy1.$Proxy0 cannot >> be cast to class jdk.jpackage.internal.MacApplicationLayout >> (com.sun.proxy.jdk.proxy1.$

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-15 Thread Alexander Matveev
On Mon, 14 Jul 2025 23:25:58 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3] > > s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-07-15 Thread Alexander Matveev
On Mon, 14 Jul 2025 23:08:53 GMT, Alexey Semenyuk wrote: >> I need it inside `createMacApplication()` before `MacApplication` instance >> is created. > > If you need a property of a `MacApplication` instance, create it and get the > property. > `MacApplicationBuilder.validatedBundleIdentifier()

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-15 Thread Alexander Matveev
On Fri, 11 Jul 2025 16:44:05 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-15 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-14 Thread Alexander Matveev
On Tue, 15 Jul 2025 02:13:41 GMT, Alexey Semenyuk wrote: >> It does not print call stack. Not sure why. Once I figure it I will update. > > Maybe run jpackage with `--verbose` flag? [19:14:45.620] jdk.jpackage.internal.model.PackagerException: java.lang.ClassCastException: class com.sun.proxy.j

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-14 Thread Alexander Matveev
On Tue, 15 Jul 2025 01:29:44 GMT, Alexey Semenyuk wrote: >> Getting following exception at runtime with code above: >> >> java.lang.ClassCastException: class com.sun.proxy.jdk.proxy1.$Proxy0 cannot >> be cast to class jdk.jpackage.internal.MacApplicationLayout >> (com.sun.proxy.jdk.proxy1.$Pro

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-14 Thread Alexander Matveev
On Mon, 14 Jul 2025 23:16:14 GMT, Alexey Semenyuk wrote: >> One is used by `appImageAction` and second by `packageAction`. Maybe I am >> misusing appImageAction and packageAction. These two actions requires >> different argument `AppImageBuildEnv` vs `PackageBuildEnv`. > > Try, > > > builder

Integrated: 8361224: [macos] MacSignTest.testMultipleCertificates failed

2025-07-14 Thread Alexander Matveev
On Fri, 11 Jul 2025 19:57:54 GMT, Alexander Matveev wrote: > Test updated to expect `jpackage` to PASS in case of > `--mac-signing-key-user-name` and FAIL in case of > `-mac-app-image-sign-identity`. See explanation below. > > Case 1: Only common name of certificat

RFR: 8361224: [macos] MacSignTest.testMultipleCertificates failed

2025-07-11 Thread Alexander Matveev
Test updated to expect `jpackage` to PASS in case of `--mac-signing-key-user-name` and FAIL in case of `-mac-app-image-sign-identity`. See explanation below. Case 1: Only common name of certificate is used (PASS): jpackage --type dmg -i input -n Test --main-class components.DynamicTreeDemo --ma

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3]

2025-07-11 Thread Alexander Matveev
On Thu, 10 Jul 2025 21:44:32 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-11 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-07-10 Thread Alexander Matveev
On Tue, 8 Jul 2025 00:15:29 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request conta

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3]

2025-07-10 Thread Alexander Matveev
On Thu, 10 Jul 2025 21:44:32 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3]

2025-07-10 Thread Alexander Matveev
On Tue, 8 Jul 2025 01:13:20 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2] > > s

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3]

2025-07-10 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-07-07 Thread Alexander Matveev
On Mon, 7 Jul 2025 22:54:32 GMT, Michael Hall wrote: > What is the .jdk extension preceded by? {NAME}-{VERSION}.jdk, where {NAME} is value of `--name` and {VERSION} is value of `--version`. - PR Comment: https://git.openjdk.org/jdk/pull/26173#issuecomment-3046781194

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-07-07 Thread Alexander Matveev
b" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" points to JDK image and --mac-sign is provided: > - 2 f

RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-07-07 Thread Alexander Matveev
Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge conflict was resolved. Old PR will be closed. All comments are addressed from old PR. Merge conflict was significant, so it is like new fix. Fixed jpackage to produce valid Java runtimes based on description below: Definiti

Withdrawn: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-07-07 Thread Alexander Matveev
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update [v2]

2025-06-17 Thread Alexander Matveev
On Tue, 17 Jun 2025 23:34:52 GMT, Alisen Chung wrote: >> This issue is responsible for updating the translations of all the >> localize(able) resources in the JDK since the previous L10n drop. > > Alisen Chung has updated the pull request incrementally with one additional > commit since the las

Integrated: 8351369: [macos] Use --install-dir option with DMG packaging

2025-05-29 Thread Alexander Matveev
On Wed, 28 May 2025 07:11:36 GMT, Alexander Matveev wrote: > - `--install-dir` option in DMG packaging is no longer ignored. > - Defaults are still the same: `/Applications` and > `/Library/Java/JavaVirtualMachines`. > - It will be user responsibility to make sure installation dir

Re: RFR: 8351369: [macos] Use --install-dir option with DMG packaging [v2]

2025-05-29 Thread Alexander Matveev
ate directories during drag and drop. > - Target directory in case of non-default installation dir will display full > path. See image below for example. > > ![Screenshot 2025-05-28 at 12 07 53  > AM](https://github.com/user-attachments/assets/fbcba07b-74a5-4276-90c3-5f8d2d0dcc16) Ale

Re: RFR: 8351369: [macos] Use --install-dir option with DMG packaging

2025-05-29 Thread Alexander Matveev
On Wed, 28 May 2025 23:01:30 GMT, Alexey Semenyuk wrote: >> If the installation directory doesn't exist, jpackage will try to create and >> delete it right after the DMG package is created. > Is this absolutely necessary? Is there a better way? Yes, there is better way. I just figure it out. A

Re: RFR: 8351369: [macos] Use --install-dir option with DMG packaging

2025-05-29 Thread Alexander Matveev
On Wed, 28 May 2025 07:11:36 GMT, Alexander Matveev wrote: > - `--install-dir` option in DMG packaging is no longer ignored. > - Defaults are still the same: `/Applications` and > `/Library/Java/JavaVirtualMachines`. > - It will be user responsibility to make sure installation dir

Re: RFR: 8358017: Various enhancements of jpackage test helpers

2025-05-29 Thread Alexander Matveev
On Wed, 28 May 2025 03:35:40 GMT, Alexey Semenyuk wrote: > Various enhancements of jpackage test helpers: > - Can run fa tests when JAVA_TOOL_OPTIONS env variable contains > `--module-path` option. This change makes support for > `jpackage.test.clear-app-launcher-java-env-vars` system property

Re: RFR: 8356047: [macos] jpackage produces confusing post- and pre- installation PKG scripts

2025-05-28 Thread Alexander Matveev
On Wed, 28 May 2025 20:00:20 GMT, Alexey Semenyuk wrote: > Why do we need empty scripts? It doesn't make sense. I'd remove them. If we do not have empty scripts how user will override it? https://docs.oracle.com/en/java/javase/24/jpackage/override-jpackage-resources.html#GUID-62412365-821D-4736-

RFR: 8356047: [macos] jpackage produces confusing post- and pre- installation PKG scripts

2025-05-28 Thread Alexander Matveev
- Removed all code from pre- and post- installation PKG scripts. - This code is not needed and PKG should create destination folder and set correct permissions. - If for some reason it is not happens, permissions issues should be fixed when jpackage prepares application bundle. PKG should keep al

Re: RFR: 8357930: Amendment for JDK-8333664 [v2]

2025-05-28 Thread Alexander Matveev
On Wed, 28 May 2025 12:24:48 GMT, Alexey Semenyuk wrote: >> - Extract ExternalApplication interface from AppImageFile and add it to the >> model; >> - Move LauncherData.ModuleInfo class to the top level; >> - Add parent interface BundleSpec for Application and Package interfaces in >> the mod

RFR: 8351369: [macos] Use --install-dir option with DMG packaging

2025-05-28 Thread Alexander Matveev
- `--install-dir` option in DMG packaging is no longer ignored. - Defaults are still the same: `/Applications` and `/Library/Java/JavaVirtualMachines`. - If the installation directory doesn't exist, jpackage will try to create and delete it right after the DMG package is created. - If jpackage wa

Re: RFR: 8357930: Amendment for JDK-8333664

2025-05-28 Thread Alexander Matveev
On Wed, 28 May 2025 02:52:57 GMT, Alexey Semenyuk wrote: > - Extract ExternalApplication interface from AppImageFile and add it to the > model; > - Move LauncherData.ModuleInfo class to the top level; > - Add parent interface BundleSpec for Application and Package interfaces in > the model; >

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v4]

2025-05-27 Thread Alexander Matveev
On Tue, 27 May 2025 19:48:11 GMT, Stefan Lobbenmeier wrote: >> The documentation suggests that --linux-package-deps is a boolean option, >> while in fact it is a string option with dependencies separated by comma and >> space >> >> You can tell that this option is supposed to have an argument

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexander Matveev
On Wed, 21 May 2025 12:41:24 GMT, Stefan Lobbenmeier wrote: >> The documentation suggests that --linux-package-deps is a boolean option, >> while in fact it is a string option with dependencies separated by comma and >> space >> >> You can tell that this option is supposed to have an argument

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexander Matveev
On Wed, 21 May 2025 12:03:16 GMT, Alexey Semenyuk wrote: >> As in, this worked in my testing: `--linux-package-deps "foo, bar"`, see >> https://github.com/JetBrains/compose-multiplatform/pull/5227#issuecomment-2659470908 > >> As in, this worked in my testing: --linux-package-deps "foo, bar" > >

Re: RFR: 8356128: Correct documentation for --linux-package-deps [v3]

2025-05-21 Thread Alexander Matveev
On Wed, 21 May 2025 12:41:24 GMT, Stefan Lobbenmeier wrote: >> The documentation suggests that --linux-package-deps is a boolean option, >> while in fact it is a string option with dependencies separated by comma and >> space >> >> You can tell that this option is supposed to have an argument

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3]

2025-05-20 Thread Alexander Matveev
ntents/Home", libjli.dylib from "lib" to "Contents/MacOS/libjli.dylib" and > create default "Contents/Info.plist" similar to what we do for runtime in > application image. > - Ad-hoc signing will done. > > 6. "--runtime-image" po

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexander Matveev
On Wed, 21 May 2025 02:19:31 GMT, Alexander Matveev wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Co

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexander Matveev
to JDK image and --mac-sign is provided: > - 2 first steps from 5 and certificate signing will be done. > > Additional changes: > - jpackage will attempt to get a package version from the JDK's release file > if the --version option is not specified. > - The bundle's t

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexander Matveev
On Wed, 21 May 2025 01:39:16 GMT, Alexey Semenyuk wrote: >> Test cases are added. > > Can you give a reference to a test that expects jpackage to fail with > `message.runtime-image-invalid` error in the output? I can't find it. I just push it. See ErrorTest.java. - PR Review Comme

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 17:05:55 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 16:57:34 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 17:00:21 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 16:39:02 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 16:35:57 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-19 Thread Alexander Matveev
Fixed jpackage to produce valid Java runtimes based on description below: Definitions: - JDK bundle defined as bundle which contains "Contents/Home", "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". - Signed JDK bundle contains all files as JDK bundle + "Contents/_CodeSignature". - JDK

Re: RFR: 8333664: Decouple command line parsing and package building in jpackage [v5]

2025-05-16 Thread Alexander Matveev
On Fri, 16 May 2025 23:43:48 GMT, Alexey Semenyuk wrote: >> Refactor jpackage to separate the configuration and execution phases. >> At the configuration phase, jpackage parses command-line arguments and >> validates them. >> At the execution phase, jpackage builds a bundle based on data collect

Re: RFR: 8333664: Decouple command line parsing and package building in jpackage [v4]

2025-05-15 Thread Alexander Matveev
On Sat, 10 May 2025 19:02:45 GMT, Alexey Semenyuk wrote: >> Refactor jpackage to separate the configuration and execution phases. >> At the configuration phase, jpackage parses command-line arguments and >> validates them. >> At the execution phase, jpackage builds a bundle based on data collect

Integrated: 8356819: [macos] MacSign should use "openssl" and "faketime" from Homebrew by default

2025-05-13 Thread Alexander Matveev
On Tue, 13 May 2025 00:30:08 GMT, Alexander Matveev wrote: > `openssl` from macOS will ignore `faketime` and as result expired > certificates will not be generated correctly. By default we should use these > tools from Homebrew. This pull request has now been integrated. Changeset:

RFR: 8356819: [macos] MacSign should use "openssl" and "faketime" from Homebrew by default

2025-05-12 Thread Alexander Matveev
`openssl` from macOS will ignore `faketime` and as result expired certificates will not be generated correctly. By default we should use these tools from Homebrew. - Commit messages: - 8356819: [macos] MacSign should use "openssl" and "faketime" from Homebrew by default Changes:

Integrated: 8356664: [macos] AppContentTest fails after JDK-8352480

2025-05-09 Thread Alexander Matveev
On Fri, 9 May 2025 23:36:44 GMT, Alexander Matveev wrote: > - Regression from JDK-8352480. > - On macOS we should create `Links` folder under `Resources`. Which means > `--app-content` should point to `app-content/Resources` and not to > `app-content/Resources/Links`. This pull

RFR: 8356664: [macos] AppContentTest fails after JDK-8352480

2025-05-09 Thread Alexander Matveev
- Regression from JDK-8352480. - On macOS we should create `Links` folder under `Resources`. Which means `--app-content` should point to `app-content/Resources` and not to `app-content/Resources/Links`. - Commit messages: - 8356664: [macos] AppContentTest fails after JDK-8352480 C

Integrated: 8352480: Don't follow symlinks in additional content for app images

2025-05-09 Thread Alexander Matveev
On Wed, 30 Apr 2025 20:17:57 GMT, Alexander Matveev wrote: > - Symbolic links will not be followed for `--app-content` on all platforms. > - Added test to cover this case. > - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, > since &q

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v4]

2025-05-08 Thread Alexander Matveev
d `cp` will > follow symbolic links which breaks test. "cp -R" does not follow symbolic > links. Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision: 8352480: [macos] Don't follow symlinks in additional conte

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v3]

2025-05-08 Thread Alexander Matveev
On Wed, 7 May 2025 02:07:03 GMT, Alexander Matveev wrote: >> - Symbolic links will not be followed for `--app-content` on all platforms. >> - Added test to cover this case. >> - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, >&

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v3]

2025-05-08 Thread Alexander Matveev
On Wed, 7 May 2025 12:26:54 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8352480: [macos] Don't follow symlinks in additional content for app >

Re: RFR: 8333568: Test that jpackage doesn't modify R/O files/directories

2025-05-08 Thread Alexander Matveev
On Thu, 8 May 2025 20:19:43 GMT, Alexey Semenyuk wrote: > Add a check that jpackage doesn't modify files/directories supplied with > "--app-image", "--resource-dir", "--runtime-image", "--app-content", and > "--mac-dmg-content" options to every jpackage test. Looks good. - Marked

Re: RFR: 8356562: SigningAppImageTwoStepsTest test fails

2025-05-08 Thread Alexander Matveev
On Thu, 8 May 2025 17:23:48 GMT, Alexey Semenyuk wrote: > Fix JPackageCommand.assertAppImageFile() method to make it pass the relative > path to ".jpackag.xml" file to JPackageCommand.assertFileInAppImage(). Looks good. - Marked as reviewed by almatvee (Reviewer). PR Review: http

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v3]

2025-05-06 Thread Alexander Matveev
d `cp` will > follow symbolic links which breaks test. "cp -R" does not follow symbolic > links. Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision: 8352480: [macos] Don't follow symlinks in additional conte

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v2]

2025-05-06 Thread Alexander Matveev
On Wed, 7 May 2025 01:50:31 GMT, Shaojin Wen wrote: >> Alexander Matveev has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contai

Re: RFR: 8352480: Don't follow symlinks in additional content for app images

2025-05-06 Thread Alexander Matveev
On Wed, 30 Apr 2025 20:56:19 GMT, Alexey Semenyuk wrote: > I don't like the idea of changing behavior on only one platform. It should be > consistent across all platforms. Let's not follow symlinks on other > platforms, either. Fix is updated not to follow links on all platforms. Test is updat

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v2]

2025-05-06 Thread Alexander Matveev
d `cp` will > follow symbolic links which breaks test. "cp -R" does not follow symbolic > links. Alexander Matveev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase

Re: RFR: 8356309: Fix issues uncovered after running jpackage tests locally with installing test packages

2025-05-06 Thread Alexander Matveev
On Fri, 25 Apr 2025 18:07:50 GMT, Alexey Semenyuk wrote: > Fix issues uncovered in the tests after local test runs with the installation > of test packages: > - LinuxHelper: fix a regression from > [JDK-8354988](https://bugs.openjdk.org/browse/JDK-8354988). Before the > [JDK-8354988](https://

Re: RFR: 8356219: jpackage places libapplauncher.so in incorrect location in the app image [v2]

2025-05-06 Thread Alexander Matveev
On Tue, 6 May 2025 03:25:07 GMT, Alexey Semenyuk wrote: >> - Refactor PathGroup >> - Add test cases to PathGroupTest >> - Update UsrTreeTest to verify "libapplauncher.so" is placed in the correct >> location in the package >> - Refactor UsrTreeTest to use JPackageCommand assert functions > >

Re: RFR: 8356219: jpackage places libapplauncher.so in incorrect location in the app image

2025-05-05 Thread Alexander Matveev
On Mon, 5 May 2025 21:44:36 GMT, Alexey Semenyuk wrote: > - Refactor PathGroup > - Add test cases to PathGroupTest > - Update UsrTreeTest to verify "libapplauncher.so" is placed in the correct > location in the package > - Refactor UsrTreeTest to use JPackageCommand assert functions Looks go

Re: RFR: 8355573: Remove kludge_c++11.h from jpackage code

2025-05-05 Thread Alexander Matveev
On Tue, 6 May 2025 00:49:35 GMT, Julian Waters wrote: >> src/jdk.jpackage/windows/native/common/MsiUtils.h line 35: >> >>> 33: #include >>> 34: #include >>> 35: #include >> >> Why this include was added? > > It seemed to be needed to compile successfully back when I removed the kludge > hea

Re: RFR: 8355573: Remove kludge_c++11.h from jpackage code

2025-05-05 Thread Alexander Matveev
On Fri, 25 Apr 2025 06:14:36 GMT, Julian Waters wrote: > kludge_c++11.h was introduced to work around older C++ versions not having > access to C++ utilities like std::unique_ptr. Since we are already on C++14 > (And hopefully will get C++17 soon) this workaround can be removed from > jpackage

Re: RFR: 8355573: Remove kludge_c++11.h from jpackage code

2025-05-05 Thread Alexander Matveev
On Fri, 25 Apr 2025 06:14:36 GMT, Julian Waters wrote: > kludge_c++11.h was introduced to work around older C++ versions not having > access to C++ utilities like std::unique_ptr. Since we are already on C++14 > (And hopefully will get C++17 soon) this workaround can be removed from > jpackage

Re: RFR: 8352480: Don't follow symlinks in additional content for app images

2025-05-02 Thread Alexander Matveev
On Thu, 1 May 2025 21:23:38 GMT, Mikhail Yankelevich wrote: >> - Symbolic links will not be followed for `--app-content` on all platforms. >> - Added test to cover this case. >> - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, >> since "cp -r" on macOS is not document

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-05-02 Thread Alexander Matveev
On Fri, 25 Oct 2024 01:49:01 GMT, Alexander Matveev wrote: > - It is not clear on which macOS versions codesign fails if application > bundle contains additional content. > - As a result test was modified to generate only application image, since PKG > or DMG cannot be generate

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-05-02 Thread Alexander Matveev
On Fri, 25 Oct 2024 01:49:01 GMT, Alexander Matveev wrote: > - It is not clear on which macOS versions codesign fails if application > bundle contains additional content. > - As a result test was modified to generate only application image, since PKG > or DMG cannot be generate

RFR: 8352480: [macos] Don't follow symlinks in additional content for app images

2025-04-30 Thread Alexander Matveev
- Symbolic links will not be followed for `--app-content` on macOS. - Added test to cover this case. - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, since "cp -r" on macOS is not documented option and when used `cp` will follow symbolic links which breaks test. "cp -R"

Re: RFR: 8355651: Issues with post-image hook [v2]

2025-04-29 Thread Alexander Matveev
On Tue, 29 Apr 2025 13:40:59 GMT, Alexey Semenyuk wrote: >> - Add missing "post-image" infrastructure on Linux. >> - Fix "post-image" infrastructure on macOS and Windows. >> - Add relevant tests. >> - Update TKit to support new tests. > > Alexey Semenyuk has refreshed the contents of this pull

Re: RFR: 8355328: Improve negative tests coverage for jpackage signing [v2]

2025-04-23 Thread Alexander Matveev
On Wed, 23 Apr 2025 02:30:59 GMT, Alexey Semenyuk wrote: >> Add tests covering `error.explicit-sign-no-cert` error ID to ErrorTest. >> >> If signing identity validation fails, jpackage outputs three messages >> constructed from the following string IDs: `error.cert.not.found`, >> `error.explic

Re: RFR: 8355328: Improve negative tests coverage for jpackage signing

2025-04-22 Thread Alexander Matveev
On Tue, 22 Apr 2025 00:43:24 GMT, Alexey Semenyuk wrote: > Add tests covering `error.explicit-sign-no-cert` error ID to ErrorTest. > > If signing identity validation fails, jpackage outputs three messages > constructed from the following string IDs: `error.cert.not.found`, > `error.explicit-si

Re: RFR: 8354990: Improve negative tests coverage for jpackage signing [v2]

2025-04-21 Thread Alexander Matveev
On Tue, 22 Apr 2025 00:03:01 GMT, Alexey Semenyuk wrote: >> test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacSign.java line 410: >> >>> 408: continue; >>> 409: } >>> 410: certs.add(cert); >> >> Maybe: >> >>

Re: RFR: 8354990: Improve negative tests coverage for jpackage signing [v3]

2025-04-21 Thread Alexander Matveev
On Tue, 22 Apr 2025 00:14:17 GMT, Alexey Semenyuk wrote: >> Add tests for the following test cases: >> - Expired certificate specified for signing; >> - Multiple certificates with the same name in one keychain. >> >> Adding the new tests revealed an issue with MacCertificate - >> [JDK-8354989

Re: RFR: 8354990: Improve negative tests coverage for jpackage signing [v2]

2025-04-21 Thread Alexander Matveev
On Mon, 21 Apr 2025 21:34:59 GMT, Alexey Semenyuk wrote: >> Add tests for the following test cases: >> - Expired certificate specified for signing; >> - Multiple certificates with the same name in one keychain. >> >> Adding the new tests revealed an issue with MacCertificate - >> [JDK-8354989

Re: RFR: 8354988: Separate stderr and stdout in Executor class from jpackage test lib

2025-04-18 Thread Alexander Matveev
On Thu, 17 Apr 2025 23:47:09 GMT, Alexey Semenyuk wrote: > Rework Executor class from jpackage test lib to support separate > configuration of stdout and stderr streams handling: > - New `Executor.discardStdout(boolean)` and > `Executor.discardStderr(boolean)` methods enable/disable stdout and

Re: RFR: 8354985: Add unit tests for Executor class from jpackage test lib

2025-04-17 Thread Alexander Matveev
On Thu, 17 Apr 2025 18:53:16 GMT, Alexey Semenyuk wrote: > - Add tests covering command output handling in the Executor class > - Fix revealed bugs > - Add a couple of `Executor.of()` convenience methods > > The test is implemented in a way that it will remain mostly unchanged when > Executor

Re: RFR: 8354320: Changes to jpackage.md cause pandoc warning [v3]

2025-04-11 Thread Alexander Matveev
On Fri, 11 Apr 2025 13:50:04 GMT, Alexey Semenyuk wrote: >> Escape the dollar sign. > > Alexey Semenyuk has updated the pull request incrementally with one > additional commit since the last revision: > > Disable tex_math_dollars extension Looks good. - Marked as reviewed by al

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v10]

2025-04-09 Thread Alexander Matveev
On Wed, 9 Apr 2025 20:56:03 GMT, Alexey Semenyuk wrote: >> jpackage app laucnher will expand environment variables in .cfg files. >> >> Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and >> `$ROOTDIR` tokens with the corresponding path values. With this patch, any >> envi

Re: RFR: 8352289: [macos] Review skipped tests in tools/jpackage/macosx/SigningPackage*

2025-04-05 Thread Alexander Matveev
On Mon, 24 Mar 2025 14:35:50 GMT, Alexey Semenyuk wrote: > Follow-up for https://github.com/openjdk/jdk/pull/24087 PR. > Revamp signing tests: > - Run the tests only if `jpackage.test.MacSignTests` property is set to > "run". This property also can be set to "setup" and "teardown" to set up an

Re: RFR: 8353679: Restructure classes in jdk.jpackage.internal package

2025-04-04 Thread Alexander Matveev
On Tue, 1 Apr 2025 15:18:13 GMT, Alexey Semenyuk wrote: > - Move ConfigException, PackagerException, MsiVersion, and DottedVersion > classes from "jdk.jpackage.internal" package to "jdk.jpackage.internal.model" > package. > - Remove public ctor from DottedVersion class. It can only be construc

Re: RFR: 8353681: jpackage suppresses errors when executed with --verbose option

2025-04-03 Thread Alexander Matveev
On Thu, 3 Apr 2025 21:36:10 GMT, Alexey Semenyuk wrote: > Always print error messages from the last trapped exception to stderr. > Optionally, print its stasktrace to stdout when in verbose mode. > > Add relevant test. Looks good. - Marked as reviewed by almatvee (Reviewer). PR

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v8]

2025-04-03 Thread Alexander Matveev
On Tue, 1 Apr 2025 21:20:54 GMT, Alexey Semenyuk wrote: >> jpackage app laucnher will expand environment variables in .cfg files. >> >> Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and >> `$ROOTDIR` tokens with the corresponding path values. With this patch, any >> envi

Re: RFR: 8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail [v2]

2025-04-01 Thread Alexander Matveev
On Tue, 1 Apr 2025 19:00:56 GMT, Alexey Semenyuk wrote: >> Make tools/jpackage/share/ErrorTest.java test safely handle the case when >> native bundling is unavailable on the test host. >> >> Additionally: >> - If native bundling is unavailable on the test host, PackageTest will >> throw `jtre

Re: RFR: 8353321: [macos] ErrorTest.testAppContentWarning test case requires signing environment

2025-03-31 Thread Alexander Matveev
On Mon, 31 Mar 2025 21:26:54 GMT, Alexey Semenyuk wrote: > Move `ErrorTest.testAppContentWarning()` test case to > `MacSignTest.testAppContentWarning()` and rework it to fail because of faulty > app content and not invalid signing identity. > > MacSignTest is supposed to be a placeholder for t

  1   2   3   4   >