Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1169509 - file: report full java version for 1.7 and 1.8 class files
file: report full java version for 1.7 and 1.8 class files
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: file (Show other bugs)
6.6
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Jan Kaluža
Marek Marusic
:
Depends On:
Blocks: 1172231 1254457 1269913 1309878
  Show dependency treegraph
 
Reported: 2014-12-01 16:26 EST by Nathan Galvin
Modified: 2016-05-10 15:47 EDT (History)
4 users (show)

See Also:
Fixed In Version: file-5.04-22.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1278737 1309878 (view as bug list)
Environment:
Last Closed: 2016-05-10 15:47:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0760 normal SHIPPED_LIVE Moderate: file security, bug fix, and enhancement update 2016-05-10 18:32:51 EDT

  None (edit)
Description Nathan Galvin 2014-12-01 16:26:09 EST
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 16:28:12 EST
(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 14:23:50 EST
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 02:26:12 EST
Proposed upstream: http://bugs.gw.com/view.php?id=422
Comment 13 errata-xmlrpc 2016-05-10 15:47:16 EDT
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.