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

Alexey Semenyuk asemenyuk at openjdk.org
Sun May 4 23:18:53 UTC 2025


On Fri, 25 Oct 2024 01:49:01 GMT, Alexander Matveev <almatvee at openjdk.org> 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 generated if signing fails. Exit code of jpackage is ignored, but generated application image will be checked for additional content.
> - This change is for macOS only.
> - Previous implementation of test (forcing expected exist code to 1) was not doing anything useful, since we never checked if additional content was copied or not.

In the log:


In subcomponent: /private/var/folders/hn/k7g0_sh57112t0xtjxcjcm5r0000gn/T/jdk.jpackage2295206181121069675/images/image-11269735772913219400/JabRef.app/Contents/***Host.py


The command line:

jpackage \
  ...
  --app-content buildres/mac/Resources/***Host.py \
  --app-content buildres/mac/Resources/native-messaging-host \


`--app-content` values are wrong. My bad, I gave you incorrect instructions. It should be a single "--app-content buildres/mac" option. This way, jpackage will copy both the "jabrefHost.py" file and the "native-messaging-host" directory into the "Contents/Resources" directory in the app bundle. This should make codesign work.

You can have multiple `--app-content` on the jpackage command line, but on macOS, the value should be a directory with the "Resources" subdirectory (or any other directory that is valid in the "Contents" directory of the app bundle). Otherwise, codesign will keep failing.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21698#issuecomment-2849491184


More information about the core-libs-dev mailing list