JDK-8310933 : Copying from runtime image to application image should not follow symlinks
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2023-06-26
  • Updated: 2025-11-19
  • Resolved: 2023-10-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b22Fixed
Related Reports
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Linux and Mac OS X

A DESCRIPTION OF THE PROBLEM :
When building an application image from an existing runtime image using the --runtime-image option, jpackage copies recursively the runtime without the option NOFOLLOW_LINKS. 
If the runtime includes additional native libraries, it's common that symbolic links are needed to accommodate version constraints (like libx.so.1 -> libx.so.1.2).
So we end up with multiple copies of the same library in the final application package.

Please consider adding NOFOLLOW_LINKS when copying a runtime.



FREQUENCY : always



Comments
Changeset: 1ca2cfaf Author: Alexander Matveev <almatvee@openjdk.org> Date: 2023-10-30 21:09:17 +0000 URL: https://git.openjdk.org/jdk/commit/1ca2cfafdd906851b923be69852ccf9a3bb4db35
30-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16426 Date: 2023-10-30 19:43:32 +0000
30-10-2023

RFE to add NOFOLLOW_LINKS when copying a runtime when using jpackage.
27-06-2023