WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

`check-licenses`: GPLv3 isn't recognized as a compatible license #20701

Open cliffordp opened 4 years ago

cliffordp commented 4 years ago

Re: https://github.com/WordPress/gutenberg/blob/%40wordpress/scripts%407.1.2/packages/scripts/scripts/check-licenses.js#L36

May be related: #7821

Describe the bug

GPLv3+ should be recognized as compatible, per: A) https://github.com/WordPress/WordPress/blob/5.3.2/readme.html#L94-L95

WordPress is free software, and is released under the terms of the GPL (GNU General Public License) version 2 or (at your option) any later version.

and

B) https://www.gnu.org/licenses/license-list.en.html#GNUGPL

Please note that GPLv3 is not compatible with GPLv2 by itself. However, most software released under GPLv2 allows you to use the terms of later versions of the GPL as well. When this is the case, you can use the code under GPLv3 to make the desired combination. ... links to https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility ... screenshot of it:

image

To reproduce

1) In your plugin's package.json, set "license": "GPL-3.0-or-later", then run wp-scripts check-licenses and you'll get this message:

ERROR Module your-plugin has an incompatible license 'GPL-3.0-or-later'.

2) Change the package.json to "license": "GPL-2.0-or-later", re-run, and no messages.

Expected behavior

No error message with GPLv3+.

See comment from @pento to learn about the proposed solution: https://github.com/WordPress/gutenberg/issues/20701#issuecomment-761961307.

gziolo commented 4 years ago

@ntwb or @pento – do we need a fix in @wordress/scripts?

ntwb commented 4 years ago

I don’t think so, there’s a prior discussion on this subject, I’ll try dig this out tomorrow and follow up

cliffordp commented 4 years ago

Checking in... would be really curious if this is determined not to be an issue. Thanks!

kevin940726 commented 4 years ago

@ntwb @cliffordp Do we have an update on this? Do we still want to fix this?

cliffordp commented 4 years ago

awaiting @ntwb's research from April 20

ntwb commented 4 years ago

I'm still unsure of this, search WP Slack for GPLv3 and there are numerous discussions in the theme and plugin channels on the subject, need to extract out this conversation

Possibly @Otto42 could weigh in here also

github-actions[bot] commented 3 years ago

Help us move this issue forward. Since it has no activity after 15 days of requesting more information, a bot is marking the issue as stale. Please add additional information as a comment or this issued will be closed in 5 days.

ntwb commented 3 years ago

@pento Any thoughts on this?

pento commented 3 years ago

check-licenses is a somewhat WordPress-specific tool: it assumes that the software is being released as GPLv2. Historically, WordPress hasn't used libraries, as defined in GPLv3: we've copied entire libraries, but we often modify them, which means they're considered copies, rather than libraries.

Gutenberg is better about this: libraries it uses are actually included as libraries, so GPLv3 could be added to otherOssLicenses. As I understand @cliffordp's original report, this would likely solve his particular issue, assuming he isn't using the --gpl2 option.

It may also be worth being more explicit about the check-licenses behaviour in the @wordpress/scripts/ readme: in particular, noting that this is a WordPress-specific tool, and isn't guaranteed to produce correct results in other use cases: licenses are usually only added the list when Gutenberg needs it.

Given that the plugin directory allows plugins to have any GPL-compatible license, not just a GPL-based license, it would be a challenging problem to maintain a licenses compatibility matrix that works in this more general case.

ryanwelcher commented 1 year ago

What needs to be done here from a docs point of view?