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 all sub-crates #2394

Closed
ignatenkobrain opened this issue May 12, 2020 · 6 comments · Fixed by #2395
Closed

Include LICENSE files in all sub-crates #2394

ignatenkobrain opened this issue May 12, 2020 · 6 comments · Fixed by #2395

Comments

@ignatenkobrain
Copy link
Contributor

Hello,

I'm packaging diesel for Fedora and found that most(all?) diesel-related crates on crates.io do not contain LICENSE files. This is solved by either copying LICENSE files into the directories with Cargo.toml or adding symlinks there. I don't know which way you prefer, so did not send PR.

Thanks for cooperation!

@weiznich
Copy link
Member

I'm not a lawyer, but as all relevant crates contain a corresponding entry in their Cargo.toml + there is an LICENSE in the root folder (which applies for all crates, as they share the same licence) I do not see an issue here.

@ignatenkobrain
Copy link
Contributor Author

@weiznich the Apache-2.0 requires that source is being present along the sources which are stored on crates.io. And the real location from where people get crates is tarballs from crates.io, for example https://crates.io/api/v1/crates/diesel_migrations/1.4.0/download

And such tarball does not contain the license text which is requirement of Apache-2.0.

Do you see any issue with having symlink to the top-level LICENSE-* files from sub-crates?

@weiznich
Copy link
Member

I would probably accept a PR changing the current setup. In general I do consider that more to be an crates.io/cargo issue as crates do explicitly say which license they are using.

Instead of symlinking/copying the top-level LICENSE-APACHE file I would probably just the include manifest to include the corresponding file explicitly. (Someone needs to double check if that's actually accepted by cargo)

@ignatenkobrain
Copy link
Contributor Author

@weiznich include won't work since files are outside of the crate folder…

@weiznich
Copy link
Member

weiznich commented May 12, 2020

It's a workspace, so I'm not sure if it's "outside" for cargos definition.

(If it's "outside", please link the relevant code/documentation)

@ignatenkobrain
Copy link
Contributor Author

@weiznich well, the issue is not with cargo or projects, but licensing weirdness. For example, if you say MIT, but there are over 20 MIT variations over there so you need to actually put proper license file to be clear to users. cargo does as much as it can to require something for being set, but licensing problems are… hard.

It's a workspace, so I'm not sure if it's "outside" for cargos definition.
(If it's "outside", please link the relevant code/documentation)

Well, anything above Cargo.toml of sub-crate is "outside". Oh yeah, the include will look even much more horrible because in that case you need to specify all files you want to include... And keep that updated. Anyway, if you would try - it won't include those.

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