Add some missing LICENSE files to crates, and add CI to verify all crates have LICENSE files.#4664
Add some missing LICENSE files to crates, and add CI to verify all crates have LICENSE files.#4664cfallin wants to merge 2 commits intobytecodealliance:mainfrom
Conversation
|
Personally I do not want to organize the repository like this. I don't think it's useful to have this copied all over the place and even with CI checking it that just seems like it'll be more annoying than anything else. IIRC Cargo does processing of a |
|
I tend to agree, but downstream packagers want this -- @decathorpe in #3761 needs LICENSE files in each crate (or at least the published ones) for packaging in Fedora (IIRC?). @decathorpe, would it be acceptable instead to remove all LICENSE files except for the root one, and then update your packaging setup to refer to that? |
|
If I understand correctly, "license-file" is only supposed to be used when using a non-standard license, i.e. the two fields in Cargo.toml are mutually exclusive: https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields Concerning inclusion of the license text in individual crates: Lawyers / people who understand licenses better than me explained it this way: Some software licenses (including Apache-2.0 and MIT, the de-facto standard licenses for Rust projects), include a requirement that redistributed sources MUST contain a copy of the actual license text (i.e. the LICENSE file). So, since you are redistributing this project as individual crates on crates.io (and subsequently, Linux distributions might create and redistribute packages for those crates), they need to include license file(s) to be in compliance with the license that you yourselves have chosen for your project. It also looks like you added copies of the LICENSE files in some places where they are actually not needed (for example, workspace directories that don't contain crates, or "internal" crates that are not published individually). And, assuming that the operating system that "cargo publish" is run on for this project supports symbolic links, you don't actually need to include full copies of the file everywhere, but a symbolic link is sufficient for cargo to include it. |
|
I understand that |
Our tooling for creating RPM packages does read the But even if that were not the case, and the license string was determined by asking an oracle, the problem is the missing license text / file: c.f. https://choosealicense.com/licenses/apache-2.0/ at 4. Redistribution, (a):
I don't see a distinction between redistribution via crates.io and redistribution by linux distributions here (other than the fact that in the first case, you're violating your own license terms, while in the second case, it usually prevents linux distributions from redistributing your code), so the problem is definitely not specific to Linux distribution packages. |
Subscribe to Label Actioncc @cfallin, @fitzgen, @peterhuene DetailsThis issue or pull request has been labeled: "cranelift", "isle", "wasmtime:c-api", "wasmtime:docs"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
|
@decathorpe understood that we need to include the license file, one way or another, in the tarball that is uploaded to crates.io. I think this is covered by what @alexcrichton was proposing:
I just checked with
@alexcrichton, do you know if there is a way to suppress this warning? |
|
I don't know how to suppress that myself, and that sounds like an issue for upstream Cargo. |
|
This looks like rust-lang/cargo#8537, which is closed with a "we won't support this" disposition -- see this comment in particular. Their reasoning is that adding both keys ( (As an aside, I bet there are a whole bunch of crates on crates.io that have a standard SPDX The person who opened that Cargo issue cc'd tokio-rs/tracing#842 where the So it seems that's kind of our only option to (i) satisfy legal requirements and (ii) work with Cargo. I'll pare this PR down to just adding |
|
@decathorpe I've modified this PR to add LICENSE files just to the six (!) crates we have added recently without LICENSE files, and to add a check to the Unfortunately it looks like @alexcrichton thoughts on this new CI check? |
alexcrichton
left a comment
There was a problem hiding this comment.
Personally I don't really want to spend any more time thinking about this. I do not want this state of affairs but not enough to push back on this any further.
|
Looks good to me, thank you. |
|
@decathorpe could you respond to the question:
I unfortunately can't spend much more time on this either but if you are willing to drive this with the above effort, then I can rebase this and merge when that's done. Thanks! |
|
Sorry, I missed that one. I can try, but I'm not really interested in wasi-nn as it's dependencies don't look like they'd be available to be. More important is wasi-common, which also has a problem like this, and it's been ignored for a while: #3912 |
|
I'm cleaning up old PRs and am going to go ahead and close this for now; this has become out-of-date anyway (new crates in the meantime). @decathorpe please feel free to recreate a new version of the PR as you see fit. |
Fixes #3761 (again).
I'm not sure about adding LICENSE to all of these crates, but it seems that it
doesn't hurt exactly (all the code is covered under the license regardless,
as we have
LICENSEat the root of the repo), and it is easier than trying todistinguish based on
publish =directives or whatnot.