On Mon, Oct 4, 2021 at 3:06 PM Stefan Bluhm fedoraproject.org@bluhm-de.com wrote:
Hello,
can you please give me a direction on how to handle a Java 11 package build on RHEL8 for EPEL8?
My issue: I am trying to build jaxb-api. The build works fine: https://src.fedoraproject.org/rpms/jaxb-api/blob/rawhide/f/jaxb-api.spec In addition to the original file, I added:
BuildRequires: java-11-openjdk-devel
and
%if 0%{?rhel} export JAVA_HOME=/usr/lib/jvm/java-11-openjdk %endif
Now the generated rpm adds this requirement line:
Requires: java-headless >= 1:9
This is something that RHEL cannot fulfill as it would be called java-11-headless (adding the next higher available version).
How do I remove/omit the generation of the 1:9 requirement?
java-11-openjdk-headless provides "java-headless = 1:11", so it should work anyway. And that's in RHEL 8.