EmbarkStudios / cargo-deny

❌ Cargo plugin for linting your dependencies πŸ¦€

Home Page:http://embark.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: unable to allow intel/ittapi

dignifiedquire opened this issue Β· comments

Describe the bug

I am allowing BSD 3 Clause licenses in my project, but I have been unable to build a configuration that clarifies the license for https://github.com/intel/ittapi/ in a way that cargo deny accepts

To reproduce

Add https://github.com/intel/ittapi/ to the project and run cargo deny

cargo-deny version

0.14.20

What OS were you running cargo-deny on?

MacOS

Additional context

No response

ittapi and ittapi-sys clearly state their license in the package manifest https://github.com/intel/ittapi/blob/e20cd6099cb9c5afee0a285781c5cc1d32412f3e/rust/ittapi/Cargo.toml#L10 so I'm not sure why a clarification is desired?

because cargo deny rejects it, even though I allowe Bsd

Can you please show the exact error?

❯ cargo deny check
warning[accepted]: license requirements satisfied
  β”Œβ”€ registry+https://github.com/rust-lang/crates.io-index#ittapi@0.4.0:4:12
  β”‚
4 β”‚ license = "GPL-2.0-only OR BSD-3-Clause"
  β”‚            ---------------------------- license expression retrieved via Cargo.toml `license`
  β”‚
  = ittapi v0.4.0
    └── wasmtime v19.0.2
        β”œβ”€β”€ iroh-fog v0.1.0
        β”œβ”€β”€ wasi-common v19.0.2
        β”‚   └── <source crate> v0.1.0 (*)
        β”œβ”€β”€ wasmtime-wasi v19.0.2
        β”‚   └── <source crate> v0.1.0 (*)
        └── wiggle v19.0.2
            β”œβ”€β”€ wasi-common v19.0.2 (*)
            └── wasmtime-wasi v19.0.2 (*)

That's not an error, it's telling you that the license requirements were satisfied. The reason it is a warning is because you have either copyleft = 'warn' or default = 'warn' in your config.

Is that enabled by default? this is my current license config

[licenses]
allow = [
      "Apache-2.0",
      "Apache-2.0 WITH LLVM-exception",
      "BSD-2-Clause",
      "BSD-3-Clause",
      "BSL-1.0", # BOSL license
      "ISC",
      "MIT",
      "Unicode-DFS-2016",
      "Zlib",
      "OpenSSL",
      "MPL-2.0", # https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/
      "CC0-1.0",
]
clarify = [
    { name = "ring", expression = "OpenSSL", license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] },
]

They are enabled by default, use version = 2 to opt-in to the future breaking change that removes copyleft/default. https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html#the-version-field-optional

I see, thanks for the clarifications!