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

[macos] Don't follow symlinks in additional content for app images

XMLWordPrintable

    • x86_64
    • os_x

      A DESCRIPTION OF THE PROBLEM :
      The ability to specify additional app content was added in In https://bugs.openjdk.org/browse/JDK-8274346. The implemented solution recursively copies additional content and follows the symlinks, which it shouldn't do.

      In my case, the additional content is another app bundle that I want to nest inside of an application. This is a legit practice in macOS world. And app bundles actively use symlinks to manage framework versions, like this:

      > My App.app
      > > Contents
      > > > Frameworks
      > > > > My Framework.framework
      > > > > > Versions
      > > > > > > 134.0.6998.89 (actual version)
      > > > > > > > My Framework (actual executable)
      > > > > > > Current (symlink to 134.0.6998.89)
      > > > > > > My Framework (symlink to the executable)

      When I add such a bundle as --app-content, jpackage materializes all symlinks which leads to an incorrect directory structure and respective codesign failure.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The symlinks inside `--app-content` remain symlinks in the app image.
      ACTUAL -
      The symlinks inside `--app-content` are materialized in the app image.

            almatvee Alexander Matveev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: