[700] Bundle license texts for all non-Apache-2.0 shaded dependencies - #857
Open
rangareddy wants to merge 1 commit into
Open
[700] Bundle license texts for all non-Apache-2.0 shaded dependencies#857rangareddy wants to merge 1 commit into
rangareddy wants to merge 1 commit into
Conversation
The bundled (shaded) jars listed third-party dependencies in LICENSE-bundled but shipped no license text for many of them, even though the banner points to "licenses/ for text of these licenses". This adds the missing texts and makes the tooling keep them complete. - generate_shaded_license_metadata.py now also regenerates each module's META-INF/licenses/ directory: for every non-Apache-2.0 bundled dependency it writes LICENSE-<artifactId>, sourced from a curated override first, then the dependency's own jar. It fails loudly when a dependency has neither, so an unattributed dependency cannot slip through. (junit is a concrete case where the jar bundles Hamcrest's BSD text rather than its own CPL, so the override must win.) - release/scripts/license_overrides/ holds the curated texts for dependencies whose jars carry no (or a misleading) license: the previously hand-maintained texts plus canonical texts for asm, protobuf, jline, antlr, xmlenc, zstd-jni, reactive-streams, stax-api, jamon (MPL 2.0), junit (CPL 1.0) and aopalliance. - validate_shaded_license_coverage.sh now fails when any non-Apache-2.0 dependency in LICENSE-bundled has no META-INF/licenses/LICENSE-<artifactId>, so this gap cannot reopen. - Generator robustness for future regens: map EPL 1.0 and treat org.apache.hadoop as Apache-2.0 (consistent with the existing hbase/zookeeper overrides). Coordinate lists in LICENSE-bundled/NOTICE-bundled are unchanged; the texts are keyed off the committed (canonical) dependency list. Closes apache#700
rangareddy
force-pushed
the
700-bundle-license-texts
branch
from
July 22, 2026 12:27
50ac2c9 to
efbffc9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The bundled (shaded) jars list their third-party dependencies in
META-INF/LICENSE(LICENSE-bundled), and the banner says "See licenses/ for text of these licenses" — but many bundled non-Apache-2.0 dependencies shipped no license text at all. This adds the missing texts and makes the tooling keep them complete and enforced.Closes #700
Background
The earlier tooling (
generate_shaded_license_metadata.py+validate_shaded_license_coverage.sh) already made the coordinate listing inLICENSE-bundledcomplete and validated. The remaining gap (raised in the issue's follow-up comment) was the actual license text files underMETA-INF/licenses/— e.g.xtable-hive-metastorebundled ~20 non-AL2 dependencies (protobuf, asm, jamon/MPL-2.0, javax.mail/CDDL, junit/CPL, …) with no bundled license text, and nothing validated their presence.Changes
generate_shaded_license_metadata.pynow also regenerates each module'sMETA-INF/licenses/directory. For every non-Apache-2.0 bundled dependency it writesLICENSE-<artifactId>, sourced from:META-INF/LICENSE*,LICENSE*, …).It fails loudly if a dependency has neither, so an unattributed dependency can't slip through. Override-first matters because some jars bundle a misleading license — e.g.
junit:4.11'sLICENSE.txtis actually Hamcrest's BSD text, not junit's Common Public License.release/scripts/license_overrides/— curated texts for dependencies whose jars carry no (or a misleading) license: the previously hand-maintained texts (paranamer, javolution, leveldbjni, jruby-jcodings/joni, jersey) plus canonical texts forasm,protobuf-java,jline,antlr/ST4,xmlenc,zstd-jni,reactive-streams(MIT-0),stax-api,jamon-runtime(MPL 2.0, extracted verbatim),junit(CPL 1.0, extracted verbatim) andaopalliance(public domain).validate_shaded_license_coverage.shnow fails when any non-Apache-2.0 dependency listed inLICENSE-bundledhas noMETA-INF/licenses/LICENSE-<artifactId>, so this gap cannot reopen.Generator robustness for future regenerations: map
EPL 1.0, and treatorg.apache.hadoopas Apache-2.0 (consistent with the existinghbase/zookeeper/velocitygroup overrides).Result: every non-Apache-2.0 bundled dependency now has a license text —
xtable-aws(5/5),xtable-hive-metastore(29/29),xtable-hudi-support-extensions(3/3).Notes / scope
LICENSE-bundled/NOTICE-bundledare intentionally unchanged. The license texts are keyed off the committed (canonical) dependency list rather than a freshly resolved tree, so the result is reproducible regardless of local~/.m2state.xtable-utilities(unpublished, already skipped by the validator) is out of scope; the generator now skips shade modules with no built dependency tree.Testing
bash -non the validator andpython3 -m py_compileon the generator pass.