From b0e7dd030124e2aba88fc069464001336379bdcf Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 14 Jan 2025 17:15:23 -0500 Subject: [PATCH] Adapt to newest copy-jdk-configs to fix issue with rpm 4.17 - Adapt to newest cjc to fix issue with rpm 4.17 - Disable copy-jdk-configs for Flatpak builds - Remove cjc backward compatibility, to fix when both rpm 4.16 and 4.17 are in transaction - Resolves: rhbz#1953923 - Resolves: RHEL-73867 --- java-17-openjdk.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/java-17-openjdk.spec b/java-17-openjdk.spec index 0dd9aeb..ef96cce 100644 --- a/java-17-openjdk.spec +++ b/java-17-openjdk.spec @@ -1135,7 +1135,7 @@ Requires: lksctp-tools%{?_isa} # tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it, # not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be # considered as regression -Requires: copy-jdk-configs >= 3.3 +Requires: copy-jdk-configs >= 4.0 OrderWithRequires: copy-jdk-configs %endif # for printing support @@ -2300,9 +2300,10 @@ else return end end --- run content of included file with fake args -arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} -require "copy_jdk_configs.lua" +arg = nil ; -- it is better to null the arg up, no meter if they exists or not, and use cjc as module in unified way, instead of relaying on "main" method during require "copy_jdk_configs.lua" +cjc = require "copy_jdk_configs.lua" +args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} +cjc.mainProgram(args) %post %{post_script %{nil}} @@ -2498,6 +2499,13 @@ require "copy_jdk_configs.lua" %endif %changelog +* Mon Jan 13 2025 Jiri Vanek - 1:17.0.14.0.7-2 +- Adapt to newest cjc to fix issue with rpm 4.17 +- Disable copy-jdk-configs for Flatpak builds +- Remove cjc backward compatibility, to fix when both rpm 4.16 and 4.17 are in transaction +- Resolves: rhbz#1953923 +- Resolves: RHEL-73867 + * Mon Jan 13 2025 Thomas Fitzsimmons - 1:17.0.14.0.7-2 - Update to jdk-17.0.14+7 (GA) - Add to .gitignore openjdk-17.0.14+7.tar.xz