Bug 1258036 - java-1.8.0-openjdk-devel is missing "java-devel" capability
java-1.8.0-openjdk-devel is missing "java-devel" capability
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.8.0-openjdk (Show other bugs)
6.7
Unspecified Linux
unspecified Severity high
: rc
: ---
Assigned To: Deepak Bhole
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 13:50 EDT by Charles Butterfield
Modified: 2015-09-29 09:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-31 09:45:25 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)

  None (edit)
Description Charles Butterfield 2015-08-28 13:50:53 EDT
Description of problem: Although we install java-1.8.0-openjdk-devel, other software (e.g. ant) requires "java-devel" and thus pulls in OLD versions of Java. This is clearly wrong.  Even worse (and the subject of a separate BZ) is that the Java-1.8 priority is wrong (less than Java 1.6 and 1.7) and so the alternatives system drops us back down to using Java 1.6

Also shows up in CentOS 6.7

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


How reproducible: Always


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Charles Butterfield 2015-08-28 13:58:58 EDT
Note - that "other bug report" is https://bugzilla.redhat.com/show_bug.cgi?id=1258039
Comment 3 Deepak Bhole 2015-08-31 09:45:25 EDT
This is intentional. The provision is deliberately removed to keep OpenJDK8 from being pulled into buildroots (as packages built with 8 would not work on 6 or 7).

Closing as NOTABUG.
Comment 4 Charles Butterfield 2015-09-28 20:29:15 EDT
I'm not sure what a "buildroot" is so I'm not sure how to assess the comment about buildroots causing Java 8 to get "pulled into" a system (maybe this means after somebody installs Java 8 along with other Java versions?)

I do know what "ant" is, and sadly if requires "java-devel" (see below) which does "pull in" (i.e. install) lesser versions of Java when installing ant, EVEN if Java 8 is installed, which rather than being merely annoying, it totally bad since the Java 8 priority is LESS than Java 6 or Java 7 and so the erroneously pulled in Java becomes the default (see bug https://bugzilla.redhat.com/show_bug.cgi?id=1258039)

I assume far more systems use "ant" than use "buildroots" and so the conflicting goals should be resolved in favor of not breaking systems with "ant".

Here is what "ant" requires
$ rpm -q --requires ant-1.7.1-13.el6.x86_64
/bin/sh
/bin/sh
config(ant) = 0:1.7.1-13.el6
java-devel >= 0:1.5.0
jpackage-utils >= 0:1.7.5
jpackage-utils >= 0:1.7.5
jpackage-utils >= 0:1.7.5
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libdl.so.2()(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcj_bc.so.1()(64bit)
libm.so.6()(64bit)
libpthread.so.0()(64bit)
librt.so.1()(64bit)
libz.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)
xerces-j2
xml-commons-jaxp-1.3-apis
rpmlib(PayloadIsXz) <= 5.2-1
Comment 5 Deepak Bhole 2015-09-29 09:20:08 EDT
Sorry about that, I should've explained the terminology.

(In reply to Charles Butterfield from comment #4)
> I'm not sure what a "buildroot" is so I'm not sure how to assess the comment
> about buildroots causing Java 8 to get "pulled into" a system (maybe this
> means after somebody installs Java 8 along with other Java versions?)
> 

Every build for Fedora and RHEL is done in a clean environment (chroot) with an application named mock. Mock works by creating a new chroot for each build, and then installing some base packages and all dependency (BuildRequires) packages for the package being built.

Many Java dependent packages use 'java-devel' as a build requirement. If the OpenJDK8 RPM were to provide java-devel, mock would pull it in during builds (and possibly no other JDK since OpenJDK8 will be seen to satisfy all dependencies), and this would cause OpenJDK8 to do the build, making the resulting build incompatible with OpenJDK6 and 7.

> I do know what "ant" is, and sadly if requires "java-devel" (see below)
> which does "pull in" (i.e. install) lesser versions of Java when installing
> ant, EVEN if Java 8 is installed, which rather than being merely annoying,
> it totally bad since the Java 8 priority is LESS than Java 6 or Java 7 and
> so the erroneously pulled in Java becomes the default (see bug
> https://bugzilla.redhat.com/show_bug.cgi?id=1258039)
> 
> I assume far more systems use "ant" than use "buildroots" and so the
> conflicting goals should be resolved in favor of not breaking systems with
> "ant".
> 

Every package is built in a buildroot, so the problem would extend to every build unfortunately.

We are trying to work out a better long term solution by using a meta requires and changing how JDK is packaged, but it is a significant amount of work and it will be a while before it can be introduced to RHEL.

> Here is what "ant" requires
> $ rpm -q --requires ant-1.7.1-13.el6.x86_64
> /bin/sh
> /bin/sh
> config(ant) = 0:1.7.1-13.el6
> java-devel >= 0:1.5.0
> jpackage-utils >= 0:1.7.5
> jpackage-utils >= 0:1.7.5
> jpackage-utils >= 0:1.7.5
> libc.so.6()(64bit)
> libc.so.6(GLIBC_2.2.5)(64bit)
> libdl.so.2()(64bit)
> libgcc_s.so.1()(64bit)
> libgcc_s.so.1(GCC_3.0)(64bit)
> libgcj_bc.so.1()(64bit)
> libm.so.6()(64bit)
> libpthread.so.0()(64bit)
> librt.so.1()(64bit)
> libz.so.1()(64bit)
> rpmlib(CompressedFileNames) <= 3.0.4-1
> rpmlib(FileDigests) <= 4.6.0-1
> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> rpmlib(VersionedDependencies) <= 3.0.3-1
> rtld(GNU_HASH)
> xerces-j2
> xml-commons-jaxp-1.3-apis
> rpmlib(PayloadIsXz) <= 5.2-1

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