Opened 4 years ago
Last modified 4 years ago
#22088 closed defect
[RFC PATCH] Debian start script does not properly check if a path does not exist or is not executable — at Version 1
| Reported by: | taylor.smock | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 22.06 |
| Component: | Core | Version: | |
| Keywords: | linux | Cc: |
Description (last modified by )
I've been working on getting downstreams to use our start script (with some minor patches) to hopefully avoid future issues where we get bug reports that we've fixed in the start script.
Steps to reproduce (on Debian/Ubuntu):
- If
/usr/lib/jvm/default-java/bin/javaexists, move it (example:mv /usr/lib/jvm/default-java/bin/java /usr/lib/jvm/default-java/bin/java.bak) - Attempt to run the start script
- If you moved
/usr/lib/jvm/default-java/bin/javain step 1, move it back (example:mv /usr/lib/jvm/default-java/bin/java.bak /usr/lib/jvm/default-java/bin/java)
You may also be able to reproduce by unsetting JAVA_HOME or setting it to an empty string (e.g., JOSM_HOME="" ./josm)
From https://github.com/flathub/org.openstreetmap.josm/issues/55,
➜ ~ flatpak install flathub org.openstreetmap.josm
Looking for matches…
org.openstreetmap.josm permissions:
ipc network x11 file access [1]
[1] xdg-download
ID Branch Op Remote Download
1. [✓] org.openstreetmap.josm stable i flathub 78.5 MB / 76.9 MB
Installation complete.
➜ ~ flatpak run org.openstreetmap.josm
which: no dpkg in (/usr/bin:/app/bin:/app/jre/bin)
Using /usr/lib/jvm/default-java/bin/java to execute josm.
/app/bin/josm: line 91: /usr/lib/jvm/default-java/bin/java: No such file or directory
This is due to source:trunk/native/linux/tested/usr/bin/josm@18297:33,41-57#L33
Change History (3)
by , 4 years ago
| Attachment: | 22088.patch added |
|---|
comment:1 by , 4 years ago
| Description: | modified (diff) |
|---|---|
| Milestone: | → 22.06 |
| Summary: | Debian start script does not properly check if a path does not exist or is not executable → [RFC PATCH] Debian start script does not properly check if a path does not exist or is not executable |
by , 4 years ago
| Attachment: | 22088.2.patch added |
|---|
Use java -version to determine JAVA_OPTS. This fixes an issue where the JAVACMD path did not include java-\d+, and should work with minimal modification for Java 20+ (presuming we do not have to add additional default JAVA_OPTS in the future). java -version is used since it works with Java 8.



attachment:22088.patch does the following:
dpkgand/etc/alternatives/javaspecifically)This will hopefully allow us to encourage downstream distributors to use the start script, with minor modifications (hopefully just L71).