I'm trying to create an rpm package with a dependency on java 11; however, it seems like the openjdk and Oracle java 11 packages don't provide any overlapping java virtual packages.
OpenJDK Java 11 provides:
$ repoquery --provides java-11-openjdk java-11 = 1:18.104.22.168-0.el7_6 java-11-openjdk = 1:22.214.171.124-0.el7_6 java-11-openjdk(x86-32) = 1:126.96.36.199-0.el7_6 jre-11 = 1:188.8.131.52-0.el7_6 jre-11-openjdk = 1:184.108.40.206-0.el7_6 libjawt.so java-11 = 1:220.127.116.11-0.el7_6 java-11-openjdk = 1:18.104.22.168-0.el7_6 java-11-openjdk(x86-64) = 1:22.214.171.124-0.el7_6 jre-11 = 1:126.96.36.199-0.el7_6 jre-11-openjdk = 1:188.8.131.52-0.el7_6
The Oracle Java 11 installer provides:
$ rpm -qp --provides /tmp/jdk-11.0.2_linux-x64_bin.rpm jdk jaxp_parser_impl xml-commons-apis java java-11.0.2 java-fonts jre jre-11.0.2 jdk-11.0.2 = 2000:11.0.2-ga jdk-11.0.2(x86-64) = 2000:11.0.2-ga
How do I set my packages' dependencies to be flexible enough to work with either java11?
I thought rpm boolean dependencies might help, but I could find no information about updating rpm to version 4.13.
If I set my packages dependencies to:
Requires: jre-11 >= 11, rpm >= 4.13
installation fails with:
Error: Package: MYPACKAGE Requires: rpm >= 4.13 Installed: rpm-4.11.3-32.el7.x86_64 (installed) rpm = 4.11.3-32.el7 Available: rpm-4.11.3-35.el7.x86_64 (base) rpm = 4.11.3-35.el7
Version 4.13 of rpm just doesn't seem to be available? I'm using CentOS7, but the same happens on RHEL 7.5 too.