JDK-8231283 : Add support to jpackage to create install Linux packages in /usr hierarchy
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: 14,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2019-09-20
  • Updated: 2024-10-17
  • Resolved: 2020-06-10
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 15 JDK 16
15 b27Fixed 16Fixed
Related Reports
Relates :  
Relates :  
Description
When installing in /usr hierarchy we have to split app image as follows:
- app launchers should be installed in /usr/bin directory.
- launcher library and other files should go in /usr/lib/$APPNAME/ directory.
- documentation and copyright file should go into /usr/share/doc/$APPNAME directory.

When installing in /usr/local hierarchy we have to split app image as follows:
- app launchers should be installed in /usr/local/bin directory.
- launcher library and other files should go in /usr/local/lib/$APPNAME/ directory.
- documentation and copyright file should go into /usr/share/doc/$APPNAME directory.

When installing at any other prefix with the root at `/usr` no app image splicing should happen. The app should be installed as usual.

Package layout is defined to comply with Linux Filesystem Hierarchy Standard (https://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html)
Comments
Changeset: 268d8701 Author: Alexey Semenyuk <asemenyuk@openjdk.org> Date: 2020-06-10 11:12:33 +0000 URL: https://git.openjdk.java.net/lanai/commit/268d8701
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/6109276549d7 User: asemenyuk Date: 2020-06-10 15:13:18 +0000
10-06-2020

App launcher logic to locate corresponding .cfg file can be adjusted to query for the name of the package that provides the launcher executable. Knowing the name of the package it is possible to get the list of all files the package provides. Path to .cfg file will be in that list. On rpm systems: --- # Get package name from launcher path rpm --queryformat '%{NAME}' -qf <path_to_launcher> # Get the list of files in the package rpm -ql <package_name> --- On deb systems: --- # Get package name from launcher path dpkg -S <path_to_launcher> # Get the list of files in the package dpkg -L <package_name> ---
08-06-2020

References to ROOTDIR property should be eliminated from .cfg file as semantics of this variable is undefined in the sliced app image. app.runtime property referencing ROOTDIR property can be safely removed from .cfg file as app launcher can derive path to runtime from its own location.
08-06-2020

Review: http://cr.openjdk.java.net/~asemenyuk/8231283/webrev.00
06-06-2020

Splitting app image is not an issue. The major obstacle is that app launchers assume particular location of Java runtime relative to the launcher. If they would be moved outside of app image these assumptions will not work and they will fail to launch jvm.
20-09-2019