Skip to content

Commit 677ae8f

Browse files
committed
fix(cargo-deny): clarify zstd-sys and brotli-decompressor
1 parent ba849a6 commit 677ae8f

2 files changed

Lines changed: 349 additions & 5 deletions

File tree

‎deny.toml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
all-features = true
2121

2222
[licenses]
23+
# Licenses we permit don't really change, no point removing them.
24+
unused-allowed-license = "allow"
25+
unused-license-exception = "deny"
26+
2327
allow = [
2428
"Apache-2.0",
2529
"Apache-2.0 WITH LLVM-exception",
@@ -43,3 +47,33 @@ exceptions = [
4347
{ allow = ["MPL-2.0"], crate = "colored" },
4448
{ allow = ["MPL-2.0"], crate = "option-ext" },
4549
]
50+
51+
# Clarifications use a hash to verify if the license file bytes changed.
52+
# To recompute: uv run dev/release/licenses.py dependencies clarification-hash <file>
53+
54+
# TODO: zstd-sys 2.1 relicensed the wrapper and bindings to BSD-3-Clause.
55+
# Transient dependency, drop when we upgrade (likely when we upgrade to Arrow 60).
56+
# https://github.com/apache/iceberg-rust/issues/3307
57+
[[licenses.clarify]]
58+
crate = "zstd-sys"
59+
expression = "(MIT OR Apache-2.0) AND BSD-3-Clause AND (GPL-2.0-only OR BSD-3-Clause)"
60+
license-files = [
61+
{ path = "LICENSE.Apache-2.0", hash = 0x7b466be4 },
62+
{ path = "LICENSE.Mit", hash = 0xa237d234 },
63+
# BSD-3-Clause of the pre-generated bindings the crate ships.
64+
{ path = "LICENSE.BSD-3-Clause", hash = 0xc9f5c4f6 },
65+
# BSD-3-Clause of the vendored zstd sources.
66+
{ path = "zstd/LICENSE", hash = 0x3bfe1fb1 },
67+
# GPL-2.0-only of the vendored zstd sources.
68+
{ path = "zstd/COPYING", hash = 0xeaa66bfd },
69+
]
70+
71+
# https://github.com/dropbox/rust-brotli-decompressor/pull/32 fixes this upstream.
72+
[[licenses.clarify]]
73+
crate = "brotli-decompressor"
74+
expression = "BSD-3-Clause AND MIT"
75+
license-files = [
76+
{ path = "LICENSE", hash = 0x1a60a92d }, # BSD-3-Clause
77+
# Missing: crate is MIT licensed but has no license text to refer to.
78+
# If the project dropped the MIT license, we wouldn't know to update the expression above.
79+
]

0 commit comments

Comments
 (0)