rpm install needlessly requires java-headless

Description

The rpm installer specifies that java-headless is a required dependency. 

Requires: java-headless >= 1:1.7.0

However, there's no such thing if you're using Oracle JRE, which means you've got to needlessly install java-headless and then re-configure your default java back to Oracle JRE.

Is there a way to specify java-headless or jre >= 1.7.0 in the RPM?

Environment

None

Activity

Show:
Kris Lou
December 21, 2017, 10:52 PM

Indeed, CentOS 6.x has RPM 4.8.0, CentOS 7.x has RPM 4.11.x.

Thanks for the clarification, though.

Greg Thomas
December 21, 2017, 10:24 PM

The "headless" JRE simply excludes the GUI aspects of the JRE - I would guess that's Swing, JavaFX, and possibly more.

As Openfire doesn't use a Java GUI it can use a headless or full JRE, but a headless requirement forces the user to OpenJDK who are the only "headless" providers AFAIK.

There should be no problem installing the 'full' JRE on a headless server, so I don't think that this is really a problem - someone using Openfire is unlikely to be so restricted on resources to be forced to use a headless JRE.

I do however note that RPM 4.13 has the option for boolean dependencies (http://rpm.org/user_doc/boolean_dependencies.html), so a switch to

Requires: (java >= 1:1.7.0 or java-headless >= 1:1.7.0)

could be made - but rpm 4.13 is quite recent so it may be a while before that happens.

 

 

Kris Lou
December 21, 2017, 6:03 PM

This is minor, and after the fact. 

But I ran my Openfire server headless, and used the java-*-openjdk-headless package, which is no longer valid for the RPM. 

It might be more of an openjdk packaging issue, and I don't know if running the headless version affects potential audio/video functionality within Openfire. 

But thought I'd mention it.  As you can see, the headless package is not listed under 'java >=1:1.7.0'

 

CentOS 6.9

#yum whatprovides 'java >= 1:1.7.0'
1:java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_8.x86_64 : OpenJDK Runtime Environment
Repo        : base
Matched from:
Other       : java >= 1:1.7.0
1:java-1.7.0-openjdk-1.7.0.151-2.6.11.0.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

1:java-1.8.0-openjdk-1.8.0.121-1.b13.el6.x86_64 : OpenJDK Runtime Environment
Repo        : base
Matched from:
Other       : java >= 1:1.7.0

1:java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

1:java-1.7.0-openjdk-1.7.0.141-2.6.10.1.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

1:java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

1:java-1.8.0-openjdk-1.8.0.144-0.b01.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0
1:java-1.8.0-openjdk-1.8.0.141-3.b16.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

1:java-1.8.0-openjdk-1.8.0.141-2.b16.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64 : OpenJDK Runtime Environment
Repo        : updates
Matched from:
Other       : java >= 1:1.7.0

Daryl Herzmann
November 30, 2017, 1:52 PM

Thanks guys, I have updated the PR

Greg Thomas
November 30, 2017, 10:33 AM

It seems so, yes

# yum whatprovides 'java >= 1:1.7.0'
jre1.8-1.8.0_151-fcs.x86_64 : Java Platform Standard Edition Runtime Environment
Repo : installed
Matched from:
Other : java >= 1:1.7.0

 

Fixed

Assignee

Daryl Herzmann

Reporter

Greg Thomas