Bug 1022135

Summary: libphidget: remove versioned jars from %{_javadir}
Product: [Fedora] Fedora Reporter: Stanislav Ochotnicky <sochotni>
Component: libphidgetAssignee: Rich Mattes <richmattes>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mizdebsk, msimacek, richmattes
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-01 18:40:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1079464    
Bug Blocks: 1022024    

Description Stanislav Ochotnicky 2013-10-22 15:48:52 UTC
Package libphidget seems to contain versioned jar files in %{_javadir}
(/usr/share/java). Such versioned files cause problems for automatic
requires generation and violate packaging guidelines[1].

List of subpackages and contained versioned jars
libphidget-java:
/usr/share/java/phidget21.jar


There are cases where this can be a false positive. Most likely if:
   * your package is compatibility version and contains only versioned
     jars
   * your package has version in the name of jars that are part of
     package name

Thank you,

[1] https://fedoraproject.org/wiki/Packaging:Java#Filenames

Comment 1 Rich Mattes 2014-04-02 01:59:10 UTC
The name of the jar file matches the name of of the C header and library provided by the package, so I think it's a false positive.  If you disagree, I don't really have a problem changing it.

I'm not a java expert, but it looks like the phidget jar file is implemented using jni, and the native components are embedded in libphidget21.so along with the C api.  Should I be putting phidget21.jar in %{_jnidir} instead of %{_datadir}/java?

Comment 2 Mikolaj Izdebski 2014-04-02 10:04:50 UTC
(In reply to Rich Mattes from comment #1)
> The name of the jar file matches the name of of the C header and library
> provided by the package, so I think it's a false positive.  If you disagree,
> I don't really have a problem changing it.

Most of Java upstreams provide JARs with versions, but in Fedora we still install them with the version stripped (except for few cases, which are explained in the guidelines).

> I'm not a java expert, but it looks like the phidget jar file is implemented
> using jni, and the native components are embedded in libphidget21.so along
> with the C api.  Should I be putting phidget21.jar in %{_jnidir} instead of
> %{_datadir}/java?

Yes, it should go to %{_jnidir}.

Comment 3 Rich Mattes 2014-06-01 18:40:04 UTC
Moved datadir/java/phidget21.jar to jnidir/phidget.jar