Skip to content

Commit

Permalink
Fixup license clarifications (#533)
Browse files Browse the repository at this point in the history
- Fixup license clarification
- Add clarification example
- Add test

Resolves: #521 
Resolves: #524
  • Loading branch information
Jake-Shadle committed Jul 26, 2023
1 parent 2a59de4 commit 3fce203
Show file tree
Hide file tree
Showing 9 changed files with 2,742 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ documentation = "https://docs.rs/cargo-deny"
homepage = "https://github.com/EmbarkStudios/cargo-deny"
categories = ["development-tools::cargo-plugins"]
keywords = ["cargo", "license", "spdx", "ci", "advisories"]
exclude = ["examples/", ".github/", "tests"]
exclude = ["docs/", "examples/", ".github/", "tests"]
rust-version = "1.70.0"

[badges]
Expand Down
216 changes: 216 additions & 0 deletions examples/13_license_clarification/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions examples/13_license_clarification/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "license-clarification"
version = "0.1.0"
authors = ["Jake Shadle <jake.shadle@embark-studios.com>"]
license = "MIT OR Apache-2.0"
edition = "2018"

[[bin]]
name = "allow-license"
path = "main.rs"

[dependencies]
rustls-webpki = "=0.100.1"
4 changes: 4 additions & 0 deletions examples/13_license_clarification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 13_license_clarification

This example shows how to clarify the license information for a project that may
have missing or non-machine readable licenses that need a human to correct.
27 changes: 27 additions & 0 deletions examples/13_license_clarification/deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[licenses]
allow = ["MIT", "Apache-2.0", "ISC"]
private = { ignore = true }
exceptions = [
{ name = "ring", allow = [
"OpenSSL",
] },
{ name = "unicode-ident", allow = [
"Unicode-DFS-2016",
] },
{ name = "rustls-webpki", allow = [
"BSD-3-Clause",
] },
]

[[licenses.clarify]]
name = "ring"
expression = "ISC AND MIT AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]

[[licenses.clarify]]
name = "rustls-webpki"
expression = "ISC AND BSD-3-Clause"
license-files = [
{ path = "LICENSE", hash = 0x001c7e6c },
{ path = "third-party/chromium/LICENSE", hash = 0x001c7e6c },
]
1 change: 1 addition & 0 deletions examples/13_license_clarification/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() {}
Loading

0 comments on commit 3fce203

Please sign in to comment.