JDK-8233449 : Various problems with DEB or RPM packages build by jpackage
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: 14,15
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux_ubuntu
  • CPU: x86_64
  • Submitted: 2019-10-30
  • Updated: 2020-10-15
  • Resolved: 2020-10-15
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
15Resolved
Related Reports
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Ubuntu 18 LTS
Fedora 30
OpenJDK 11 for build
OpenJDK 14 for jpackage

A DESCRIPTION OF THE PROBLEM :
I've been experimenting with using jpackage on my small open source JavaFX app called PDF Decorator.

I've build a DEB package on Ubuntu 18 LTS and a RPM on Fedora 30. Both suffer from two problems:
a) a short cut to run my application is no where to be found in Gnome Shell
b) uninstalling those packages results in an error

Furthermore on Fedora opening the RPM by double clicking it results in an error shown in the software center app.

You can find out how I've build my packages in this upcoming article on my blog: 

https://walczak.it/blog/distributing-javafx-desktop-applications-without-requiring-jvm-using-jlink-and-jpackage

you'll also find screen shots and detailed error messages there.

The full source code of my JavaFX app is available at: https://bitbucket.org/walczak_it/pdf-decorator/src/master/

If you need any help in testing with jpackage on linux please let me know: adam@walczak.it

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see:
https://walczak.it/blog/distributing-javafx-desktop-applications-without-requiring-jvm-using-jlink-and-jpackage


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
installed app accessible from Gnome Shell
ACTUAL -
no short cut + errors with uninstalling

---------- BEGIN SOURCE ----------
https://bitbucket.org/walczak_it/pdf-decorator/src/master/
---------- END SOURCE ----------

FREQUENCY : always



Comments
Issue was fixed in JDK15
15-10-2020

Seems like the problem is caused by whitespace in app's name. In the log at https://gist.github.com/walec51/56d17f005e7e8492ee46a168c62219d8: --- jpackage ... --name PDF\ Decorator --- There is also a problem with running rpmbuild on file names with whitespaces: --- /usr/bin/strip: '/tmp/jdk.jpackage8352187892531371328/BUILDROOT/pdf-decorator-0.3-1.x86_64/opt/pdf-decorator/bin/PDF': No such file /usr/bin/strip: 'Decorator': No such file --- Issues with whitespaces in package name and shortcuts were fixed in JDK-8241713. Issues with running rpmbuild on file names with whitespaces were fixed in JDK-8231283.
15-10-2020

Additional note from submitter: ========================= here's the command that gets executed by my gradle plugin with the added --verbose option and its output: https://gist.github.com/walec51/56d17f005e7e8492ee46a168c62219d8
09-01-2020

Additional Information from submitter: Unfortunately I see no improvement on 14-jpackage+1-67 (2019/11/4) and Fedora 31 $ sudo rpm -i pdf-decorator-0.3-1.x86_64.rpm xdg-desktop-menu: file '/opt/pdf-decorator/lib/pdf-decorator-PDF' does not exist warning: %post(pdf-decorator-0.3-1.x86_64) scriptlet failed, exit status 2 $ sudo rpm -e pdf-decorator-0.3-1.x86_64 xdg-desktop-menu: file to uninstall must be a *.directory or *.desktop file Try 'xdg-desktop-menu --help' for more information. error: %preun(pdf-decorator-0.3-1.x86_64) scriptlet failed, exit status 1 error: pdf-decorator-0.3-1.x86_64: erase failed $ sudo rpm -e --nopreun pdf-decorator-0.3-1.x86_64
07-11-2019