Skip to content
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

Update Java dependencies #58

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Update Java dependencies #58

merged 1 commit into from
Mar 6, 2024

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Mar 4, 2024

The RPM spec has been updated to use Java 21 on Fedora 40 or later and Java 17 on other platforms.

The Dockerfile has been modified to remove any Java packages pulled by the existing LDAP SDK package to ensure that the build will be done using the correct Java version.

The tools-test.sh has been updated to remove hard-coded JAVA_HOME.

@edewata edewata requested a review from fmarco76 March 4, 2024 16:48
Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Feel free to merge if this avoid problems with java versions.
However I think we should keep the java requirements. We could have something like:

Requires:         java_headless >= 17

just to avoid version before 17.
We could even avoid this version and require only java_headless since it is associated to java 17 for both F39 and F40, until this will move to java 21.

@edewata edewata added the WIP Work In Progress label Mar 4, 2024
@edewata
Copy link
Contributor Author

edewata commented Mar 4, 2024

Sorry, this is not quite ready yet. It needs additional testing.

@edewata
Copy link
Contributor Author

edewata commented Mar 4, 2024

One of the issues is java-17-openjdk-headless apparently doesn't provide java-headless = 1:17.0.10.0.7-2.fc40, whereas java-21-openjdk-headless does provide java-headless = 1:21.0.2.0.13-2.fc40, so we cannot specify Requires: java-headless >= 17.

@fmarco76
Copy link
Member

fmarco76 commented Mar 5, 2024

One of the issues is java-17-openjdk-headless apparently doesn't provide java-headless = 1:17.0.10.0.7-2.fc40, whereas java-21-openjdk-headless does provide java-headless = 1:21.0.2.0.13-2.fc40, so we cannot specify Requires: java-headless >= 17.

Not sure on this. In F39 I have:

mfargetta@fedora:~$ sudo dnf repoquery --provides java-21-openjdk-headless 
Updating Subscription Management repositories.

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

Last metadata expiration check: 0:00:13 ago on Tue 05 Mar 2024 11:01:07 CET.
config(java-21-openjdk-headless) = 1:21.0.2.0.13-1.fc39
java-21-headless = 1:21.0.2.0.13-1.fc39
java-21-openjdk-headless = 1:21.0.2.0.13-1.fc39
java-21-openjdk-headless(x86-64) = 1:21.0.2.0.13-1.fc39
jre-21-headless = 1:21.0.2.0.13-1.fc39
jre-21-openjdk-headless = 1:21.0.2.0.13-1.fc39
libjsvml.so()(64bit)
lible.so()(64bit)
libsyslookup.so()(64bit)
mfargetta@fedora:~$ sudo dnf repoquery --provides java-17-openjdk-headless 
Updating Subscription Management repositories.

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

Last metadata expiration check: 0:00:21 ago on Tue 05 Mar 2024 11:01:07 CET.
config(java-17-openjdk-headless) = 1:17.0.8.0.7-1.fc39
config(java-17-openjdk-headless) = 1:17.0.9.0.9-3.fc39
java-17-headless = 1:17.0.8.0.7-1.fc39
java-17-headless = 1:17.0.9.0.9-3.fc39
java-17-openjdk-headless = 1:17.0.8.0.7-1.fc39
java-17-openjdk-headless = 1:17.0.9.0.9-3.fc39
java-17-openjdk-headless(x86-64) = 1:17.0.8.0.7-1.fc39
java-17-openjdk-headless(x86-64) = 1:17.0.9.0.9-3.fc39
java-headless = 1:17.0.8.0.7-1.fc39
java-headless = 1:17.0.9.0.9-3.fc39
java-openjdk-headless = 1:17.0.8.0.7-1.fc39
java-openjdk-headless = 1:17.0.9.0.9-3.fc39
jre-17-headless = 1:17.0.8.0.7-1.fc39
jre-17-headless = 1:17.0.9.0.9-3.fc39
jre-17-openjdk-headless = 1:17.0.8.0.7-1.fc39
jre-17-openjdk-headless = 1:17.0.9.0.9-3.fc39
jre-headless = 1:17.0.8.0.7-1.fc39
jre-headless = 1:17.0.9.0.9-3.fc39
jre-openjdk-headless = 1:17.0.8.0.7-1.fc39
jre-openjdk-headless = 1:17.0.9.0.9-3.fc39
libjava.so()(64bit)
libjsig.so()(64bit)
libjsvml.so()(64bit)
libjvm.so()(64bit)
libjvm.so(SUNWprivate_1.1)(64bit)
libsyslookup.so()(64bit)
libverify.so()(64bit)

With F40 we have:

