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

Meaning of multiple licenses #2174

Closed
SimonSapin opened this issue Nov 27, 2015 · 14 comments
Closed

Meaning of multiple licenses #2174

SimonSapin opened this issue Nov 27, 2015 · 14 comments
Labels
A-interacts-with-crates.io Area: interaction with registries

Comments

@SimonSapin
Copy link
Contributor

http://doc.crates.io/manifest.html#package-metadata says:

# This is a string description of the license for this package. Currently
# crates.io will validate the license provided against a whitelist of known
# license identifiers from http://spdx.org/licenses/. Multiple licenses can
# be separated with a `/`
license = "..."

But what is the meaning of having multiple licenses?

MIT / Apache-2.0 is often use to express a "dual-license" like Rust itself. My understanding is that the user chooses which one to apply.

Now I’m publishing https://github.com/servo/rust-egl on crates.io. Some files have an Apache-2 license headers, others something that looks like MIT. So different files have different requirements. This is sort of "this license and this license", where Rust is "that one or that one".

Is there a way to express this difference in the license field of Cargo.toml? Should there be?

CC @larsbergstrom

@alexcrichton
Copy link
Member

crates.io currently uses https://crates.io/crates/license-exprs which I believe allows clarifying this ambiguity

@SimonSapin
Copy link
Contributor Author

Unfortunately https://crates.io/crates/license-exprs doesn’t have a documentation or repository link, I don’t even know how to download the source to reverse-engineer what it does.

@alexcrichton
Copy link
Member

Sure, but you can google "withoutboats license-exprs" and get https://github.com/withoutboats/license-exprs :)

@SimonSapin
Copy link
Contributor Author

Cool. ehuss/license-exprs#2.

Perhaps this syntax is worth mentioning on http://doc.crates.io/manifest.html#package-metadata?

@withoutboats
Copy link
Contributor

The syntax is specified in Appendix IV of the SPDX 2.0 standard. My crate has a few bugs: + should be an operator than can be applied to any license according to the standard, not a part of the license string, and it doesn't support parens. Maybe I'll fix these things today.

EDIT: + is properly treated now.

@codyps
Copy link
Contributor

codyps commented Jan 10, 2016

I'd like to note that the / is a crates.io specific addition, applied before trying to parse SPDX license expressions (using license-exprs). As a result, there isn't much clarity on what / means (except in looking at how projects use it, which isn't great. Docs on http://doc.crates.io/manifest.html just say "Multiple licenses can be separated with a /").

It would be a very good idea to try to deprecate the non-standard use of / in the license fields and stick to SPDX license expressions.

@hobofan
Copy link

hobofan commented Jan 14, 2016

#2039 related/duplicate issue

@carols10cents carols10cents added the A-interacts-with-crates.io Area: interaction with registries label May 12, 2017
@sanmai-NL
Copy link

@alexcrichton: It seems like we can quickly remove any Cargo documentation suggesting to use the deprecated notation as per @jmesmon's comment. Can we expedite that fix?

@sanmai-NL
Copy link

An appropriate link to replace the wording with the deprecated notation would be https://github.com/david-a-wheeler/spdx-tutorial/blob/master/README.md#spdx-license-expressions

@wking
Copy link
Contributor

wking commented Jan 5, 2018

/ is deprecated and AND / OR recommended (via the SPDX license expression docs) with the just-landed #4898. The only remaining issue here is the lack of (parens ehuss/license-exprs#3).

@stale
Copy link

stale bot commented Sep 18, 2018

As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it.

I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect?

The team would be especially grateful if such a comment included details such as:

  • Is this still relevant?
  • If so, what is blocking it?
  • Is it known what could be done to help move this forward?

Thank you for contributing!

(The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.)

If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable!

@stale stale bot added the stale label Sep 18, 2018
@wking
Copy link
Contributor

wking commented Sep 18, 2018

Still an issue

@stale stale bot removed the stale label Sep 18, 2018
@dwijnand
Copy link
Member

misclick

@dwijnand dwijnand reopened this Sep 18, 2018
@dwijnand dwijnand changed the title Meaning of mutliple licenses Meaning of multiple licenses Sep 18, 2018
@dwijnand
Copy link
Member

The only remaining issue here is the lack of (parens rust-lang-nursery/license-exprs#3).

As such, let's close this as duplicate of #2039, which is tracking that last change (#2039 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interacts-with-crates.io Area: interaction with registries
Projects
None yet
Development

No branches or pull requests

9 participants