-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include license text in all published crates #3131
Conversation
You should copy the licence each time. |
I think it is a bit overkill. |
Right now, the license text is not included in crate packages (e.g. look at https://crates.io/crates/uucore), which technically violates the MIT license (see https://github.com/uutils/coreutils/blob/main/LICENSE#L10-L11). By adding a LICENSE file for each crate, we ensure that the next time the crates are published they'll include it, fulfilling the MIT provision. |
I have a couple of notes:
All that being said, I wouldn't be opposed to adding the license file to all crates. It adds a bit of noise, but it does make it clearer what license we are using on crates.io and other places. A quick scan of some other projects with multiple crates in one repository and whether they add a license file to each crate:
|
Caveat: I'm not a lawyer. This came up in the context of attempting to package coreutils in Fedora (specifically in https://bugzilla.redhat.com/show_bug.cgi?id=1980205), cc @decathorpe; see https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text for how Fedora explains the problem. The way cargo works, it'll resolve the symlink and include the actual file in the published crate. You can verify this by running |
Thank you for the additional information! @sylvestre, I'm in favor of this, but I'll leave the final decision up to you. |
Including the LICENSE widely seems reasonable, especially if it's cheap to implement. I'd also change the LICENSE header to...
|
I'm not a lawyer either :) But this is how it has been explained to me: Most popular licenses (including MIT and Apache-2.0) require redistributed sources to include a copy of the actual license test. Pages like choosealicense.com or the OSI also explain it this way. So, since you're redistributing sources for individual crates (via crates.io), they should all include the license text. This is also the case for Fedora Linux RPM packages for Rust crates, which each redistribute one crate, and hence need a license file.
Caveat: As far as I know, doing it with a symlink does only work when running "cargo publish" on Unix-y systems, and not on windows. |
The MIT license requires the license text to be included in all redistributed sources. Add symlinks to ensure it will be included in all published crates build from this repository.