This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-3553-b5cc6a1c179eafd3bc3159f1f537b8928f293c15
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git

commit 18d8ed2c2c051de13ced656a91246a318f95ff00
Author: NingLin Liu <[email protected]>
AuthorDate: Tue Oct 27 15:25:42 2026 +0000

    chore(release): check crate LICENSE/NOTICE files in verify_rc.sh (#3553)
---
 dev/release/README.md    |  4 +++-
 dev/release/verify_rc.sh | 30 +++++++++++++++++++++++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/dev/release/README.md b/dev/release/README.md
index 4a9cecd8f..98c183a5b 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -74,7 +74,7 @@ Pass `--check_publish 0` to skip it when offline or when 
iterating on the script
 dev/release/verify_rc.sh 0.9.1 2
 ```
 
-By default this downloads from 
`https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-rust-0.9.1-rc2/`,
 verifies checksum and signature with the local GPG keyring, checks source 
headers, and runs Rust and Python build/tests.
+By default this downloads from 
`https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-rust-0.9.1-rc2/`,
 verifies checksum and signature with the local GPG keyring, checks source 
headers and that every publishable crate packages the root `LICENSE` and 
`NOTICE`, and runs Rust and Python build/tests.
 
 To verify artifacts already created under local `dist/`:
 
@@ -88,6 +88,7 @@ Common options:
 dev/release/verify_rc.sh 0.9.1 2 --verify_signature 0
 dev/release/verify_rc.sh 0.9.1 2 --import_gpg_keys 1
 dev/release/verify_rc.sh 0.9.1 2 --build 0 --python 0 --check_headers 0
+dev/release/verify_rc.sh 0.9.1 2 --check_crate_licenses 0
 ```
 
 Defaults:
@@ -97,6 +98,7 @@ Defaults:
 - `--verify_signature 1`: verify the `.asc` signature with the local GPG 
keyring.
 - `--import_gpg_keys 0`: download and import Apache Iceberg release keys 
before signature verification.
 - `--check_headers 1`: check Apache license headers against the extracted 
source archive.
+- `--check_crate_licenses 1`: run `dev/release/licenses.py crates check` 
against the extracted source archive, so every publishable crate must package 
the root `LICENSE` and `NOTICE`. Requires `cargo` and `python3`.
 - `--build 1`: build and test the Rust source distribution.
 - `--python 1`: build and test pyiceberg-core.
 - `--tmp_dir <auto>`: verification sandbox; auto-created and deleted on 
success when omitted.
diff --git a/dev/release/verify_rc.sh b/dev/release/verify_rc.sh
index 253803452..326e3a92d 100755
--- a/dev/release/verify_rc.sh
+++ b/dev/release/verify_rc.sh
@@ -102,6 +102,12 @@ Options:
       Whether to check Apache license headers against the extracted source 
archive.
       Default: 1
 
+  --check_crate_licenses <0|1>
+      Whether to check that every publishable crate in the extracted source 
archive
+      packages the root LICENSE and NOTICE (dev/release/licenses.py crates 
check).
+      Requires cargo and python3.
+      Default: 1
+
   --build <0|1>
       Whether to build and test the Rust source distribution.
       Default: 1
@@ -122,7 +128,7 @@ Examples:
   $0 0.9.1 2 --download 0
   $0 0.9.1 2 --import_gpg_keys 1
   $0 0.9.1 2 --verify_git_tag 0
-  $0 0.9.1 2 --download 0 --build 0 --python 0 --check_headers 0 
--verify_signature 0
+  $0 0.9.1 2 --download 0 --build 0 --python 0 --check_headers 0 
--check_crate_licenses 0 --verify_signature 0
 USAGE
 }
 
@@ -253,6 +259,12 @@ parse_args() {
         CHECK_HEADERS="$2"
         shift 2
         ;;
+      --check_crate_licenses | --check-crate-licenses)
+        require_option_value "$1" "${2:-}"
+        validate_bool_option "$1" "$2"
+        CHECK_CRATE_LICENSES="$2"
+        shift 2
+        ;;
       --build)
         require_option_value "$1" "${2:-}"
         validate_bool_option "$1" "$2"
@@ -427,6 +439,15 @@ check_license_headers() {
   docker run --rm -v "${VERIFY_TMPDIR}/${ARCHIVE_BASE_NAME}:/github/workspace" 
apache/skywalking-eyes header check
 }
 
+check_crate_licenses() {
+  require_command cargo
+  require_command python3
+  (
+    trap - ERR
+    python3 "${ARCHIVE_BASE_NAME}/dev/release/licenses.py" crates check
+  )
+}
+
 test_source_distribution() {
   require_command make
   (
@@ -465,6 +486,7 @@ IMPORT_GPG_KEYS="0"
 VERIFY_GIT_TAG="1"
 GIT_REPO_URL="https://github.com/apache/iceberg-rust.git";
 CHECK_HEADERS="1"
+CHECK_CRATE_LICENSES="1"
 BUILD="1"
 PYTHON="1"
 
@@ -507,6 +529,12 @@ else
   skip_step "Check license headers"
 fi
 
+if enabled "${CHECK_CRATE_LICENSES}"; then
+  run_step "Check crate licenses in source archive" check_crate_licenses
+else
+  skip_step "Check crate licenses in source archive"
+fi
+
 if enabled "${BUILD}"; then
   run_step "Build and test Rust source distribution" test_source_distribution
 else

Reply via email to