SHA256
1
0
forked from pool/rpmlint

Accepting request 875382 from home:coolo:branches:openSUSE:Factory

- Update to version 84.87+git20210226.d6b66e2:
  * GitHub Actions: work around the missing
  * GitHub Actions: work around the missing `groupadd`
  * rclink2: fix test reference output
  * polkit: adjust polkit frobnicate action name

- Add accept-licenses-with-plus.patch to accept any license ending
  with a + (as indicated in the SPDX syntax)

- Remove licenses ending with + from valid license array

OBS-URL: https://build.opensuse.org/request/show/875382
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=768
This commit is contained in:
2021-03-01 19:27:04 +00:00
committed by Git OBS Bridge
parent 9c09cdda26
commit 804a3cc03a
9 changed files with 69 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
<param name="changesrevision">3d948bb4c8be26e2ec8922d4c3430b0e0451994b</param></service><service name="tar_scm">
<param name="changesrevision">d6b66e2f3072f5962358e0101c3597316903cfd2</param></service><service name="tar_scm">
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
<param name="changesrevision">f62985c16ad7bc370ea08958a139d23aad4fd94b</param></service></servicedata>
<param name="changesrevision">8a60ef9ef02754556557db3708477f3568c13ff1</param></service></servicedata>

View File

@@ -0,0 +1,38 @@
Index: rpmlint-rpmlint-1.11/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.11/TagsCheck.py
@@ -845,12 +845,19 @@ class TagsCheck(AbstractCheck.AbstractCh
return (x.strip() for x in
(l for l in license_regex.split(license) if l))
+ def is_valid_license(license):
+ if license in VALID_LICENSES:
+ return True
+ if license.endswith('+'):
+ return license[:-1] in VALID_LICENSES
+ return False
+
rpm_license = pkg[rpm.RPMTAG_LICENSE]
if not rpm_license:
printError(pkg, 'no-license')
else:
valid_license = True
- if rpm_license not in VALID_LICENSES:
+ if not is_valid_license(rpm_license):
license_string = rpm_license
l1, lexception = split_license_exception(rpm_license)
@@ -862,10 +869,10 @@ class TagsCheck(AbstractCheck.AbstractCh
valid_license = False
for l1 in split_license(license_string):
- if l1 in VALID_LICENSES:
+ if is_valid_license(l1):
continue
for l2 in split_license(l1):
- if l2 not in VALID_LICENSES:
+ if not is_valid_license(l2):
printWarning(pkg, 'invalid-license', l2)
valid_license = False
if not valid_license:

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1313aa66bf802838eb87286a97ee2e45787b290254e5991a8c948808a359edf8
size 32840
oid sha256:eb3db8e4053d3e4c92e466f802fd82c79d252596920eb37d6246ef96df3833cc
size 32856

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5423af9fa9924f86439a06e98867d2a9895d51e457447d1df111913a72450e8
size 13632

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82a5d1be062d1aa69f57d2adc815de653c26d0dbecfd5078acec6666268c9481
size 13672

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Feb 26 09:10:31 UTC 2021 - coolo@suse.com
- Update to version 84.87+git20210226.d6b66e2:
* GitHub Actions: work around the missing
* GitHub Actions: work around the missing `groupadd`
* rclink2: fix test reference output
* polkit: adjust polkit frobnicate action name
-------------------------------------------------------------------
Fri Jul 31 10:28:58 UTC 2020 - matthias.gerstner@suse.com

View File

@@ -24,7 +24,7 @@ BuildRequires: rpmlint-Factory-strict
BuildRequires: rpmlint-mini
Name: rpmlint-tests
Version: 84.87+git20200724.ef05f7e
Version: 84.87+git20210226.d6b66e2
Release: 0
Summary: rpmlint regression tests
License: SUSE-Public-Domain

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Feb 26 10:49:52 UTC 2021 - Stephan Kulow <coolo@suse.com>
- Add accept-licenses-with-plus.patch to accept any license ending
with a + (as indicated in the SPDX syntax)
-------------------------------------------------------------------
Fri Feb 26 09:12:17 UTC 2021 - Stephan Kulow <coolo@suse.com>
- Remove licenses ending with + from valid license array
-------------------------------------------------------------------
Mon Feb 22 13:26:48 UTC 2021 - Matthias Gerstner <matthias.gerstner@suse.com>

View File

@@ -62,6 +62,7 @@ Patch72: rpmlint-slpp-NUM-NUM.patch
Patch77: suse-rpmlint-all-pie.patch
Patch78: add-check-for-a-non-zero-.text-segment-in-.a-archive.patch
Patch79: rpm415-workaround.diff
Patch80: accept-licenses-with-plus.patch
BuildRequires: desktop-file-utils
BuildRequires: obs-service-format_spec_file
BuildRequires: python3-flake8
@@ -116,12 +117,11 @@ cp %{SOURCE12} licenses.config
# note there is a tab character behind the -d, so don't copy&paste lightly
cut '-d ' -f1 %{_prefix}/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
sed -i -e "s/\(#VALIDLICENSES\)/\1+\n '$l',/" licenses.config
done
# add some deprecated licenses we allow for now
for l in AGPL-3.0 AGPL-3.0+ GFDL-1.1 GFDL-1.1+ GFDL-1.2 GFDL-1.2+ GFDL-1.3 GFDL-1.3+ GPL-3.0-with-GCC-exception \
for l in AGPL-3.0 GFDL-1.1 GFDL-1.2 GFDL-1.3 GPL-3.0-with-GCC-exception \
GPL-2.0-with-classpath-exception GPL-2.0-with-font-exception SUSE-LGPL-2.1+-with-GCC-exception SUSE-NonFree \
GPL-1.0+ GPL-1.0 GPL-2.0+ GPL-2.0 GPL-3.0+ GPL-3.0 LGPL-2.0 LGPL-2.0+ LGPL-2.1+ LGPL-2.1 LGPL-3.0+ LGPL-3.0; do
GPL-1.0 GPL-2.0 GPL-3.0 LGPL-2.0 LGPL-2.1 LGPL-3.0; do
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
done
install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/