[root@fa2e6def46a3 /]# dnf repoquery --provides java-21-openjdk-headless
Last metadata expiration check: 0:00:17 ago on Tue Mar  5 10:04:37 2024.
config(java-21-openjdk-headless) = 1:21.0.2.0.13-1.fc40.1
config(java-21-openjdk-headless) = 1:21.0.2.0.13-2.fc40
java-21-headless = 1:21.0.2.0.13-1.fc40.1
java-21-headless = 1:21.0.2.0.13-2.fc40
java-21-openjdk-headless = 1:21.0.2.0.13-1.fc40.1
java-21-openjdk-headless = 1:21.0.2.0.13-2.fc40
java-21-openjdk-headless(x86-64) = 1:21.0.2.0.13-1.fc40.1
java-21-openjdk-headless(x86-64) = 1:21.0.2.0.13-2.fc40
java-headless = 1:21.0.2.0.13-2.fc40
java-openjdk-headless = 1:21.0.2.0.13-2.fc40
jre-21-headless = 1:21.0.2.0.13-1.fc40.1
jre-21-headless = 1:21.0.2.0.13-2.fc40
jre-21-openjdk-headless = 1:21.0.2.0.13-1.fc40.1
jre-21-openjdk-headless = 1:21.0.2.0.13-2.fc40
jre-headless = 1:21.0.2.0.13-2.fc40
jre-openjdk-headless = 1:21.0.2.0.13-2.fc40
libjava.so()(64bit)
libjsig.so()(64bit)
libjsvml.so()(64bit)
libjvm.so()(64bit)
libjvm.so(SUNWprivate_1.1)(64bit)
lible.so()(64bit)
libsyslookup.so()(64bit)
libverify.so()(64bit)
[root@fa2e6def46a3 /]# dnf repoquery --provides java-17-openjdk-headless
Last metadata expiration check: 0:00:25 ago on Tue Mar  5 10:04:37 2024.
config(java-17-openjdk-headless) = 1:17.0.10.0.7-1.fc40
config(java-17-openjdk-headless) = 1:17.0.10.0.7-2.fc40
java-17-headless = 1:17.0.10.0.7-1.fc40
java-17-headless = 1:17.0.10.0.7-2.fc40
java-17-openjdk-headless = 1:17.0.10.0.7-1.fc40
java-17-openjdk-headless = 1:17.0.10.0.7-2.fc40
java-17-openjdk-headless(x86-64) = 1:17.0.10.0.7-1.fc40
java-17-openjdk-headless(x86-64) = 1:17.0.10.0.7-2.fc40
java-headless = 1:17.0.10.0.7-1.fc40
java-openjdk-headless = 1:17.0.10.0.7-1.fc40
jre-17-headless = 1:17.0.10.0.7-1.fc40
jre-17-headless = 1:17.0.10.0.7-2.fc40
jre-17-openjdk-headless = 1:17.0.10.0.7-1.fc40
jre-17-openjdk-headless = 1:17.0.10.0.7-2.fc40
jre-headless = 1:17.0.10.0.7-1.fc40
jre-openjdk-headless = 1:17.0.10.0.7-1.fc40
libjava.so()(64bit)
libjsig.so()(64bit)
libjsvml.so()(64bit)
libjvm.so()(64bit)
libjvm.so(SUNWprivate_1.1)(64bit)
libsyslookup.so()(64bit)
libverify.so()(64bit)

In both cases I see java-headless for java-17 but only in F40 for java-21. In my test it should work but I have not tested with this package so I am not sure of other dependency problems.

@edewata
Copy link
Contributor Author

edewata commented Mar 5, 2024

Hmm.. interesting. Thanks for investigating! This is how it's defined in Fedora:
https://src.fedoraproject.org/rpms/dogtag-pki/blob/rawhide/f/dogtag-pki.spec#_66
We probably need to do the same upstream since this was done by Java maintainers.

@fmarco76
Copy link
Member

fmarco76 commented Mar 5, 2024

Not sure for java_devel. In F40 is this java 21 I guess. Are we ready to move to this version? Do we need to test it?

The RPM spec has been updated to use Java 21 on Fedora 40 or later
and Java 17 on other platforms.

The Dockerfile has been modified to remove any Java packages
pulled by the existing LDAP SDK package to ensure that the build
will be done using the correct Java version.

The tools-test.sh has been updated to remove hard-coded JAVA_HOME.
Copy link

sonarqubecloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@edewata edewata removed the WIP Work In Progress label Mar 6, 2024
@edewata
Copy link
Contributor Author

edewata commented Mar 6, 2024

This is ready now. Please see the updated PR. We'll use Java 21 on Fedora 40+.

Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@edewata
Copy link
Contributor Author

edewata commented Mar 6, 2024

@fmarco76 Thanks!

@edewata edewata merged commit 5ed5c06 into dogtagpki:master Mar 6, 2024
19 checks passed
@edewata edewata changed the title Drop java-17-openjdk-headless dependency Update Java dependencies Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants