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

Convert license to array of identifiers #312

Merged
merged 2 commits into from Mar 20, 2024

Conversation

voxik
Copy link
Contributor

@voxik voxik commented Jan 4, 2024

RubyGems currently complain during gem build:

WARNING:  license value 'MIT AND (BSD-2-Clause OR GPL-2.0-or-later)' is invalid.
Use a license identifier from http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
Did you mean 'AGPL-1.0-or-later', 'AGPL-3.0-or-later', 'BSD-2-Clause-Patent', 'GPL-2.0-or-later', 'LGPL-2.0-or-later'?

Nothing else then plain list of license identifers is supported ATM.

Relates #309

Types of Changes

  • Bug fix.

Contribution

@ioquatix
Copy link
Member

ioquatix commented Jan 4, 2024

Does this indicate that we are all 3 licenses? I assume we can't represent OR with this list, only AND. If that's the case, we should choose BSD as we aren't releasing the combined total under the GPL.

@voxik
Copy link
Contributor Author

voxik commented Jan 4, 2024

I don't think it really is defined what the content of this field means, if that is just list or if there is any relation between the items. Therefore I have opened rubygems/rubygems#7355. However, there is other option:

spec.license = "LicenseRef-license.md"

But I am not sure if that is any better :/

Nevertheless, the intention of this PR is just to merely list all the licenses, which is good for practical purposes. I.e. if somebody installs this package, they knows there those licenses applies. Where and how, they would need to look around. But that is not different to the "MIT AND (BSD-2-Clause OR GPL-2.0-or-later)" string IMHO.

@ioquatix
Copy link
Member

ioquatix commented Jan 4, 2024

Okay, makes sense. Let's see the conclusion of rubygems/rubygems#7355 and then move forward here.

@tarcieri
Copy link
Contributor

tarcieri commented Jan 4, 2024

Perhaps for simplicity's sake you could relicense the whole thing as BSD, with permission from the original authors.

@ioquatix
Copy link
Member

ioquatix commented Jan 4, 2024

I think it would be hard work: https://github.com/socketry/nio4r/blob/main/license.md

nio4r.gemspec Outdated Show resolved Hide resolved
@ioquatix
Copy link
Member

I think it's okay to specify spec.licenses = ["MIT", "BSD-2-Clause"].

In our case, we have license.md which clarifies the situation, and additionally, if we were adopting the GPL from libev our own code would also need to be GPL, therefore, we couldn't also release under the MIT license. Thus, I think we can simplify this and assume that spec.licenses is a union of all licenses, in this case, the position we are taking is:

  • nio4r code is licensed under the MIT license.
  • libev code is licensed under the BSD-2-Clause license.

If anyone has a problem with this interpretation, please let me know. The goal here is to make it easier for automated tools to analyse the license of this code. I think this is a reasonable middle ground, with the full details being outlined in license.md.

voxik and others added 2 commits March 21, 2024 10:06
RubyGems currently complain during gem build:

~~~
WARNING:  license value 'MIT AND (BSD-2-Clause OR GPL-2.0-or-later)' is invalid.  Use a license identifier from
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
Did you mean 'AGPL-1.0-or-later', 'AGPL-3.0-or-later', 'BSD-2-Clause-Patent', 'GPL-2.0-or-later', 'LGPL-2.0-or-later'?
~~~

Nothing else then plain list of license identifers is supported ATM.

Relates socketry#309
@ioquatix ioquatix merged commit 6fac337 into socketry:main Mar 20, 2024
30 checks passed
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 this pull request may close these issues.

None yet

3 participants