diff --git a/openjdk-latest.spec b/openjdk-latest.spec index 6733f4991c37f9605b01a5a8135ca65b6c95f061..ca75ab629f4c5bc47de697512da6f66d8f2d4313 100644 --- a/openjdk-latest.spec +++ b/openjdk-latest.spec @@ -786,7 +786,7 @@ Requires: tzdata-java >= 2015d # 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 >= 3.9 OrderWithRequires: copy-jdk-configs # for printing support Requires: cups-libs @@ -1589,7 +1589,13 @@ done -- whether copy-jdk-configs is installed or not. If so, then configs are copied -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all local posix = require "posix" -local debug = false + +if (os.getenv("debug") == "true") then + debug = true; + print("cjc: in spec debug is on") +else + debug = false; +end SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua" SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua" @@ -1618,8 +1624,9 @@ else end end -- run content of included file with fake args +cjc = require "copy_jdk_configs.lua" arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} -require "copy_jdk_configs.lua" +cjc.mainProgram(arg) %post %{post_script %{nil}} @@ -1757,7 +1764,6 @@ require "copy_jdk_configs.lua" * Sat May 7 2022 noah - 1:18.0.1.10-0-rolling - Update to jdk-18.0.1+10 -- downgrade copy-jdk-configs from 3.9 to 3.3 in Requires * Thu May 5 2022 noah - 1:18.0.0.37-1.rolling - set build jdk to 18