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

license parsing corner case #676

Open
spotrh opened this issue Jul 15, 2021 · 8 comments
Open

license parsing corner case #676

spotrh opened this issue Jul 15, 2021 · 8 comments

Comments

@spotrh
Copy link
Contributor

spotrh commented Jul 15, 2021

I think the license regexes needs some adjustment for a corner case. In Fedora, we have a package pending review (sip6) that has this as a license tag:

License: (GPLv2 or GPLv3) and (GPLv2+ with exceptions)

rpmlint returns:

sip6.src: W: invalid-license-exception exceptions)
sip6.src: W: invalid-license (GPLv2+

@marxin
Copy link
Contributor

marxin commented Jul 22, 2021

Note that rpmlint uses SPDX License List as defined here: https://spdx.org/licenses/. So my guess is that you need something like GPL-2.0-with-autoconf-exception, in your case sip6..

@Conan-Kudo
Copy link
Member

Not for Fedora, it doesn't. It still uses the traditional RPM shorthand identifiers.

@marxin
Copy link
Contributor

marxin commented Sep 2, 2021

Not for Fedora, it doesn't. It still uses the traditional RPM shorthand identifiers.

What do you suggest for the mentioned license (License: (GPLv2 or GPLv3) and (GPLv2+ with exceptions)) ?
What can we do?

@Conan-Kudo
Copy link
Member

I'm not sure. I think we're probably not handling whitespace in the field properly.

@marxin
Copy link
Contributor

marxin commented Sep 2, 2021

Oh, you are right, I haven't noticed the split error messages.

@marxin
Copy link
Contributor

marxin commented Sep 3, 2021

I can confirm the parsing can be improved to the following tokens: GPLv2, GPLv3 and GPLv2+ (+ exception=exceptions). Anyway, I'm not planning to work on that right now..

@smooge
Copy link

smooge commented Dec 13, 2021

I have closed #769 as this is the ticket I need to track

@xsuchy
Copy link
Member

xsuchy commented Sep 20, 2024

Note that for Fedora you can use BNF grammar that comes in fedora-license-data package in a file /usr/share/fedora-license-data/grammar.lark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants