#1052259 licensecheck: license shortname GPL-3+ misdetected as GPL-3

#1052259#5
Date:
2023-09-19 16:34:02 UTC
From:
To:
Dear Maintainer,

Files containing short license names such as GPL-3.0+ are reported
as GPL-3 instead of GPL-3+

Example is dist/unix/strawberry.spec.in in package strawberry
https://salsa.debian.org/debian/strawberry/-/blob/master/dist/unix/strawberry.spec.in

This is the only example file I have now, but I have tried editing the file to
use various other short names such as;

GPL-3+
GPLv3+

The results are the same. The + suffix is not recognised as allowing a later
version of the license. All are reported as GPL-3


Regards,
Peter B

#1052259#12
Date:
2024-01-02 17:25:33 UTC
From:
To:
I have found another example of misdetection of GPL-3

In most of the files in https://sources.debian.org/src/xbrzscale/1.8-2/xbrz/
the license is given in the line

// * GNU General Public License:
https://www.gnu.org/licenses/gpl-3.0         *

but licensecheck detects as just GPL.
Changing the case to GPL-3.0 does not improve things.

#1052259#17
Date:
2024-01-03 01:23:41 UTC
From:
To:
Quoting Peter B (2024-01-02 18:25:33)

This command shows details of what is found as basis for license:

  TRACE=1 licensecheck --deb-machine xbrz

Neither of the strings "GNU General Public License" nor
"https://www.gnu.org/licenses/gpl-3.0" are on their own basis for
license detection, because they do not state a license that is
*granted*.

What is detected as basis for a license is the larger string
"distributed under GNU General Public License" which *is* a statement of
a license which is granted.

True, that string is then continued after a colon to clarify that what
is meant by "GNU General Public License" really is a specific version of
that license, but licensecheck does not attempt to explore those
elaborate variations of the english language.  Licensecheck expects
grants to be expressed in common language, which mostly if not always
means within a single sentence.

I would flag this as wontfix and close it, but you chose to report this
as an addon to another bugreport which is slightly different and deserve
a different treatment (sorry for not responding to that one earlier).
Therefore I will instead ignore this addon and treat the bugreport as
only being about your initial post.

Please, in future file separate new bugreports when in doubt if issue is
same or only *looking* similar - because it is easy to merge bugreports
bug elaborate and confusing to handle multiple issues reported within a
single bugreport.

Also, if you disagree with my view on the addon report or in other ways
want to discuss it further (which I am happy to do: closing a bugreport
does not mean silencing discussion about it, and further discussion may
lead to reopening a bugreport leater), then please repost as a new
bugreport and let's discuss it separately.

Thanks for reporting these issues.  Despite my slow response and being
quick to close, I very much appreciate this input.


 - Jonas

#1052259#22
Date:
2024-01-03 01:31:25 UTC
From:
To:
Hi Peter,

Quoting Peter B (2023-09-19 18:34:02)

Indeed, this is a bug.

Not quite sure, but I guess the problem is that licensecheck strips
surrounding "noise" too aggressively, before scanning for license
shortname - i.e. that the "+" is mistaken as a kind of comment marker or
ASCII art - like this:

++++++++++++++++++
+License: GPL-3.0+
++++++++++++++++++


 - Jonas