Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8332110

[macos] jpackage tries to sign added files without the --mac-sign option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 23
    • 22
    • tools
    • b26
    • os_x

      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.

            almatvee Alexander Matveev
            nlisker Nir Lisker
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: