Skip to content
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 files in crates #44

Closed
jwodder opened this issue Oct 26, 2023 · 6 comments · Fixed by #46
Closed

Include license files in crates #44

jwodder opened this issue Oct 26, 2023 · 6 comments · Fixed by #46

Comments

@jwodder
Copy link

jwodder commented Oct 26, 2023

Currently, the LICENSE-APACHE and LICENSE-MIT files at the root of this repository are not included in the system-configuration and system-configuration-sys crates uploaded to crates.io, which is a problem for dependents who wish to properly honor licensing requirements. I believe that, in order to include them in the crates, it's necessary to copy the license files into the individual package roots (i.e., next to the Cargo.toml files).

@faern
Copy link
Member

faern commented Jan 30, 2024

Both our crates specify the license name in the license header. Is that not enough? They are both well known standard licenses, so the actual license text should not be needed as that's given from their names.

@faern
Copy link
Member

faern commented Jan 30, 2024

The Cargo manual has this to say:

If a package is using a nonstandard license, then the license-file field may be specified in lieu of the license field.

-- https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields

So it does not really sound like it encourages license files to begin with. We do specify what license the crate is under already. And tools such as cargo deny etc do pick it up properly already

@faern faern closed this as completed Jan 30, 2024
@jwodder
Copy link
Author

jwodder commented Jan 30, 2024

@faern

  • Most of the tools I know of for gathering licenses of Rust dependencies (specifically, cargo-bundle-licenses and cargo-lichking, but not cargo-about) are not able to substitute standard texts for missing licenses.

  • While an argument could be made that the Apache 2.0 license can be filled in automatically, the MIT license cannot, as it includes a copyright date and author name specific to the project. Indeed, LICENSE-MIT in this repository starts with "Copyright (c) 2017 Amagicom AB", and the license itself requires that "The above copyright notice ... shall be included in all copies or substantial portions of the Software." — which affects anyone distributing a binary executable built with one of these crates as a dependency.

@jwodder
Copy link
Author

jwodder commented Jan 30, 2024

@faern I'm not asking you to use the license-file field; I'm asking you to include the license files themselves in the crates uploaded to crates.io, which you can do by just putting them inside the crates' source directories.

@faern
Copy link
Member

faern commented Jan 30, 2024

Fixed in #46! Thanks for reporting. This was indeed easily fixed. If tools use it then it's just good 👍

@faern
Copy link
Member

faern commented Jan 31, 2024

This is now part of the just published 0.6.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants