Repository navigation
chore: add LICENSE-binary, NOTICE-binary and dependencies CI check - #4387
Merged
Merged
Conversation
bobbai00
marked this pull request as draft
April 15, 2026 17:33
bobbai00
force-pushed
the
chore/draft-binary-license
branch
from
April 18, 2026 07:03
40ee56a to
5809c4c
Compare
bobbai00
marked this pull request as ready for review
April 18, 2026 20:59
parshimers
reviewed
Apr 27, 2026
parshimers
reviewed
Apr 27, 2026
parshimers
reviewed
Apr 27, 2026
parshimers
left a comment
Member
There was a problem hiding this comment.
looks a lot better overall, just a couple questions
…r-jar license pointers
LICENSE-binary changes:
- Strip the redundant `lib/` path prefix from all 566 JVM jar bullets;
the prose at the top of the Scala/Java jars block already documents
that they ship under each service's `lib/` directory.
- Expand the mbknor-jackson-jsonschema source-files entry from a
single directory line to the explicit list of 13 .java/.scala files
actually adapted from upstream, matching the per-file granularity of
the sibling formly / monaco-languageclient / SVGRepo entries.
Addresses parshimers's review on PR apache#4387.
- Drop all 33 `(see licenses/LICENSE-*.txt)` inline suffixes. The
per-dep license files under `licenses/` continue to ship verbatim
for jars whose upstream LICENSE preserves embedded third-party
copyrights (commons-math3 / pekko / netty / lucene / jackson /
threeten-extra / postgresql / awssdk-third-party-jackson /
hadoop-shaded). Mirrors Spark's licenses-binary/ pattern: directory
listing is the index; LICENSE-binary stays clean.
Tooling change:
- bin/licensing/check_binary_deps.py: simplify JAR_BULLET regex now
that bullets no longer carry the `lib/` prefix.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add bin/licensing/audit_jar_licenses.py: walks each bundled jar's
LICENSE/NOTICE files (jar root + META-INF/, including subdirectory
variants like META-INF/license/ that netty-3.x uses, and the deeply-
nested META-INF/licenses/<group>/.../LICENSE pattern that postgresql
JDBC ships its OnGres component licenses under), groups jars by
license-content hash so intra-project duplicates collapse, and flags
groups whose upstream LICENSE preserves embedded third-party copyrights
beyond the canonical SPDX template. Strict criterion:
- LICENSE size > 11600 bytes (canonical Apache-2.0 ~= 11357), OR
- LICENSE contains an explicit "Licenses for included components"
block (Lombok-style), OR
- >= 4 distinct Copyright lines.
Wire it into the JVM job in .github/workflows/check-binary-licenses.yml
as an advisory step (always runs, never fails) so reviewers can see at
a glance which jars warrant a per-dep licenses/LICENSE-*.txt file.
This addresses parshimers's review on PR apache#4387 surfacing that the
original per-dep file selection in commit 6d2e17d (lombok was the
example) was unsystematic — a manual hand-pick seeded by the prior
commons-math3/Mersenne-Twister example rather than a per-jar audit.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ced by audit Running the new audit_jar_licenses.py against the dist surfaced 28 distinct LICENSE-content groups warranting a per-dep file under our established convention (preserve upstream LICENSEs whose text carries copyrights for code embedded inside the jar). The original 14 files landed in commit 6d2e17d covered ~9 of those groups; the remaining 19 are added here, extracted verbatim from a sample jar in each group: - LICENSE-iceberg.txt (6 jars: iceberg-api, -aws, -common, -core, -data, -parquet) - LICENSE-iceberg-bundled-guava.txt (1 jar) - LICENSE-pekko-cluster.txt (1 jar) - LICENSE-pekko-protobuf-v3.txt (1 jar) - LICENSE-guice.txt (Google Guice 4.0) - LICENSE-jetty-jakarta-servlet-api.txt - LICENSE-jetty-9.4.txt (21 jetty 9.4 jars) - LICENSE-jetty-11.0.txt (7 jetty 11.0 jars) - LICENSE-avro.txt (Apache Avro 1.12.0) - LICENSE-lombok.txt (parshimers's example: lombok ships LICENSE at jar root with ASM/INRIA + other component attributions) - LICENSE-hadoop.txt (11 hadoop 3.3.x jars) - LICENSE-aws-sdk.txt (29 awssdk-* jars) - LICENSE-javax-mail.txt (CDDL+GPLv2-CPE) - LICENSE-jaxb-api.txt (CDDL+GPLv2-CPE) - LICENSE-javax-activation.txt (CDDL+GPLv2-CPE) - LICENSE-javax-ee-cddl.txt (3 jars: javax.annotation, javax.servlet, glassfish javax.el) - LICENSE-glassfish-hk2.txt (4 jars) - LICENSE-jakarta-ee.txt (5 jars: jakarta.annotation 2.1.1+3.0.0, jakarta.el 4.0.0, glassfish.jakarta.el 4.0.2, jakarta.ws.rs 3.0.0+3.1.0) - LICENSE-jersey.txt (8 jersey 3.0.12 jars) Per the previous-commit decision, no inline `(see licenses/...)` references are added to LICENSE-binary; the licenses/ directory listing serves as the index, mirroring Spark's licenses-binary/ pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Following the same audit-driven pass that filled the per-dep license
gap, NOTICE-binary now reproduces every substantive upstream
META-INF/NOTICE the audit found uncovered. ASF Apache-2.0 section 4d
requires preserving "the attribution notices contained within such
NOTICE file"; the previous file relied on a hedge ("Individual bundled
jars continue to carry their own META-INF/NOTICE files...") which is
weaker than reproducing the substantive content directly.
Changes:
* APACHE SOFTWARE FOUNDATION PROJECTS WITH SUBSTANTIVE UPSTREAM NOTICES
+ Apache Iceberg block — preserves the Cloudera/Kite copyright that
Iceberg's upstream NOTICE inlines.
* APACHE SOFTWARE FOUNDATION PROJECTS WITH STANDARD NOTICES
+ Apache HTrace (Incubating) — was missing entirely.
+ Apache Iceberg one-liner — was missing entirely.
* THIRD-PARTY APACHE-LICENSED WORKS WITH THEIR OWN NOTICES
+ Jackson core 2.18.6 verbatim NOTICE (FastDoubleParser shaded copy,
fast_double_parser BSL, fast_float MIT, bigint BSD-2 — none of
these were preserved by the previous shorter Jackson section).
+ Jackson modules / datatypes verbatim NOTICEs (annotations +
databind, afterburner + blackbird, dataformat-yaml old + new,
jaxb-annotations + no-ctor-deser, datatype-jdk8/jsr310 etc.).
+ Eclipse Jetty 11.0 (UnixCrypt + per-feature dependency listing —
the existing Jetty section covers Jetty 9.4 only).
+ Apache Parquet supplementary notices for parquet-avro and
parquet-jackson (Avro vendoring, Jackson vendoring).
+ R2DBC SPI section (was missing entirely).
+ Joda-Convert section (sibling to existing Joda-Time; preserves
Google Guava code embedded in joda-convert's jar).
* ECLIPSE PROJECTS — replaced the three one-liner stub entries
(jakarta.ws.rs, jakarta.activation, jakarta.xml.bind) with verbatim
inline NOTICEs for every Eclipse-project jar bundled:
- Eclipse Jersey (containers, server, common, bean-validation)
— preserves Jersey's vendored Bean Validation, Bootstrap,
Guava, jQuery, Javassist, ASM, jakarta.inject, KineticJS,
JSR-166, AOP Alliance, OSGi, W3.org attributions.
- Eclipse GlassFish HK2 family.
- Eclipse Jetty Servlet API (jakarta-servlet-api 5.0.2).
- Jakarta XML Binding API.
- Jakarta RESTful Web Services API.
- Jakarta Expression Language API.
- Jakarta Annotations API (2.1.1 and 3.0.0 each shipped a
slightly different upstream NOTICE; both reproduced).
- Jakarta Inject API.
- Jakarta Activation (com.sun + jakarta).
NOTICE-binary grows from 479 to 2167 lines. Each upstream NOTICE is
introduced by a "From <jar>:META-INF/NOTICE" header so a reader can
trace any block back to its source jar.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The five all-caps banner sections that grouped notices into 'APACHE SOFTWARE FOUNDATION PROJECTS WITH SUBSTANTIVE UPSTREAM NOTICES', '... WITH STANDARD NOTICES', 'THIRD-PARTY APACHE-LICENSED WORKS WITH THEIR OWN NOTICES', 'ECLIPSE PROJECTS', and 'ADDITIONAL NOTICES FOR NON-APACHE-LICENSED BUNDLED COMPONENTS' were a Texera-original taxonomy, not standard ASF practice. Spark, Hadoop, Kafka, and Flink all just inline upstream NOTICEs sequentially with whatever per-project divider the upstream NOTICE itself uses, no top-level category headings. The taxonomy also imposed editorial judgment that's hard to defend: 'substantive' vs 'standard' is our call, not a legal distinction, and 'ECLIPSE PROJECTS' as a peer of 'ASF projects' organizes by foundation of origin rather than by the more conventional jar/coord. Future jar additions had to be triaged into a bucket; without the buckets, they just get appended. Also drop the trailing 'Individual bundled jars continue to carry their own META-INF/NOTICE files...' hedge, which made sense when this file omitted substantive upstream content but is misleading now that we reproduce it inline. NOTICE-binary: 2167 -> 2139 lines. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Spark's licenses-binary/ files are pure verbatim upstream license text
with no metadata. The previous '=== From <jar>:META-INF/LICENSE ===' /
'=== From <jar>:LICENSE ===' headers I added in three files (pekko-
protobuf-v3, guice, iceberg-bundled-guava) when the jar shipped multiple
LICENSE entries don't match that convention.
Re-extracted verbatim, deduping identical entries:
- LICENSE-pekko-protobuf-v3.txt: jar's two LICENSE files were byte-
identical Apache-2.0 copies; collapsed to one.
- LICENSE-guice.txt: two differing LICENSE entries (root LICENSE and
META-INF/LICENSE) kept, separated by a blank line per Spark style.
- LICENSE-iceberg-bundled-guava.txt: same shape — two differing
LICENSE entries kept, blank-line separator.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…-binary Spark's NOTICE-binary contains pure verbatim upstream NOTICE text with no Texera-added 'From <jar>:META-INF/NOTICE:' or 'From the following jars' META-INF/NOTICE (identical content):' breadcrumbs. The previous approach added two such breadcrumbs per inlined notice (a section divider plus a jar enumeration), inflating the file without adding legal weight — section dividers like '---\nApache Iceberg\n---' already identify the upstream project, and the verbatim upstream NOTICE itself opens with the project name. Stripped all 28 such breadcrumbs (14 jar-enumeration blocks listing multiple contributing jars + 14 single-jar 'From <jar>:META-INF/NOTICE:' headers). NOTICE-binary: 2139 -> 2037 lines. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
parshimers
reviewed
Apr 28, 2026
parshimers
reviewed
Apr 28, 2026
Mirror the existing JVM/frontend-npm/Python license checks for the new agent-service Node/Bun sidecar (added in upstream commit dd39f93). Pieces: agent-service/bin/collect-licenses.ts Walks node_modules/<pkg>/package.json (and node_modules/@<scope>/<pkg>) after `bun install --production --frozen-lockfile`, emits a {name, version, license}[] manifest in the same shape that the frontend's license-webpack-plugin produces. Bun has no built-in license enumerator; this is a 60-line replacement. bin/licensing/check_binary_deps.py + ECO_HEADERS["agent-npm"] = "Agent service npm packages" + new agent-npm branch in main(), reusing collect_npm() and NPM_BULLET (the agent-service manifest has the same JSON shape and bullet format as the frontend's). LICENSE-binary + 'Agent service npm packages:' subsection added under each license type the agent-service deps land in: Apache-2.0 (9 pkgs), MIT (43 pkgs), BSD-3-Clause (3 pkgs), ISC (1 pkg), 0BSD (1 pkg). Total 57 production deps (transitive closure of 9 dependencies in agent-service/package.json). All ASF Category A; no copyleft. [email protected] is dual-licensed AFL-2.1 OR BSD-3-Clause; we redistribute under BSD-3-Clause. .github/workflows/check-binary-licenses.yml + check-agent-service-deps job mirroring the frontend's check-npm-deps shape: setup Bun, install --production --frozen-lockfile, run the collector, diff against LICENSE-binary. Verified locally: ./bin/licensing/check_binary_deps.py agent-npm agent-service/dist/3rdpartylicenses.json reports "OK: 57 agent-service npm packages match LICENSE-binary." Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…T entries parshimers's review on PR apache#4387 (comment 3151423334) on the mbknor entry: once the derived files are enumerated, the inline 'Copyright (c) ...' line in LICENSE-binary is redundant — the MIT-required copyright preservation already lives in each derived source file's header. Verified each derived file actually carries the upstream copyright in its header: - mbknor-jackson-jsonschema (13 .java/.scala files) /* Copyright (c) 2016 Kjell Tore Eliassen (mbknor) ... */ - Google Angular formly examples (4 .ts files) /* Copyright 2018 Google Inc. All Rights Reserved. ... */ - TypeFox monaco-languageclient (3 .ts files) /* Copyright (c) 2024 TypeFox and others. ... */ Stripped the now-redundant 'Copyright (c) ...' lines from the LICENSE- binary entries for all three. The remaining bullet structure (project name + enumerated file paths + upstream URL) still identifies each upstream source. SVGRepo entry already had no inline copyright line, so it's unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
parshimers
approved these changes
Apr 28, 2026
parshimers
left a comment
Member
There was a problem hiding this comment.
looks good to me. only thing i think to be sure of is that the LICENSE-binary gets renamed to LICENSE in the actual binary distribution, and the same for NOTICE
This was referenced Nov 24, 2026
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 changes were proposed in this PR?
Add two binary-distribution compliance manifests at the repo root:
CI and some util scripts are also added for checking the updates on the dependencies
Any related issues, documentation, discussions?
Related to #4396.
How was this PR tested?
Manually reviewed using the spreadsheets:
Round 1: https://docs.google.com/spreadsheets/d/1kAxKorZGOjKO2hjVFgmYb4aCBy-MWVmy/edit?usp=sharing&ouid=112107075417491968565&rtpof=true&sd=true
Round 2: https://docs.google.com/spreadsheets/d/1h0yhv6gINRUw212cmatYJyXOokGbdyhe/edit?usp=sharing&ouid=112107075417491968565&rtpof=true&sd=true
Was this PR authored or co-authored using generative AI tooling?
Co-authored with: Claude Code (Claude Opus 4.7)