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

[macos] Signing app bundle with jpackage fails if runtime is already signed

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOS
      OpenJDK Runtime Environment (build 15-ea+9-264)
      OpenJDK Runtime Environment (build 14+36-1461)


      A DESCRIPTION OF THE PROBLEM :
      It is almost the same JDK-8237607.
      After signing all components it fails with error:

      /var/folders/9g/62bb9wjd1ks04kfxsd3_1tbr0000gn/T/jdk.incubator.jpackage12785038626377964102/images/image-7125624493142684957/griddlers.app: is already signed
      java.io.IOException: Command [codesign, -s, XXXXXX , -vvvv, /var/folders/9g/62bb9wjd1ks04kfxsd3_1tbr0000gn/T/jdk.incubator.jpackage12785038626377964102/images/image-7125624493142684957/myapp.app] exited with 1 code
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Executor.executeExpectSuccess(Executor.java:73)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.IOUtils.exec(IOUtils.java:165)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.IOUtils.exec(IOUtils.java:136)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.MacAppImageBuilder.signAppBundle(MacAppImageBuilder.java:895)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.MacAppImageBuilder.sign(MacAppImageBuilder.java:363)

      I would say that there could be also -f parameter on https://github.com/openjdk/jdk14/blob/5ed4b9f2c0a1572da09fef84aaf0ce899689c4c2/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacAppImageBuilder.java#L881



      REGRESSION : Last worked in version 14

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      jpackage --verbose --type dmg -d dist -i target/input -n myapp \
       --main-class com.igridd.client.Griddlers --main-jar myapp.jar \
       --icon src/main/bundleresources/package/macosx/myapp.icns \
       --mac-package-identifier myapp.com --mac-sign --mac-signing-key-user-name "developer" \
       --resource-dir src/main/bundleresources/package/macosx \
       --mac-package-signing-prefix com.myapp


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      complete dmg image
      ACTUAL -
      Error

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                herrick Andy Herrick
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: