forked from pool/rpmlint
Accepting request 901418 from home:StevenK:branches:devel:openSUSE:Factory:rpmlint
- Install configs with 644. - Update to Rpmlint 2.0: * RPMLint now is a "normal" Python application and now supports being imported like a standard Python module! This means that all the normal use-cases for RPMLint are still supported, but now you can make it a part of larger Python-based applications or services. * RPMLint uses a declarative TOML-based syntax for configuring RPMLint policy instead of Python code. * RPMLint now has an override system for the descriptions shown for various checks, so that distributions who want to give specific policy information can do so without patching the code. * RPMLint includes many more checks! Nearly all of the generally useful checks created by the openSUSE community have been merged into the tree, so distributions can now benefit from a wider offering of checks to implement policy enforcement. * RPMLint is Python 3 only and now supports Python 3.6 and newer. * RPMLint is now built and installed like a standard Python application using setuptools. - Removed legacy patches: * invalid-filerequires.diff * no-badness-return.diff * no-doc-for-lib.diff * only-reg-files-are-scripts.diff * remove-ghostfile-checks.diff * rpm415-workaround.diff * rpmgroup-checks.diff * rpmlint-suse.diff * suse-binarieschecks.diff * suse-checks.diff * suse-filter-exception.diff * suse-filter-more-verbose.diff OBS-URL: https://build.opensuse.org/request/show/901418 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=780
This commit is contained in:
parent
1d3b21c389
commit
51256fa68d
@ -1,31 +0,0 @@
|
||||
From c5dd20d7e48f4c441fe1cc3f451b184d6b31c074 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dirk@dmllr.de>
|
||||
Date: Sat, 2 Feb 2019 09:19:45 +0100
|
||||
Subject: [PATCH] ZipCheck: Also ignore RuntimeError
|
||||
|
||||
When there is a unpack error, we need to catch it. Potential
|
||||
reasons are : NotImplementedError (which happens on compression
|
||||
type issues) or RuntimeError (e.g for encrypted zip files).
|
||||
|
||||
This issue is already fixed in master in a non-backportable
|
||||
way, so a new fix has been done on stable.
|
||||
---
|
||||
ZipCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ZipCheck.py b/ZipCheck.py
|
||||
index a6f927a..4da6b06 100644
|
||||
--- a/ZipCheck.py
|
||||
+++ b/ZipCheck.py
|
||||
@@ -43,7 +43,7 @@ class ZipCheck(AbstractCheck.AbstractCheck):
|
||||
badcrc = z.testzip()
|
||||
if badcrc:
|
||||
printError(pkg, 'bad-crc-in-zip', badcrc, fname)
|
||||
- except zipfile.error:
|
||||
+ except (RuntimeError, zipfile.error):
|
||||
printWarning(pkg, 'unable-to-read-zip', '%s: %s' %
|
||||
(fname, sys.exc_info()[1]))
|
||||
else:
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,18 +0,0 @@
|
||||
= rpmlint-checks, rpmlint-tests =
|
||||
|
||||
The files from rpmlint-checks and rpmlint-tests managed in git. If
|
||||
you need to make changes, you have the following options:
|
||||
* Make them in git and update the package from git (you can file
|
||||
pull requests if you don't have write access)
|
||||
* Create a patch, add the patch to the package and let one of the
|
||||
maintainers commit it for you
|
||||
|
||||
The online repos are at:
|
||||
https://github.com/openSUSE/rpmlint-checks
|
||||
https://github.com/openSUSE/rpmlint-tests
|
||||
|
||||
For building the package from git run the service directly:
|
||||
osc service disabledrun
|
||||
|
||||
The services may mess up versions and changes files a bit. Needs
|
||||
some manual tweaking.
|
18
_service
18
_service
@ -1,23 +1,13 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="version">1</param>
|
||||
<param name="versionformat">84.87+git%cd.%h</param>
|
||||
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
||||
<param name="versionformat">2.0+git%cd.%h</param>
|
||||
<param name="url">https://github.com/rpm-software-management/rpmlint.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="version">1</param>
|
||||
<param name="versionformat">master</param>
|
||||
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="revision">opensuse</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="compression">xz</param>
|
||||
<param name="file">*.tar</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled">
|
||||
<param name="file">rpmlint-tests.spec</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled" />
|
||||
</services>
|
||||
|
@ -1,6 +0,0 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
||||
<param name="changesrevision">d6b66e2f3072f5962358e0101c3597316903cfd2</param></service><service name="tar_scm">
|
||||
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
||||
<param name="changesrevision">8a60ef9ef02754556557db3708477f3568c13ff1</param></service></servicedata>
|
@ -1,38 +0,0 @@
|
||||
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:
|
@ -1,77 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/BinariesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/BinariesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/BinariesCheck.py
|
||||
@@ -73,6 +73,10 @@ class BinaryInfo(object):
|
||||
mktemp_call_regex = create_regexp_call('mktemp')
|
||||
lto_section_name_prefix = '.gnu.lto_.'
|
||||
|
||||
+ # [Nr] Name Type Address Off Size ES Flg Lk Inf Al
|
||||
+ # [ 1] .text PROGBITS 0000000000000000 000040 000000 00 AX 0 0 1
|
||||
+ section_regex = re.compile(r'.*\] (?P<section>\S*)\s*\S+\s*\S*\s*\S*\s*(?P<size>\w*)')
|
||||
+
|
||||
def __init__(self, pkg, path, fname, is_ar, is_shlib):
|
||||
self.readelf_error = False
|
||||
self.needed = []
|
||||
@@ -92,6 +96,7 @@ class BinaryInfo(object):
|
||||
self.symtab = False
|
||||
self.tail = ''
|
||||
self.lto_sections = False
|
||||
+ self.no_text_in_archive = False
|
||||
|
||||
self.setgid = False
|
||||
self.setuid = False
|
||||
@@ -102,6 +107,7 @@ class BinaryInfo(object):
|
||||
self.mktemp = False
|
||||
|
||||
is_debug = path.endswith('.debug')
|
||||
+ is_archive = path.endswith('.a')
|
||||
# Currently this implementation works only on specific
|
||||
# architectures due to reliance on arch specific assembly.
|
||||
if (pkg.arch.startswith('armv') or pkg.arch == 'aarch64'):
|
||||
@@ -117,6 +123,24 @@ class BinaryInfo(object):
|
||||
('readelf', '-W', '-S', '-l', '-d', '-s', path))
|
||||
if not res[0]:
|
||||
lines = res[1].splitlines()
|
||||
+
|
||||
+ # For an archive, test if all .text sections are empty
|
||||
+ if is_archive and not ('/usr/lib64/ghc' in path or '/usr/lib/ghc' in path):
|
||||
+ has_text_segment = False
|
||||
+ non_zero_text_segment = False
|
||||
+
|
||||
+ for line in lines:
|
||||
+ r = self.section_regex.search(line)
|
||||
+ if r:
|
||||
+ sn = r.group('section')
|
||||
+ if sn == '.preinit_array' or sn == '.init_array' or sn == '.fini_array' or sn.startswith('.text'):
|
||||
+ has_text_segment = True
|
||||
+ size = int(r.group('size'), 16)
|
||||
+ if size > 0:
|
||||
+ non_zero_text_segment = True
|
||||
+ if has_text_segment and not non_zero_text_segment:
|
||||
+ self.no_text_in_archive = True
|
||||
+
|
||||
for line in lines:
|
||||
if BinaryInfo.lto_section_name_prefix in line:
|
||||
self.lto_sections = True
|
||||
@@ -522,6 +546,9 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
if bin_info.lto_sections:
|
||||
printError(pkg, 'lto-bytecode', fname)
|
||||
|
||||
+ if bin_info.no_text_in_archive:
|
||||
+ printError(pkg, 'lto-no-text-in-archive', fname)
|
||||
+
|
||||
for ec in bin_info.forbidden_calls:
|
||||
printWarning(pkg, ec, fname,
|
||||
BinaryInfo.forbidden_functions[ec]['f_name'])
|
||||
@@ -846,6 +873,10 @@ implementations only strip if the permis
|
||||
'lto-bytecode',
|
||||
'''This executable contains a LTO section. LTO bytecode is not portable
|
||||
and should not be distributed in static libraries or e.g. Python modules.''',
|
||||
+
|
||||
+'lto-no-text-in-archive',
|
||||
+'''This archive does not contain a non-empty .text section. The archive
|
||||
+was not created with -ffat-lto-objects option.''',
|
||||
)
|
||||
|
||||
# BinariesCheck.py ends here
|
@ -1,34 +0,0 @@
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Fri, 10 Apr 2015 14:54:18 +0200
|
||||
Subject: [PATCH] check for self provides
|
||||
|
||||
---
|
||||
TagsCheck.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -874,6 +874,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
||||
|
||||
+ for p in pkg.provides():
|
||||
+ if p[0] == pkg.name and not p[1]:
|
||||
+ printError(pkg, 'unversioned-explicit-self-provides', p[0])
|
||||
+
|
||||
for o in (x for x in obs_names if x not in prov_names):
|
||||
printWarning(pkg, 'obsolete-not-provided', o)
|
||||
for o in pkg.obsoletes():
|
||||
@@ -1219,6 +1223,10 @@ objects should thus not be depended on a
|
||||
in the containing package. Get rid of the provides if appropriate, for example
|
||||
by filtering it out during build. Note that in some cases this may require
|
||||
disabling rpmbuild's internal dependency generator.''',
|
||||
+
|
||||
+'unversioned-explicit-self-provides',
|
||||
+'''This package provides it's own name explicitely, which might break
|
||||
+upgrade path. self-provides are autogenerated. Remove the provide.''',
|
||||
)
|
||||
|
||||
for i in ("obsoletes", "conflicts", "provides", "recommends", "suggests",
|
@ -1,24 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] devel-provide-is-devel-package.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
FilesCheck.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/FilesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
@@ -446,6 +446,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
# Check if the package is a development package
|
||||
devel_pkg = devel_regex.search(pkg.name)
|
||||
|
||||
+ for p in pkg.provides():
|
||||
+ if not devel_pkg and devel_regex.search(p[0]):
|
||||
+ devel_pkg = True
|
||||
+
|
||||
config_files = pkg.configFiles()
|
||||
ghost_files = pkg.ghostFiles()
|
||||
doc_files = pkg.docFiles()
|
10
disable-flake.patch
Normal file
10
disable-flake.patch
Normal file
@ -0,0 +1,10 @@
|
||||
diff --git a/setup.cfg b/setup.cfg
|
||||
index 098f636..0ccb9dc 100644
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -10,4 +10,4 @@ import-order-style = google
|
||||
application-import-names = Testing
|
||||
|
||||
[tool:pytest]
|
||||
-addopts = -vv --cov=rpmlint -n auto --flake8
|
||||
+addopts = -vv --cov=rpmlint -n auto
|
@ -1,42 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
||||
Subject: [PATCH] docdata-examples.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
FilesCheck.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/FilesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
@@ -190,6 +190,7 @@ bin_regex = re.compile(r'^/(?:usr/(?:s?b
|
||||
includefile_regex = re.compile(r'\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||
develfile_regex = re.compile(r'\.(a|cmxa?|mli?|gir)$')
|
||||
buildconfigfile_regex = re.compile(r'(\.pc|/bin/.+-config)$')
|
||||
+docdir_examples_regex = re.compile('^/usr/(?:share/doc/packages|lib(?:64))/[^/]+/(?:example|demo|script|contrib)')
|
||||
# room for improvement with catching more -R, but also for false positives...
|
||||
buildconfig_rpath_regex = re.compile(r'(?:-rpath|Wl,-R)\b')
|
||||
sofile_regex = re.compile(r'/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||
@@ -820,7 +821,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
includefile_regex.search(f) or \
|
||||
develfile_regex.search(f) or \
|
||||
logrotate_regex.search(f)
|
||||
- if nonexec_file:
|
||||
+ if nonexec_file and not docdir_examples_regex.search(f):
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/') and f not in config_files and \
|
||||
f not in ghost_files:
|
||||
@@ -1196,7 +1197,10 @@ included in your package.''',
|
||||
'spurious-executable-perm',
|
||||
'''The file is installed with executable permissions, but was identified as one
|
||||
that probably should not be executable. Verify if the executable bits are
|
||||
-desired, and remove if not.''',
|
||||
+desired, and remove if not.
|
||||
+NOTE: example scripts should be packaged under %docdir/examples, which will avoid
|
||||
+this warning.
|
||||
+''',
|
||||
|
||||
'world-writable',
|
||||
'''A file or directory in the package is installed with world writable
|
@ -1,22 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
||||
Subject: [PATCH] extend-suse-conffiles-check.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
FilesCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/FilesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
@@ -828,7 +828,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
if nonexec_file and not docdir_examples_regex.search(f):
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/') and f not in config_files and \
|
||||
- f not in ghost_files:
|
||||
+ f not in ghost_files and not f.endswith(".desktop"):
|
||||
printWarning(pkg, 'non-conffile-in-etc', f)
|
||||
|
||||
if pkg.arch == 'noarch' and f.startswith('/usr/lib64/python'):
|
@ -1,43 +0,0 @@
|
||||
--- a/Filter.py
|
||||
+++ b/Filter.py
|
||||
@@ -43,15 +43,15 @@ else:
|
||||
|
||||
|
||||
def printInfo(pkg, reason, *details):
|
||||
- _print("I", pkg, reason, details)
|
||||
+ _print('I', pkg, reason, details)
|
||||
|
||||
|
||||
def printWarning(pkg, reason, *details):
|
||||
- _print("W", pkg, reason, details)
|
||||
+ _print('W', pkg, reason, details)
|
||||
|
||||
|
||||
def printError(pkg, reason, *details):
|
||||
- _print("E", pkg, reason, details)
|
||||
+ _print('E', pkg, reason, details)
|
||||
|
||||
|
||||
def _print(msgtype, pkg, reason, details):
|
||||
@@ -111,8 +111,10 @@ def printDescriptions(reason):
|
||||
|
||||
|
||||
def _diag_sortkey(x):
|
||||
- xs = x.split()
|
||||
- return (xs[2], xs[1])
|
||||
+ xs = x.split(maxsplit=2)
|
||||
+ # Sort Category (Info/Warnings/Errors), Diagnostic, Name
|
||||
+ # ['game.x86_64:', 'W:', 'call-to-mktemp /usr/games/lib/blub\n']
|
||||
+ return (str('IWE'.find(xs[1][0])), xs[2], xs[0])
|
||||
|
||||
|
||||
def printAllReasons():
|
||||
@@ -121,7 +123,7 @@ def printAllReasons():
|
||||
return False
|
||||
|
||||
global _diagnostic
|
||||
- _diagnostic.sort(key=_diag_sortkey, reverse=True)
|
||||
+ _diagnostic.sort(key=_diag_sortkey)
|
||||
last_reason = ''
|
||||
for diag in _diagnostic:
|
||||
if Config.info:
|
@ -1,44 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
||||
Subject: [PATCH] invalid-filerequires.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
TagsCheck.py | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -456,6 +456,7 @@ invalid_version_regex = re.compile(r'([0
|
||||
# () are here for grouping purpose in the regexp
|
||||
forbidden_words_regex = re.compile(r'(%s)' % Config.getOption('ForbiddenWords'), re.IGNORECASE)
|
||||
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
||||
+valid_filedep_regex = re.compile(r'(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
||||
use_epoch = Config.getOption('UseEpoch', False)
|
||||
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||
max_line_len = Config.getOption('MaxLineLength', 79)
|
||||
@@ -636,6 +637,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if d[0].startswith('/usr/local/'):
|
||||
printError(pkg, 'invalid-dependency', d[0])
|
||||
|
||||
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
||||
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
||||
+
|
||||
if is_source:
|
||||
if lib_devel_number_regex.search(d[0]):
|
||||
printError(pkg, 'invalid-build-requires', d[0])
|
||||
@@ -1166,6 +1170,12 @@ unneeded explicit Requires: tags.''',
|
||||
'''This package provides 2 times the same capacity. It should only provide it
|
||||
once.''',
|
||||
|
||||
+'invalid-filepath-dependency',
|
||||
+'''A package has a file or path based dependency that is not resolveable for
|
||||
+package solvers because it is not in the whitelist for path based dependencies
|
||||
+and therefore not available in repository metadata. Please use a symbolic requires
|
||||
+instead or require a file in bin or /etc.''',
|
||||
+
|
||||
'tag-not-utf8',
|
||||
'''The character encoding of the value of this tag is not UTF-8.''',
|
||||
|
@ -1,17 +0,0 @@
|
||||
# -*- python -*-
|
||||
# vim: syntax=python sw=4 et
|
||||
|
||||
# This line is mandatory to access the configuration functions
|
||||
from Config import *
|
||||
from Filter import addDetails
|
||||
|
||||
addDetails('invalid-license',
|
||||
"""The specified license string is not recognized. Please refer to
|
||||
https://spdx.org/licenses/ for the list of known licenses and
|
||||
their exact spelling.""")
|
||||
|
||||
# from http://www.spdx.org/licenses/
|
||||
setOption('ValidLicenses', (
|
||||
# generated in spec file
|
||||
#VALIDLICENSES
|
||||
))
|
@ -1,36 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] no-badness-return.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
Filter.py | 2 +-
|
||||
rpmlint | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/Filter.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/Filter.py
|
||||
+++ rpmlint-rpmlint-1.11/Filter.py
|
||||
@@ -130,7 +130,7 @@ def printAllReasons():
|
||||
if len(last_reason):
|
||||
printDescriptions(last_reason)
|
||||
last_reason = reason
|
||||
- __print(diag)
|
||||
+ __print(diag[:-1])
|
||||
if Config.info and len(last_reason):
|
||||
printDescriptions(last_reason)
|
||||
_diagnostic = list()
|
||||
Index: rpmlint-rpmlint-1.11/rpmlint
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/rpmlint
|
||||
+++ rpmlint-rpmlint-1.11/rpmlint
|
||||
@@ -207,7 +207,7 @@ def main():
|
||||
% (packages_checked, specfiles_checked,
|
||||
printed_messages["E"], printed_messages["W"]))
|
||||
|
||||
- if printed_messages["E"] > 0:
|
||||
+ if badnessThreshold() < 0 and printed_messages["E"] > 0:
|
||||
sys.exit(64)
|
||||
sys.exit(0)
|
||||
|
@ -1,22 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
||||
Subject: [PATCH] no-doc-for-lib.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
FilesCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/FilesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
@@ -464,7 +464,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
debuginfo_srcs = False
|
||||
debuginfo_debugs = False
|
||||
|
||||
- if not doc_files:
|
||||
+ if not lib_package and not doc_files:
|
||||
printWarning(pkg, 'no-documentation')
|
||||
|
||||
if files:
|
@ -1,32 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] only-reg-files-are-scripts.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
InitScriptCheck.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/InitScriptCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/InitScriptCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/InitScriptCheck.py
|
||||
@@ -17,7 +17,7 @@ import AbstractCheck
|
||||
import Config
|
||||
from Filter import addDetails, printError, printWarning
|
||||
import Pkg
|
||||
-
|
||||
+import stat
|
||||
|
||||
chkconfig_content_regex = re.compile(r'^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
||||
subsys_regex = re.compile(r'/var/lock/subsys/([^/"\'\s;&|]+)', re.MULTILINE)
|
||||
@@ -49,6 +49,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
not fname.startswith('/etc/rc.d/init.d/'):
|
||||
continue
|
||||
|
||||
+ if not stat.S_ISREG(pkgfile.mode):
|
||||
+ continue
|
||||
+
|
||||
basename = os.path.basename(fname)
|
||||
initscript_list.append(basename)
|
||||
if pkgfile.mode & 0o500 != 0o500:
|
234
pie.config
234
pie.config
@ -1,234 +0,0 @@
|
||||
from Config import *
|
||||
|
||||
# This file should list daemons and programs that are likely to be set setuid
|
||||
# by users. Files listed in permissions.eays are automatically checked.
|
||||
|
||||
pie_execs = (
|
||||
"/bin/ping",
|
||||
"/usr/bin/ping",
|
||||
"/bin/ping6",
|
||||
"/usr/bin/ping6",
|
||||
"/bin/su",
|
||||
"/usr/bin/su",
|
||||
"/usr/bin/pidgin",
|
||||
"/sbin/arping",
|
||||
"/sbin/clockdiff",
|
||||
"/sbin/dhclient",
|
||||
"/sbin/dhcpcd",
|
||||
"/sbin/klogd",
|
||||
"/sbin/rpcbind",
|
||||
"/sbin/syslogd",
|
||||
"/sbin/tracepath",
|
||||
"/sbin/tracepath6",
|
||||
"/usr/bin/uniconv",
|
||||
"/usr/bin/achfile",
|
||||
"/usr/bin/adv1tov2",
|
||||
"/usr/bin/aecho",
|
||||
"/usr/bin/afile",
|
||||
"/usr/bin/afppasswd",
|
||||
"/usr/bin/at",
|
||||
"/usr/bin/cadaver",
|
||||
"/usr/bin/chage",
|
||||
"/usr/bin/chfn",
|
||||
"/usr/bin/chsh",
|
||||
"/usr/bin/ciptool",
|
||||
"/usr/bin/cnid_index",
|
||||
"/usr/bin/dig",
|
||||
"/usr/bin/dund",
|
||||
"/usr/bin/expiry",
|
||||
"/usr/bin/finger",
|
||||
"/usr/bin/getzones",
|
||||
"/usr/bin/gpasswd",
|
||||
"/usr/bin/gpg",
|
||||
"/usr/bin/gpgsplit",
|
||||
"/usr/bin/gpgv",
|
||||
"/usr/bin/hcitool",
|
||||
"/usr/bin/hidd",
|
||||
"/usr/bin/host",
|
||||
"/usr/bin/htpasswd",
|
||||
"/usr/bin/l2ping",
|
||||
"/usr/bin/lppasswd",
|
||||
"/usr/bin/megatron",
|
||||
"/usr/bin/nbplkup",
|
||||
"/usr/bin/nbprgstr",
|
||||
"/usr/bin/nbpunrgstr",
|
||||
"/usr/bin/ncplogin",
|
||||
"/usr/bin/ncpmap",
|
||||
"/usr/bin/net",
|
||||
"/usr/bin/newgrp",
|
||||
"/usr/bin/nmblookup",
|
||||
"/usr/bin/nslookup",
|
||||
"/usr/bin/nsupdate",
|
||||
"/usr/bin/nwsfind",
|
||||
"/usr/bin/omshell",
|
||||
"/usr/bin/pand",
|
||||
"/usr/bin/pap",
|
||||
"/usr/bin/papstatus",
|
||||
"/usr/bin/passwd",
|
||||
"/usr/bin/pdbedit",
|
||||
"/usr/bin/profiles",
|
||||
"/usr/bin/psorder",
|
||||
"/usr/bin/rcp",
|
||||
"/usr/bin/rexec",
|
||||
"/usr/bin/rfcomm",
|
||||
"/usr/bin/rlogin",
|
||||
"/usr/bin/rpcclient",
|
||||
"/usr/bin/rsh",
|
||||
"/usr/bin/scp",
|
||||
"/usr/bin/sdptool",
|
||||
"/usr/bin/sftp",
|
||||
"/usr/bin/showppd",
|
||||
"/usr/bin/smbcacls",
|
||||
"/usr/bin/smbclient",
|
||||
"/usr/bin/smbcontrol",
|
||||
"/usr/bin/smbcquotas",
|
||||
"/sbin/mount.cifs",
|
||||
"/usr/bin/smbpasswd",
|
||||
"/usr/bin/smbspool",
|
||||
"/usr/bin/smbstatus",
|
||||
"/usr/bin/smbtree",
|
||||
"/usr/bin/ssh",
|
||||
"/usr/bin/ssh-add",
|
||||
"/usr/bin/ssh-agent",
|
||||
"/usr/bin/ssh-keygen",
|
||||
"/usr/bin/ssh-keyscan",
|
||||
"/usr/bin/svn",
|
||||
"/usr/bin/svnadmin",
|
||||
"/usr/bin/svndumpfilter",
|
||||
"/usr/bin/svnlook",
|
||||
"/usr/bin/svnserve",
|
||||
"/usr/bin/svnversion",
|
||||
"/usr/bin/talk",
|
||||
"/usr/bin/telnet",
|
||||
"/usr/bin/testparm",
|
||||
"/usr/bin/testprns",
|
||||
"/usr/bin/timeout",
|
||||
"/usr/bin/wbinfo",
|
||||
"/usr/lib/mit/bin/ftp",
|
||||
"/usr/lib/mit/bin/gss-client",
|
||||
"/usr/lib/mit/bin/kdestroy",
|
||||
"/usr/lib/mit/bin/kinit",
|
||||
"/usr/lib/mit/bin/klist",
|
||||
"/usr/lib/mit/bin/kpasswd",
|
||||
"/usr/lib/mit/bin/krb524init",
|
||||
"/usr/lib/mit/bin/ksu",
|
||||
"/usr/lib/mit/bin/kvno",
|
||||
"/usr/lib/mit/bin/rcp",
|
||||
"/usr/lib/mit/bin/rlogin",
|
||||
"/usr/lib/mit/bin/rsh",
|
||||
"/usr/lib/mit/bin/sclient",
|
||||
"/usr/lib/mit/bin/sim_client",
|
||||
"/usr/lib/mit/bin/telnet",
|
||||
"/usr/lib/mit/bin/uuclient",
|
||||
"/usr/lib/mit/bin/v4rcp",
|
||||
"/usr/lib/mit/sbin/ftpd",
|
||||
"/usr/lib/mit/sbin/gss-server",
|
||||
"/usr/lib/mit/sbin/kadmin",
|
||||
"/usr/lib/mit/sbin/kadmin.local",
|
||||
"/usr/lib/mit/sbin/kadmind",
|
||||
"/usr/lib/mit/sbin/kdb5_util",
|
||||
"/usr/lib/mit/sbin/klogind",
|
||||
"/usr/lib/mit/sbin/kprop",
|
||||
"/usr/lib/mit/sbin/kpropd",
|
||||
"/usr/lib/mit/sbin/krb524d",
|
||||
"/usr/lib/mit/sbin/krb5kdc",
|
||||
"/usr/lib/mit/sbin/kshd",
|
||||
"/usr/lib/mit/sbin/ktutil",
|
||||
"/usr/lib/mit/sbin/login.krb5",
|
||||
"/usr/lib/mit/sbin/sim_server",
|
||||
"/usr/lib/mit/sbin/sserver",
|
||||
"/usr/lib/mit/sbin/telnetd",
|
||||
"/usr/lib/mit/sbin/uuserver",
|
||||
"/usr/lib/news/bin/innd",
|
||||
"/usr/lib/news/bin/innbind",
|
||||
"/usr/lib/news/bin/rnews",
|
||||
"/usr/sbin/afpd",
|
||||
"/usr/sbin/amcheck",
|
||||
"/usr/sbin/amdd",
|
||||
"/usr/sbin/atalkd",
|
||||
"/usr/sbin/atd",
|
||||
"/usr/sbin/automount",
|
||||
"/usr/sbin/chat",
|
||||
"/usr/sbin/cnid_dbd",
|
||||
"/usr/sbin/cnid_metad",
|
||||
"/usr/sbin/cron",
|
||||
"/usr/sbin/cupsd",
|
||||
"/usr/sbin/dhcpd",
|
||||
"/usr/sbin/dhcrelay",
|
||||
"/usr/sbin/dnssec-keygen",
|
||||
"/usr/sbin/dnssec-signzone",
|
||||
"/usr/sbin/exim",
|
||||
"/usr/sbin/hciattach",
|
||||
"/usr/sbin/bluetoothd",
|
||||
"/usr/sbin/hciconfig",
|
||||
"/usr/sbin/hid2hci",
|
||||
"/usr/sbin/httpd2",
|
||||
"/usr/sbin/httpd2-prefork",
|
||||
"/usr/sbin/httpd2-worker",
|
||||
"/usr/sbin/in.fingerd",
|
||||
"/usr/sbin/in.ntalkd",
|
||||
"/usr/sbin/in.rexecd",
|
||||
"/usr/sbin/in.rlogind",
|
||||
"/usr/sbin/in.rshd",
|
||||
"/usr/sbin/in.telnetd",
|
||||
"/usr/sbin/irqbalance",
|
||||
"/usr/sbin/lwresd",
|
||||
"/usr/sbin/mailstats",
|
||||
"/usr/sbin/makemap",
|
||||
"/usr/sbin/named",
|
||||
"/usr/sbin/named-checkconf",
|
||||
"/usr/sbin/named-checkzone",
|
||||
"/usr/sbin/nmbd",
|
||||
"/usr/sbin/nscd",
|
||||
"/usr/sbin/ntlm_auth",
|
||||
"/usr/sbin/ntp-keygen",
|
||||
"/usr/sbin/ntpd",
|
||||
"/usr/sbin/ntpdc",
|
||||
"/usr/sbin/ntpq",
|
||||
"/usr/sbin/ntptime",
|
||||
"/usr/sbin/openvpn",
|
||||
"/usr/sbin/papd",
|
||||
"/usr/sbin/postfix",
|
||||
"/usr/sbin/pppd",
|
||||
"/usr/sbin/praliases",
|
||||
"/usr/sbin/radiusd",
|
||||
"/usr/sbin/rarpd",
|
||||
"/usr/sbin/rndc",
|
||||
"/usr/sbin/rndc-confgen",
|
||||
"/usr/sbin/rotatelogs2",
|
||||
"/usr/sbin/rpc.mountd",
|
||||
"/usr/sbin/rpc.nfsd",
|
||||
"/usr/sbin/rpc.rquotad",
|
||||
"/usr/sbin/rpc.rwalld",
|
||||
"/usr/sbin/rpc.yppasswdd",
|
||||
"/usr/sbin/rpc.ypxfrd",
|
||||
"/usr/sbin/safe_finger",
|
||||
"/usr/sbin/sendmail",
|
||||
"/usr/lib/sudo/sesh",
|
||||
"/usr/lib/openldap/slapd",
|
||||
"/usr/sbin/smartctl",
|
||||
"/usr/sbin/smartd",
|
||||
"/usr/sbin/smbd",
|
||||
"/usr/sbin/snmpd",
|
||||
"/usr/sbin/snmptrapd",
|
||||
"/usr/sbin/squid",
|
||||
"/usr/sbin/squidclient",
|
||||
"/usr/sbin/sshd",
|
||||
"/usr/sbin/stunnel",
|
||||
"/usr/sbin/suexec2",
|
||||
"/usr/sbin/tcpd",
|
||||
"/usr/sbin/tickadj",
|
||||
"/usr/sbin/traceroute",
|
||||
"/usr/sbin/traceroute6",
|
||||
"/usr/sbin/try-from",
|
||||
"/usr/sbin/utempter",
|
||||
"/usr/sbin/visudo",
|
||||
"/usr/sbin/vsftpd",
|
||||
"/usr/sbin/winbindd",
|
||||
"/usr/sbin/xinetd",
|
||||
"/usr/sbin/yppush",
|
||||
"/usr/sbin/ypserv",
|
||||
"/usr/bin/zone2ldap",
|
||||
)
|
||||
|
||||
setOption('PieExecutables', '^(?:%s)$' % '|'.join(pie_execs))
|
@ -1,36 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/PostCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/PostCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/PostCheck.py
|
||||
@@ -108,20 +108,6 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||
pkg, files, prog[idx],
|
||||
pkg.header[tag[0]][idx], tag[2], prereq)
|
||||
|
||||
- ghost_files = pkg.ghostFiles()
|
||||
- if ghost_files:
|
||||
- postin = pkg[rpm.RPMTAG_POSTIN]
|
||||
- prein = pkg[rpm.RPMTAG_PREIN]
|
||||
- for f in ghost_files:
|
||||
- if f in pkg.missingOkFiles():
|
||||
- continue
|
||||
- if not postin and not prein:
|
||||
- printWarning(pkg, 'ghost-files-without-postin')
|
||||
- if (not postin or f not in postin) and \
|
||||
- (not prein or f not in prein):
|
||||
- printWarning(pkg,
|
||||
- 'postin-without-ghost-file-creation', f)
|
||||
-
|
||||
def check_aux(self, pkg, files, prog, script, tag, prereq):
|
||||
if script:
|
||||
script_str = Pkg.b2s(script)
|
||||
@@ -193,10 +179,6 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||
check = PostCheck()
|
||||
|
||||
# Add information about checks
|
||||
-addDetails(
|
||||
-'postin-without-ghost-file-creation',
|
||||
-'''A file tagged as ghost is not created during %prein nor during %postin.''',
|
||||
-)
|
||||
for scriptlet in map(lambda x: '%' + x, Pkg.RPM_SCRIPTLETS):
|
||||
addDetails(
|
||||
'one-line-command-in-%s' % scriptlet,
|
@ -1,58 +0,0 @@
|
||||
Ugly workaround for RPM 4.14 vs 4.15 python3 bindings incompatibility
|
||||
|
||||
Upstream commits:
|
||||
a310a79f81f2b2dd3a31a101562e67915476a751
|
||||
8fd904b53c028dded0b308ee95f1a5ff998584fd
|
||||
|
||||
diff --git a/rpmlint/Pkg.py b/rpmlint/Pkg.py
|
||||
index 8d01f30..1b25771 100644
|
||||
--- rpmlint-rpmlint-1.11.orig/Pkg.py
|
||||
+++ rpmlint-rpmlint-1.11/Pkg.py
|
||||
@@ -143,8 +143,17 @@ def is_utf8(fname):
|
||||
|
||||
|
||||
def is_utf8_bytestr(s):
|
||||
+ """Returns True whether the given text is UTF-8.
|
||||
+ Due to changes in rpm, needs to handle both bytes and unicode."""
|
||||
try:
|
||||
- s.decode('UTF-8')
|
||||
+ if hasattr(s, 'decode'):
|
||||
+ s.decode('utf-8')
|
||||
+ elif hasattr(s, 'encode'):
|
||||
+ s.encode('utf-8')
|
||||
+ else:
|
||||
+ unexpected = type(s).__name__
|
||||
+ raise TypeError(
|
||||
+ 'Expected str/unicode/bytes, not {}'.format(unexpected))
|
||||
except UnicodeError:
|
||||
return False
|
||||
return True
|
||||
--- rpmlint-rpmlint-1.11.orig/PostCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/PostCheck.py
|
||||
@@ -70,6 +70,8 @@ def incorrect_perl_script(prog, perlscri
|
||||
def check_syntax_script(prog, commandline, script):
|
||||
if not script:
|
||||
return False
|
||||
+ if isinstance(script, str):
|
||||
+ script = script.encode('utf-8')
|
||||
# TODO: test that "prog" is available/executable
|
||||
tmpfd, tmpname = tempfile.mkstemp(prefix='rpmlint.')
|
||||
tmpfile = os.fdopen(tmpfd, 'wb')
|
||||
--- rpmlint-rpmlint-1.11.orig/rpmlint-checks-master/CheckFilelist.py
|
||||
+++ rpmlint-rpmlint-1.11/rpmlint-checks-master/CheckFilelist.py
|
||||
@@ -425,8 +425,13 @@ class FilelistCheck(AbstractCheck.Abstra
|
||||
invalidfhs = set()
|
||||
invalidopt = set()
|
||||
|
||||
- isSUSE = (pkg.header[RPMTAG_VENDOR] and
|
||||
- b'SUSE' in pkg.header[RPMTAG_VENDOR])
|
||||
+ isSUSE = False
|
||||
+ if pkg.header[RPMTAG_VENDOR]:
|
||||
+ vendor = pkg.header[RPMTAG_VENDOR]
|
||||
+ if isinstance(vendor, str):
|
||||
+ isSUSE = 'SUSE' in vendor
|
||||
+ else:
|
||||
+ isSUSE = b'SUSE' in vendor
|
||||
|
||||
# the checks here only warn about a directory once rather
|
||||
# than reporting potentially hundreds of files individually
|
@ -1,33 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] rpmgroup-checks.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
TagsCheck.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -750,6 +750,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
self._unexpanded_macros(pkg, 'Group', group)
|
||||
if not group:
|
||||
printError(pkg, 'no-group-tag')
|
||||
+ elif pkg.name.endswith('-devel') and not group.startswith('Development/'):
|
||||
+ printWarning(pkg, 'devel-package-with-non-devel-group', group)
|
||||
elif VALID_GROUPS and group not in VALID_GROUPS:
|
||||
printWarning(pkg, 'non-standard-group', group)
|
||||
|
||||
@@ -1085,6 +1087,10 @@ won't fool the specfile parser, and rebu
|
||||
'''There is no Group tag in your package. You have to specify a valid group
|
||||
in your spec file using the Group tag.''',
|
||||
|
||||
+'devel-package-with-non-devel-group',
|
||||
+'''The package ends with -devel but does not have a RPM group starting with
|
||||
+Development/''',
|
||||
+
|
||||
'non-standard-group',
|
||||
'''The value of the Group tag in the package is not valid. Valid groups are:
|
||||
"%s".''' % '", "'.join(VALID_GROUPS),
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ea1f4726382bcf24652ea710b4e98fdfd7f83a7c44a7ee2f5eaf5b201be9ac3
|
||||
size 21774264
|
3
rpmlint-2.0+git20210622.7834254.tar.xz
Normal file
3
rpmlint-2.0+git20210622.7834254.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e6d7a88fc3a17abdf2e2739831c3f10c5461a3fad060850bf35982a067e2e4b
|
||||
size 6676984
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb3db8e4053d3e4c92e466f802fd82c79d252596920eb37d6246ef96df3833cc
|
||||
size 32856
|
@ -1,13 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||
@@ -673,7 +673,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
base_or_libs = base + '*' + '/' + base + '-libs/lib' + base + '*'
|
||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||||
base_or_libs_re = re.compile(
|
||||
- r'^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?$' % re.escape(base))
|
||||
+ r'^(lib)?%s(-libs)?[\d_-]*(\(\w+-\d+\))?$' % re.escape(base))
|
||||
for d in deps:
|
||||
if base_or_libs_re.match(d[0]):
|
||||
dep = d
|
@ -1,26 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/FilesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/FilesCheck.py
|
||||
@@ -185,7 +185,7 @@ compr_regex = re.compile(compressions +
|
||||
absolute_regex = re.compile(r'^/([^/]+)')
|
||||
absolute2_regex = re.compile(r'^/?([^/]+)')
|
||||
points_regex = re.compile(r'^\.\./(.*)')
|
||||
-doc_regex = re.compile(r'^/usr(/share|/X11R6)?/(doc|man|info)/|^/usr/share/gnome/help')
|
||||
+doc_regex = re.compile(r'^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help')
|
||||
bin_regex = re.compile(r'^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
|
||||
includefile_regex = re.compile(r'\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||
develfile_regex = re.compile(r'\.(a|cmxa?|mli?|gir)$')
|
||||
Index: rpmlint-rpmlint-1.11/I18NCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/I18NCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/I18NCheck.py
|
||||
@@ -30,7 +30,7 @@ INCORRECT_LOCALES = {
|
||||
'en_UK': 'en_GB'}
|
||||
|
||||
package_regex = re.compile('-(' + '|'.join(LANGUAGES) + ')$')
|
||||
-locale_regex = re.compile('^(/usr/share/locale/([^/]+))/')
|
||||
+locale_regex = re.compile(r'^(/(usr|opt/kde3|opt/gnome)/share/locale/([^/]+))/')
|
||||
correct_subdir_regex = re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$')
|
||||
lc_messages_regex = re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$')
|
||||
man_regex = re.compile('/usr(?:/share)?/man/([^/]+)/man[0-9n][^/]*/[^/]+$')
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:82a5d1be062d1aa69f57d2adc815de653c26d0dbecfd5078acec6666268c9481
|
||||
size 13672
|
@ -1,28 +0,0 @@
|
||||
From af1ec4e64647ec4b6bf550ba822165c563a40ad6 Mon Sep 17 00:00:00 2001
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Wed, 9 May 2018 13:50:54 +0200
|
||||
Subject: [PATCH] Revert "polkit: adjust reference output to match
|
||||
corresponding change in rpmlint-checks"
|
||||
|
||||
This reverts commit f4dfbdc2cc367245537df410353a64d67cbcc519.
|
||||
---
|
||||
tests/polkit.ref | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/polkit.ref b/tests/polkit.ref
|
||||
index fb214ea..22dd180 100644
|
||||
--- a/tests/polkit.ref
|
||||
+++ b/tests/polkit.ref
|
||||
@@ -1,6 +1,6 @@
|
||||
polkit: I: polkit-cant-acquire-privilege org.opensuse.test.bar (no:auth_admin:auth_admin)
|
||||
+polkit: W: polkit-untracked-privilege org.opensuse.test.bar (no:auth_admin:auth_admin)
|
||||
+polkit: W: polkit-untracked-privilege org.opensuse.test.foo (auth_admin:auth_admin:auth_admin)
|
||||
polkit: E: polkit-unauthorized-privilege (Badness: 10000) org.opensuse.test.baz (auth_admin:auth_admin:auth_self)
|
||||
polkit: E: polkit-unauthorized-privilege (Badness: 10000) org.opensuse.test.baz2 (auth_admin:auth_admin:yes)
|
||||
-polkit: E: polkit-untracked-privilege (Badness: 10000) org.opensuse.test.bar (no:auth_admin:auth_admin)
|
||||
-polkit: E: polkit-untracked-privilege (Badness: 10000) org.opensuse.test.foo (auth_admin:auth_admin:auth_admin)
|
||||
-1 packages and 0 specfiles checked; 4 errors, 0 warnings.
|
||||
+1 packages and 0 specfiles checked; 2 errors, 2 warnings.
|
||||
--
|
||||
2.16.3
|
||||
|
@ -1,424 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
- Update of rpmlint-tests to version 84.87+git20200724.ef05f7e:
|
||||
* use /usr/bin/su instead of /bin/su since the latter is no longer allowed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 28 14:28:17 UTC 2020 - malte.kraus@suse.com
|
||||
|
||||
- Update to version 84.87+git20200221.3ea152b:
|
||||
* pam1 test: adjust reference output to newly added badness in rpmlint-Factory
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 06 10:06:37 UTC 2020 - malte.kraus@suse.com
|
||||
|
||||
- Update to version master:
|
||||
* CheckSUIDPermissions.py: fix permissions.d checks
|
||||
* add a lint to catch insecure mixed file/directory ownership similar to CVE-2019-3689
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 06 10:06:36 UTC 2020 - malte.kraus@suse.com
|
||||
|
||||
- Update to version 84.87+git20200206.7e2b64f:
|
||||
* permissions2: test that allowed permissions.d drop-ins work
|
||||
* test for new file-parent-ownership-mismatch lint
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 30 12:34:02 UTC 2020 - jsegitz@suse.de
|
||||
|
||||
- Update to version 84.87+git20200130.c0de5f4:
|
||||
* libzork4.spec: removed define for 'basename' in libzork4.spec.
|
||||
This causes build errors because 'basename' is a builtin and it's
|
||||
not used
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 30 08:06:14 UTC 2020 - jsegitz@suse.de
|
||||
|
||||
- Update to version 84.87+git20200115.9339533:
|
||||
* use uname -m instead of uname -i as the latter is not portable
|
||||
* remove rpm directory upon make clean
|
||||
* Support for different output based on architecture. For that create a
|
||||
<NAME>.<ARCH>.ref file instead of <NAME>.ref E.g. debug.i386.ref
|
||||
* verify that new permissions paths need whitelisting
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 20 13:22:14 UTC 2019 - mimi.vx@gmail.com
|
||||
|
||||
- Update to version 84.87+git20190920.e27d431:
|
||||
* Fix tests with disabled 'group' checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 28 06:32:18 UTC 2019 - tchvatal@suse.com
|
||||
|
||||
- Update to version 84.87+git20190828.2c92180:
|
||||
* Revert "added LTO errors as expected for debug tests"
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 28 01:08:27 UTC 2019 - tchvatal@suse.com
|
||||
|
||||
- Update to version 84.87+git20190828.8fa8ac5:
|
||||
* Do not use -flto for debug tests.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 20 07:40:56 UTC 2019 - kukuk@suse.com
|
||||
|
||||
- Update to version master:
|
||||
* Allow /usr/etc as discussed on opensuse-factory and opensuse-packaging
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 17 14:51:58 UTC 2019 - jsegitz@suse.de
|
||||
|
||||
- Update to version 84.87+git20190717.48212cf:
|
||||
* added LTO errors as expected for debug tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 18 08:51:41 UTC 2019 - dmueller@suse.com
|
||||
|
||||
- Update to version 84.87+git20190318.caf1835:
|
||||
* pie.spec: use /usr/bin/mount, since /bin/mount was removed from permissions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 23 22:06:23 UTC 2019 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20190123.8914352:
|
||||
* adjust ref for rpmlint 1.11
|
||||
|
||||
------------------------------------------------------------------
|
||||
Wed Jan 09 19:02:01 UTC 2019 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20181018.60e0249:
|
||||
* Add test for %tmpfiles_create foo.conf with no full path
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 03 12:53:18 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20180703.88daa4e:
|
||||
* Adjust order of output as well
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 03 12:45:14 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20180703.03176da:
|
||||
* adjust reference testoutput for removal of badness
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 9 11:48:47 UTC 2018 - lnussel@suse.de
|
||||
|
||||
- add rpmlint-tests-sle15.patch to fix rpmlint-tests build for
|
||||
sle/leap 15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 14:13:28 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20180220.6f1f0aa:
|
||||
* polkit: adjust reference output to match corresponding change in rpmlint-checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 18 14:56:22 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20180218.1142fcc:
|
||||
* Update polkit ref tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 08 13:49:46 UTC 2018 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20180202.3df4ae7:
|
||||
* Add testcases for MenuXDGCheck.py
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 11 11:29:25 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20171011.8b163ac:
|
||||
* Trying to fixup the erlang check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 11 06:43:46 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20171011.856375f:
|
||||
* Add unit test for ErlangCheck
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 10 12:21:50 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20171010.a53d9bd:
|
||||
* Remove appdata related tests, those are upstream now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 10 09:19:30 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20171009.dfac67b:
|
||||
* Adjust output for enabled non-std group checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 30 16:19:07 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20170930.921e051:
|
||||
* Update reference files against rpmlint 1.10
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 28 21:16:42 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20170928.27b6cb3:
|
||||
* Adjustments for newer rpmlint
|
||||
drop 0001-Update-varrun-test-for-Leap-42.2-severity-reduction.patch
|
||||
rpmlint-pie-factory.patch, rpmlint-pie-leap42.patch:
|
||||
this belongs into git
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 28 12:47:02 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20170928.d2c55ee:
|
||||
* Remove some outdated sysv init check, we have switched to systemd
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 2 16:30:01 UTC 2017 - meissner@suse.com
|
||||
|
||||
- rpmlint-pie-leap42.patch, rpmlint-pie-factory.patch:
|
||||
adjust testsuite to match new PIE warning, for both
|
||||
Leap 42.3 and Factory.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 18 13:49:18 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version master:
|
||||
* remote unused/outdated checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 18 13:49:16 UTC 2017 - opensuse-packaging@opensuse.org
|
||||
|
||||
- Update to version 84.87+git20170418.092177d:
|
||||
* Remove initscript related tests, systemd FTW!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 20 14:20:12 UTC 2017 - lnussel@suse.de
|
||||
|
||||
- Update to version 84.87+git20170320.f92cea5:
|
||||
* Adjust for new init script check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 09 15:16:52 UTC 2017 - lnussel@suse.de
|
||||
|
||||
- Update to version 84.87+git20161214.5500838
|
||||
* add checks for shlib-policy-name-error and "no dependency on *lib*"
|
||||
- remove
|
||||
0002-Update-license1-test-for-Leap-42.2-severity-reductio.patch as
|
||||
rpmlint-Factory-strict is pulled in always.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 25 18:32:52 UTC 2016 - jberry@suse.com
|
||||
|
||||
- Patch lint severity reductions for >= Leap 42.2:
|
||||
0001-Update-varrun-test-for-Leap-42.2-severity-reduction.patch
|
||||
0002-Update-license1-test-for-Leap-42.2-severity-reductio.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 25 14:27:40 UTC 2016 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20160725.8d99488:
|
||||
* add check for calls to gethostbyname and similar
|
||||
* add check for correct invocation of chroot
|
||||
- remove rpmlint-check-gethostbyname.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 8 10:54:14 UTC 2016 - stefan.bruens@rwth-aachen.de
|
||||
|
||||
- BuildRequire rpmlint-Factory-strict to have same config on all
|
||||
releases, fixes failed tests on Tumbleweed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 8 22:57:31 UTC 2016 - stefan.bruens@rwth-aachen.de
|
||||
|
||||
- add regression test for boo#970170
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 30 14:58:36 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20151130.b31588d:
|
||||
+ add shared library tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 12:27:11 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20151113.ff9879a:
|
||||
+ adjust for tmpfiles fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 10 12:39:01 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20151110.e8d6260:
|
||||
+ fixed two new warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 20 08:02:15 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20150520.a374c88:
|
||||
+ add tmpfiles.d checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 19 12:21:46 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20150519.278efdf:
|
||||
+ add ghost file checks
|
||||
+ print names of failed tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 21 08:59:43 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20150410.6161e60:
|
||||
+ build our own non-PIE binaries, as the distribution slowly gets converted to all PIE binaries
|
||||
(removed rpmlint-pie-fixes.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 9 14:00:19 UTC 2015 - meissner@suse.com
|
||||
|
||||
- rpmlint-pie-fixes.patch: build own non-pie binaries to avoid
|
||||
relying on random system binaries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 10 12:55:04 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- Update to version 13.2+git20150310.00c9b55:
|
||||
+ fix reference output when new bash is used
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 21 15:09:10 UTC 2014 - lnussel@suse.de
|
||||
|
||||
- fix rclink* tests by adding expected systemd macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 21 13:12:44 UTC 2014 - lnussel@suse.de
|
||||
|
||||
- add test cases for systemd macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 6 09:12:18 UTC 2014 - lnussel@suse.de
|
||||
|
||||
- adjust for new var/run check
|
||||
- use service file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 7 09:44:20 UTC 2014 - lnussel@suse.de
|
||||
|
||||
- add appdata check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 5 12:25:52 UTC 2014 - lnussel@suse.de
|
||||
|
||||
- fix reference output for non-ghost* tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 30 09:25:40 UTC 2014 - lnussel@suse.de
|
||||
|
||||
- add tests for rc links (bnc#860340)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 25 12:08:03 UTC 2013 - lnussel@suse.de
|
||||
|
||||
- update reference data to match Factory
|
||||
- generate tarball via service file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 10 11:07:10 UTC 2012 - dmueller@suse.com
|
||||
|
||||
- update reference data to make checks pass again (bnc#793546))
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 18 14:04:28 UTC 2012 - lnussel@suse.de
|
||||
|
||||
- omit debug packages from checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 23 13:33:21 UTC 2012 - lnussel@suse.de
|
||||
|
||||
- add pam test case
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 8 09:23:23 UTC 2012 - lnussel@suse.de
|
||||
|
||||
- adjust to new badness score for non-position-independent-executable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 20 16:04:11 UTC 2012 - lnussel@suse.de
|
||||
|
||||
- add logrotate test
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 31 11:03:20 UTC 2012 - lnussel@suse.de
|
||||
|
||||
- add test for buildroot check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 20 11:07:53 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- suse-filelist-empty is not fatal anymore
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 29 12:39:30 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- add -devel group check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 29 12:07:54 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- adjust to new license check and add test case
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 4 15:06:03 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- non-ghost-in-var-run is fatal now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 29 11:49:32 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- fix testsuite
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 11 11:56:38 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- check for false positives in pie test
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 7 15:26:29 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- add polkit test
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 6 12:38:59 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- add an actually readable package description
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 31 15:01:12 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- add check for /var/log/subsys
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 17 10:43:17 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- update ref files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 11:57:12 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- another init script test case
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 21 13:11:44 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- add new initscript warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 19 12:03:51 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- initial package
|
||||
|
@ -1,54 +0,0 @@
|
||||
#
|
||||
# spec file for package rpmlint-tests
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
# icecream 0
|
||||
|
||||
|
||||
#!BuildIgnore: post-build-checks brp-check-suse
|
||||
|
||||
BuildRequires: erlang
|
||||
BuildRequires: rpmlint-Factory-strict
|
||||
BuildRequires: rpmlint-mini
|
||||
|
||||
Name: rpmlint-tests
|
||||
Version: 84.87+git20210226.d6b66e2
|
||||
Release: 0
|
||||
Summary: rpmlint regression tests
|
||||
License: SUSE-Public-Domain
|
||||
Group: Development/Tools/Building
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
URL: http://www.opensuse.org/
|
||||
Source: rpmlint-tests-%version.tar.xz
|
||||
Patch0: rpmlint-tests-sle15.patch
|
||||
|
||||
%description
|
||||
This package doesn't actually contain any files and is not meant to
|
||||
be installed. It's only useful in the opensuse build service to run
|
||||
regression tests against rpmlint(-mini).
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%if 0%{?sle_version} >= 1500
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
mkdir rpms
|
||||
make test
|
||||
|
||||
%install
|
||||
|
||||
%changelog
|
@ -1,3 +1,67 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 17 08:26:05 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Install configs with 644.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 27 10:52:32 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Update to Rpmlint 2.0:
|
||||
* RPMLint now is a "normal" Python application and now supports being imported
|
||||
like a standard Python module! This means that all the normal use-cases for
|
||||
RPMLint are still supported, but now you can make it a part of larger Python-based
|
||||
applications or services.
|
||||
* RPMLint uses a declarative TOML-based syntax for configuring RPMLint policy
|
||||
instead of Python code.
|
||||
* RPMLint now has an override system for the descriptions shown for various checks,
|
||||
so that distributions who want to give specific policy information can
|
||||
do so without patching the code.
|
||||
* RPMLint includes many more checks! Nearly all of the generally useful checks created
|
||||
by the openSUSE community have been merged into the tree, so distributions can now
|
||||
benefit from a wider offering of checks to implement policy enforcement.
|
||||
* RPMLint is Python 3 only and now supports Python 3.6 and newer.
|
||||
* RPMLint is now built and installed like a standard Python application using setuptools.
|
||||
|
||||
- Removed legacy patches:
|
||||
* invalid-filerequires.diff
|
||||
* no-badness-return.diff
|
||||
* no-doc-for-lib.diff
|
||||
* only-reg-files-are-scripts.diff
|
||||
* remove-ghostfile-checks.diff
|
||||
* rpm415-workaround.diff
|
||||
* rpmgroup-checks.diff
|
||||
* rpmlint-suse.diff
|
||||
* suse-binarieschecks.diff
|
||||
* suse-checks.diff
|
||||
* suse-filter-exception.diff
|
||||
* suse-filter-more-verbose.diff
|
||||
* suse-ignore-specfile-errors.diff
|
||||
* suse-pkg-config-check.diff
|
||||
* suse-python3-naming-policy.diff
|
||||
* suse-shlib-devel-dependency.diff
|
||||
* suse-skip-macro-expansion.diff
|
||||
* suse-speccheck-utf8.diff
|
||||
* suse-url-check.diff
|
||||
* suse-version.diff
|
||||
* yast-provides.diff
|
||||
* 0001-ZipCheck-Also-ignore-RuntimeError.patch
|
||||
* accept-licenses-with-plus.patch
|
||||
* add-check-for-a-non-zero-.text-segment-in-.a-archive.patch
|
||||
* rpmlint-slpp-NUM-NUM.patch
|
||||
* rpmlint-tests-sle15.patch
|
||||
* suse-rpmlint-all-pie.patch
|
||||
* suse-spdx-license-exceptions.patch
|
||||
* suse-tests-without-badness.patch
|
||||
|
||||
- Removed config fileS:
|
||||
* config
|
||||
* licenses.config
|
||||
* pie.config
|
||||
|
||||
- Removed misc files: syntax-validator.py, README.packaging.txt,
|
||||
rpmlint-1.11.tar.gz, rpmlint-checks-master.tar.xz and
|
||||
rpmlint-tests-84.87+git20210226.d6b66e2.tar.xz.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 21 14:08:38 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
||||
|
||||
|
125
rpmlint.spec
125
rpmlint.spec
@ -17,129 +17,86 @@
|
||||
|
||||
|
||||
Name: rpmlint
|
||||
Version: 1.11
|
||||
Version: 2.0+git20210622.7834254
|
||||
Release: 0
|
||||
Summary: RPM file correctness checker
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/Packages
|
||||
URL: https://github.com/rpm-software-management/rpmlint
|
||||
Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz
|
||||
Source1: rpmlint-checks-master.tar.xz
|
||||
Source2: config
|
||||
Source11: pie.config
|
||||
Source12: licenses.config
|
||||
Source99: README.packaging.txt
|
||||
Source100: syntax-validator.py
|
||||
Patch00: rpmlint-suse.diff
|
||||
Patch01: suse-checks.diff
|
||||
Patch02: suse-version.diff
|
||||
Patch03: suse-url-check.diff
|
||||
Patch04: suse-python3-naming-policy.diff
|
||||
Patch05: suse-tests-without-badness.patch
|
||||
Patch06: suse-pkg-config-check.diff
|
||||
Patch07: suse-binarieschecks.diff
|
||||
Patch08: no-doc-for-lib.diff
|
||||
Patch09: suse-filter-exception.diff
|
||||
Patch10: suse-spdx-license-exceptions.patch
|
||||
Patch11: suse-skip-macro-expansion.diff
|
||||
Patch23: suse-filter-more-verbose.diff
|
||||
Patch24: docdata-examples.diff
|
||||
Patch25: yast-provides.diff
|
||||
Patch29: rpmgroup-checks.diff
|
||||
Patch30: devel-provide-is-devel-package.diff
|
||||
Patch31: only-reg-files-are-scripts.diff
|
||||
Patch32: 0001-ZipCheck-Also-ignore-RuntimeError.patch
|
||||
Patch40: no-badness-return.diff
|
||||
Patch41: suse-shlib-devel-dependency.diff
|
||||
Patch49: extend-suse-conffiles-check.diff
|
||||
Patch51: suse-speccheck-utf8.diff
|
||||
Patch54: suse-ignore-specfile-errors.diff
|
||||
Patch55: invalid-filerequires.diff
|
||||
Patch57: check-for-self-provides.diff
|
||||
Patch58: remove-ghostfile-checks.diff
|
||||
Patch63: fix-diag-sortorder.diff
|
||||
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
|
||||
Source0: rpmlint-%{version}.tar.xz
|
||||
Patch0: disable-flake.patch
|
||||
BuildRequires: appstream-glib
|
||||
BuildRequires: binutils
|
||||
BuildRequires: checkbashisms
|
||||
BuildRequires: dash
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: obs-service-format_spec_file
|
||||
BuildRequires: python3-flake8
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: myspell-cs_CZ
|
||||
BuildRequires: myspell-en_US
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-magic
|
||||
BuildRequires: python3-pybeam
|
||||
BuildRequires: python3-pyenchant
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-pytest-cov
|
||||
BuildRequires: python3-pytest-runner
|
||||
BuildRequires: python3-pytest-xdist
|
||||
BuildRequires: python3-pyxdg
|
||||
BuildRequires: python3-rpm
|
||||
BuildRequires: python3-toml
|
||||
BuildRequires: python3-zstd
|
||||
BuildRequires: xz
|
||||
#!BuildIgnore: rpmlint-mini
|
||||
Requires: %{_bindir}/readelf
|
||||
Requires: appstream-glib
|
||||
Requires: bash
|
||||
Requires: binutils
|
||||
Requires: checkbashisms
|
||||
Requires: cpio
|
||||
Requires: dash
|
||||
Requires: desktop-file-utils
|
||||
Requires: file
|
||||
Requires: findutils
|
||||
Requires: myspell-en_US
|
||||
Requires: python3-magic
|
||||
Requires: python3-pybeam
|
||||
Requires: python3-pyenchant
|
||||
Requires: python3-pyxdg
|
||||
Requires: python3-rpm
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-toml
|
||||
Requires: python3-xml
|
||||
Requires: python3-zstd
|
||||
Requires: rpm-build
|
||||
BuildArch: noarch
|
||||
%ifarch x86_64
|
||||
BuildRequires: glibc-32bit
|
||||
%endif
|
||||
|
||||
%description
|
||||
rpmlint is a tool to check common errors on RPM packages. Binary and
|
||||
source packages can be checked.
|
||||
|
||||
%prep
|
||||
%autosetup -n rpmlint-rpmlint-%{version} -a1 -p1
|
||||
|
||||
cp -p %{SOURCE2} .
|
||||
chmod a-x rpmlint-checks-master/*.py
|
||||
# Only move top-level python files
|
||||
mv rpmlint-checks-master/*.py .
|
||||
%autosetup -p1 -n rpmlint-%{version}
|
||||
|
||||
%build
|
||||
%make_build PYTHON=%{_bindir}/python3
|
||||
%python3_build
|
||||
|
||||
%install
|
||||
%make_install PYTHON=%{_bindir}/python3
|
||||
# the provided bash-completion does not work and only prints bash errors
|
||||
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||
mv %{buildroot}%{_sysconfdir}/rpmlint/config %{buildroot}%{_datadir}/rpmlint/config
|
||||
head -n 8 %{buildroot}%{_datadir}/rpmlint/config > %{buildroot}%{_sysconfdir}/rpmlint/config
|
||||
# make sure that the package is sane
|
||||
for f in %{buildroot}%{_datadir}/rpmlint/*.py %{buildroot}%{_datadir}/rpmlint/config; do
|
||||
echo $f
|
||||
env LC_ALL=C.utf8 python3 -tt %{SOURCE100} $f
|
||||
done
|
||||
install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/
|
||||
|
||||
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
|
||||
done
|
||||
# add some deprecated licenses we allow for now
|
||||
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-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/
|
||||
%python3_install
|
||||
fdupes %{buildroot}%{python3_sitelib}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/xdg/rpmlint
|
||||
install -m644 configs/openSUSE/* %{buildroot}%{_sysconfdir}/xdg/rpmlint
|
||||
|
||||
%check
|
||||
env PYTHON=%{_bindir}/python3 ./test.sh
|
||||
python3 -m pytest
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc README*
|
||||
%{_bindir}/rpmlint
|
||||
%{_bindir}/rpmdiff
|
||||
%{_datadir}/rpmlint
|
||||
%config(noreplace) %{_sysconfdir}/rpmlint/config
|
||||
%config %{_sysconfdir}/rpmlint/pie.config
|
||||
%config %{_sysconfdir}/rpmlint/licenses.config
|
||||
%dir %{_sysconfdir}/rpmlint
|
||||
%{_mandir}/man1/rpmlint.1%{?ext_man}
|
||||
%{_mandir}/man1/rpmdiff.1%{?ext_man}
|
||||
%{python3_sitelib}/rpmlint*
|
||||
%dir %{_sysconfdir}/xdg/rpmlint
|
||||
%config %{_sysconfdir}/xdg/rpmlint/*
|
||||
|
||||
%changelog
|
||||
|
@ -1,146 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
||||
Subject: [PATCH] suse-binarieschecks.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
BinariesCheck.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 56 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/BinariesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/BinariesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/BinariesCheck.py
|
||||
@@ -16,7 +16,7 @@ import rpm
|
||||
|
||||
import AbstractCheck
|
||||
import Config
|
||||
-from Filter import addDetails, printError, printWarning
|
||||
+from Filter import addDetails, printError, printWarning, printInfo
|
||||
import Pkg
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ class BinaryInfo(object):
|
||||
setuid_call_regex = create_regexp_call(r'set(?:res|e)?uid')
|
||||
setgroups_call_regex = create_regexp_call(r'(?:ini|se)tgroups')
|
||||
chroot_call_regex = create_regexp_call('chroot')
|
||||
+ debuginfo_regex = re.compile(r'^\s+\[\s*\d+\]\s+\.debug_.*\s+')
|
||||
+ symtab_regex = re.compile(r'^\s+\[\s*\d+\]\s+\.symtab\s+')
|
||||
+ gethostbyname_call_regex = create_regexp_call(r'(gethostbyname|gethostbyname2|gethostbyaddr|gethostbyname_r|gethostbyname2_r|gethostbyaddr_r)')
|
||||
|
||||
forbidden_functions = Config.getOption("WarnOnFunction")
|
||||
if forbidden_functions:
|
||||
@@ -83,7 +86,10 @@ class BinaryInfo(object):
|
||||
self.exec_stack = False
|
||||
self.exit_calls = []
|
||||
self.forbidden_calls = []
|
||||
+ self.calls_gethostbyname = False
|
||||
fork_called = False
|
||||
+ self.debuginfo = False
|
||||
+ self.symtab = False
|
||||
self.tail = ''
|
||||
self.lto_sections = False
|
||||
|
||||
@@ -134,6 +140,14 @@ class BinaryInfo(object):
|
||||
self.non_pic = False
|
||||
continue
|
||||
|
||||
+ if BinaryInfo.debuginfo_regex.search(line):
|
||||
+ self.debuginfo = True
|
||||
+ continue
|
||||
+
|
||||
+ if BinaryInfo.symtab_regex.search(line):
|
||||
+ self.symtab = True
|
||||
+ continue
|
||||
+
|
||||
r = BinaryInfo.soname_regex.search(line)
|
||||
if r:
|
||||
self.soname = r.group(1)
|
||||
@@ -174,6 +188,9 @@ class BinaryInfo(object):
|
||||
if BinaryInfo.chroot_call_regex.search(line):
|
||||
self.chroot = True
|
||||
|
||||
+ if BinaryInfo.gethostbyname_call_regex.search(line):
|
||||
+ self.calls_gethostbyname = True
|
||||
+
|
||||
if BinaryInfo.forbidden_functions:
|
||||
for r_name, func in BinaryInfo.forbidden_functions.items():
|
||||
ret = func['f_regex'].search(line)
|
||||
@@ -432,13 +449,26 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
continue
|
||||
|
||||
# stripped ?
|
||||
- if 'not stripped' in pkgfile.magic:
|
||||
+ if ('not stripped' in pkgfile.magic and
|
||||
+ (os.environ.get('BUILD_DIR', '') == '' or
|
||||
+ os.environ.get('BUILD_DEBUG', '') != '')):
|
||||
printWarning(pkg, 'unstripped-binary-or-object', fname)
|
||||
|
||||
# inspect binary file
|
||||
is_shlib = so_regex.search(fname)
|
||||
bin_info = BinaryInfo(pkg, pkgfile.path, fname, is_ar, is_shlib)
|
||||
|
||||
+ # stripped static library
|
||||
+ if is_ar:
|
||||
+ if bin_info.readelf_error:
|
||||
+ pass
|
||||
+ elif not bin_info.symtab:
|
||||
+ printError(pkg, 'static-library-without-symtab', fname)
|
||||
+ elif (not bin_info.debuginfo and
|
||||
+ (os.environ.get('BUILD_DIR', '') == '' or
|
||||
+ os.environ.get('BUILD_DEBUG', '') != '')):
|
||||
+ printWarning(pkg, 'static-library-without-debuginfo', fname)
|
||||
+
|
||||
if is_shlib:
|
||||
has_lib = True
|
||||
|
||||
@@ -496,6 +526,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
printWarning(pkg, ec, fname,
|
||||
BinaryInfo.forbidden_functions[ec]['f_name'])
|
||||
|
||||
+ # gethostbyname ?
|
||||
+ if bin_info.calls_gethostbyname:
|
||||
+ printInfo(pkg, 'binary-or-shlib-calls-gethostbyname', fname)
|
||||
+
|
||||
# rpath ?
|
||||
if bin_info.rpath:
|
||||
for p in bin_info.rpath:
|
||||
@@ -724,6 +758,14 @@ with the intended shared libraries only.
|
||||
'ldd-failed',
|
||||
'''Executing ldd on this file failed, all checks could not be run.''',
|
||||
|
||||
+'static-library-without-symtab',
|
||||
+'''The static library doesn't contain any symbols and therefore can't be linked
|
||||
+against. This may indicated that it was strip.''',
|
||||
+
|
||||
+'static-library-without-debuginfo',
|
||||
+'''The static library doesn't contain any debuginfo. Binaries linking against
|
||||
+this static library can't be properly debugged.''',
|
||||
+
|
||||
'executable-stack',
|
||||
'''The binary declares the stack as executable. Executable stack is usually an
|
||||
error as it is only needed if the code contains GCC trampolines or similar
|
||||
@@ -736,6 +778,10 @@ don\'t define a proper .note.GNU-stack s
|
||||
make the stack executable. Usual suspects include use of a non-GNU linker or
|
||||
an old GNU linker version.''',
|
||||
|
||||
+'binary-or-shlib-calls-gethostbyname',
|
||||
+'''The binary calls gethostbyname(). Please port the code to use
|
||||
+getaddrinfo().''',
|
||||
+
|
||||
'shared-lib-calls-exit',
|
||||
'''This library package calls exit() or _exit(), probably in a non-fork()
|
||||
context. Doing so from a library is strongly discouraged - when a library
|
||||
@@ -754,6 +800,12 @@ that use prelink, make sure that prelink
|
||||
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
||||
|
||||
+'unstripped-binary-or-object',
|
||||
+'''stripping debug info from binaries happens automatically according to global
|
||||
+project settings. So there's normally no need to manually strip binaries.
|
||||
+Left over unstripped binaries could therefore indicate a bug in the automatic
|
||||
+stripping process.''',
|
||||
+
|
||||
'non-position-independent-executable',
|
||||
'''This executable must be position independent. Check that it is built with
|
||||
-fPIE/-fpie in compiler flags and -pie in linker flags.''',
|
@ -1,29 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:37 +0200
|
||||
Subject: [PATCH] suse-checks.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
Config.py | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Config.py b/Config.py
|
||||
index ac3c5ea..f27607c 100644
|
||||
--- a/Config.py
|
||||
+++ b/Config.py
|
||||
@@ -16,14 +16,13 @@ try:
|
||||
except ImportError:
|
||||
__version__ = 'devel'
|
||||
|
||||
-DEFAULT_CHECKS = ("DistributionCheck",
|
||||
+DEFAULT_CHECKS = (
|
||||
"TagsCheck",
|
||||
"BinariesCheck",
|
||||
"ConfigCheck",
|
||||
"FilesCheck",
|
||||
"DocFilesCheck",
|
||||
"FHSCheck",
|
||||
- "SignatureCheck",
|
||||
"I18NCheck",
|
||||
"MenuCheck",
|
||||
"PostCheck",
|
@ -1,111 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
||||
Subject: [PATCH] suse-filter-exception.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
Config.py | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 54 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/Config.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/Config.py
|
||||
+++ rpmlint-rpmlint-1.11/Config.py
|
||||
@@ -111,12 +111,23 @@ def getOption(name, default=""):
|
||||
_filters = []
|
||||
_filters_re = None
|
||||
|
||||
+_filters_non_except = []
|
||||
+_filters_non_except_re = None
|
||||
+
|
||||
+_filters_except = []
|
||||
+_filters_except_re = None
|
||||
|
||||
def addFilter(s):
|
||||
global _filters_re
|
||||
+ global _filters_except
|
||||
+
|
||||
+ if len(_filters_except):
|
||||
+ _filters.append(s)
|
||||
+ _filters_re = None
|
||||
+ else:
|
||||
+ _filters_non_except.append(s)
|
||||
+ _filters_non_except_re = None
|
||||
|
||||
- _filters.append(s)
|
||||
- _filters_re = None
|
||||
|
||||
|
||||
def removeFilter(s):
|
||||
@@ -134,8 +145,13 @@ _scoring = {}
|
||||
|
||||
|
||||
def setBadness(s, score):
|
||||
+ global _scoring
|
||||
_scoring[s] = score
|
||||
|
||||
+def setFilterException(s):
|
||||
+ global _filters_except
|
||||
+
|
||||
+ _filters_except.append(s)
|
||||
|
||||
def badness(s):
|
||||
return _scoring.get(s, 0)
|
||||
@@ -146,11 +162,24 @@ _non_named_group_re = re.compile(r'[^\\]
|
||||
|
||||
def isFiltered(s):
|
||||
global _filters_re
|
||||
+ global _filters_except
|
||||
+ global _filters_except_re
|
||||
+ global _filters_non_except
|
||||
+ global _filters_non_except_re
|
||||
|
||||
- if _filters_re is None:
|
||||
- # no filter
|
||||
- if len(_filters) == 0:
|
||||
- return False
|
||||
+ if _filters_non_except_re == None and len(_filters_non_except):
|
||||
+ _filters_non_except_re = '(?:' + _filters_non_except[0] + ')'
|
||||
+
|
||||
+ for idx in range(1, len(_filters_non_except)):
|
||||
+ # to prevent named group overflow that happen when there is too
|
||||
+ # many () in a single regexp: AssertionError: sorry, but this
|
||||
+ # version only supports 100 named groups
|
||||
+ if '(' in _filters_non_except[idx]:
|
||||
+ _non_named_group_re.subn('(:?', _filters_non_except[idx])
|
||||
+ _filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
|
||||
+ _filters_non_except_re = re.compile(_filters_non_except_re)
|
||||
+
|
||||
+ if _filters_re == None and len(_filters):
|
||||
_filters_re = '(?:' + _filters[0] + ')'
|
||||
|
||||
for idx in range(1, len(_filters)):
|
||||
@@ -162,9 +191,27 @@ def isFiltered(s):
|
||||
_filters_re = _filters_re + '|(?:' + _filters[idx] + ')'
|
||||
_filters_re = re.compile(_filters_re)
|
||||
|
||||
+ if _filters_except_re == None and len(_filters_except):
|
||||
+ _filters_except_re = '(?:' + _filters_except[0] + ')'
|
||||
+
|
||||
+ for idx in range(1, len(_filters_except)):
|
||||
+ # to prevent named group overflow that happen when there is too
|
||||
+ # many () in a single regexp: AssertionError: sorry, but this
|
||||
+ # version only supports 100 named groups
|
||||
+ if '(' in _filters_except[idx]:
|
||||
+ _non_named_group_re.subn('(:?', _filters_except[idx])
|
||||
+ _filters_except_re = _filters_except_re + '|(?:' + _filters_except[idx] +')'
|
||||
+ _filters_except_re = re.compile(_filters_except_re)
|
||||
+
|
||||
if not no_exception:
|
||||
- if _filters_re.search(s):
|
||||
+
|
||||
+ if _filters_non_except_re and _filters_non_except_re.search(s):
|
||||
return True
|
||||
+ if _filters_except_re and _filters_except_re.search(s):
|
||||
+ return False
|
||||
+ if _filters_re and _filters_re.search(s):
|
||||
+ return True
|
||||
+
|
||||
return False
|
||||
|
||||
# Config.py ends here
|
@ -1,59 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
||||
Subject: [PATCH] suse-filter-more-verbose.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
Config.py | 25 +++++++++++++++++++++++--
|
||||
1 file changed, 23 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/Config.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/Config.py
|
||||
+++ rpmlint-rpmlint-1.11/Config.py
|
||||
@@ -10,6 +10,7 @@
|
||||
import locale
|
||||
import os.path
|
||||
import re
|
||||
+import sys
|
||||
|
||||
try:
|
||||
from __version__ import __version__
|
||||
@@ -177,7 +178,17 @@ def isFiltered(s):
|
||||
if '(' in _filters_non_except[idx]:
|
||||
_non_named_group_re.subn('(:?', _filters_non_except[idx])
|
||||
_filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
|
||||
- _filters_non_except_re = re.compile(_filters_non_except_re)
|
||||
+ try:
|
||||
+ _filters_non_except_re = re.compile(_filters_non_except_re)
|
||||
+ except Exception:
|
||||
+ # Try to figure out which filter caused the error
|
||||
+ for f in _filters_non_except[1:]:
|
||||
+ try:
|
||||
+ re.compile(f)
|
||||
+ except Exception as e:
|
||||
+ # can't use Pkg.error/warn here, as that would recurse
|
||||
+ print >> sys.stderr, "(none): E: %s in filter '%s'" % (e.message, f)
|
||||
+ sys.exit(2)
|
||||
|
||||
if _filters_re == None and len(_filters):
|
||||
_filters_re = '(?:' + _filters[0] + ')'
|
||||
@@ -189,7 +200,17 @@ def isFiltered(s):
|
||||
if '(' in _filters[idx]:
|
||||
_non_named_group_re.subn('(:?', _filters[idx])
|
||||
_filters_re = _filters_re + '|(?:' + _filters[idx] + ')'
|
||||
- _filters_re = re.compile(_filters_re)
|
||||
+ try:
|
||||
+ _filters_re = re.compile(_filters_re)
|
||||
+ except Exception:
|
||||
+ # Try to figure out which filter caused the error
|
||||
+ for f in _filters[1:]:
|
||||
+ try:
|
||||
+ re.compile(f)
|
||||
+ except Exception as e:
|
||||
+ # can't use Pkg.error/warn here, as that would recurse
|
||||
+ print >> sys.stderr, "(none): E: %s in filter '%s'" % (e.message, f)
|
||||
+ sys.exit(2)
|
||||
|
||||
if _filters_except_re == None and len(_filters_except):
|
||||
_filters_except_re = '(?:' + _filters_except[0] + ')'
|
@ -1,25 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
||||
Subject: [PATCH] suse-ignore-specfile-errors.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
SpecCheck.py | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/SpecCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/SpecCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/SpecCheck.py
|
||||
@@ -551,9 +551,8 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||
printWarning(pkg, "patch-not-applied",
|
||||
"Patch%d:" % pnum, pfile)
|
||||
|
||||
- # Rest of the checks require a real spec file
|
||||
- if not self._spec_file:
|
||||
- return
|
||||
+ # Skip rest of the checks
|
||||
+ return
|
||||
|
||||
# We'd like to parse the specfile only once using python bindings,
|
||||
# but it seems errors from rpmlib get logged to stderr and we can't
|
@ -1,54 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -420,6 +420,7 @@ lib_devel_number_regex = re.compile(r'^l
|
||||
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
||||
lib_package_regex = re.compile(r'(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
||||
leading_space_regex = re.compile(r'^\s+')
|
||||
+pkg_config_regex = re.compile(r'^/usr/(?:lib\d*|share)/pkgconfig/')
|
||||
license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
|
||||
invalid_version_regex = re.compile(r'([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
||||
# () are here for grouping purpose in the regexp
|
||||
@@ -639,10 +640,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
base = is_devel.group(1)
|
||||
dep = None
|
||||
has_so = False
|
||||
+ has_pc = False
|
||||
for fname in pkg.files():
|
||||
if fname.endswith('.so'):
|
||||
has_so = True
|
||||
- break
|
||||
+ if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
||||
+ has_pc = True
|
||||
if has_so:
|
||||
base_or_libs = base + '/' + base + '-libs/lib' + base
|
||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||||
@@ -679,6 +682,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if prov not in (x[0] for x in pkg.provides()):
|
||||
printWarning(pkg, 'no-provides', prov)
|
||||
|
||||
+ if has_pc:
|
||||
+ found_pkg_config_dep = False
|
||||
+ for p in (x[0] for x in pkg.provides()):
|
||||
+ if (p.startswith("pkgconfig(")):
|
||||
+ found_pkg_config_dep = True
|
||||
+ break
|
||||
+ if not found_pkg_config_dep:
|
||||
+ printWarning(pkg, 'no-pkg-config-provides')
|
||||
+
|
||||
# List of words to ignore in spell check
|
||||
ignored_words = set()
|
||||
for pf in pkg.files():
|
||||
@@ -1126,6 +1138,11 @@ once.''',
|
||||
'no-url-tag',
|
||||
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
||||
|
||||
+'no-pkg-config-provides',
|
||||
+'''The package installs a .pc file but does not provide pkgconfig(..) provides.
|
||||
+The most likely reason for that is that it was built without BuildRequires: pkg-config.
|
||||
+Please double check your build dependencies.''',
|
||||
+
|
||||
'name-repeated-in-summary',
|
||||
'''The name of the package is repeated in its summary. This is often redundant
|
||||
information and looks silly in various programs' output. Make the summary
|
@ -1,22 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:37 +0200
|
||||
Subject: [PATCH] suse-python3-naming-policy.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
NamingPolicyCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.10/NamingPolicyCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.10.orig/NamingPolicyCheck.py
|
||||
+++ rpmlint-rpmlint-1.10/NamingPolicyCheck.py
|
||||
@@ -89,7 +89,7 @@ check = NamingPolicyCheck()
|
||||
# if somone as a elegant solution, I will be happy to implement and test it.
|
||||
|
||||
check.add_check('xmms', '^xmms(-|$)', '^/usr/lib(64)?/xmms/')
|
||||
-check.add_check('python', '^python(-|$)', '^/usr/lib(64)?/python[1-9](-[1-9])?')
|
||||
+#check.add_check('python', '^python(2|3)?(-|$)', '^/usr/lib(64)?/python[1-9](-[1-9])?')
|
||||
check.add_check('perl5', '^perl(-|$)', '^/usr/lib(64)?/perl5/vendor_perl')
|
||||
check.add_check('apache2', '^apache2-mod_', '^/usr/lib(64)?/apache2-')
|
||||
check.add_check('fortune', '^fortune(-|$)', '^/usr/share/games/fortunes/')
|
@ -1,34 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/BinariesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/BinariesCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/BinariesCheck.py
|
||||
@@ -558,10 +558,14 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
if ocaml_mixed_regex.search(bin_info.tail):
|
||||
printWarning(pkg, 'ocaml-mixed-executable', fname)
|
||||
|
||||
- if ((not is_shobj and not is_pie_exec) and
|
||||
- pie_exec_re and pie_exec_re.search(fname)):
|
||||
- printError(pkg, 'non-position-independent-executable',
|
||||
- fname)
|
||||
+ if (not is_shobj and not is_pie_exec):
|
||||
+ if pie_exec_re and pie_exec_re.search(fname):
|
||||
+ printError(
|
||||
+ pkg, 'non-position-independent-executable', fname)
|
||||
+ else:
|
||||
+ printWarning(
|
||||
+ pkg, 'position-independent-executable-suggested',
|
||||
+ fname)
|
||||
|
||||
if bin_info.readelf_error:
|
||||
continue
|
||||
@@ -810,6 +814,10 @@ stripping process.''',
|
||||
'''This executable must be position independent. Check that it is built with
|
||||
-fPIE/-fpie in compiler flags and -pie in linker flags.''',
|
||||
|
||||
+'position-independent-executable-suggested',
|
||||
+'''This executable should be position independent (all binaries should). Check
|
||||
+that it is built with -fPIE/-fpie in compiler flags and -pie in linker flags.''',
|
||||
+
|
||||
'missing-call-to-setgroups-before-setuid',
|
||||
'''This executable is calling setuid and setgid without setgroups or
|
||||
initgroups. There is a high probability this means it didn't relinquish all
|
@ -1,26 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] suse-shlib-devel-dependency.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
TagsCheck.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -667,10 +667,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
||||
has_pc = True
|
||||
if has_so:
|
||||
- base_or_libs = base + '/' + base + '-libs/lib' + base
|
||||
+ base_or_libs = base + '*' + '/' + base + '-libs/lib' + base + '*'
|
||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||||
base_or_libs_re = re.compile(
|
||||
- r'^(lib)?%s(-libs)?(\(\w+-\d+\))?$' % re.escape(base))
|
||||
+ r'^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?$' % re.escape(base))
|
||||
for d in deps:
|
||||
if base_or_libs_re.match(d[0]):
|
||||
dep = d
|
@ -1,36 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -466,16 +466,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a
|
||||
# we assume that no rpm packages existed before rpm itself existed...
|
||||
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
|
||||
|
||||
-private_so_paths = set()
|
||||
-for path in ('%perl_archlib', '%perl_vendorarch', '%perl_sitearch',
|
||||
- '%python_sitearch', '%python2_sitearch', '%python3_sitearch',
|
||||
- '%ruby_sitearch', '%php_extdir'):
|
||||
- epath = rpm.expandMacro(path)
|
||||
- if epath and epath != path:
|
||||
- private_so_paths.add(epath)
|
||||
- private_so_paths.add(re.sub(r'/lib64(?=/|$)', '/lib', epath))
|
||||
- private_so_paths.add(re.sub(r'/lib(?=/|$)', '/lib64', epath))
|
||||
-
|
||||
_enchant_checkers = {}
|
||||
|
||||
|
||||
@@ -934,14 +924,6 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
res = Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())])
|
||||
self._unexpanded_macros(pkg, tag, res)
|
||||
|
||||
- for path in private_so_paths:
|
||||
- for fname, pkgfile in pkg.files().items():
|
||||
- if fname.startswith(path):
|
||||
- for prov in pkgfile.provides:
|
||||
- if so_dep_regex.search(prov[0]):
|
||||
- printWarning(pkg, "private-shared-object-provides",
|
||||
- fname, Pkg.formatRequire(*prov))
|
||||
-
|
||||
def check_description(self, pkg, lang, ignored_words):
|
||||
description = pkg.langtag(rpm.RPMTAG_DESCRIPTION, lang)
|
||||
if use_utf8:
|
@ -1,122 +0,0 @@
|
||||
From a7e8eca225a09c08742627af7b0c9bc7db9f44b3 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dirk@dmllr.de>
|
||||
Date: Wed, 6 Apr 2016 11:29:40 +0200
|
||||
Subject: [PATCH] Handle SPDX style license exceptions
|
||||
|
||||
---
|
||||
TagsCheck.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 50 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -140,6 +140,50 @@ DEFAULT_VALID_LICENSES = (
|
||||
'Shareware',
|
||||
)
|
||||
|
||||
+DEFAULT_VALID_LICENSE_EXCEPTIONS = (
|
||||
+ '389-exception',
|
||||
+ 'Autoconf-exception-2.0',
|
||||
+ 'Autoconf-exception-3.0',
|
||||
+ 'Bison-exception-2.2',
|
||||
+ 'Bootloader-exception',
|
||||
+ 'CLISP-exception-2.0',
|
||||
+ 'Classpath-exception-2.0',
|
||||
+ 'DigiRule-FOSS-exception',
|
||||
+ 'FLTK-exception',
|
||||
+ 'Fawkes-Runtime-exception',
|
||||
+ 'Font-exception-2.0',
|
||||
+ 'GCC-exception-2.0',
|
||||
+ 'GCC-exception-3.1',
|
||||
+ 'GPL-3.0-linking-exception',
|
||||
+ 'GPL-3.0-linking-source-exception',
|
||||
+ 'GPL-CC-1.0',
|
||||
+ 'LGPL-3.0-linking-exception',
|
||||
+ 'LLVM-exception',
|
||||
+ 'LZMA-exception',
|
||||
+ 'Libtool-exception',
|
||||
+ 'Linux-syscall-note',
|
||||
+ 'Nokia-Qt-exception-1.1',
|
||||
+ 'OCCT-exception-1.0',
|
||||
+ 'OCaml-LGPL-linking-exception',
|
||||
+ 'OpenJDK-assembly-exception-1.0',
|
||||
+ 'PS-or-PDF-font-exception-20170817',
|
||||
+ 'Qt-GPL-exception-1.0',
|
||||
+ 'Qt-LGPL-exception-1.1',
|
||||
+ 'Qwt-exception-1.0',
|
||||
+ 'SHL-2.0',
|
||||
+ 'SHL-2.1',
|
||||
+ 'Swift-exception',
|
||||
+ 'Universal-FOSS-exception-1.0',
|
||||
+ 'WxWindows-exception-3.1',
|
||||
+ 'eCos-exception-2.0',
|
||||
+ 'freertos-exception-2.0',
|
||||
+ 'gnu-javamail-exception',
|
||||
+ 'i2p-gpl-java-exception',
|
||||
+ 'mif-exception',
|
||||
+ 'openvpn-openssl-exception',
|
||||
+ 'u-boot-exception-2.0',
|
||||
+)
|
||||
+
|
||||
BAD_WORDS = {
|
||||
'alot': 'a lot',
|
||||
'accesnt': 'accent',
|
||||
@@ -408,6 +452,7 @@ VALID_GROUPS = Config.getOption('ValidGr
|
||||
if VALID_GROUPS is None: # get defaults from rpm package only if it's not set
|
||||
VALID_GROUPS = Pkg.get_default_valid_rpmgroups()
|
||||
VALID_LICENSES = Config.getOption('ValidLicenses', DEFAULT_VALID_LICENSES)
|
||||
+VALID_LICENSE_EXCEPTIONS = Config.getOption('ValidLicenseExceptions', DEFAULT_VALID_LICENSE_EXCEPTIONS)
|
||||
INVALID_REQUIRES = map(re.compile, Config.getOption('InvalidRequires', DEFAULT_INVALID_REQUIRES))
|
||||
packager_regex = re.compile(Config.getOption('Packager'))
|
||||
changelog_version_regex = re.compile(r'[^>]([^ >]+)\s*$')
|
||||
@@ -422,6 +467,7 @@ lib_package_regex = re.compile(r'(?:^(?:
|
||||
leading_space_regex = re.compile(r'^\s+')
|
||||
pkg_config_regex = re.compile(r'^/usr/(?:lib\d*|share)/pkgconfig/')
|
||||
license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
|
||||
+license_exception_regex = re.compile(r'(\S+)\sWITH\s(\S+)')
|
||||
invalid_version_regex = re.compile(r'([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
||||
# () are here for grouping purpose in the regexp
|
||||
forbidden_words_regex = re.compile(r'(%s)' % Config.getOption('ForbiddenWords'), re.IGNORECASE)
|
||||
@@ -795,6 +841,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
# printWarning(pkg, 'package-provides-itself')
|
||||
# break
|
||||
|
||||
+ def split_license_exception(license):
|
||||
+ x, y = license_exception_regex.split(license)[1:3] or (license, "")
|
||||
+ return x.strip(), y.strip()
|
||||
+
|
||||
def split_license(license):
|
||||
return (x.strip() for x in
|
||||
(l for l in license_regex.split(license) if l))
|
||||
@@ -805,7 +855,17 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
else:
|
||||
valid_license = True
|
||||
if rpm_license not in VALID_LICENSES:
|
||||
- for l1 in split_license(rpm_license):
|
||||
+ license_string = rpm_license
|
||||
+
|
||||
+ l1, lexception = split_license_exception(rpm_license)
|
||||
+ # SPDX allows "<license> WITH <license-exception>"
|
||||
+ if lexception:
|
||||
+ license_string = l1
|
||||
+ if lexception not in VALID_LICENSE_EXCEPTIONS:
|
||||
+ printWarning(pkg, 'invalid-license-exception', lexception)
|
||||
+ valid_license = False
|
||||
+
|
||||
+ for l1 in split_license(license_string):
|
||||
if l1 in VALID_LICENSES:
|
||||
continue
|
||||
for l2 in split_license(l1):
|
||||
@@ -1092,6 +1152,11 @@ your specfile.''',
|
||||
'''The value of the License tag was not recognized. Known values are:
|
||||
"%s".''' % '", "'.join(VALID_LICENSES),
|
||||
|
||||
+'invalid-license-exception',
|
||||
+'''The ' WITH <x> ' license exception of the License tag was not recognized.
|
||||
+Known values are:
|
||||
+"%s".''' % '", "'.join(VALID_LICENSE_EXCEPTIONS),
|
||||
+
|
||||
'obsolete-not-provided',
|
||||
'''If a package is obsoleted by a compatible replacement, the obsoleted package
|
||||
should also be provided in order to not cause unnecessary dependency breakage.
|
@ -1,24 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
||||
Subject: [PATCH] suse-speccheck-utf8.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
SpecCheck.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/SpecCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/SpecCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/SpecCheck.py
|
||||
@@ -642,8 +642,8 @@ SPEC file to build a valid RPM package.'
|
||||
("Name:" tag). Either rename your package or the specfile.''',
|
||||
|
||||
'non-utf8-spec-file',
|
||||
-'''The character encoding of the spec file is not UTF-8. Convert it for
|
||||
-example using iconv(1).''',
|
||||
+'''The character encoding of the spec file (or the merged bits from the .changes file)
|
||||
+is not UTF-8. Convert it for example using iconv(1).''',
|
||||
|
||||
'use-of-RPM_SOURCE_DIR',
|
||||
'''You use $RPM_SOURCE_DIR or %{_sourcedir} in your spec file. If you have to
|
@ -1,44 +0,0 @@
|
||||
Index: rpmlint-rpmlint-1.11/test.sh
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/test.sh
|
||||
+++ rpmlint-rpmlint-1.11/test.sh
|
||||
@@ -19,7 +19,10 @@ for i in $TESTPATH/test.*.py; do
|
||||
fi
|
||||
done
|
||||
|
||||
-run_rpmlint="$PYTHON ./rpmlint -C $(pwd)"
|
||||
+export RPMLINT_SKIP_GLOBAL=1
|
||||
+
|
||||
+run_rpmlint="$PYTHON ./rpmlint -f config -C $(pwd)"
|
||||
+
|
||||
|
||||
echo "Check that rpmlint executes with no unexpected errors"
|
||||
echo "...in default locale"
|
||||
@@ -40,10 +43,6 @@ $PYTEST -v || exit $?
|
||||
|
||||
unset PYTHONWARNINGS
|
||||
|
||||
-echo "$FLAKE8 tests"
|
||||
-$FLAKE8 --version
|
||||
-$FLAKE8 . ./rpmdiff ./rpmlint || exit $?
|
||||
-
|
||||
echo "man page tests"
|
||||
if man --help 2>&1 | grep -q -- --warnings; then
|
||||
tmpfile=$(mktemp) || exit 1
|
||||
Index: rpmlint-rpmlint-1.11/rpmlint
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/rpmlint
|
||||
+++ rpmlint-rpmlint-1.11/rpmlint
|
||||
@@ -267,8 +267,10 @@ conf_file = _default_user_conf
|
||||
info_error = set()
|
||||
|
||||
# load global config files
|
||||
-configs = glob.glob('/etc/rpmlint/*config')
|
||||
-configs.sort()
|
||||
+configs = []
|
||||
+if 'RPMLINT_SKIP_GLOBAL' not in os.environ:
|
||||
+ configs = glob.glob('/etc/rpmlint/*config')
|
||||
+ configs.sort()
|
||||
|
||||
# Was rpmlint invoked as a prefixed variant?
|
||||
m = re.match(r"(?P<prefix>[\w-]+)-rpmlint(\.py)?", argv0)
|
@ -1,22 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:37 +0200
|
||||
Subject: [PATCH] suse-url-check.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
TagsCheck.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -803,7 +803,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if not valid_license:
|
||||
self._unexpanded_macros(pkg, 'License', rpm_license)
|
||||
|
||||
- for tag in ('URL', 'DistURL', 'BugURL'):
|
||||
+ for tag in ('URL', 'BugURL'):
|
||||
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
||||
url = Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())])
|
||||
self._unexpanded_macros(pkg, tag, url, is_url=True)
|
@ -1,50 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:37 +0200
|
||||
Subject: [PATCH] suse-version.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
SpecCheck.py | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/SpecCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/SpecCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/SpecCheck.py
|
||||
@@ -49,6 +49,7 @@ packager_regex = re_tag_compile('Package
|
||||
buildarch_regex = re_tag_compile('BuildArch(?:itectures)?')
|
||||
buildprereq_regex = re_tag_compile('BuildPreReq')
|
||||
prereq_regex = re_tag_compile(r'PreReq(\(.*\))')
|
||||
+suse_version_regex = re.compile(r'%suse_version\s*[<>=]+\s*(\d+)')
|
||||
|
||||
make_check_regex = re.compile(r'(^|\s|%{?__)make}?\s+(check|test)')
|
||||
rm_regex = re.compile(r'(^|\s)((.*/)?rm|%{?__rm}?) ')
|
||||
@@ -389,6 +390,12 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||
if not res.group(1).startswith('%'):
|
||||
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
|
||||
|
||||
+ res = suse_version_regex.search(line)
|
||||
+ if res and int(res.group(1)) > 0 and int(res.group(1)) < 1315:
|
||||
+ printWarning(pkg, "obsolete-suse-version-check", res.group(1))
|
||||
+ elif res and int(res.group(1)) > 1550:
|
||||
+ printError(pkg, "invalid-suse-version-check", res.group(1))
|
||||
+
|
||||
res = prereq_regex.search(line)
|
||||
if res:
|
||||
printError(pkg, 'prereq-use', res.group(2))
|
||||
@@ -806,6 +813,15 @@ architecture independent or if some othe
|
||||
in some editors but can lead to obscure errors. It should be replaced by a
|
||||
regular space.''',
|
||||
|
||||
+'obsolete-suse-version-check',
|
||||
+'''The specfile contains a comparison of %suse_version against a suse release
|
||||
+that is no longer in maintenance. Consider removing obsolete parts of your
|
||||
+spec file to make it more readable.''',
|
||||
+
|
||||
+'invalid-suse-version-check',
|
||||
+'''The specfile contains a comparison of %suse_version against a suse release
|
||||
+that does not exist. Please double check.''',
|
||||
+
|
||||
'non-standard-group',
|
||||
'''The value of the Group tag in the package is not valid. Valid groups are:
|
||||
"%s".''' % '", "'.join(VALID_GROUPS),
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# vim:sw=4:et
|
||||
|
||||
import sys
|
||||
|
||||
for filename in sys.argv[1:]:
|
||||
try:
|
||||
compile(open(filename).read(), filename, 'exec')
|
||||
except Exception as e:
|
||||
print(e)
|
||||
exit(1)
|
@ -1,22 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
||||
Subject: [PATCH] yast-provides.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
TagsCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
||||
@@ -866,7 +866,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
printWarning(pkg, 'no-url-tag')
|
||||
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
- prov_names = [x[0] for x in pkg.provides()]
|
||||
+ prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
||||
|
||||
for o in (x for x in obs_names if x not in prov_names):
|
||||
printWarning(pkg, 'obsolete-not-provided', o)
|
Loading…
Reference in New Issue
Block a user