Include LICENSE in release artifacts
Closed this issue · 4 comments
Hi there,
I'm looking at importing this crate into Google's codebase as a third party crate. The way the tooling works, it imports the artifacts from releases on crates.io. We also have a requirement that all code included in Google's codebase has a permissible license.
Reborrow has the MIT license (thanks!!), and while that license datum is in Cargo.toml
, for whatever reason Google prefers the LICENSE
file itself to be included in the crates.io release artifacts.
It appears not to be there for reborrow, though the repository base has the LICENSE file.
$ wget -O reborrow.tar.gz https://crates.io/api/v1/crates/reborrow/0.5.1/download
$ tar xvzf reborrow.tar.gz
$ ls reborrow-0.5.1
Cargo.toml Cargo.toml.orig README.md src
Would it be possible to add the existing LICENSE to the release artifacts?
i'm not familiar with crates.io release artifacts. would adding the LICENSE file to the two subfolders in reborrow/reborrow-derive solve the issue?
I was afraid you'd ask me that! 😅
In short, yes, I think if you copy the licenses to the subdirectories and publish a new minor version, it will work. But to be sure, I had to look it up in the Cargo book:
https://doc.rust-lang.org/cargo/reference/publishing.html#packaging-a-crate
If you run cargo package --list
it will show you what files will be uploaded by cargo publish
. Unless your Cargo.toml
has an explicit includes
directive, it should automatically include everything in the source directory (under the same directory as Cargo.toml
), ignoring what your VCS has ignored. You can also try cargo publish --dry-run
and then manually inspect the .crate
generated.
Thanks for being open to this bureaucratic nit picking.
i published v0.5.2 after adding the license file to both subdirectories. is this everything that's needed?
Works great with our tools. Thanks for your cooperation!