You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add option to skip signing of runtime on macOS #138
By default, NBPackage deep re-signs the whole of the installation payload on macOS. This ensures everything is signed with the hardened runtime and correct entitlements. When first written this proved necessary to pass notarization requirements. This might no longer always be the case, and it can cause subtle issues with things like jlink. See mailing list conversation at https://lists.apache.org/thread/gm8rst0ppmflfg38trdfvglb6dgfjzc3
We should provide an option to skip re-signing of the JDK runtime in certain cases where the user can determine this is unnecessary.
I've taken a first stab at adding an option to skip re-signing the bundled JDK runtime on macOS.
New option: package.macos.codesign-runtime (boolean, default true). Leaving it at the default keeps current behaviour. Setting it to false keeps the runtime's existing signatures, which should avoid the jlink "modified runtime" errors.
A couple of things on the approach:
It filters by the runtime path (Contents/Home) rather than adjusting the signing glob, since FileUtils.find also matches on filename, so the default glob's *.dylib would still catch the runtime libs by name.
The final whole-bundle codesign doesn't use --deep, so it doesn't re-sign the runtime contents either, filtering the native-binary list is enough to preserve the JDK's original signatures.
Also added help text, a short README note, a log line when the runtime is skipped, and a test.
Something ekse, per the mailing-list thread: skipping runtime re-signing could affect notarization or runtime permissions, so it'd be good for us to run a package built with codesign-runtime=false through notarization + stapling before relying on it.
Activity
geertjanw commentedon Oct 1, 2026
I've taken a first stab at adding an option to skip re-signing the bundled JDK runtime on macOS.
New option: package.macos.codesign-runtime (boolean, default true). Leaving it at the default keeps current behaviour. Setting it to false keeps the runtime's existing signatures, which should avoid the jlink "modified runtime" errors.
A couple of things on the approach:
Something ekse, per the mailing-list thread: skipping runtime re-signing could affect notarization or runtime permissions, so it'd be good for us to run a package built with codesign-runtime=false through notarization + stapling before relying on it.
geertjanw commentedon Oct 1, 2026
For review: #146
Add option to skip signing of JDK runtime on macOS (#138)