diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index 828b073..2959235 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -1601,7 +1601,7 @@ The %{compatiblename}-src-fastdebug sub-package contains the complete %{origin_n %if %{include_normal_build} %package javadoc -Summary: %{origin_nice} %{featurever}API documentation +Summary: %{origin_nice} %{featurever} API documentation Group: Development/Java Requires: javapackages-filesystem Obsoletes: javadoc-slowdebug < 1:11.0.3.7-4 @@ -1610,9 +1610,7 @@ Obsoletes: javadoc-slowdebug < 1:11.0.3.7-4 %description javadoc The %{origin_nice} %{featurever} API documentation. -%endif -%if %{include_normal_build} %package javadoc-zip Summary: %{origin_nice} %{featurever} API documentation compressed in a single archive Group: Development/Java @@ -2224,6 +2222,28 @@ arg = nil ; -- it is better to null the arg up, no meter if they exists or not, 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) +-- the returns from copy_jdk_configs.lua should not affect this 'main', so it shodl run under all circumstances, except fatal error +-- https://bugzilla.redhat.com/show_bug.cgi?id=1820172 +-- https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ +-- Define the path to directory being replaced below. +-- DO NOT add a trailing slash at the end. +path1 = "%{_jvmdir}/%{sdkdir -- %{nil}}/conf" +path2 = "%{_jvmdir}/%{sdkdir -- %{nil}}/lib/security" +array = {path1, path2} +for index, path in pairs(array) do + st = posix.stat(path) + if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end + end +end %post %{post_script %{nil}}