weiting-chen opened a new pull request, #13689: URL: https://github.com/apache/gluten/pull/13689
## What changes are proposed in this pull request? Retain the third-party license texts and copyright notices referenced by the binary distribution's LICENSE, both inside the shaded JAR and alongside it in release tarballs. The 1.8.0 RC0 audit found two related packaging gaps that are still present on main: - The outer LICENSE lists MIT components, and the outer NOTICE contains MIT texts for other components, but the required Checker Framework copyright notice is missing. All five RC0 Spark bundles contain 356 classes byte-identical to `checker-qual:3.33.0`. Spark 3.4 additionally bundles SLF4J without its QOS.ch copyright notice. - `LICENSE-binary` refers to `licenses-binary/`, which is not shipped. The shade configuration removes dependency license resources, and the resulting JAR's `META-INF/LICENSE` contains only Apache License 2.0. This patch: - Adds upstream license texts for Checker Framework and SLF4J, including their required copyrights. - Supplies the BSD/EDL/EPL texts needed by the other entries pointing at the same missing directory, and gives each component an explicit path. The protobuf coordinates are aligned with the dependencies currently used by main. - Packages the texts under `META-INF/licenses-binary/` and explicitly writes `LICENSE-binary` / `NOTICE-binary` as the shaded JAR's `META-INF/LICENSE` / `META-INF/NOTICE`, rather than retaining an arbitrary dependency's Apache-only metadata. Existing same-name resources are filtered to avoid duplicate ZIP entries. - Copies `licenses-binary/` into binary release tarballs and fails early if the directory is absent. - Adds native-independent packaging regression tests under `gluten-ut/` and documents how to run them. This addresses license retention and broken references, not an exhaustive audit of the existing dependency inventory. It does not change dependency versions, runtime code, the source distribution's LICENSE/NOTICE, or the separate Velox spill issue. References: - [ASF release licensing documentation](https://www.apache.org/legal/release-policy.html#license-file) - [1.8.0 RC0 vote thread](https://lists.apache.org/thread/1zqmz690d01r8yc1f0mto10z1y1jg5z3) - License provenance: `checker-qual:3.33.0`'s `META-INF/LICENSE.txt`; `slf4j-api:2.0.6`'s source headers; [Paranamer 2.8](https://github.com/paul-hammant/paranamer/blob/paranamer-parent-2.8/LICENSE.txt); [protobuf v23.4](https://github.com/protocolbuffers/protobuf/blob/v23.4/LICENSE); and the EDL/EPL files distributed in `eclipse-collections:11.1.0`. ## How was this patch tested? On Linux with Java 17 and the repository-pinned Maven wrapper: ```bash python3 -m unittest discover -s gluten-ut/src-release/test/python -v ./build/mvn -N -f package/pom.xml spotless:check \ -Pbackends-velox,spark-4.2,java-17,scala-2.13 ./build/mvn -N validate -Pbackends-velox,spark-4.2,java-17,scala-2.13 python3 .github/workflows/util/check.py header main --fix bash -n dev/release/package-release.sh git diff --check ``` All three regression tests pass. They: - Build real shaded fixture JARs using the production resource definitions, shade configuration and pinned Shade plugin version, with Checker Framework bundled and SLF4J either bundled or provided. Assert class presence, exact binary LICENSE/NOTICE contents, retained copyright/permission notices, resolution of every referenced license file, and no duplicate ZIP entries, including when Apache-only metadata is already present in the input. - Run the real release script against fixture JARs for every Spark version currently configured in that script, substituting only the source ZIP download, and inspect the resulting tarballs. - Check that release packaging rejects a missing license directory. The same regression suite fails against the original main-branch production configuration. The six added texts were compared with their upstream sources, ignoring whitespace/comment formatting where applicable. Validation used a task-local public Maven Central mirror and task-local missing tool installations; no global build settings were changed. No full native build or SQL test matrix was run: these tests exercise the changed resource/shading/release packaging paths without native compilation. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: GitHub Copilot CLI 1.0.114 (GPT-6.1 Sol) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
