Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915822 - sci-geosciences/gpsprune-bin-23.1 should depend on jre-11 and other issues
Summary: sci-geosciences/gpsprune-bin-23.1 should depend on jre-11 and other issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rick Farina (Zero_Chaos)
URL: https://activityworkshop.net/software...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-15 15:47 UTC by Jonas Stein
Modified: 2023-10-17 18:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Stein gentoo-dev 2023-10-15 15:47:51 UTC
There are two .jar files for gpsprune. One for Java 8 and one for Java 11+

The ebuild currently only downloads the Java 11+ .jar but uses 

DEPEND="virtual/jre:*"
RDEPEND="${DEPEND}"

Hence gpsprune fails to start on systems with <Java 11:

$ gpsprune 
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: tim/prune/GpsPrune has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)



Reproducible: Always
Comment 1 Florian Schmaus gentoo-dev 2023-10-16 19:34:26 UTC
The ebuild has some more issues:

- empty IUSE should be deleted
- DEPEND=virtual/jre is probably unnecessary

but most notably and severe:
it creates it's own launcher that directly invokes 'java'. However 'java' may not be the right java VM. You probably want to use java-pkg-simple_src_install() from java-pkg-simple.eclass instead. This would get rid of the global variable gpsprune_bin, which would be an additional improvement.

The final global variable gpsprune_desktop can be removed by either factoring the desktop file out into FILESDIR. Or maybe domenu accepts '-' as argument?
Comment 2 Larry the Git Cow gentoo-dev 2023-10-17 18:11:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3697ca2471e01d5208b0a517b05b9d881c4f2ace

commit 3697ca2471e01d5208b0a517b05b9d881c4f2ace
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2023-10-17 18:10:18 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2023-10-17 18:11:44 +0000

    sci-geosciences/gpsprune-bin: add 23.2, drop 23.1, various fixes
    
    - properly install the jar file
    - drop empty IUSE
    - fix DEPEND/RDEPEND
    - use https
    
    Closes: https://bugs.gentoo.org/915822
    Closes: https://bugs.gentoo.org/915823
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 sci-geosciences/gpsprune-bin/Manifest              |  2 +-
 .../gpsprune-bin/gpsprune-bin-23.1.ebuild          | 65 ----------------------
 .../gpsprune-bin/gpsprune-bin-23.2.ebuild          | 51 +++++++++++++++++
 3 files changed, 52 insertions(+), 66 deletions(-)