Skip to content

Too many licenses identified and different result single file vs project #3550

Description

@hesa

Description

Two problems:

  1. Different result when scanning single file compared to an entire project. This issue seems to be partly related to: OR identified as AND #3523
  2. GPLv3 and other licenses seem to be incorrectly identified but ignored? Partly relates to the 3523 as well.

How To Reproduce

Tell us how to reproduce the issue.

Execute attached file (freetype.sh) to download project and single file, scan and present data from them separately.

Problem (1)
See output from script. The licenses detected are as follows:

  • Scanning single file, t1afm.c, gives: freetype
  • Scanning entire gives (for the same file, t1afm.c): mit AND public-domain AND gpl-2.0 AND freetype

Problem (2)
See output from script.

A GPLv3 rule is matched.

Expression:freetype OR gpl-3.0
RULE:https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/freetype_or_gpl-3.0_1.RULE

I guess this is incorrectly identified by the following text in freetype-2.13.2/LICENSE.TXT:

    Note that  this license  is compatible to  the GNU  General Public                                   
    License version 3, but not version 2.                                                                

The below, I think, relates to #3523

Expression:mit
RULE:https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE

I think this is caused by the top level license as found in freetype-2.13.2/LICENSE.TXT. Not valid for the file t1afm.c

Expression:public-domain
RULE:https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/public-domain_285.RULE

I think this is caused by the top level license as found in freetype-2.13.2/LICENSE.TXT. Not valid for the file t1afm.c

Expression:gpl-2.0
RULE:https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_1022.RULE

Expression:freetype
RULE:https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/freetype.LICENSE

Both are oK.

System configuration

For bug reports, it really helps us to know:

  • What OS are you running on? (Windows/MacOS/Linux)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
  • What version of scancode-toolkit was used to generate the scan file?
$ scancode --version
ScanCode version: 32.0.8
ScanCode Output Format version: 3.0.0
SPDX License list version: 3.21
  • What installation method was used to install/run scancode? (pip/source download/other)
    pip

... thanks for all your work on Scancode :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions