-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adjust rpms and (maybe) repositories so Temurin JDKs can serve as replacement of non-system JDKs in Fedora #848
Comments
To summarize, there are two requests for Adoptium to consider:
What does this actually mean? For 1. Provide an RPM package that Provides specific versions of Java RPMs have a dependency mechanism using strings via Provides, BuildRequires, and Requires fields in the RPM spec file. For example: https://github.com/adoptium/installer/blob/master/linux/jdk/redhat/src/main/packaging/temurin/21/temurin-21-jdk.spec#L77 For some historical reason, Temurin RPMs do not specify a version in the provide field.
If we did, it would so look like:
In comparison, other vendors like Amazon, Azul, and Red Hat, have explicit versions for their RPM's Provides fields. Why does this matter? The lack of a version is problematic. If Temurin 21 is installed on the system, and the Fedora user installs a package that needs JDK 8, then it would be satisfied by Temurin 21, but not actually work. For 2. Provide a headless RPM package. This is a subpackage in the same spec file that has a related files and dependencies removed to run in a headless environment with a smaller footprint. For example: |
Who will be using the headless packages? In the past we've had explicit requests for JRE packages, but I don't recall requests for headless packages. Are there many other packages in Fedora that depend on the headless package and can we see that list here? It would be nice to have some strong evidence for their benefit. |
You mentioned a meta-package solution for the problem of versionless provides. Can you elaborate on what that looks like? And I still do not fully understand: Why can't we just change all the spec files to Provides like: What is the danger of such a change? I appreciate your expertise here. |
I have a few questions regarding the proposal:
Just to be clear - are you suggesting we change the current package to be versioned-only and then the metapackage would depend on the versioned one and "provide" the versionless one?
Just to be 100% clear, does that mean that you'll replace the current java8,11,17 packages in Fedora with something that sets up the Temurin dnf repositories? And once that's done the user would be able to install temurin as a separate package? Or, since you've said it's transparent, would the Fedoras RPMs trigger the install as a postinstall step after setting up the temurin repos? |
I will answer as soon as I can, bu those are not simple answer. One note on jdk8 and openjfx. In fedora we have opnejfx apckages whic are for jdk11 and up, those shoudl be worign wihtout issues. For jdk8, we ahd to add jdk8 subpackage, which added the necessary symlinks. This will disapear, but I think, we can already let openfx8 die in peace. |
yes and yes. But introduction of headless subpackage is beneficial to all. plus 3.regression is that javafx for jdk8, buthtat really do nto count at the end.
I'm not sure what version you now refer. I have never ever mentioned version behind versionless provides.
or
Does not meter from my point of view. Still the second one is more correct, although we recenlty hit issue where versionless provides (eg Anyway the version-full , eg
I'm again not sure what you mean by lack of version. Sorry. The whole versionless x versionfull issue is based on If the jdk is system jdk (is_system_jdk 1) then a version-less provides like The whole point is to distinguish system jdk against any other jdk. Only system jdk have versionless provides. You will hit the https://src.fedoraproject.org/rpms/java-21-openjdk/blob/rawhide/f/java-21-openjdk.spec#_393 and https://src.fedoraproject.org/rpms/java-21-openjdk/blob/rawhide/f/java-21-openjdk.spec#_921 and https://src.fedoraproject.org/rpms/java-21-openjdk/blob/rawhide/f/java-21-openjdk.spec#_1013 lines, which is making the issue a bit more tricky, but still proeprly doable. If package requires some exact java, it requires it via That is reason, why temurin jdks, when used in fedora, must not contain the versionless provides. Then exactly what you describe Howeverm I think it is correct that each temurin jdk as it is now in generic repos, provides versionless provides like "java", as it is then trully versatile as any portbale package should be. If you decide to drop version-less provides completely, then we are done. Pls consult also Deepak on this topic. it was moreover me an him behind this change, he may remember additional points if not, a metapackage is here to help:
The metapackage is package with only with provides. Such package require the real package, which itself do not have the provides. So in this exact scope it may be (but I hope it will be done better):
If fedora frienldy names are no go, thats ok, virtual provides (which you afaik already have) would do. Only the meta packages will be weirdly named, and some rename of original packages is necessary anyway. As your rpsm are "only" repacking tarball, maybe better then mtapackage is simply generate special set of rpms jsut for fedora, without versionless provides. As second repo is in play anyway.
Because it is not what I ment by versionless x versinfull ;)
Right. better view on that is, what files are not in headless one: https://src.fedoraproject.org/rpms/java-21-openjdk/blob/rawhide/f/java-21-openjdk.spec#_791 Only rpm generated requires on those .so are half a gig at least. And thats answers also:
The user is anybody who do not want to mess its system by X and other windowing depndecs, no metter what reason it is. Cool example is any build system. But unluckily java-devel rewuires full jre, not jsut jre-headless. |
Correct. For details see my answer to Jie.
it can be both, and depends on our agreement. Smallest intervention - I will just discontinue jdk8,11 and in a year also 17 and will enhance fedora java pages so they recommend to install temurin jdk. With link to temurin pages. Bigger intervention - I will replace jdk 8,11 and later 17 really by the repository file, but will not transparently allow update to temurins. This and additional steps will be documented in fedora-java pages. Total intervention. I will replace jdk 8,11 and later 17 really by the rrepository file, and will set up proper I see the last as best, but it is also on FESCO and fedora-devel discussion. And of course Temurin people . If third will be the option, then I do not plan to do this in posttrans. I plan to add the repository in one transaction, and later to remove myslef and substitue by temurins. |
I had jsut realised that jdk8 will lost also shenandoah, but I guess thats ok. Is jdk11 built with shenandoah enabled? Upstreamis, so I guess it is.. Please correctme |
Thank you Jiri for clarifying. Sadly the GH Comment UI is not that great for replying in-line as it gets longer as longer :( I wonder if there is some other tool to help with that... For 1. Provide an RPM package that Provides specific versions of Java Okay. I'm glad you've clarified further as I misunderstood the request. A concrete example would have been nice in the initial request. So, what is actually requested: Before:
After:
Before continuing further discussion, is this correct? I think so as now all your other comments make complete sense in this context :) The term version-less provides was confusing. I thought you were referencing the |
yah, reading it, now, with this ponit of view on, I should be more specific, but the issue is so obvious to me:( Really sorry.
yes. It contains also various:
I recommend, that all version-full provides contains full version string
Correct. In my vocabulaty thet |
here is the jira: https://issues.redhat.com/browse/OPENJDK-2507
As this revert goes only to old rhels, not to the future, temurins should use full version string also for versionless provides. |
Thanks @judovana for all your follow ups. The explanations make sense to me. Delivering headless subpackages seems generally worthy as it will strengthen our offerings. Our installers in general do need some love...
For the three levels of intervention, in the case of the smallest/bigger, is a fix for the Provides necessary? It sounds like it would be necessary for the total intervention case at least. The Temurin RPM already clashes with the system JDK in Fedora today, right? So the motivation to fix it is that, after your change in Fedora, more users will be using Temurin on Fedora systems and the problem will likely be seen more often. Just checking, are there any other motivations for the change? |
I think the removal of versionless provides is mandatory in all three cases (moreover as you summ up in last paragraph). Moreover expected case:
Unexpected case:
|
Okay. Thanks for those two examples @judovana, that is really helpful to understand. So reviewing this in whole, I see two different parts.
Lets continue to discuss versionless provides here and put the headless feature into it's own issue. |
Note, that this issue should serve to find all possible issues in both Temurin JDK and in Fedora, so that the feature can happen at all. If we agreed both headless subpackage and versionless provides should happen, then they both desrve its own issue, and we can continue here to search for other issue, or disucss them there as they will be occuring once it it made more public |
Okay, makes sense. Let's follow this approach then. Do you see any other areas to investigate for issues with Temurin and Fedora? |
Nope, But I'm pretty sure they will emerge:( |
Good to see the discussion taking place here. I'm going to remove the PMC tag for this specific issue as it is getting long, and ask that we open associated specific focused issues for decisions concluded here that need to go to PMC review. There is no rush for these. |
This is quite long but I'm adding in this comment as a summary for my own benefit and for anyone else reading it as an explanation of the concern with what Temurin currently does that blocks Fedora using our rpm files. This is specific to the versioning and does NOT cover any discussion relating to headless. Fedora is considering removing their older openjdk packages and encouraging users to move to Temurin instead. They have a number of options for this, however a blocker to any user migration story is that they need RPM packages that Provides specific versions of Java and do not Fedora expects that any package which satisfies the requirement for To see the concern in action, running
If you add in the Temurin repositories there will be entries for all of the different versions available from Temurin, which is in conflict with the Fedora requirements. Output from `dnf -q provides java` with Temurin repository enabled
Some notes:
The concern from a Temurin perspective is that this cannot be replicated with a single RPM (Since the distribution determines which one is the "system" JDK and Temurin currently does not provide multiple RPMs for each distribution and I think we we would prefer not to start doing so, especially since we'd rather reduce the complexity of our uploads as per #501 Temurin does not currently have a While it's not directly related to the above, we should consider listing our It has been noted that other vendors like Amazon, Azul, and Red Hat, have explicit versions for their RPM's Provides fields. Noting also that Temurin currently provides separate rpm files in the repository for RHEL and SUSE. One option here would be to have a third option for Fedora with an alternative setup (which would remove any backwards compatibility concerns for Temurin users, although as noted above UBI (And therefore presumably RHEL) would have the same concern so adjusting for the existing |
true |
I would be actually quite happy to include this variable and its usage into Temrun's specfiles. Only it will remain for ever false. |
🤔 I quite like that idea ... It would also give anyone else who wanted to the ability to create an rpm using our scripts with the option turned on if they wanted to. (I guess it could also be a list that has the version(s) that can act as system ones but that's maybe more complex than would be required). I think from the Adoptium perspective at this point it's a question of "Are we happy with this being off by default?" and go from there. (And with that, I'm shutting the laptop down until June! See you all next month) |
Exactly. Happy vacation! |
Temurin SDKs as non-system JDKs in Fedora
The goal is to get rid of redundant maintenance of legacy JDKs in Fedora. And to keep legacy jdk support via temurin repositories https://adoptium.net/installation/linux/
This may be prequel to doing similar in RHELs
Prequel
JDK8 is slowly but surely disappearing. On enforced bytecode compatibility level, jdk21 - current system jdk in fedora - is the last one which supports jdk8 bytecode level. For jdk22 minimal bytecode level corresponds to jdk9. Next system jdk - 25 will be bytecode level compatible with jdk12. In addition, jdk11 and 17, do not carry the burden of backward compatibility as jdk8 does, and we can happily claim jdk21 would do.
All distribution people around OpenJDK have slowly moved towards the current reference implementation - Eclipse Adoptium Temurin JDK. Eclipse foundation is providing ecosystem for all possible distributions of JDK, from rpms and deb packages, over portable static tarballs to containers. As it is, it is win win for both users and developers. That includes also support tools like javaws or mission control (openjfx?)
Since jdk21, there is no room for any package to depend on jdk8, 11 and in year or so also on 17.
Thus we would like to continue to maintain future LTS - all STS java packages in rolling java-latest-openjdk, system JDK, and for short transition time previous STS (now 17), but we would lijke to drop all older jdks. Where there should be no lost for users, for developers, a comfortable
dnf install java*
is quite cool feature, and thus we would like to support this via eclipse temurin rpm repositories as an counter weight to SDKMAN and similar tools.Known showstoppers
Known regressions
6. Recently was added risc5 support to jdk11+ (on spec level)
7. I’m not sure if Adotpium can cover all architectures.
* But I think it don't matter
Proposed offering to fedora 41 system wide change
We will get rid of all non-system fedora/rpms/java-xy-openjdk once they stop being system JDK. As a start, we will discontinue JDKs 8 and 11 as follows:
This decision will flow up from the fedora-devel list and from fesco decision. If both will be strongly for the opinion (1), and indeed a strong maintainer would step in, and will prove themselves, then then we can add Temurins as secondary JDKs. This will be part of the proposal.
(3) is the preferred way to go, but we are not yet there.
To install 3rd party repository have exact rules:
The text was updated successfully, but these errors were encountered: