Skip to content

Commit 4a6349b

Browse files
authored
Prepare release 0.5.0 (#66)
* Clarify GNU licenses
1 parent c58888e commit 4a6349b

File tree

4 files changed

+29
-18
lines changed

4 files changed

+29
-18
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## [0.5.0] - 2019-12-18
810
### Added
911
- Added the `advisories` check and configuration section for checking crates against an advisory database to detect security vulnerabilities, unmaintained crates, and crates with security notices
1012
- A warning will now be emitted if a crate that isn't in the graph is specified in `[bans.skip-tree]`

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cargo-deny"
33
description = "Cargo plugin to help you manage large dependency graphs"
44
repository = "https://github.com/EmbarkStudios/cargo-deny"
5-
version = "0.4.2"
5+
version = "0.5.0"
66
authors = ["Embark <[email protected]>", "Jake Shadle <[email protected]>"]
77
edition = "2018"
88
license = "MIT OR Apache-2.0"

README.md

+25-16
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,35 @@ Contains all of the configuration for `cargo deny check license`.
4747

4848
#### The `unlicensed` field (optional)
4949

50-
Determines what happens when a crate has not explicitly specified its license terms, and no license
51-
information could be easily detected via `LICENSE*` files in the crate's source.
50+
Determines what happens when a crate has not explicitly specified its license terms, and no license information could be easily detected via `LICENSE*` files in the crate's source.
5251

5352
* `deny` (default) - All unlicensed crates will emit an error and fail the license check
5453
* `allow` - All unlicensed crates will show a note, but will not fail the license check
5554
* `warn` - All unlicensed crates will show a warning, but will not fail the license check
5655

5756
#### The `allow` and `deny` fields (optional)
5857

59-
The licenses that should be allowed or denied. The license must be a valid SPDX v2.1 identifier, which must either be in version 3.6 of the [SPDX License List](https://spdx.org/licenses/), with an optional [exception](https://spdx.org/licenses/exceptions-index.html) specified by `WITH <exception-id>`, or else a user defined license reference denoted by `LicenseRef-<idstring>` for a license not on the SPDX License List.
58+
The licenses that should be allowed or denied. The license must be a valid SPDX v2.1 identifier, which must either be in version 3.7 of the [SPDX License List](https://spdx.org/licenses/), with an optional [exception](https://spdx.org/licenses/exceptions-index.html) specified by `WITH <exception-id>`, or else a user defined license reference denoted by `LicenseRef-<idstring>` for a license not on the SPDX License List.
6059

6160
**NOTE:** The same license cannot appear in both the `allow` and `deny` lists.
6261

62+
##### GNU licenses
63+
64+
* GPL
65+
* AGPL
66+
* LGPL
67+
* GFDL
68+
69+
The GNU licenses are, of course, different from all the other licenses in the SPDX list which makes them annoying to deal with. When supplying one of the above licenses, to either `allow` or `deny`, you must not use the suffixes `-only` or `-or-later`, as they can only be used by the license holder themselves to decide under which terms to license their code.
70+
71+
So, for example, if you we wanted to disallow `GPL-2.0` licenses, but allow `GPL-3.0` licenses, we could use the following configuration.
72+
73+
```toml
74+
[licenses]
75+
allow = [ "GPL-3.0" ]
76+
deny = [ "GPL-2.0" ]
77+
```
78+
6379
#### The `copyleft` field (optional)
6480

6581
Determines what happens when a license that is considered [copyleft](https://en.wikipedia.org/wiki/Copyleft) is encountered.
@@ -150,8 +166,7 @@ For example, we previously depended on OpenSSL as it is the "default" for many c
150166

151167
### Use Case - Get a handle on duplicate versions
152168

153-
One thing that is part of the tradeoff of being able to use so many crates, is that they all won't
154-
necessarily agree on what versions of a dependency they want to use, and cargo and rust will happily chug along compiling all of them. This is great when just trying out a new dependency as quickly as possible, but it does come with some long term costs. Crate fetch times (and disk space) are increased, but in particular, **compile times**, and ultimately your binary sizes, also increase. If you are made aware that you depend on multiple versions of the same crate, you at least have an opportunity to decide how you want to handle them.
169+
One thing that is part of the tradeoff of being able to use so many crates, is that they all won't necessarily agree on what versions of a dependency they want to use, and cargo and rust will happily chug along compiling all of them. This is great when just trying out a new dependency as quickly as possible, but it does come with some long term costs. Crate fetch times (and disk space) are increased, but in particular, **compile times**, and ultimately your binary sizes, also increase. If you are made aware that you depend on multiple versions of the same crate, you at least have an opportunity to decide how you want to handle them.
155170

156171
### The `[bans]` section
157172

@@ -170,8 +185,7 @@ Determines what happens when multiple versions of the same crate are encountered
170185
When multiple versions of the same crate are encountered and the `multiple-versions` is set to `warn` or `deny`, using the `-g <dir>` option will print out a [dotgraph](https://www.graphviz.org/) of each of the versions and how they were included into the graph. This field determines how the graph is colored to help you quickly spot good candidates for removal or updating.
171186

172187
* `lowest-version` - Highlights the path to the lowest duplicate version. Highlighted in ![red](https://placehold.it/15/ff0000/000000?text=+)
173-
* `simplest-path` - Highlights the path to the duplicate version with the fewest number of total
174-
edges to the root of the graph, which will often be the best candidate for removal and/or upgrading. Highlighted in ![blue](https://placehold.it/15/0000FF/000000?text=+).
188+
* `simplest-path` - Highlights the path to the duplicate version with the fewest number of total edges to the root of the graph, which will often be the best candidate for removal and/or upgrading. Highlighted in ![blue](https://placehold.it/15/0000FF/000000?text=+).
175189
* `all` - Highlights both the `lowest-version` and `simplest-path`. If they are the same, they are only highlighted in ![red](https://placehold.it/15/ff0000/000000?text=+).
176190

177191
![Imgur](https://i.imgur.com/xtarzeU.png)
@@ -196,7 +210,7 @@ As with `licenses`, these determine which specificy crates and version ranges ar
196210

197211
#### The `skip` field (optional)
198212

199-
When denying duplicate versions, it sometimes takes time to update versions in transitive dependencies, or big changes in core often used crates such as winapi and others to ripple through the rest of the ecosystem. In such cases, it can be ok to remove certain versions from consideration so that they won't trigger failures due to multiple versions, and can eventually be removed once all crates have update to the later version(s).
213+
When denying duplicate versions, it sometimes takes time to update versions in transitive dependencies, or big changes in core often used crates such as `winapi` and others to ripple through the rest of the ecosystem. In such cases, it can be ok to remove certain versions from consideration so that they won't trigger failures due to multiple versions, and can eventually be removed once all crates have update to the later version(s).
200214

201215
Note entries in the `skip` field that never match a crate in your graph will have a warning printed that they never matched, allowing you to clean up your configuration as your crate graph changes over time.
202216

@@ -307,13 +321,11 @@ The threshold for security vulnerabilities to be turned into notes instead of of
307321

308322
## CI Usage
309323

310-
`cargo-deny` is primarily meant to be used in your CI so it can do automatic verification for all
311-
your changes, for an example of this, you can look at the [self check](https://github.com/EmbarkStudios/cargo-deny/blob/master/.travis.yml#L77-L87) job for this repository, which just checks `cargo-deny` itself using the [deny.toml](deny.toml) config.
324+
`cargo-deny` is primarily meant to be used in your CI so it can do automatic verification for all your changes, for an example of this, you can look at the [self check](https://github.com/EmbarkStudios/cargo-deny/blob/master/.travis.yml#L77-L87) job for this repository, which just checks `cargo-deny` itself using the [deny.toml](deny.toml) config.
312325

313326
## List - `cargo deny list`
314327

315-
Similarly to [cargo-license](https://github.com/onur/cargo-license), print out the licenses and crates
316-
that use them.
328+
Similarly to [cargo-license](https://github.com/onur/cargo-license), print out the licenses and crates that use them.
317329

318330
* `layout = license, format = human` (default)
319331

@@ -348,7 +360,4 @@ at your option.
348360

349361
### Contribution
350362

351-
Unless you explicitly state otherwise, any contribution intentionally
352-
submitted for inclusion in the work by you, as defined in the Apache-2.0
353-
license, shall be dual licensed as above, without any additional terms or
354-
conditions.
363+
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

0 commit comments

Comments
 (0)