Skip to content

fix: generate the binary LICENSE for native dependencies - #7874

Draft
manuzhang wants to merge 2 commits into
apache:mainfrom
manuzhang:codex/generate-native-license
Draft

manuzhang wants to merge 2 commits into
apache:mainfrom
manuzhang:codex/generate-native-license

Conversation

@manuzhang

@manuzhang manuzhang commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Part of #7383.

Rationale for this change

The Comet JARs currently carry a small hand-maintained set of native license texts. The released Linux library includes additional Rust crates and vendored C libraries with their own terms and copyright notices.

What changes are included in this PR?

  • Generate spark/target/binary-legal/LICENSE-binary.txt in Maven's prepare-package phase. For a native JAR, resolve the locked amd64 and arm64 Linux release graphs with pinned cargo-about and include the vendored attributions. JVM-only packaging uses the project and shaded JVM license inputs.
  • Feed the generated file into both shaded JARs and compare each packaged copy byte-for-byte with that build output. The snapshot workflow runs Maven verify before publication.
  • Pin the Linux release builds to the same locked package selection and audit the graph in Rust CI.

How are these changes tested?

  • Online generation and offline generation produced identical output. The native LICENSE also matches the previously audited 534-version inventory byte-for-byte.
  • Spark 4.1 release-profile Maven verification passed with an existing macOS native library and verified exactly one matching LICENSE in each JAR.
  • The 18 generator and JAR-checker tests, Apache RAT, and CI configuration checks passed.

Resolve the locked Linux release graphs and record crate versions, license texts and vendored attributions. Regenerate in CI and verify the LICENSE in both shaded JARs.

Part of apache#7383.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Codex <codex@openai.com>
Create the legal resource in the build output before shading. Use the generated file for both JARs and verify the bytes before snapshot publication.

Co-authored-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant