Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENSSL and zlib not recognized as valid licences #811

Open
vargenau opened this issue Jul 9, 2024 · 2 comments
Open

OPENSSL and zlib not recognized as valid licences #811

vargenau opened this issue Jul 9, 2024 · 2 comments
Labels
validation An issue concerning the validation of SPDX documents

Comments

@vargenau
Copy link
Contributor

vargenau commented Jul 9, 2024

OPENSSL-zlib.spdx.json

pyspdxtools -i OPENSSL-zlib.spdx.json
ERROR:root:The document is invalid. The following issues have been found:
Unrecognized license reference: zlib. license_expression must only use IDs from the license list or extracted licensing info, but is: BSD-3-Clause AND IJG AND zlib
Unrecognized license reference: OPENSSL. license_expression must only use IDs from the license list or extracted licensing info, but is: IJG AND ISC AND LGPL-2.1-or-later AND Libpng AND MIT AND OPENSSL AND X11 AND Zlib AND bzip2-1.0.6

File is valid SPDX as confirmed by Java Tools

@armintaenzertng armintaenzertng added the validation An issue concerning the validation of SPDX documents label Jul 26, 2024
@stefan6419846
Copy link

Is this still an issue? Running the latest main code with license-expression==30.3.1 seems to validate correctly both from the CLI and from code:

(venv) stefan@localhost:/tmp$ python
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from spdx_tools.spdx.model.document import Document
>>> from spdx_tools.spdx.parser.parse_anything import parse_file
>>> document = parse_file('/home/stefan/Downloads/OPENSSL-zlib.spdx.json')
>>> from spdx_tools.spdx.validation.document_validator import validate_full_spdx_document
>>> validate_full_spdx_document(document)
[]
>>>

@vargenau
Copy link
Contributor Author

Yes, I still have the issue.

pyspdxtools -i OPENSSL-zlib.spdx.json
ERROR:root:The document is invalid. The following issues have been found:
Unrecognized license reference: zlib. license_expression must only use IDs from the license list or extracted licensing info, but is: BSD-3-Clause AND IJG AND zlib
Unrecognized license reference: OPENSSL. license_expression must only use IDs from the license list or extracted licensing info, but is: IJG AND ISC AND LGPL-2.1-or-later AND Libpng AND MIT AND OPENSSL AND X11 AND Zlib AND bzip2-1.0.6
which pyspdxtools
/opt/homebrew/bin/pyspdxtools

MacOS 14.6.1

python --version
Python 3.11.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation An issue concerning the validation of SPDX documents
Projects
None yet
Development

No branches or pull requests

3 participants