From 7e5968585a1e000e7bb1faefaefdcb68dd6194cd Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Wed, 20 Nov 2024 10:47:40 -0500 Subject: [PATCH] Remove copy-jdk-configs logic - Remove copy-jdk-configs logic - Related: RHEL-68848 --- java-21-openjdk.spec | 69 +------------------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 4a38d92..028c83d 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -586,16 +586,6 @@ alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} $key %{_jvmdir}/%{jre %define post_headless() %{expand: update-desktop-database %{_datadir}/applications &> /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -# see pretrans where this file is declared -# also see that pretrans is only for non-debug -if [ ! "%{?1}" == %{debug_suffix} ]; then - if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then - sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}} - fi -fi - -exit 0 } %define postun_script() %{expand: @@ -1162,13 +1152,6 @@ Requires: tzdata-java >= 2024a # for support of kernel stream control # libsctp.so.1 is being `dlopen`ed on demand Requires: lksctp-tools%{?_isa} -%if ! 0%{?flatpak} -# 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 >= 4.0 -OrderWithRequires: copy-jdk-configs -%endif # for printing support Requires: cups-libs # for system security properties @@ -2289,55 +2272,6 @@ find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/legal -type f -exec chmod 6 done %if %{include_normal_build} -# intentionally only for non-debug -%pretrans headless -p --- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue --- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre --- if copy-jdk-configs is in transaction, it installs in pretrans to temp --- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction and so is --- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends --- 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" - -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" - -local stat1 = posix.stat(SOURCE1, "type"); -local stat2 = posix.stat(SOURCE2, "type"); - - if (stat1 ~= nil) then - if (debug) then - print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.") - end; - package.path = package.path .. ";" .. SOURCE1 -else - if (stat2 ~= nil) then - if (debug) then - print(SOURCE2 .." exists - copy-jdk-configs already installed and NOT in transaction. Using.") - end; - package.path = package.path .. ";" .. SOURCE2 - else - if (debug) then - print(SOURCE1 .." does NOT exists") - print(SOURCE2 .." does NOT exists") - print("No config files will be copied") - end - return - end -end -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}} @@ -2449,8 +2383,6 @@ cjc.mainProgram(args) %if %{include_normal_build} %files headless -# important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue -# all config/noreplace files (and more) have to be declared in pretrans. See pretrans %{files_jre_headless %{nil}} %files devel @@ -2535,6 +2467,7 @@ cjc.mainProgram(args) * Tue Dec 17 2024 Thomas Fitzsimmons - 1:21.0.5.0.11-4 - Revert incorrect automated Release change from 1:21.0.5.0.11-2.1 - Set rpmrelease to 4 +- Remove copy-jdk-configs logic * Tue Oct 29 2024 Troy Dawson - 1:21.0.5.0.11-2.1 - Bump release for October 2024 mass rebuild: