From bdbb9cb592035f94b9706da8555413e903bed217 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 25 Jan 2022 16:36:59 +0800 Subject: [PATCH] =?UTF-8?q?I4PHGK:=20openjdk-latest=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=8A=A5=E9=94=99lua=20script=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openjdk-latest.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/openjdk-latest.spec b/openjdk-latest.spec index c84af29..875312b 100644 --- a/openjdk-latest.spec +++ b/openjdk-latest.spec @@ -171,7 +171,7 @@ %global top_level_dir_name %{origin} %global minorver 0 %global buildver 12 -%global rpmrelease 2 +%global rpmrelease 3 # priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit %if %is_system_jdk %global priority %( printf '%02d%02d%02d%02d' %{majorver} %{minorver} %{securityver} %{buildver} ) @@ -777,7 +777,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 @@ -1577,7 +1577,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" @@ -1606,8 +1612,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}} @@ -1732,6 +1739,9 @@ require "copy_jdk_configs.lua" %changelog +* Wed Jan 05 2021 noah - 1:17.0.1.12-3-rolling +- adapted to newst cjc to fix issue with rpm 4.17 + * Tue Dec 21 2021 kuenking111 - 1:17.0.1.12-2-rolling - delete stack protection -- Gitee