diff --git a/0016-non-existent-URL.patch b/0016-non-existent-URL.patch new file mode 100644 index 0000000000000000000000000000000000000000..01f3cbdc5185fe66562d1ee08bc798b6ebf18da0 --- /dev/null +++ b/0016-non-existent-URL.patch @@ -0,0 +1,42 @@ +diff --git a/build.gradle b/build.gradle +index 5e8b82237a..0a181019cb 100644 +--- a/build.gradle ++++ b/build.gradle +@@ -2296,4 +2296,37 @@ task aggregatedJavadoc(type: Javadoc, dependsOn: compileJava) { + options.links "https://docs.oracle.com/en/java/javase/${JavaVersion.current().majorVersion}/docs/api/" + else + options.links "https://docs.oracle.com/javase/8/docs/api/" ++ // TODO: remove this snippet once JDK >11 is used or https://bugs.openjdk.java.net/browse/JDK-8215291 is backported to JDK11 ++ // Patch to include `getURLPrefix` from JDK 12 + ++ // NOTICE: This code was copied from original ORACLE search.js file present in JDK 12 and newer ++ final SEARCH_PATCH_MODULE_LESS_AWARE = "\n\n" + ++ "// Fix for moudle-less aware search\n" + ++ "function getURLPrefix(ui) {\n" + ++ " var urlPrefix=\"\";\n" + ++ " var slash = \"/\";\n" + ++ " if (ui.item.category === catModules) {\n" + ++ " return ui.item.l + slash;\n" + ++ " } else if (ui.item.category === catPackages && ui.item.m) {\n" + ++ " return ui.item.m + slash;\n" + ++ " } else if (ui.item.category === catTypes || ui.item.category === catMembers) {\n" + ++ " if (ui.item.m) {\n" + ++ " urlPrefix = ui.item.m + slash;\n" + ++ " } else {\n" + ++ " \$.each(packageSearchIndex, function(index, item) {\n" + ++ " if (item.m && ui.item.p === item.l) {\n" + ++ " urlPrefix = item.m + slash;\n" + ++ " }\n" + ++ " });\n" + ++ " }\n" + ++ " }\n" + ++ " return urlPrefix;\n" + ++ "}" ++ ++ // When all the JavaDoc is generated we proceed to patch the search.js file ++ doLast { ++ def searchJsFile = new File(destinationDir.getAbsolutePath() + '/search.js') ++ // Append the patch to the file. By being defined at a later position, JS will execute that definition instead of ++ // the one provided by default (higher up in the file). ++ searchJsFile.append SEARCH_PATCH_MODULE_LESS_AWARE ++ } + } diff --git a/kafka.spec b/kafka.spec index 99f635910af53a9e7290ba9bc72954363a4b9ca3..5ba4b7d00db7e91eae61900c363aa80d126a8864 100644 --- a/kafka.spec +++ b/kafka.spec @@ -4,7 +4,7 @@ Name: kafka Version: 2.8.2 -Release: 15 +Release: 16 Summary: A Distributed Streaming Platform. License: Apache-2.0 @@ -27,6 +27,7 @@ Patch11: 0012-incorrectly-LeaderElectionCommand.patch Patch12: 0013-AlterIsr.patch Patch13: 0014-override-toString.patch Patch14: 0015-SessionWindows-closed-early.patch +Patch15: 0016-non-existent-URL.patch BuildRequires: systemd java-1.8.0-openjdk-devel Provides: kafka = %{version} @@ -78,6 +79,8 @@ cp -pr licenses/* $RPM_BUILD_ROOT%{kafka_home}/licenses rm -rf %{buildroot} %changelog +* Fri Dec 08 2023 sundapeng - 2.8.2-16 +- Javadocs search sends you to a non-existent URL * Fri Dec 08 2023 sundapeng - 2.8.2-15 - SessionWindows are closed too early * Fri Dec 08 2023 sundapeng - 2.8.2-14