Remove copy-jdk-configs logic
- Remove copy-jdk-configs logic - Related: RHEL-68848
This commit is contained in:
parent
51a8a9c81f
commit
7e5968585a
@ -586,16 +586,6 @@ alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} $key %{_jvmdir}/%{jre
|
|||||||
%define post_headless() %{expand:
|
%define post_headless() %{expand:
|
||||||
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
||||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/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:
|
%define postun_script() %{expand:
|
||||||
@ -1162,13 +1152,6 @@ Requires: tzdata-java >= 2024a
|
|||||||
# for support of kernel stream control
|
# for support of kernel stream control
|
||||||
# libsctp.so.1 is being `dlopen`ed on demand
|
# libsctp.so.1 is being `dlopen`ed on demand
|
||||||
Requires: lksctp-tools%{?_isa}
|
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
|
# for printing support
|
||||||
Requires: cups-libs
|
Requires: cups-libs
|
||||||
# for system security properties
|
# for system security properties
|
||||||
@ -2289,55 +2272,6 @@ find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/legal -type f -exec chmod 6
|
|||||||
done
|
done
|
||||||
|
|
||||||
%if %{include_normal_build}
|
%if %{include_normal_build}
|
||||||
# intentionally only for non-debug
|
|
||||||
%pretrans headless -p <lua>
|
|
||||||
-- 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
|
||||||
%{post_script %{nil}}
|
%{post_script %{nil}}
|
||||||
|
|
||||||
@ -2449,8 +2383,6 @@ cjc.mainProgram(args)
|
|||||||
|
|
||||||
%if %{include_normal_build}
|
%if %{include_normal_build}
|
||||||
%files headless
|
%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_jre_headless %{nil}}
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
@ -2535,6 +2467,7 @@ cjc.mainProgram(args)
|
|||||||
* Tue Dec 17 2024 Thomas Fitzsimmons <fitzsim@redhat.com> - 1:21.0.5.0.11-4
|
* Tue Dec 17 2024 Thomas Fitzsimmons <fitzsim@redhat.com> - 1:21.0.5.0.11-4
|
||||||
- Revert incorrect automated Release change from 1:21.0.5.0.11-2.1
|
- Revert incorrect automated Release change from 1:21.0.5.0.11-2.1
|
||||||
- Set rpmrelease to 4
|
- Set rpmrelease to 4
|
||||||
|
- Remove copy-jdk-configs logic
|
||||||
|
|
||||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:21.0.5.0.11-2.1
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:21.0.5.0.11-2.1
|
||||||
- Bump release for October 2024 mass rebuild:
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
Loading…
Reference in New Issue
Block a user