scancode-toolkit icon indicating copy to clipboard operation
scancode-toolkit copied to clipboard

License Scan fails for header at e2fsprogs-1.45.4

Open AyanSinhaMahapatra opened this issue 3 years ago • 0 comments

License scan fails for the following license header.

/*
 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it would be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * Further, this software is distributed without any warranty that it is
 * free of the rightful claim of any third person regarding infringement
 * or the like.  Any license provided herein, whether implied or
 * otherwise, applies only to this software file.  Patent licenses, if
 * any, provided herein do not apply to combinations of this program with
 * other software, or any other product whatsoever.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
 * Mountain View, CA  94043, or:
 *
 * http://www.sgi.com
 *
 * For further information regarding this notice, see:
 *
 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 */

Btw, this bug is somehow solved in https://github.com/nexB/scancode-toolkit/pull/2961 License expression: gpl-2.0 AND patent-disclaimer

Failure Trace

 "headers": [
    {
      "tool_name": "scancode-toolkit",
      "tool_version": "31.0.0rc2",
      "options": {
        "input": [
          "sca40"
        ],
        "--json-pp": "-",
        "--license": true,
        "--license-text": true,
        "--license-text-diagnostics": true
      },
      "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
      "start_timestamp": "2022-07-12T135900.150881",
      "end_timestamp": "2022-07-12T135901.494602",
      "output_format_version": "2.0.0",
      "duration": 1.3437302112579346,
      "message": null,
      "errors": [
        "Path: sca40"
      ],
      "warnings": [],
      "extra_data": {
        "system_environment": {
          "operating_system": "linux",
          "cpu_architecture": "64",
          "platform": "Linux-5.14.0-1044-oem-x86_64-with-glibc2.29",
          "platform_version": "#49-Ubuntu SMP Mon Jun 27 12:26:11 UTC 2022",
          "python_version": "3.8.10 (default, Mar 15 2022, 12:22:08) \n[GCC 9.4.0]"
        },
        "spdx_license_list_version": "3.17",
        "files_count": 1
      }
    }
  ],
  "files": [
    {
      "path": "sca40",
      "type": "file",
      "licenses": [],
      "license_expressions": [],
      "percentage_of_license_text": 0,
      "scan_errors": [
        "ERROR: for scanner: licenses:\nERROR: Unknown error:\nTraceback (most recent call last):\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/src/scancode/interrupt.py\", line 91, in interruptible\n    return NO_ERROR, func(*(args or ()), **(kwargs or {}))\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/src/scancode/api.py\", line 192, in get_licenses\n    _licenses_data_from_match(\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/src/scancode/api.py\", line 240, in _licenses_data_from_match\n    for license_key in match.rule.license_keys():\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/src/licensedcode/models.py\", line 1539, in license_keys\n    return self.licensing.license_keys(\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/venv/lib/python3.8/site-packages/license_expression/__init__.py\", line 411, in license_keys\n    symbols = self.license_symbols(\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/venv/lib/python3.8/site-packages/license_expression/__init__.py\", line 356, in license_symbols\n    symbols = (s for s in expression.get_literals() if isinstance(s, BaseSymbol))\n  File \"/home/ayansinha/nexB/write_access/scancode-extra/venv/lib/python3.8/site-packages/boolean/boolean.py\", line 674, in get_literals\n    if self.isliteral:\nAttributeError: 'AND' object has no attribute 'isliteral'\n"
      ]
    }
  ]
}Scanning done.
Some files failed to scan properly:
Path: sca40
Summary:        licenses with 1 process(es)
Errors count:   1
Scan Speed:     3.57 files/sec.
Initial counts: 1 resource(s): 1 file(s) and 0 directorie(s)
Final counts:   1 resource(s): 1 file(s) and 0 directorie(s)
Timings:
  scan_start: 2022-07-12T135900.150881
  scan_end:   2022-07-12T135901.494602
  setup_scan:licenses: 1.06s
  setup: 1.06s
  scan: 0.28s
  total: 1.34s

How To Reproduce

Tell us how to reproduce the issue.

Scan e2fsprogs-1.45.4/contrib/fsstress.c for licenses.

System configuration

For bug reports, it really helps us to know:

  • What OS are you running on? Linux
  • What version of scancode-toolkit was used to generate the scan file?
  • What installation method was used to install/run scancode? source download
"system_environment": {
          "operating_system": "linux",
          "cpu_architecture": "64",
          "platform": "Linux-5.14.0-1044-oem-x86_64-with-glibc2.29",
          "platform_version": "#49-Ubuntu SMP Mon Jun 27 12:26:11 UTC 2022",
          "python_version": "3.8.10 (default, Mar 15 2022, 12:22:08) \n[GCC 9.4.0]"
        },

AyanSinhaMahapatra avatar Jul 12 '22 14:07 AyanSinhaMahapatra