|
I examined this little bit this issue with small test spec file and compiled it with rpmbuild -ba test-gpl.spec and rpmbuild -ba test-gpl-spdx.spec. For test-gpl.spec just replace GPLv2 OR LGPLv2
Name: test-gpl-spdx
|
Version: 1.0.0
|
Release: 0
|
Summary: Test GPLv2 license
|
License: GPL-2.0-only OR LGPL-2.0-only
|
Group: Applications/Internet
|
URL: https://www.example.com
|
Source0: test.txt
|
|
%description
|
RPMlint test which license is ok
|
|
%prep
|
|
%build
|
|
%install
|
mkdir -p %{buildroot}%{_bindir}
|
chmod +x %{SOURCE0}
|
cp %{SOURCE0} %{buildroot}%{_bindir}
|
|
%files
|
%{_bindir}/*.txt
|
Run rpmlint and result is that only SLES and openSUSE supports SPDX and others goes with old style. First approach is wrong and need small adjustment.
| Distribution |
GPLv2 and LGPLv2 |
GPL-2.0-only OR LGPL-2.0-only |
| RHEL 7 / CentOS 7 |
OK |
FAIL |
| RHEL 8 / ALMA Linux 8 |
OK |
FAIL |
| RHEL 9 / ALMA Linux 9 |
OK |
FAIL |
| Fedora 36 |
OK |
FAIL |
| SLES 15.3 / openSUSE 15.3 |
FAIL |
OK |
|