RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions
Alexander Matveev
almatvee at openjdk.org
Fri Oct 25 21:36:07 UTC 2024
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.
Test used to do nothing before this fix on macOS. Before we forced exit code to 1, jpackage failed and we did not verify anything. With new approach we will generate application image with additional content and test will verify that additional content exists in application image. Generating PKG and DMG is not possible due to potential failure of codesign. Also, it is unlikely that something can go wrong with PKG and DMG generation with additional content, since PKG and DMG does not really care about content of application image.
We always do code sign on macOS since sometime already. If `--mac-sign` is not specified we will do ad-hoc signing. If `--mac-sign` is specified we will do signing using certificates. ad-hoc signing does not use any identity, but it is required on latest macOS versions, otherwise application cannot be run.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21698#issuecomment-2438911925
More information about the core-libs-dev
mailing list