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 1169509 - file: report full java version for 1.7 and 1.8 class files
Summary: file: report full java version for 1.7 and 1.8 class files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: file
Version: 6.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: Marek Marusic
URL:
Whiteboard:
Depends On:
Blocks: 1172231 1254457 1269913 1309878
TreeView+ depends on / blocked
 
Reported: 2014-12-01 21:26 UTC by Nathan Galvin
Modified: 2019-12-16 04:35 UTC (History)
4 users (show)

Fixed In Version: file-5.04-22.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1278737 1309878 (view as bug list)
Environment:
Last Closed: 2016-05-10 19:47:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0760 0 normal SHIPPED_LIVE Moderate: file security, bug fix, and enhancement update 2016-05-10 22:32:51 UTC

Description Nathan Galvin 2014-12-01 21:26:09 UTC
Description of problem:
If you compile using Java SE 6, file will display:
    compiled Java class data, version 48.0 (Java 1.4)
Note the "(Java 1.4)" at the end.

If you compile with Java SE 7, file will display:
    compiled Java class data, version 51.0
Note the missing ("Java 1.7)" at the end.

Version-Release number of selected component (if applicable):
java-1.7.0-ibm-1.7.0.7.1-1jpp.1.el6_5.x86_64

How reproducible:
Very

Steps to Reproduce:
1. install java
2. complile java
3. run 'file' command against class files

Actual results:
No java version reported

Expected results:
Java verion to be reported as part of the output.

Additional info:

Comment 1 Nathan Galvin 2014-12-01 21:28:12 UTC
(In reply to Nathan Galvin from comment #0)
> Description of problem:
> If you compile using Java SE 6, file will display:
>     compiled Java class data, version 48.0 (Java 1.4)
> Note the "(Java 1.4)" at the end.
> 
> If you compile with Java SE 7, file will display:
>     compiled Java class data, version 51.0
> Note the missing ("Java 1.7)" at the end.
> 
> Version-Release number of selected component (if applicable):
> java-1.7.0-ibm-1.7.0.7.1-1jpp.1.el6_5.x86_64
> 
> How reproducible:
> Very
> 
> Steps to Reproduce:
> 1. install java
> 2. complile java
> 3. run 'file' command against class files

Should read

Steps to Reproduce:
1. install java
2. complile using java
3. run 'file' command against class files

> 
> Actual results:
> No java version reported
> 
> Expected results:
> Java verion to be reported as part of the output.
> 
> Additional info:

Comment 3 Tomas Hoger 2014-12-02 19:23:50 UTC
This isn't java bug, but file bug.  The solution is exactly what is described in the initial description of the attached support case.  cafebabe magic file needs the following two rules:

>>4 belong      0x0033      (Java 1.7)
>>4 belong      0x0034      (Java 1.8)

Their addition changes output form:

$ file java{6,7,8}.class
java6.class: compiled Java class data, version 50.0 (Java 1.6)
java7.class: compiled Java class data, version 51.0
java8.class: compiled Java class data, version 52.0

to:

$ file java{6,7,8}.class -m magic 
java6.class: compiled Java class data, version 50.0 (Java 1.6)
java7.class: compiled Java class data, version 51.0 (Java 1.7)
java8.class: compiled Java class data, version 52.0 (Java 1.8)

The issue does not seem to be fixed upstream:

https://github.com/file/file/blob/master/magic/Magdir/cafebabe

I'm sure Jan can get this upstream rather easily.

Comment 4 Jan Kaluža 2015-02-05 07:26:12 UTC
Proposed upstream: http://bugs.gw.com/view.php?id=422

Comment 13 errata-xmlrpc 2016-05-10 19:47:16 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-2016-0760.html


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