Skip to content

Commit 2b23075

Browse files
viru0909-devdduportalgounthar
authored andcommitted
Require Java 17 or Java 21 for RPM installations and Java 21 for Fedora installations (#544)
* rpm: Require temurin-21-jre to replace deprecated OpenJDK packages (fixes #516) * Apply conditional Temurin dependency only for Fedora builds * Fix: Update Java dependency for Fedora to java >= 21 * Fix: Update Java dependency to java >= 17 for non-Fedora systems * Fix: correct java requirement syntax * Restore Requires(pre) line as requested by reviewer * Update rpm/build/SPECS/jenkins.spec Co-authored-by: Damien Duportal <damien.duportal@gmail.com> * Update rpm/build/SPECS/jenkins.spec Co-authored-by: Damien Duportal <damien.duportal@gmail.com> --------- Co-authored-by: Damien Duportal <damien.duportal@gmail.com> Co-authored-by: Bruno Verachten <gounthar@gmail.com>
1 parent c2664db commit 2b23075

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rpm/build/SPECS/jenkins.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version}
1919
# So either we make a hard requirement on the OpenJDK or none at all
2020
# Only workaround would be to use a java virtual package, see https://github.com/keystep/virtual-java-rpm
2121
# TODO: If re-enable, fix the matcher for Java 17
22-
# Requires: java >= 1:1.8.0
22+
# Fedora 42+ removes openjdk-{8,11,17}. Jenkins now uses Eclipse Temurin JDK 21.
23+
%if 0%{?fedora}
24+
Requires: java >= 21
25+
%else
26+
Requires: java >= 17
27+
%endif
2328
Requires: procps
2429
Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd
2530
BuildArch: noarch

0 commit comments

Comments
 (0)