[MDEV-28586] Fix some easy rpmlint issues Created: 2022-05-17  Updated: 2023-11-28

Status: Stalled
Project: MariaDB Server
Component/s: Packaging, Platform RedHat, Platform SUSE
Affects Version/s: None
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Tuukka Pasanen Assignee: Tuukka Pasanen
Resolution: Unresolved Votes: 0
Labels: centos, redhat, suse


 Description   

If rpmlint is getting added to Docker build. Some easy standing issues should be fixed or suspended. This one is for very easy ones:

  • License GPLv2 should be GPL-2.0-only as rpm should use SPDX license string
  • License LGPLv2.1 should be LGPL-2.1-only as in above
  • Some requirements are circular (updated later)

These are to update size they are found. Nothing big changes are not made only fine tuning.



 Comments   
Comment by Tuukka Pasanen [ 2022-05-31 ]

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
Generated at Thu Feb 08 10:01:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.