aboutcode-org / aboutcode-org/scancode-toolkit

Disambiguate closely related and versioned licenses

Abierto
#2,399 0 comentarios 0 reacciones 0 asignados Ver en GitHub
license scan new feature
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

#### Problem

There is a class of license notice that is problematic, for instance short GPL notices such as this one (which is not a real one but made up for illustration):

> we prefer to use the GPL
> therefore this is licensed under the GPL 2.0

The scan yields these licenses (scan has been edited for brevity):
```JSON
"licenses": [
{
"key": "gpl-1.0-plus",
"score": 85.0,
"start_line": 1,
"end_line": 1,
"matched_text": "the gpl"
},
{
"key": "gpl-3.0-plus",
"score": 4.0,
"start_line": 2,
"end_line": 2,
"matched_text": "therefore [this] is licensed under [the] gpl"
},
{
"key": "gpl-2.0",
"score": 100.0,
"start_line": 2,
"end_line": 2,
"matched_text": "licensed under the gpl 2."
}
],
```

This is obviously both more or less correct and superbly wrong. The right answer
should be GPL-2.0 and nothing else.
The licenses involved with this class of ambiguous detections are:
- mostly the A/L/GPL with and without versions
- to a lesser extent, other GFDL license

#### Solution elements

While I would hate to have code that is specific to the A/L/GPL licenses these are likely two few licenses and too common not to treat these specially, though there may be some ways to address this in some data-driven way:

1. using the upcoming https://github.com/nexB/scancode-results-analyzer/ should be helpful and is generic for a start
2. today there is no explicit relationship stored in the data between a) the versions of a license (GPL 1,2,3 and or-later variants b) closely related licenses such as the A/L/GPL or closely related BSD variants or MITs. Tracking this explicitly as extra attributes in the License record could then enable data-driven refined disambiguation and merging

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.