RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1319086 - libguestfs-java: mismatch class version vs java dependency
Summary: libguestfs-java: mismatch class version vs java dependency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Jiri Herrmann
URL:
Whiteboard:
Depends On:
Blocks: 1364808
TreeView+ depends on / blocked
 
Reported: 2016-03-18 15:49 UTC by Lukáš Zachar
Modified: 2017-03-21 08:55 UTC (History)
3 users (show)

Fixed In Version: libguestfs-1.20.11-19.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1364518 (view as bug list)
Environment:
Last Closed: 2017-03-21 08:55:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0564 0 normal SHIPPED_LIVE Moderate: libguestfs security and bug fix update 2017-03-21 12:21:18 UTC

Description Lukáš Zachar 2016-03-18 15:49:10 UTC
Description of problem:

Jar archive /usr/share/java/libguestfs-1.20.11.jar contains classes, which are version '51' (java 7). 
However package has set runtime requires as 'java >= 1.5.0'
If for whatever reason java 1.6.0 or less was installed, no class from the jar could be run because it is not compatible.

Version-Release number of selected component (if applicable):
libguestfs-java-1.20.11-14.el6

How reproducible:
always

Steps to Reproduce:
1. jar xf /usr/share/java/libguestfs-1.20.11.jar
2. find . -name '*class' -exec file {} \;
3. rpm -qR libguestfs-java

Actual results:
compiled Java class data, version 51.0 (Java 1.7)
java >= 1.5.0

Expected results:
java requirement always satisfies compiled java class version


Additional info:
BuildRequires list java-1.7.0-openjdk-devel, so it seems that only requires are too old.

Comment 2 Richard W.M. Jones 2016-08-25 13:21:30 UTC
I was looking at this bug in general.

Ideally, since we don't use any new Java features at all, we
would want to compile everything with something like:

  -source 1.5 -target 1.5

to make our class files work even on old versions of Java.

However it seems like this is not really possible without having the
older Java runtime installed during compilation and/or knowing
a magic classpath (http://stackoverflow.com/a/11364910).

So the alternate fix is simply to fix the runtime Requires to reflect
the same version of Java that we were built against.  Unfortunately I
don't see any RPM macro which would let us write a general rule, so
we'll have to hard-code it.

Comment 4 Bin Han 2016-10-26 08:59:53 UTC
Package version:
libguestfs-java-1.20.11-19.el6.x86_64

Verify steps:
1. jar xf /usr/share/java/libguestfs-1.20.11.jar
2. find . -name '*class' -exec file {} \;
3. rpm -qR libguestfs-java

Result:
[root@dhcp-13-199 ~]# rpm -qR libguestfs-java
libguestfs = 1:1.20.11-19.el6
java >= 1.7.0

So verified.

Comment 6 errata-xmlrpc 2017-03-21 08:55:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0564.html


Note You need to log in before you can comment on or make changes to this bug.