Running jpackage on MacOS 14.4.1 without the --mac-sign option, but with
--type app-image --app-content NOTICE.txt
will throw an exception when trying to sign NOTICE.txt:
[17:21:59.454] Command [PID: 4876]:
/usr/bin/codesign -s - -vvvv --force /Users/runner/work/gui/gui/build/jpackage/gui.app
[17:21:59.454] Output:
/Users/runner/work/gui/gui/build/jpackage/gui.app: replacing existing signature
/Users/runner/work/gui/gui/build/jpackage/gui.app: code object is not signed at all
In subcomponent: /Users/runner/work/gui/gui/build/jpackage/gui.app/Contents/NOTICE.txt
[17:21:59.454] Returned: 1
Error: "codesign" failed with following output:
/Users/runner/work/gui/gui/build/jpackage/gui.app: replacing existing signature
/Users/runner/work/gui/gui/build/jpackage/gui.app: code object is not signed at all
In subcomponent: /Users/runner/work/gui/gui/build/jpackage/gui.app/Contents/NOTICE.txt
[17:21:59.455] java.io.IOException: Command [/usr/bin/codesign, -s, -, -vvvv, --force, /Users/runner/work/jextractGUI/jextractGUI/build/jpackage/jextractGUI.app] exited with 1 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:90)
at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:229)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.runCodesign(MacAppImageBuilder.java:741)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.signAppBundle(MacAppImageBuilder.java:880)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.doSigning(MacAppImageBuilder.java:425)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.prepareApplicationFiles(MacAppImageBuilder.java:367)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:189)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:93)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:714)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:92)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:53)
[17:21:59.456] jdk.jpackage.internal.PackagerException: java.io.IOException: Command [/usr/bin/codesign, -s, -, -vvvv, --force, /Users/runner/work/jextractGUI/jextractGUI/build/jpackage/jextractGUI.app] exited with 1 code
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:98)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:714)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:92)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:53)
Caused by: java.io.IOException: Command [/usr/bin/codesign, -s, -, -vvvv, --force, /Users/runner/work/gui/gui/build/jpackage/gui.app] exited with 1 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:90)
at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:229)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.runCodesign(MacAppImageBuilder.java:741)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.signAppBundle(MacAppImageBuilder.java:880)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.doSigning(MacAppImageBuilder.java:425)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.prepareApplicationFiles(MacAppImageBuilder.java:367)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:189)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:93)
... 4 more
Without
--app-content NOTICE.txt
the process completes correctly.
Not sure if this is considered a bug, or if jpackage must have its input image signed already.
--type app-image --app-content NOTICE.txt
will throw an exception when trying to sign NOTICE.txt:
[17:21:59.454] Command [PID: 4876]:
/usr/bin/codesign -s - -vvvv --force /Users/runner/work/gui/gui/build/jpackage/gui.app
[17:21:59.454] Output:
/Users/runner/work/gui/gui/build/jpackage/gui.app: replacing existing signature
/Users/runner/work/gui/gui/build/jpackage/gui.app: code object is not signed at all
In subcomponent: /Users/runner/work/gui/gui/build/jpackage/gui.app/Contents/NOTICE.txt
[17:21:59.454] Returned: 1
Error: "codesign" failed with following output:
/Users/runner/work/gui/gui/build/jpackage/gui.app: replacing existing signature
/Users/runner/work/gui/gui/build/jpackage/gui.app: code object is not signed at all
In subcomponent: /Users/runner/work/gui/gui/build/jpackage/gui.app/Contents/NOTICE.txt
[17:21:59.455] java.io.IOException: Command [/usr/bin/codesign, -s, -, -vvvv, --force, /Users/runner/work/jextractGUI/jextractGUI/build/jpackage/jextractGUI.app] exited with 1 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:90)
at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:229)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.runCodesign(MacAppImageBuilder.java:741)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.signAppBundle(MacAppImageBuilder.java:880)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.doSigning(MacAppImageBuilder.java:425)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.prepareApplicationFiles(MacAppImageBuilder.java:367)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:189)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:93)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:714)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:92)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:53)
[17:21:59.456] jdk.jpackage.internal.PackagerException: java.io.IOException: Command [/usr/bin/codesign, -s, -, -vvvv, --force, /Users/runner/work/jextractGUI/jextractGUI/build/jpackage/jextractGUI.app] exited with 1 code
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:98)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:714)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:92)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:53)
Caused by: java.io.IOException: Command [/usr/bin/codesign, -s, -, -vvvv, --force, /Users/runner/work/gui/gui/build/jpackage/gui.app] exited with 1 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:90)
at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:229)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.runCodesign(MacAppImageBuilder.java:741)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.signAppBundle(MacAppImageBuilder.java:880)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.doSigning(MacAppImageBuilder.java:425)
at jdk.jpackage/jdk.jpackage.internal.MacAppImageBuilder.prepareApplicationFiles(MacAppImageBuilder.java:367)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:189)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:93)
... 4 more
Without
--app-content NOTICE.txt
the process completes correctly.
Not sure if this is considered a bug, or if jpackage must have its input image signed already.
- relates to
-
JDK-8311877 [macos] Add CLI options to provide signing identity directly to codesign and productbuild
- Resolved