Bug #2941
closedThe dependencies on Java are not correct on CentOS6.3
Description
On my test VM Centos 6.3 64bits, I'm trying to install rudder-server-root.
I already have install openJDK 1.7 :
# yum install java-1.7.0-openjdk Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile * base: distrib-coffee.ipsl.jussieu.fr * extras: centos.vieth-server.de * updates: distrib-coffee.ipsl.jussieu.fr Setting up Install Process Package 1:java-1.7.0-openjdk-1.7.0.5-2.2.1.el6_3.3.x86_64 already installed and latest version Nothing to do
When I try to install rudder-server-root, it tries to install java-1.6.0-openjdk, which doesn't work with rudder
Updated by Nicolas PERRON about 12 years ago
The dependencies of the package rudder-jetty include jre >= 1.6. Then I thought it could be the version which was wrong but it is not.
Here what happens with jre >= 1.7:
[...] Error: Package: 1352388614:rudder-jetty-2.4.0.beta6.git-1.noarch (RepoTest) Requires: jre >= 1.7 Available: java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 (base) jre = 1.5.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64 (base) jre = 1.6.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64 (updates) jre = 1.6.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.49.1.11.4.el6_3.x86_64 (updates) jre = 1.6.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64 (updates) jre = 1.6.0 You could try using --skip-broken to work around the problem
Updated by Nicolas PERRON about 12 years ago
- Status changed from New to In progress
Updated by Nicolas PERRON about 12 years ago
After grabbing informations from fedora documentation (http://fedoraproject.org/wiki/Packaging:Java#Package_naming) I thought It could be due to the name and the version. But the problem is still present:
Error: Package: 1352393438:rudder-jetty-2.4.0.beta6.git-1.noarch (RepoTest) Requires: java >= 1:1.7 Available: java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 (base) java = 1.5.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64 (base) java = 1:1.6.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64 (updates) java = 1:1.6.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.49.1.11.4.el6_3.x86_64 (updates) java = 1:1.6.0 Available: 1:java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64 (updates) java = 1:1.6.0
I don't know how to deal with this. Should we really let this dependency about java (jre >=1.6) knowing that it involve to have the Sun package ? or should we specify to use openjdk 7, knowing that not all the platform have prebuilt packages ? or should we remove that dependency in order to let the user to install what he want with appropriate documentation ?
And i'm sure that this is the same on other systems using RPM, like SLES.
Jon, any idea ?
Updated by Nicolas PERRON about 12 years ago
- Status changed from In progress to Discussion
- Assignee changed from Nicolas PERRON to Jonathan CLARKE
Updated by Nicolas PERRON about 12 years ago
François told me about java repository for Redhat. I found it, this is jpackage (http://www.jpackage.org) but I'm afraid that this repository only provides software linked to java, not Java JRE or JDK.
It could have been a good tip if it provided a meta-package for java JRE.
Updated by Nicolas PERRON about 12 years ago
Nicolas PERRON wrote:
I really see no other option than that:After grabbing informations from fedora documentation (http://fedoraproject.org/wiki/Packaging:Java#Package_naming) I thought It could be due to the name and the version. But the problem is still present:
[...]
I don't know how to deal with this. Should we really let this dependency about java (jre >=1.6) knowing that it involve to have the Sun package ? or should we specify to use openjdk 7, knowing that not all the platform have prebuilt packages ? or should we remove that dependency in order to let the user to install what he want with appropriate documentation ?
- Let dependency with jre >= 1.6 which oblige to install Oracle java 6 JDK or later (since Rudder can't work with Rudder) to satisfy dependencies.
- Use a dependency about openJDK 7, which oblige to install openJDK7 to satisfy dependencies even if the user wants to use Oracle java 6 JDK. The problem is that few supported OS have an openJDK 7 prebuilt package.
- Do not specify dependency about Java but Rudder will be installed even if no JRE is present on the system.
And i'm sure that this is the same on other systems using RPM, like SLES.
SLES is our only other supported OS using RPM and we can't install openjdk7 on it (SLES 11 SP1). So the problem is not met here.
Jon, any idea ?
Updated by Nicolas PERRON about 12 years ago
it seems that the problem comes from the fact that openJDK 7 is not providing jre or java:
$ yum whatprovides java [...] 1:java-1.6.0-openjdk-1.6.0.0-1.48.1.11.3.el6_2.x86_64 : OpenJDK Runtime Environment Repo : updates Matched from: Other : java java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 : JPackage runtime compatibility layer for GCJ Repo : base Matched from: Other : java 1:java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64 : OpenJDK Runtime Environment Repo : updates Matched from: Other : java 1:java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64 : OpenJDK Runtime Environment Repo : base Matched from: Other : java 1:java-1.6.0-openjdk-1.6.0.0-1.49.1.11.4.el6_3.x86_64 : OpenJDK Runtime Environment Repo : updates Matched from: Other : java
http://stackoverflow.com/questions/6370014/specifying-alternatives-in-rpm-dependencies :
A problem has been met here when RHEL didn't seem to provide jre or jdk. His solution was to made a virtual package.
Maybe we should make a virtual package specific to openjdk7 to provides jre ?
I was thinking of using Requires(hint) (http://www.spinics.net/lists/rpm/msg03520.html) but it would not resolve the problem of dependencies as Requires will be kept mandatory.
I have no other clue
Updated by Jonathan CLARKE about 12 years ago
I have looked into this, and discovered that there are several "recommended" methods for installing JRE on RHEL/CentOS.
One is described here: http://wiki.centos.org/HowTos/JavaRuntimeEnvironment. They instruct to install the RPM version from java.com (http://www.java.com/en/download/linux_manual.jsp). I downloaded this file for Java 6 and 7 and inspected it, it does indeed provide "jre":
# wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=69466 # rpm -q --provides -p jre-7u9-linux-x64.rpm jaxp_parser_impl xml-commons-apis jre = 1.7.0_09-fcs # wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=69506 # sh ./jre-6u37-linux-x64-rpm.bin # rpm -q --provides jre jaxp_parser_impl xml-commons-apis jre = 1.6.0_37-fcs
However, this other page, on the java.com website itself recommends not to use their package but rely on RHEL/CentOS's own pacakge (talk about not eating your own dogfood...) : http://openjdk.java.net/install/. I checked this, for Java 7, and it doesn't provide "jre" but it does provide "jre7" :
rpm -q --provides java-1.7.0-openjdk | grep jre|java jre7 = 1.7.0 jre7-1.7.0 = 1:1.7.0.9-2.3.3.el6_3.1 jre7-1.7.0-openjdk = 1:1.7.0.9-2.3.3.el6_3.1 jre7-openjdk = 1:1.7.0.9-2.3.3.el6_3.1 java7 = 1:1.7.0 java7-1.7.0 = 1:1.7.0.9-2.3.3.el6_3.1 java7-fonts = 1:1.7.0.9 java7-openjdk = 1:1.7.0.9-2.3.3.el6_3.1 java7-sasl = 1:1.7.0.9
However, the same package from RHEL/CentOS for OpenJDK 6, does provide "jre" :
rpm -q --provides java-1.6.0-openjdk | grep jre|java java = 1:1.6.0 java-1.6.0 = 1:1.6.0.0-1.50.1.11.5.el6_3 java-fonts = 1:1.6.0.0 java-openjdk = 1:1.6.0.0-1.50.1.11.5.el6_3 java-sasl = 1:1.6.0.0 jre = 1.6.0 jre-1.6.0 = 1:1.6.0.0-1.50.1.11.5.el6_3 jre-1.6.0-openjdk = 1:1.6.0.0-1.50.1.11.5.el6_3 jre-openjdk = 1:1.6.0.0-1.50.1.11.5.el6_3
So, to summarize the virtual packages and versions provided by various JRE packages and versions are:
Package origin | Package name | Java version | Provides "java" | Provides "java7" | Provides "jre" | Provides "jre6" | Provides "jre7" | Other provides |
RHEL/CentOS | java-1.6.0-openjdk | OpenJDK 6 | 1.6.0 | No | No | No | jre-1.6.0, jre-1.6.0-openjdk, jre-openjdk | |
RHEL/CentOS | java-1.7.0-openjdk | Java 7 | No | 1:1.7.0 | No | No | 1.7.0 | jre7-1.7.0, jre7-1.7.0-openjdk, java7-1.7.0, java7-openjdk |
java.com / Oracle | jre | Java 7 | No | No | 1.7.0_09-fcs | No | No | |
java.com / Oracle | jre | "Sun" Java 6 | No | No | 1.6.0_37-fcs | No | No |
And what we need for Rudder is any Java 7, or "Sun" Java 6. Since RPM spec files don't support "or" logic in dependencies, it doesn't seem possible to specify this. Ideally, we would want to specify something like "jre7 or jre >= 1.6 but not jre-openjdk-1.6.0"
Given that Java 7 is readily available in RHEL/CentOS 6 (Rudder server is not supported on RHEL/CentOS < 6) and is designed not to conflict with Java 6 (of any origin), I firstly suggest that we simplify the problem by depending on Java 7 only, and ignoring 6.
Secondly, given that the point of providing packages is to make installing Rudder a simple, out of the box experience, I think we should build our packages to rely only on base system packages, which provide jre7. So, how about we change our dependency to "jre7", and check this works, and be done with it?
Updated by Nicolas PERRON about 12 years ago
Jonathan CLARKE wrote:
[...]
So, to summarize the virtual packages and versions provided by various JRE packages and versions are:
Package origin Package name Java version Provides "java" Provides "java7" Provides "jre" Provides "jre6" Provides "jre7" Other provides RHEL/CentOS java-1.6.0-openjdk OpenJDK 6 1.6.0 No No No jre-1.6.0, jre-1.6.0-openjdk, jre-openjdk RHEL/CentOS java-1.7.0-openjdk Java 7 No 1:1.7.0 No No 1.7.0 jre7-1.7.0, jre7-1.7.0-openjdk, java7-1.7.0, java7-openjdk java.com / Oracle jre Java 7 No No 1.7.0_09-fcs No No java.com / Oracle jre "Sun" Java 6 No No 1.6.0_37-fcs No No And what we need for Rudder is any Java 7, or "Sun" Java 6. Since RPM spec files don't support "or" logic in dependencies, it doesn't seem possible to specify this. Ideally, we would want to specify something like "jre7 or jre >= 1.6 but not jre-openjdk-1.6.0"
Given that Java 7 is readily available in RHEL/CentOS 6 (Rudder server is not supported on RHEL/CentOS < 6) and is designed not to conflict with Java 6 (of any origin), I firstly suggest that we simplify the problem by depending on Java 7 only, and ignoring 6.
Secondly, given that the point of providing packages is to make installing Rudder a simple, out of the box experience, I think we should build our packages to rely only on base system packages, which provide jre7. So, how about we change our dependency to "jre7", and check this works, and be done with it?
Ok, I agree with you but it will be necessary to document that problem on Rudder 2.4 documentation.
Updated by Nicolas PERRON about 12 years ago
Ok, it seems to work:
With these dependencies, we specify in the SPEC file that only RHEL/CentOS (and indirectly only CentOS 6 as we only support Rudder server on it) needs jre7:
%if 0%{?rhel} Requires: jre7 %else Requires: jre >= 1.6 %endif
On a SLES, builded packages keep its dependencies:
rpm -qpR RPMS/noarch/rudder-jetty-2.4.0.beta6.git-1.noarch.rpm jre >= 1.6 rudder-inventory-ldap /bin/sh /bin/sh rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadIsLzma) <= 4.4.2-1
on a RHEL/CentOS, builded packages have another dependency:
rpm -qpR RPMS/noarch/rudder-jetty-2.4.0.beta6.git-1.el6.noarch.rpm jre7 rudder-inventory-ldap /bin/sh /bin/sh rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadIsXz) <= 5.2-1
yum deplist rudder-jetty [...] Finding dependencies: package: rudder-jetty.noarch 1353322393:2.4.0.beta6.git-1.el6 dependency: /bin/sh provider: bash.x86_64 4.1.2-9.el6_2 dependency: rudder-inventory-ldap Unsatisfied dependency dependency: jre7 provider: java-1.7.0-openjdk.x86_64 1:1.7.0.3-2.1.el6.7 provider: java-1.7.0-openjdk.x86_64 1:1.7.0.5-2.2.1.el6_3 provider: java-1.7.0-openjdk.x86_64 1:1.7.0.5-2.2.1.el6_3.3 provider: java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.3.el6_3.1
Updated by Nicolas PERRON about 12 years ago
- Status changed from Discussion to In progress
Updated by Nicolas PERRON about 12 years ago
- % Done changed from 0 to 80
The modifications for packaging has been made, need a documentation about it and ticket will be fixed.
Updated by Nicolas PERRON about 12 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 80 to 100
A documentation has been added about it. Jon, could you review all of this, please ?
Updated by Jonathan CLARKE about 12 years ago
- Status changed from Pending technical review to Released
Looks good to me, thanks.
Updated by Nicolas PERRON almost 12 years ago
- Project changed from Rudder to 34
- Category deleted (
11)
Updated by Benoît PECCATTE almost 10 years ago
- Project changed from 34 to Rudder
- Category set to Packaging