packaging icon indicating copy to clipboard operation
packaging copied to clipboard

Clean up Java installation

Open basil opened this issue 9 months ago • 9 comments

I got this message while running the test suite recently:

The java-17-openjdk package is deprecated and may no longer receive updates. Since f42 install adoptium-temurin-java-repository and install temurin-17-jre

https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks#adoptium-temurin-java-repository

We could install Eclipse Temurin rather than getting Java from the distribution. The precise manner in which this would be implemented would vary by distribution. That would be a change from how we do things today, where we install Java from the distribution.

Alternatively, we could stop trying to install an older Java LTS and install the latest Java LTS supported by each distribution. That might vary by distribution as well (e.g., newer distribution releases might carry newer Java LTS releases). That would also be a change from today, where we try to install Java 17 across all distributions (except for Fedora 41, where only Java 21 is available).

I have no strong preference as to which choice is made. To the implementer goes the decision. Whoever is doing the work can choose the implementation that makes the most sense.

basil avatar Mar 18 '25 02:03 basil

Fedora is phasing out their old Java 17 package (java-17-openjdk) and recommending we switch to Eclipse Temurin instead. It's like when your favorite coffee shop stops selling your usual blend and points you to a better supplier.

The solution for this is Switch to Eclipse Temurin:

Issue_1.txt

# First add the Temurin repository
sudo dnf install -y adoptium-temurin-java-repository

# Then install Java 17
sudo dnf install -y temurin-17-jre

Why using this solution because: It's like getting your coffee straight from the roaster - better quality and more reliable

You won't need to change your code

harshita2626 avatar Mar 24 '25 14:03 harshita2626

could you please assign this issue to me??I wanna solve it!

Mujib-Ahasan avatar Apr 25 '25 19:04 Mujib-Ahasan

Thanks for proposing, @Mujib-Ahasan . We don't assign issues in the Jenkins community. Feel free to experiment and propose a Pull Request when you're ready.

gounthar avatar Apr 25 '25 20:04 gounthar

Alright!! Thank you so much!

Mujib-Ahasan avatar Apr 25 '25 20:04 Mujib-Ahasan

Hey @gounthar , I'm working on this. could you please confirm if the Java installation is handled inside this repo??If yes, then where should I focus on?

Mujib-Ahasan avatar Apr 26 '25 19:04 Mujib-Ahasan

Yes, the Java installation is handled inside this repository. You should focus on the following files for Java installation:

  1. molecule/default/install-rpm.yml: This file installs different Java packages based on the distribution:
    • java-17-openjdk for most distributions except Amazon and CentOS 10.
    • java-17-amazon-corretto for Amazon distributions.
    • java-21-openjdk for CentOS 10.
  2. molecule/default/install-suse.yml: This file installs java-17-openjdk along with other packages for SUSE distributions.
  3. molecule/default/install-deb.yml: This file installs openjdk-17-jre for Debian-based distributions.

These files use Ansible to manage package installations, ensuring that the appropriate Java version is installed based on the operating system and its version.

gounthar avatar Apr 28 '25 20:04 gounthar

is this issue open now??

beri04 avatar Nov 04 '25 12:11 beri04

Yes

lemeurherveCB avatar Nov 04 '25 13:11 lemeurherveCB

thanks @lemeurherveCB for confirming I'll start analyzing and propose a cleanup plan before submitting a PR

beri04 avatar Nov 05 '25 06:11 beri04