Open judovana opened 1 month ago
I think we should aim to do versionless provides as a resolution here and attempt to progress on that basis. Based on the summary analysis at https://github.com/adoptium/installer/issues/848#issuecomment-2112138525 the TL;DR for the PMC is as follows:
java
(the name java
here is being used to refer to the RPM package metadata, not the java
command) is what we're calling a "versionless provide" (since it is not qualified with a version number) will have the version which is considered the default distribution for the distro available if a package meeting the java
requirement is installed. This can be different on different distributions depending on the decision made at the time the distribution was shipped.java
without taking into account the above, and means that the Temurin RPMs could break distribution-supplied applications relying on the package providing java
being a particular version.java
", but I think the risk of destabilising someone's machine when dropping in Temurin as a replacement is potentially a larger concern..rpm
for Fedora which removes the "versionless provides" (since we have separate ones for RH/SuSE already) but I'd rather not maintain more of them...The ask here is therefore for approval to remove the Provides: java
line and add in Provides: java-XX-openjdk
which we do not currently do in order to be able to act as a drop-in replacement for any OS-provided version of java. The implementation details can be left to discussion in this PR if that decision is approved.
- an alternative option would be to have a separate
.rpm
for Fedora which removes the "versionless provides" (since we have separate ones for RH/SuSE already) but I'd rather not maintain more of them...
Alternative to this may be already described metapackage workaround. That version-less provides are provided by metapackage, which weil not be avialable in the fedora respo. This preventing existence of another set of RPMs, but is adding a bit of repository logic.
@judovana Just to confirm since I've been looking closer at some of the packages again. I wrote this above:
The ask here is therefore for approval to remove the Provides: java line
Would it be feasible to retain the java provides if it had a version number associated with it? (Temurin's one currently doesn't which would seem to have been an oversight) or would that be a problem for other reasons.
All versionless provides must be removed - java, javac, I have to double check it. No, keeping/adding the version would not help:(
All versionless provides must be removed - java, javac, I have to double check it. No, keeping/adding the version would not help:(
That's what I expected you to say so thanks for confirming :-) I looked at one example java application in the F40 repos (tomcat
- the first that came to mind) and it seemed to have a dependency on either the headless packages or java >= 1.8
[root@ef1c1b0ecdcb /]# repoquery --requires tomcat
Last metadata expiration check: 0:00:51 ago on Thu Jun 27 16:01:22 2024.
(java-headless >= 1:1.8 or java-1.8.0-headless or java-11-headless or java-17-headless or java >= 1:1.8)
I was expecting it to need the system one explicitly. Impressive that it still runs on 8 (assuming the dependencies are valid of course ;-) ).
[EDIT: Interestingly temurin-8-jdk does NOT satisfy the prereqs for tomcat
which still tries to install java-21-openjdk-headless
- perhaps because we provide java
without an explicit version and it needs >=1:1.8. Are there examples packages in Fedora where a Temurin install would override the system one?]
[EDIT 2: This is interesting because java-1.8.0-headless
is listed as a valid dependency of tomcat
and that is satisfied by temurin-8-jdk
- but tomcat
depends on javapackages-tools
which DOES have a hard dependency on java-21-openjdk-headless
(Not java
) which temurin-21-jdk
provides ]
[root@ef1c1b0ecdcb /]# dnf install java-1.8.0-headless
Last metadata expiration check: 0:09:16 ago on Thu Jun 27 16:05:30 2024.
Package temurin-8-jdk-8.0.412.0.0.8-1.x86_64 is already installed.
[root@ef1c1b0ecdcb /]# repoquery --requires javapackages-tools
Last metadata expiration check: 0:19:49 ago on Thu Jun 27 16:05:30 2024.
coreutils
findutils
java-21-openjdk-headless
javapackages-filesystem = 6.2.0-9.fc40
which
java >= 1:1.8
and java-headless >= 1:1.8
... Ok. The version in versionless provides will not help, butdo not hurt. Sorry for not being clear imediately.. We ahve it here: https://src.fedoraproject.org/rpms/java-21-openjdk/blob/rawhide/f/java-21-openjdk.spec#_1120
Funnily enough, there was up to recently generator of amven provides: which was generating requires with all version-full(!!) requires. And it is leaving just now: https://fedoraproject.org/wiki/Changes/Drop_Mandatory_Requires_on_JRE
I will need to double check this tomorrow morrning in fresh condition, but the acording to that code snippets, temurin jdk8 shares some provides with java-1.8.0-headless (which is a bit weird, as it do not provide java-1.8.0-headless and thus distribution jdk8 shodl be installed anyway..)
I will need to double check this tomorrow morrning in fresh condition
Good plan - I definitely feel my brain needs until tomorrow to process all the possibilities too ;-)
This issue was pinpointed as show-stopper in https://github.com/adoptium/installer/issues/848
The versionless provides are blocker for any fedora/rhel like distribution to use temurins instead or in-disro rpms. The reason is, that versionless provides are suppose to be only for system jdk - the jdk which builds and runs distribution java stack.
If versionless provides can not be removed, then - to achive adjust rpms and (maybe) repositories so Temurin JDKs can serve as replacement of non-system JDKs in Fedora soem repo magic will need to be don (or simply build special set of rpms, which is scary). The meta package repo-magic workaround is like: original temurin repo will contain both meta packages (with versionless provides, which just requires versionless-free normal packages. Tehn for fedora is creatyed repo which contains only versionless-free normal pcakages.
More detailed info in https://github.com/adoptium/installer/issues/848
@jiekang fyi!