diff --git a/installers/linux/al2/spec/build.gradle b/installers/linux/al2/spec/build.gradle index 8b257d7d4c1..2dd9c495e44 100644 --- a/installers/linux/al2/spec/build.gradle +++ b/installers/linux/al2/spec/build.gradle @@ -52,6 +52,7 @@ task inflateRpmSpec { version_opt : versionOpt, debug_level : correttoDebugLevel, boot_jdk_major_version : version.major.toInteger() - 1, + boot_jdk_major_v_backup : version.major.toInteger() - 2, experimental_feature: project.findProperty("corretto.experimental_feature") ?: "%{nil}", additional_configure_options: project.findProperty("corretto.additional_configure_options") ?: "%{nil}", zlib_option: project.findProperty("corretto.zlib_option") ?: "system", diff --git a/installers/linux/al2/spec/java-amazon-corretto.spec.template b/installers/linux/al2/spec/java-amazon-corretto.spec.template index 956b80fa106..e45e718f827 100644 --- a/installers/linux/al2/spec/java-amazon-corretto.spec.template +++ b/installers/linux/al2/spec/java-amazon-corretto.spec.template @@ -53,6 +53,7 @@ # %global release_ext 1 %global boot_jdk_major_version $boot_jdk_major_version +%global boot_jdk_major_v_backup $boot_jdk_major_v_backup %global java_home %{_jvmdir}/%{name}.%{_arch} %global java_lib %{java_home}/lib @@ -146,7 +147,7 @@ BuildRequires: pkgconfig BuildRequires: xorg-x11-proto-devel %if %{with bootjdk} -BuildRequires: java-${boot_jdk_major_version}-devel +BuildRequires: (java-${boot_jdk_major_version}-devel or java-${boot_jdk_major_v_backup}-devel) %endif Requires: libX11