You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "jianguotian (via GitHub)" <gi...@apache.org> on 2026/09/21 12:13:26 UTC

[PR] fix(release): package complete native license files [paimon-mosaic]

jianguotian opened a new pull request, #97:
URL: https://github.com/apache/paimon-mosaic/pull/97

   ## Purpose
   
   The Java and Python release artifacts must carry legal files for the native code they distribute. The checked-in reports also need to describe target runtime dependencies rather than host-only build and proc-macro crates.
   
   ## Changes
   
   - generate the eight target-specific reports from `cargo-about` JSON intersected with `cargo tree --edges normal,no-proc-macro` for the corresponding release target;
   - fail closed on missing licenses, missing runtime packages, ambiguous same-name/version sources, or the separately licensed `zstd-sys` legacy feature;
   - preserve runtime NOTICE content and the pinned Rust Unicode attribution;
   - package target reports and the pinned Rust standard library copyright in Java JARs and Python wheels without checking the large Rust copyright file into the repository;
   - verify legal and native payloads in final JARs and wheels before upload, publication, or local Nexus staging;
   - retain the Java JNI smoke test and sources-JAR native exclusion.
   
   ## Scope
   
   This is release-packaging and verification only. It does not change the Mosaic runtime, public API, or file format.
   
   This PR supersedes #92 with a smaller, independent commit based directly on `main`.
   
   ## Validation
   
   - `python -m pytest -q tools/tests`: 230 passed
   - `bash tools/tests/deploy_java_staging_test.sh`: 5 scenarios passed
   - `python3 tools/generate_license_reports.py --check`: passed
   - `python3 tools/dependencies.py check`: passed
   - `python3 tools/check_license_headers.py`: passed
   - `cargo deny --manifest-path ffi/Cargo.toml --all-features check licenses`: passed
   - `cargo deny --manifest-path jni/Cargo.toml --all-features check licenses`: passed
   - `cargo fmt --all -- --check`: passed
   - actual aarch64 wheel build and artifact verification: passed
   - Java release-profile JAR packaging, artifact verification, sources-JAR exclusion, and host JNI smoke: passed
   - `git diff --check`: passed
   
   Official Apache PR checks have not reported a result for this head yet.
   


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(release): package complete native license files [paimon-mosaic]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #97:
URL: https://github.com/apache/paimon-mosaic/pull/97


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(release): package complete native license files [paimon-mosaic]

Posted by "jianguotian (via GitHub)" <gi...@apache.org>.
jianguotian commented on code in PR #97:
URL: https://github.com/apache/paimon-mosaic/pull/97#discussion_r4070241505


##########
python/setup.py:
##########
@@ -53,6 +61,31 @@ def _find_native_lib():
     return None
 
 
+def _stage_legal_files(destination_dir):
+    here = os.path.dirname(os.path.abspath(__file__))
+    staged = []
+
+    for name in LEGAL_FILES:
+        source = os.path.join(here, LEGAL_SOURCE_FILES[name])
+        destination = os.path.join(destination_dir, name)
+        if not os.path.isfile(source):
+            raise RuntimeError(f"required binary legal file is missing: {source}")

Review Comment:
   Fixed in 982160c. Repository canonical files remain preferred, with an sdist-local fallback for both metadata and package staging. Added a RED/GREEN sdist-to-wheel regression; default builds, the reported pip wheel command, and installed-wheel native loading pass locally.



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(release): package complete native license files [paimon-mosaic]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #97:
URL: https://github.com/apache/paimon-mosaic/pull/97#discussion_r4070110980


##########
python/setup.py:
##########
@@ -53,6 +61,31 @@ def _find_native_lib():
     return None
 
 
+def _stage_legal_files(destination_dir):
+    here = os.path.dirname(os.path.abspath(__file__))
+    staged = []
+
+    for name in LEGAL_FILES:
+        source = os.path.join(here, LEGAL_SOURCE_FILES[name])
+        destination = os.path.join(destination_dir, name)
+        if not os.path.isfile(source):
+            raise RuntimeError(f"required binary legal file is missing: {source}")

Review Comment:
   [P2] Allow legal-file staging from the generated sdist
   
   The generated sdist contains `LICENSE`, `NOTICE`, and `LICENSE-binary` alongside `setup.py`, but this code always requires the parent repository copies before checking those bundled files. Consequently, `python -m pip wheel --no-build-isolation --no-deps <generated-sdist.tar.gz>` now fails during metadata generation with `RuntimeError: required binary legal file is missing: .../../LICENSE`; the same packaging round trip succeeds on the base commit. This also breaks the default `python -m build` flow, which builds the wheel from an extracted sdist. Please use the canonical repository sources when available and fall back to the legal files bundled in the sdist when rebuilding it, including when staging into `mosaic/`, and cover the sdist-to-wheel round trip in a regression test.



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org