Bug 1216018

Summary: The java-1.8.0-openjdk-devel pacakge does not provide java-devel
Product: Red Hat Enterprise Linux 7 Reporter: Marek Goldmann <mgoldman>
Component: java-1.8.0-openjdkAssignee: jiri vanek <jvanek>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: dbhole, fspolti, isenfeld, jvanek, redhatbugs, tschloss
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 22:54:51 UTC Type: Bug
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: 1311175    
Bug Blocks: 1297579, 1313485    

Description Marek Goldmann 2015-04-28 11:37:03 UTC
Description of problem:

If I have installed java-1.8.0-openjdk-devel package on my system and I want to install Maven from optional repos, the maven package does pull JDK7 devel package into the transaction, but I already have a JDK devel package which should be used.

http://fpaste.org/216167/22079614/

The system ends up with two installed JDKs which should not be the case. Additionally the alternatives for java and javac are switched to the JDK 7 which is not expected.

rpm -q --provides java-1.8.0-openjdk-devel
java-1.8.0-openjdk-devel = 1:1.8.0.45-30.b13.el7_1
java-1.8.0-openjdk-devel(x86-64) = 1:1.8.0.45-30.b13.el7_1
lib.so(SUNWprivate_1.1)(64bit)
libjawt.so()(64bit)
libjawt.so(SUNWprivate_1.1)(64bit)
libjli.so()(64bit)
libjli.so(SUNWprivate_1.1)(64bit)
libunpack.so(SUNWprivate_1.1)(64bit)

Version-Release number of selected component (if applicable):

java-1.8.0-openjdk-devel-1.8.0.45-30.b13.el7_1.x86_64

How reproducible:

Always

Steps to Reproduce:
1. yum install java-1.8.0-openjdk-devel
2. Enable optional repo
3. Install maven

Actual results:

JDK 7 is being installed.

Expected results:

JDK 8 from the operating system used.

Comment 3 jiri vanek 2015-04-30 12:02:07 UTC
Once we provide devel, brew will be randomly pulling it.  Classes built by jdk8 can not run in jdk7. So this is definitely no go in 7.1 And I would say hard to go in 7.2 Later? Maybe.

Now - you can heappily run maven with jdk8 selected via alternatives, but you must suffer jdk7 on your machine.

Comment 4 Marek Goldmann 2015-05-04 07:16:55 UTC
Hiya Jiri,

I use the alternatives workaround currently. The problem is that, like you said - it pulls JDK7 even if we don't plan to use it. This makes the the Docker image unnecessarily big. IMHO this is a problem and should be addressed one way or another. Maybe there are other ways to solve it without providing java-devel?

Comment 5 jiri vanek 2016-01-13 13:25:33 UTC
This is probably impossible to fix somehow simply just in packages.


We are now solving this issue for rhel 6.8 - we need to provide java-devel for openjdk7 and we still have to kept brewroot on openjdk6.

Relengs offered solution, in which fake brew root will be created, whch will not contain openjdk7 nor openjdk8.

If similar can be done for rhel 7 then it is victory.

condnack

Comment 6 Deepak Bhole 2016-01-14 14:48:22 UTC
(In reply to jiri vanek from comment #5)
> 
> Relengs offered solution, in which fake brew root will be created, whch will
> not contain openjdk7 nor openjdk8.
> 
> If similar can be done for rhel 7 then it is victory.
> 
> condnack

rel-eng has not offered this solution. We have. We are still waiting for rel-eng to respond:
https://engineering.redhat.com/rt/Ticket/Display.html?id=383635

Comment 7 Deepak Bhole 2016-01-29 22:33:13 UTC
rel-eng has created new buildroots which now allow us to make this change. QE will be adding additional tests to ensure that Java packages are not built by OpenJDK7 accidentally.

Setting devel_ack with the assumption that the above mentioned QE tests will be in place.

Comment 9 jiri vanek 2016-06-06 15:18:05 UTC
Depends on https://bugzilla.redhat.com/show_bug.cgi?id=1311175 (RPMDIFF bytecode check)
and https://projects.engineering.redhat.com/browse/RCM-3653 (special buildroot in brew)

Comment 10 jiri vanek 2016-06-23 14:03:03 UTC
The build root have been created. Lets wait for rpm diff

Comment 11 jiri vanek 2016-06-29 12:44:51 UTC
issue was found with buildroots. Now waiting for

https://projects.engineering.redhat.com/browse/RCM-4521
and
https://projects.engineering.redhat.com/browse/RCM-4520
and
rpmdiff of course

Comment 12 jiri vanek 2016-07-13 14:49:14 UTC
The buildroot seems to be working fine.
The rpmdiff too, but will be deployed to production in three weeks.

Comment 13 jiri vanek 2016-07-28 12:37:09 UTC
Rpmdiff with bytecode check was released

Comment 20 errata-xmlrpc 2016-11-03 22:54:51 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/RHEA-2016-2139.html