F40 Change Proposal: Java 21 (System-Wide)

2024-01-10 Thread Aoife Moloney
Wiki ->https://fedoraproject.org/wiki/Changes/Java21

**This is a *proposed* Change for Fedora Linux.**
This document represents a *proposed* Change. As part of the [Changes
process](https://docs.fedoraproject.org/en-US/program_management/changes_policy/),
proposals are publicly announced in order to receive community
feedback. This proposal will only be implemented if approved by the
Fedora Engineering Steering Committee.


== Summary ==
Update the system JDK in Fedora from java-17-openjdk to java-21-openjdk.

== Owner ==
* Name: [[User:pmikova| Petra Alice Mikova]]
* Email: 
* Product: java and java stack
* Responsible WG: java-sig (java and java-maint)(which no longer exists)
* rcm ticket: https://pagure.io/releng/issue/11859
* named side tag ticket: TBD



=== Expected schedule ===
* During January 2024, we will create a new package, java-21-openjdk,
which will be a clone of java-latest-openjdk, which contains STS
versions of OpenJDK (currently 21) and will move to JDK 22 in
February/March.
* December 2023 I will do mass rebuild in copr
** all maintainers will be informed about the results
* January 2023 I will do second mass rebuild in copr
** all maintainers will be informed about the results
*  February 2023 mass rebuild in rawhide - side tag
** FTBFS bugs will be filed
*  February 2023 the sidetag will be merged
* Change Checkpoint: 100% Code Complete Deadline TBD
** hard deadline for feature completed

== Detailed Description ==
Fedora currently ships:
* java-1.8.0-openjdk (LTS)
* java-11-openjdk (LTS)
* java-17-openjdk (LTS), system JDK
* java-latest-openjdk (currently JDK21)
* java-21-openjdk will be cloned from java-latest-openjdk

Therefore, every package honoring the packaging rules and requiring
java via java-headless or java-devel is built in koji using
java-17-openjdk-devel and pulling java-17-openjdk during runtime (see
[https://fedoraproject.org/wiki/Java java] ). Also,
javapackaging-tools are using java-11-openjdk as hardcoded runtime
(see 
[https://fedoraproject.org/wiki/Changes/Decouple_system_java_setting_from_java_command_setting
changes]).

We were intentionally delaying jdk11 on-boarding for stability
reasons. But there is reason for this approach with 21 (for recall,
see https://fedoraproject.org/wiki/Changes/Java11)

Major incompatibility is again (as we were bumping 8->11)
encapsulation. What was hidden is now even more hidden and few more
parts were hidden. Luckily, most of the projects, when shifted to 11,
did it properly. Still few projects may hit usage of some  newly
restricted APIs.

== Feedback ==


== Benefit to Fedora ==

JDK21 was released a while ago, but compatibility with JDK 17 is good
enough and it is a stable release. Although we can expect some group
of packages to use jdk8 forever, and some other (much smaller) group
of packages stay on jdk11 for a while, the java stack should be able
to use the JDK 21. Both JDK 8 and JDK 11 will remain part of Fedora as
long as they are supported upstream, and there is a target audience in
our OS.


== Scope ==
=== To keep the java-17-openjdk (and lower versions of JDK), but to
remove its java/javac versionless provides, make java-21-openjdk the
provider of java, javac and other versionless provides, and keep
java-latest-openjdk as rolling package for STS JDKs) ===
* will guarantee fedora to be pure JDK21 distro.
* will allow maintainers of JDK21 (or higher) incompatible packages to
keep using JDK 17, JDK 11 and JDK 8
** if any package depends on a package built by JDK 21, JDK 17, JDK 11
and JDK 8 may not be able to pick up that dependency.
** this may lead to quite a lot of bundling or compat packages, but
that may be acceptable
** people developing JDK8 and JDK11 applications will very likely stay
with fedora
** we are bumping the system JDK every time a new JDK LTS comes up and
it proved itself as a good practice

While quite a lot of users will rejoice, there may be cases where
application is very hard to migrate to JDK11, so the contingency plan
should be taken very serious.
 Bytecode version 
* It appeared, that several applications have to be built by jdk8,
while they work fine with jdk11
* It lead to manual work on aligned libraries on 1.8 byte code
version.  see https://pagure.io/java-maint-sig/issue/7
* Other approaches how to avoid this in next update (jdk17, aprox f36,
minimal bytecode 7) were mentioned here:
https://src.fedoraproject.org/rpms/javapackages-tools/pull-request/3#comment-50266
 Workflow 
* announce as by
https://docs.fedoraproject.org/en-US/program_management/changes_policy/#_essential_communication
* tune java-latest-openjdk package (for all live Fedoras)
* clone java-21-openjdk package (for all live Fedoras)
* several rounds of mass rebuilds ( see
https://fedoraproject.org/w/index.php?title=Changes/Java21#Expected_schedule)
** from copr
** over side tag
** to koji
 Change owners 
* Feature will be implemented in
[https://fedoraproject.org/wiki/Changes/Java21#side_tag side 

F40 Change Proposal: Java 21 (System-Wide)

2024-01-10 Thread Aoife Moloney
Wiki ->https://fedoraproject.org/wiki/Changes/Java21

**This is a *proposed* Change for Fedora Linux.**
This document represents a *proposed* Change. As part of the [Changes
process](https://docs.fedoraproject.org/en-US/program_management/changes_policy/),
proposals are publicly announced in order to receive community
feedback. This proposal will only be implemented if approved by the
Fedora Engineering Steering Committee.


== Summary ==
Update the system JDK in Fedora from java-17-openjdk to java-21-openjdk.

== Owner ==
* Name: [[User:pmikova| Petra Alice Mikova]]
* Email: 
* Product: java and java stack
* Responsible WG: java-sig (java and java-maint)(which no longer exists)
* rcm ticket: https://pagure.io/releng/issue/11859
* named side tag ticket: TBD



=== Expected schedule ===
* During January 2024, we will create a new package, java-21-openjdk,
which will be a clone of java-latest-openjdk, which contains STS
versions of OpenJDK (currently 21) and will move to JDK 22 in
February/March.
* December 2023 I will do mass rebuild in copr
** all maintainers will be informed about the results
* January 2023 I will do second mass rebuild in copr
** all maintainers will be informed about the results
*  February 2023 mass rebuild in rawhide - side tag
** FTBFS bugs will be filed
*  February 2023 the sidetag will be merged
* Change Checkpoint: 100% Code Complete Deadline TBD
** hard deadline for feature completed

== Detailed Description ==
Fedora currently ships:
* java-1.8.0-openjdk (LTS)
* java-11-openjdk (LTS)
* java-17-openjdk (LTS), system JDK
* java-latest-openjdk (currently JDK21)
* java-21-openjdk will be cloned from java-latest-openjdk

Therefore, every package honoring the packaging rules and requiring
java via java-headless or java-devel is built in koji using
java-17-openjdk-devel and pulling java-17-openjdk during runtime (see
[https://fedoraproject.org/wiki/Java java] ). Also,
javapackaging-tools are using java-11-openjdk as hardcoded runtime
(see 
[https://fedoraproject.org/wiki/Changes/Decouple_system_java_setting_from_java_command_setting
changes]).

We were intentionally delaying jdk11 on-boarding for stability
reasons. But there is reason for this approach with 21 (for recall,
see https://fedoraproject.org/wiki/Changes/Java11)

Major incompatibility is again (as we were bumping 8->11)
encapsulation. What was hidden is now even more hidden and few more
parts were hidden. Luckily, most of the projects, when shifted to 11,
did it properly. Still few projects may hit usage of some  newly
restricted APIs.

== Feedback ==


== Benefit to Fedora ==

JDK21 was released a while ago, but compatibility with JDK 17 is good
enough and it is a stable release. Although we can expect some group
of packages to use jdk8 forever, and some other (much smaller) group
of packages stay on jdk11 for a while, the java stack should be able
to use the JDK 21. Both JDK 8 and JDK 11 will remain part of Fedora as
long as they are supported upstream, and there is a target audience in
our OS.


== Scope ==
=== To keep the java-17-openjdk (and lower versions of JDK), but to
remove its java/javac versionless provides, make java-21-openjdk the
provider of java, javac and other versionless provides, and keep
java-latest-openjdk as rolling package for STS JDKs) ===
* will guarantee fedora to be pure JDK21 distro.
* will allow maintainers of JDK21 (or higher) incompatible packages to
keep using JDK 17, JDK 11 and JDK 8
** if any package depends on a package built by JDK 21, JDK 17, JDK 11
and JDK 8 may not be able to pick up that dependency.
** this may lead to quite a lot of bundling or compat packages, but
that may be acceptable
** people developing JDK8 and JDK11 applications will very likely stay
with fedora
** we are bumping the system JDK every time a new JDK LTS comes up and
it proved itself as a good practice

While quite a lot of users will rejoice, there may be cases where
application is very hard to migrate to JDK11, so the contingency plan
should be taken very serious.
 Bytecode version 
* It appeared, that several applications have to be built by jdk8,
while they work fine with jdk11
* It lead to manual work on aligned libraries on 1.8 byte code
version.  see https://pagure.io/java-maint-sig/issue/7
* Other approaches how to avoid this in next update (jdk17, aprox f36,
minimal bytecode 7) were mentioned here:
https://src.fedoraproject.org/rpms/javapackages-tools/pull-request/3#comment-50266
 Workflow 
* announce as by
https://docs.fedoraproject.org/en-US/program_management/changes_policy/#_essential_communication
* tune java-latest-openjdk package (for all live Fedoras)
* clone java-21-openjdk package (for all live Fedoras)
* several rounds of mass rebuilds ( see
https://fedoraproject.org/w/index.php?title=Changes/Java21#Expected_schedule)
** from copr
** over side tag
** to koji
 Change owners 
* Feature will be implemented in
[https://fedoraproject.org/wiki/Changes/Java21#side_tag side