socketry / nio4r

Cross-platform asynchronous I/O primitives for scalable network clients and servers.
Other
965 stars 86 forks source link

Convert license to array of identifiers #312

Closed voxik closed 4 months ago

voxik commented 6 months ago

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

Contribution

ioquatix commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

Okay, makes sense. Let's see the conclusion of https://github.com/rubygems/rubygems/issues/7355 and then move forward here.

tarcieri commented 6 months ago

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

ioquatix commented 6 months ago

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

ioquatix commented 4 months ago

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:

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.