I use following license in a package:
> (GPL-2.0-only OR LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0) AND BSD-3-Clause
This is correct according to documentation and also correct according to license-validate, but rpmlint reports following warning:
> W: invalid-license-exception Qt-GPL-exception-1.0)
Version-Release number of selected component (if applicable):
Thanks for the report. I filed https://github.com/rpm-software-management/rpmlint/pull/1014 to fix this. Once that's reviewed, we can decide whether to apply to Fedora or wait for the next upstream release.
The upstream PR only fixes the case when the exception is last.
If the exception is first, as in e.g.:
License: (Apache-2.0 WITH LLVM-exception OR NCSA) AND BSD-3-Clause
will still reult in
W: invalid-license (Apache-2.0
Thanks for reporting that. I don't know why I thought the beginning of the license_exception_regex didn't need changed as well. It needs the same sort of adjustement. On top of the patch I sent, it should need:
-license_exception_regex = re.compile(r'(\S+)\s(?:WITH|with)\s([^)]+)')
+license_exception_regex = re.compile(r'([^(]+)\s(?:WITH|with)\s([^)]+)')
I just need to work out some issues with the test suite and I'll submit this upstream.
FWIW, I filed https://github.com/rpm-software-management/rpmlint/pull/1028 for this. Hopefully I haven't overlooked too much this time. I'm reasonably sure that the start and end are the only places a parenthesis can come into play, at least. ;)
I have scratch builds for rawhide and f38, if anyone can test and confirm that they fix the various cases:
FEDORA-2023-d32d1441dc has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d32d1441dc
FEDORA-2023-d32d1441dc has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.