SHA256
1
0
forked from pool/rpmlint

- update to 1.10:

* test: Skip fedoradev GPG checks at least for now
 * test: Refresh fedora* packages on image build
 * test: Use assertEqual where appropriate, thanks to flake8/hacking
 * test: Update fedora24 config to fedora26, run it on Travis
 * Add a new test for tmpfiles.d snippets in the /etc/ tree.
 * Add new tests for systemd units and udev rules in /etc/ tree
 * test: Disable hacking for now until it's flake8 3.4+ compatible
 * test: Set up flake8-bugbear, enable it in fedoradev container
 * rpmlint: Avoid unused loop control variable
 * ZipCheck: Add TODO
 * *: Avoid mutable argument defaults
 * Be aware of -debugsource packages
 * rpmdiff: Fix unused variable from previous commit
 * rpmdiff: Support soft dependencies
 * BinariesCheck, FilesCheck: Ignore various .build-id dirs
 * Add python3-devel and rpm-build to fedoradev container to provoke some issues
 * BinariesCheck: Popen env consistency fix
 * Pkg.getstatusoutput: Set LC_ALL for all Popens, defaulting to C
 * rpmlint: Fix checking specfile from stdin
 * test.sh: Extract rpmlint command to run_rpmlint
 * Revert "Remove unused spec_lines check_spec argument"
 * BinariesCheck: Trivial cleanups
 * travis: Run make install too
 * FilesCheck: Allow multiple bytecode magic values per Python version
 * tests: Make output test tools easier to reuse
 * FilesCheck: hg.python.org -> github.com/python
 * Pkg: Return vendor and distribution as unicode strings
 * FilesCheck: Add Python 3.7 bytecode magic value
 * Pkg.b2s: Add some more test cases

OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=482
This commit is contained in:
Dirk Mueller 2017-09-28 11:35:09 +00:00 committed by Git OBS Bridge
parent 3eec33df17
commit 1cdbc13b57
66 changed files with 536 additions and 1895 deletions

View File

@ -1,50 +0,0 @@
From 8169818dbad3f8f6fccbc7e3de99e86b37ad45f6 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk@dmllr.de>
Date: Mon, 22 Feb 2016 09:12:39 +0100
Subject: [PATCH] Solve exceptions on printing str (Fixes #61)
Handle printing of str gracefully by first encoding
it to unicode before printing it in the proper encoding.
Also fix python2 check.
---
Filter.py | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
Index: rpmlint-rpmlint-1.8/Filter.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/Filter.py
+++ rpmlint-rpmlint-1.8/Filter.py
@@ -24,20 +24,20 @@ _diagnostic = list()
_badness_score = 0
printed_messages = {"I": 0, "W": 0, "E": 0}
-if sys.stdout.isatty():
- def __print(s):
- print(s)
-else:
- __stdout = sys.stdout
- if not __stdout.encoding: # Python < 3 only?
- import codecs
- if hasattr(__stdout, "buffer"):
- __stdout = __stdout.buffer
- __stdout = codecs.getwriter(
- locale.getpreferredencoding())(__stdout, "replace")
+__stdout = sys.stdout
+__preferred_encoding = locale.getpreferredencoding()
+if hasattr(__stdout, 'xreadlines'): # Python < 3 only
+ import codecs
+ if hasattr(__stdout, "buffer"):
+ __stdout = __stdout.buffer
+ __stdout = codecs.getwriter(
+ __preferred_encoding)(sys.stdout, 'replace')
- def __print(s):
- print(s, file=__stdout)
+
+def __print(s):
+ if isinstance(s, str) and hasattr(s, 'decode'):
+ s = s.decode(__preferred_encoding, 'replace')
+ print(s, file=__stdout)
def printInfo(pkg, reason, *details):

View File

@ -1,50 +0,0 @@
From 3b0286ba7f2192807b6d1eadf1fe7c46cc364854 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Sun, 29 Nov 2015 22:13:14 +0200
Subject: [PATCH] Fix resolving Python source from 3.5 *.opt-[12].pyc
https://bugzilla.redhat.com/show_bug.cgi?id=1286382
---
FilesCheck.py | 2 +-
test/test_files.py | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 test/test_files.py
diff --git a/FilesCheck.py b/FilesCheck.py
index 977b47f..76b8f89 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -211,7 +211,7 @@
normal_zero_length_regex = re.compile('^/etc/security/console\.apps/|/\.nosearch$|/__init__\.py$')
perl_regex = re.compile('^/usr/lib/perl5/(?:vendor_perl/)?([0-9]+\.[0-9]+)\.([0-9]+)/')
python_regex = re.compile('^/usr/lib(?:64)?/python([.0-9]+)/')
-python_bytecode_regex_pep3147 = re.compile('^(.*)/__pycache__/(.*)\.(.*)(\.py[oc])$')
+python_bytecode_regex_pep3147 = re.compile('^(.*)/__pycache__/(.*?)\.([^.]+)(\.opt-[12])?\.py[oc]$')
python_bytecode_regex = re.compile('^(.*)(\.py[oc])$')
python_default_version = Config.getOption('PythonDefaultVersion', None)
perl_version_trick = Config.getOption('PerlVersionTrick', True)
diff --git a/test/test_files.py b/test/test_files.py
new file mode 100644
index 0000000..84359d2
--- /dev/null
+++ b/test/test_files.py
@@ -0,0 +1,19 @@
+from FilesCheck import python_bytecode_to_script as pbts
+
+
+class TestPythonBytecodeToScript(object):
+
+ def test_pep3147(self):
+ assert pbts("/usr/lib64/python3.4/__pycache__/__phello__.foo.cpython-34.pyc") == "/usr/lib64/python3.4/__phello__.foo.py"
+ assert pbts("/usr/lib64/python3.4/__pycache__/__phello__.foo.cpython-34.pyo") == "/usr/lib64/python3.4/__phello__.foo.py"
+
+ def test_py2(self):
+ assert pbts("/usr/lib/python2.7/site-packages/_pytest/main.pyc") == "/usr/lib/python2.7/site-packages/_pytest/main.py"
+ assert pbts("/usr/lib/python2.7/site-packages/_pytest/main.pyo") == "/usr/lib/python2.7/site-packages/_pytest/main.py"
+
+ def test_pep0488(self):
+ assert pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.opt-1.pyc") == "/usr/lib/python3.5/site-packages/pytest.py"
+ assert pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.opt-2.pyc") == "/usr/lib/python3.5/site-packages/pytest.py"
+ assert pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.pyc") == "/usr/lib/python3.5/site-packages/pytest.py"
+
+# ex: ts=4 sw=4 et

View File

@ -1,38 +0,0 @@
diff --git a/usr/share/rpmlint/BinariesCheck.py b/tmp/BinariesCheck.py
index 6e50c03..460c003 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -64,8 +64,6 @@ class BinaryInfo:
setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
setgroups_call_regex = create_regexp_call(['initgroups', 'setgroups'])
chroot_call_regex = create_regexp_call('chroot')
- # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
- objdump_call_regex = re.compile(b'callq?\s(.*)')
forbidden_functions = Config.getOption("WarnOnFunction")
if forbidden_functions:
@@ -109,6 +107,12 @@ class BinaryInfo:
self.mktemp = False
is_debug = path.endswith('.debug')
+ if pkg.arch in ['armv6hl', 'armv7hl', 'aarch64']:
+ # 10450: ebffffec bl 10408 <chroot@plt>
+ BinaryInfo.objdump_call_regex = re.compile(b'\sbl\s+(.*)')
+ else: # x86_64, ix86
+ # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
+ BinaryInfo.objdump_call_regex = re.compile(b'callq?\s(.*)')
cmd = ['env', 'LC_ALL=C', 'readelf', '-W', '-S', '-l', '-d', '-s']
cmd.append(path)
@@ -234,6 +238,11 @@ class BinaryInfo:
# check if chroot is near chdir (since otherwise, chroot is called
# without chdir)
if self.chroot and self.chdir:
+ if pkg.arch in ['ppc', 'ppc64', 'ppc64le']:
+ # On PPC, it is to difficult to find the actual invocations
+ # of chroot/chdir, if both exist assume chroot is fine
+ self.chroot_near_chdir = True
+ pass
p = subprocess.Popen(
['env', 'LC_ALL=C', 'objdump', '-d', path],
stdout=subprocess.PIPE, bufsize=-1)

View File

@ -1,8 +1,3 @@
= rpmlint =
The patches for rpmlint can be managed in git. That is especially
useful when rebasing to a new rpmlint version. Read update_git.sh
= rpmlint-checks, rpmlint-tests =
The files from rpmlint-checks and rpmlint-tests managed in git. If

View File

@ -14,11 +14,11 @@ complain about ghost files handled by the tmpfiles mechanism.
2 files changed, 111 insertions(+), 18 deletions(-)
create mode 100644 TmpFilesCheck.py
diff --git a/PostCheck.py b/PostCheck.py
index 20b515e..6836359 100644
--- a/PostCheck.py
+++ b/PostCheck.py
@@ -112,20 +112,6 @@ class PostCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/PostCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/PostCheck.py
+++ rpmlint-rpmlint-1.10/PostCheck.py
@@ -112,20 +112,6 @@ class PostCheck(AbstractCheck.AbstractCh
self.check_aux(
pkg, files, prog[idx], script[idx], tag[2], prereq)
@ -39,7 +39,7 @@ index 20b515e..6836359 100644
def check_aux(self, pkg, files, prog, script, tag, prereq):
if script:
if prog:
@@ -194,10 +180,6 @@ class PostCheck(AbstractCheck.AbstractCheck):
@@ -195,10 +181,6 @@ class PostCheck(AbstractCheck.AbstractCh
check = PostCheck()
# Add information about checks
@ -50,11 +50,10 @@ index 20b515e..6836359 100644
for scriptlet in map(lambda x: '%' + x, RPM_SCRIPTLETS):
addDetails(
'one-line-command-in-%s' % scriptlet,
diff --git a/TmpFilesCheck.py b/TmpFilesCheck.py
new file mode 100644
index 0000000..d1ef824
Index: rpmlint-rpmlint-1.10/TmpFilesCheck.py
===================================================================
--- /dev/null
+++ b/TmpFilesCheck.py
+++ rpmlint-rpmlint-1.10/TmpFilesCheck.py
@@ -0,0 +1,111 @@
+# -*- coding: utf-8 -*-
+#############################################################################

View File

@ -8,11 +8,11 @@ Subject: [PATCH] add-weak-dependencies.diff
TagsCheck.py | 19 +++++++++++++++++++
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/Pkg.py b/Pkg.py
index 8884dce..360ec39 100644
--- a/Pkg.py
+++ b/Pkg.py
@@ -475,6 +475,10 @@ class Pkg(AbstractPkg):
Index: rpmlint-rpmlint-1.10/Pkg.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/Pkg.py
+++ rpmlint-rpmlint-1.10/Pkg.py
@@ -494,6 +494,10 @@ class Pkg(AbstractPkg):
self._missingok_files = None
self._files = None
self._requires = None
@ -23,7 +23,7 @@ index 8884dce..360ec39 100644
self._req_names = -1
if header:
@@ -730,6 +734,22 @@ class Pkg(AbstractPkg):
@@ -771,6 +775,22 @@ class Pkg(AbstractPkg):
self._gatherDepInfo()
return self._requires
@ -44,9 +44,9 @@ index 8884dce..360ec39 100644
+ return self._enhances
+
def prereq(self):
"""Get package PreReqs as list of
(name, flags, (epoch, version, release)) tuples."""
@@ -790,7 +810,7 @@ class Pkg(AbstractPkg):
"""
Get package PreReqs as list of
@@ -845,7 +865,7 @@ class Pkg(AbstractPkg):
# internal function to gather dependency info used by the above ones
def _gather_aux(self, header, list, nametag, flagstag, versiontag,
@ -55,7 +55,7 @@ index 8884dce..360ec39 100644
names = header[nametag]
flags = header[flagstag]
versions = header[versiontag]
@@ -801,7 +821,11 @@ class Pkg(AbstractPkg):
@@ -856,7 +876,11 @@ class Pkg(AbstractPkg):
evr = stringToVersion(b2s(versions[loop]))
if prereq is not None and flags[loop] & PREREQ_FLAG:
prereq.append((name, flags[loop] & (~PREREQ_FLAG), evr))
@ -68,7 +68,7 @@ index 8884dce..360ec39 100644
list.append((name, flags[loop], evr))
def _gatherDepInfo(self):
@@ -867,6 +891,7 @@ class Pkg(AbstractPkg):
@@ -924,6 +948,7 @@ class Pkg(AbstractPkg):
return prog
@ -76,11 +76,11 @@ index 8884dce..360ec39 100644
def getInstalledPkgs(name):
"""Get list of installed package objects by name."""
diff --git a/TagsCheck.py b/TagsCheck.py
index 13dbb95..00ec2e8 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -854,8 +854,27 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -899,8 +899,27 @@ class TagsCheck(AbstractCheck.AbstractCh
value = Pkg.formatRequire(*c)
self._unexpanded_macros(pkg, 'Conflicts %s' % (value,), value)

View File

@ -7,19 +7,19 @@ Subject: [PATCH] better-wrong-script.diff
FilesCheck.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index ca3e96a..ad77589 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -1663,7 +1663,10 @@ executed.''',
executed.''',
Index: rpmlint-rpmlint-1.9/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.9.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.9/FilesCheck.py
@@ -1249,7 +1249,10 @@ executed.''',
'wrong-script-interpreter',
-'''This script uses an incorrect interpreter.''',
+'''This script uses an incorrect interpreter. Correct interpreters should
+be an absolute path to a file in in /(s)bin or /usr/(s)bin.
+Alternatively, if the file isn't supposed to be executed, then don't
+mark it as executable. ''',
'''This script uses an interpreter which is either an inappropriate one
-or located in an inappropriate directory for packaged system software.''',
+or located in an inappropriate directory for packaged system software.
+Alternatively, if the file isn't supposed to be executed, then ensure that
+it is not marked as being executable.
+''',
'non-executable-script',
'''This text file contains a shebang or is located in a path dedicated for

View File

@ -1,126 +0,0 @@
From 4d995b87763076cc2aca25b7836e106708bd926f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Fri, 23 Oct 2015 23:43:16 +0200
Subject: [PATCH] Skip checks for problematic function calls if common prefix
does not match
The regexes have a common prefix. If the prefix does not match, none of
the regexes will match, continue with the next line.
---
BinariesCheck.py | 53 ++++++++++++++++++++++++++++++++---------------------
1 file changed, 32 insertions(+), 21 deletions(-)
Index: rpmlint-rpmlint-1.8/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.8/BinariesCheck.py
@@ -28,14 +28,14 @@ DEFAULT_SYSTEM_LIB_PATHS = (
def create_regexp_call(call):
if type(call) == type([]):
call = '(?:' + '|'.join(call) + ')'
- r = "\s+FUNC\s+.*?\s+(%s(?:@GLIBC\S+)?)(?:\s|$)" % call
+ r = ".*?\s+(%s(?:@GLIBC\S+)?)(?:\s|$)" % call
return re.compile(r)
def create_nonlibc_regexp_call(call):
if type(call) == type([]):
call = '(?:' + '|'.join(call) + ')'
- r = "\s+FUNC\s+.*?\s+UND\s+(%s)\s?.*$" % call
+ r = ".*?\s+UND\s+(%s)\s?.*$" % call
return re.compile(r)
@@ -51,6 +51,7 @@ class BinaryInfo:
stack_exec_regex = re.compile('^..E$')
undef_regex = re.compile('^undefined symbol:\s+(\S+)')
unused_regex = re.compile('^\s+(\S+)')
+ call_regex = re.compile('\s0\s+FUNC\s+(.*)')
exit_call_regex = create_regexp_call('_?exit')
fork_call_regex = create_regexp_call('fork')
debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+')
@@ -109,25 +110,8 @@ class BinaryInfo:
cmd.append(path)
res = Pkg.getstatusoutput(cmd)
if not res[0]:
- for l in res[1].splitlines():
- if BinaryInfo.mktemp_call_regex.search(l):
- self.mktemp = True
-
- if BinaryInfo.setgid_call_regex.search(l):
- self.setgid = True
-
- if BinaryInfo.setuid_call_regex.search(l):
- self.setuid = True
-
- if BinaryInfo.setgroups_call_regex.search(l):
- self.setgroups = True
-
- if BinaryInfo.chdir_call_regex.search(l):
- self.chdir = True
-
- if BinaryInfo.chroot_call_regex.search(l):
- self.chroot = True
-
+ lines = res[1].splitlines()
+ for l in lines:
r = BinaryInfo.needed_regex.search(l)
if r:
self.needed.append(r.group(1))
@@ -160,6 +144,41 @@ class BinaryInfo:
self.exec_stack = True
continue
+ if BinaryInfo.debuginfo_regex.search(l):
+ self.debuginfo=1
+ continue
+
+ if BinaryInfo.symtab_regex.search(l):
+ self.symtab=1
+ continue
+
+ if l.startswith("Symbol table"):
+ break
+
+ for l in lines:
+ r = BinaryInfo.call_regex.search(l)
+ if not r:
+ continue
+ l = r.group(1)
+
+ if BinaryInfo.mktemp_call_regex.search(l):
+ self.mktemp = True
+
+ if BinaryInfo.setgid_call_regex.search(l):
+ self.setgid = True
+
+ if BinaryInfo.setuid_call_regex.search(l):
+ self.setuid = True
+
+ if BinaryInfo.setgroups_call_regex.search(l):
+ self.setgroups = True
+
+ if BinaryInfo.chdir_call_regex.search(l):
+ self.chdir = True
+
+ if BinaryInfo.chroot_call_regex.search(l):
+ self.chroot = True
+
if BinaryInfo.forbidden_functions:
for r_name, func in BinaryInfo.forbidden_functions.items():
ret = func['f_regex'].search(l)
@@ -181,14 +200,6 @@ class BinaryInfo:
fork_called = True
continue
- if BinaryInfo.debuginfo_regex.search(l):
- self.debuginfo=1
- continue
-
- if BinaryInfo.symtab_regex.search(l):
- self.symtab=1
- continue
-
# check if we don't have a string that will automatically
# waive the presence of a forbidden call
if self.forbidden_calls:

View File

@ -1,13 +0,0 @@
Index: rpmlint-rpmlint-1.8/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.8/TagsCheck.py
@@ -446,7 +446,7 @@ invalid_url_regex = re.compile(Config.ge
lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
leading_space_regex = re.compile('^\s+')
pkg_config_regex = re.compile('^/usr/(?:lib\d*|share)/pkgconfig/')
-license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
+license_regex = re.compile('\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
license_exception_regex = re.compile('(\S+)\sWITH\s(\S+)')
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
# () are here for grouping purpose in the regexp

View File

@ -7,11 +7,11 @@ Subject: [PATCH] buildroot-doc.diff
SpecCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SpecCheck.py b/SpecCheck.py
index 2e3ba56..62c5d9f 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -673,7 +673,7 @@ versions you can ignore this warning.''',
Index: rpmlint-rpmlint-1.10/SpecCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
+++ rpmlint-rpmlint-1.10/SpecCheck.py
@@ -670,7 +670,7 @@ versions you can ignore this warning.'''
'hardcoded-path-in-buildroot-tag',
'''A path is hardcoded in your Buildroot tag. It should be replaced

View File

@ -7,11 +7,11 @@ Subject: [PATCH] buildroot-in-scripts.diff
SpecCheck.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/SpecCheck.py b/SpecCheck.py
index 62c5d9f..8fc6e94 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -239,7 +239,9 @@ class SpecCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/SpecCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
+++ rpmlint-rpmlint-1.10/SpecCheck.py
@@ -235,7 +235,9 @@ class SpecCheck(AbstractCheck.AbstractCh
continue

View File

@ -6,11 +6,11 @@ Subject: [PATCH] check for self provides
TagsCheck.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/TagsCheck.py b/TagsCheck.py
index 8071f1d..39b7544 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -847,6 +847,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.9/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.9.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.9/TagsCheck.py
@@ -901,6 +901,8 @@ class TagsCheck(AbstractCheck.AbstractCh
for p in pkg.provides():
value = Pkg.formatRequire(*p)
self._unexpanded_macros(pkg, 'Provides %s' % (value,), value)
@ -19,7 +19,7 @@ index 8071f1d..39b7544 100644
for c in pkg.conflicts():
value = Pkg.formatRequire(*c)
@@ -1175,6 +1177,10 @@ objects should thus not be depended on and they should not result in provides
@@ -1252,6 +1254,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.''',
@ -29,4 +29,4 @@ index 8071f1d..39b7544 100644
+upgrade path. self-provides are autogenerated. Remove the provide.''',
)
for i in "obsoletes", "conflicts", "provides", "recommends", "suggests", \
for i in ("obsoletes", "conflicts", "provides", "recommends", "suggests",

View File

@ -7,16 +7,16 @@ Subject: [PATCH] compressed-backup-regex.diff
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index a8ac7f4..f73cda1 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -599,7 +599,7 @@ DEFAULT_DISALLOWED_DIRS = (
Index: rpmlint-rpmlint-1.10/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.10/FilesCheck.py
@@ -179,7 +179,7 @@ DEFAULT_DISALLOWED_DIRS = (
)
sub_bin_regex = re.compile('^(/usr)?/s?bin/\S+/')
-backup_regex = re.compile('(~|\#[^/]+\#|\.orig|\.rej)$')
+backup_regex = re.compile('(~|\#[^/]+\#|\.orig|\.orig\.gz|\.rej)$')
compr_regex = re.compile('\.(gz|z|Z|zip|bz2|lzma|xz)$')
absolute_regex = re.compile('^/([^/]+)')
absolute2_regex = re.compile('^/?([^/]+)')
sub_bin_regex = re.compile(r'^(/usr)?/s?bin/\S+/')
-backup_regex = re.compile(r'(~|\#[^/]+\#|\.orig|\.rej)$')
+backup_regex = re.compile(r'(~|\#[^/]+\#|\.orig|\.orig\.gz|\.rej)$')
compr_regex = re.compile(r'\.(gz|z|Z|zip|bz2|lzma|xz)$')
absolute_regex = re.compile(r'^/([^/]+)')
absolute2_regex = re.compile(r'^/?([^/]+)')

View File

@ -7,11 +7,11 @@ Subject: [PATCH] description-check.diff
TagsCheck.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/TagsCheck.py b/TagsCheck.py
index 0a5f839..13dbb95 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -715,6 +715,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -746,6 +746,9 @@ class TagsCheck(AbstractCheck.AbstractCh
else:
for lang in langs:
self.check_description(pkg, lang, ignored_words)
@ -21,7 +21,7 @@ index 0a5f839..13dbb95 100644
else:
printError(pkg, 'no-description-tag')
@@ -1001,6 +1004,10 @@ Name tag.''',
@@ -1046,6 +1049,10 @@ Name tag.''',
'''The major number of the library isn't included in the package's name.
''',

View File

@ -7,11 +7,11 @@ Subject: [PATCH] devel-provide-is-devel-package.diff
FilesCheck.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/FilesCheck.py b/FilesCheck.py
index ad77589..cdffaea 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -830,6 +830,10 @@ class FilesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.10/FilesCheck.py
@@ -422,6 +422,10 @@ class FilesCheck(AbstractCheck.AbstractC
# Check if the package is a development package
devel_pkg = devel_regex.search(pkg.name)

View File

@ -7,28 +7,28 @@ Subject: [PATCH] docdata-examples.diff
FilesCheck.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 1011a25..ca3e96a 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -609,6 +609,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
buildconfigfile_regex = re.compile('(\.pc|/bin/.+-config)$')
Index: rpmlint-rpmlint-1.10/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.10/FilesCheck.py
@@ -189,6 +189,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('(?:-rpath|Wl,-R)\\b')
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
@@ -1184,7 +1185,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
includefile_regex.search(f) or \
develfile_regex.search(f) or \
logrotate_regex.search(f)
buildconfig_rpath_regex = re.compile(r'(?:-rpath|Wl,-R)\b')
sofile_regex = re.compile(r'/lib(64)?/(.+/)?lib[^/]+\.so$')
@@ -785,7 +786,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:
@@ -1540,7 +1541,10 @@ included in your package.''',
@@ -1154,7 +1155,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

View File

@ -1,34 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:39 +0200
Subject: [PATCH] fix shared library matching
Avoids e.g.
[ 332s] glib2-devel.i586: E: library-without-ldconfig-postun (Badness: 300) /usr/share/gdb/auto-load/usr/lib/libglib-2.0.so.0.4600.1-gdb.py
---
FilesCheck.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 81c5680..622b3b3 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -615,7 +615,9 @@ buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
devel_regex = re.compile('(.*)-(debug(info)?|devel|headers|source|static)$')
debuginfo_package_regex = re.compile('-debug(info)?$')
-lib_regex = re.compile('lib(64)?/lib[^/]*(\.so\..*|-[0-9.]+\.so)')
+# matches properly versioned shared libraries like libfoo.so.1.2.3 as well as
+# weird ones like libfoo-1.2.3.so
+lib_regex = re.compile('/lib(?:64)?/lib[^/]*(?:\.so\.[\d.]+|-[\d.]+\.so)$')
ldconfig_regex = re.compile('^[^#]*ldconfig', re.MULTILINE)
depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE)
install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE)
@@ -1018,7 +1020,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
# check ldconfig call in %post and %postun
if lib_regex.search(f):
- if devel_pkg:
+ if devel_pkg and not (sofile_regex.search(f) and stat.S_ISLNK(mode)):
printError(pkg, 'non-devel-file-in-devel-package', f)
if not postin:
printError(pkg, 'library-without-ldconfig-postin', f)

View File

@ -7,19 +7,19 @@ Subject: [PATCH] invalid-filerequires.diff
TagsCheck.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/TagsCheck.py b/TagsCheck.py
index 9856f9e..8071f1d 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -422,6 +422,7 @@ invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECA
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -452,6 +452,7 @@ invalid_version_regex = re.compile(r'([0
# () are here for grouping purpose in the regexp
forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
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('(?:/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)
@@ -602,6 +603,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
@@ -642,6 +643,9 @@ class TagsCheck(AbstractCheck.AbstractCh
if d[0].startswith('/usr/local/'):
printError(pkg, 'invalid-dependency', d[0])
@ -29,7 +29,7 @@ index 9856f9e..8071f1d 100644
if is_source:
if lib_devel_number_regex.search(d[0]):
printError(pkg, 'invalid-build-requires', d[0])
@@ -1122,6 +1126,12 @@ unneeded explicit Requires: tags.''',
@@ -1199,6 +1203,12 @@ unneeded explicit Requires: tags.''',
'''This package provides 2 times the same capacity. It should only provide it
once.''',

View File

@ -1,37 +0,0 @@
From c5871542684bf1439d96f2430fe4f0010070e4db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Sun, 7 Feb 2016 10:10:51 +0200
Subject: [PATCH] BinariesCheck: avoid false chroot w/o chdir when objdump
fails
https://bugzilla.redhat.com/show_bug.cgi?id=1305302
---
BinariesCheck.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index b2c030e..33dfae5 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -210,7 +210,10 @@ def __init__(self, pkg, path, file, is_ar, is_shlib):
# on a server like postfix
res = Pkg.getstatusoutput(
('env', 'LC_ALL=C', 'objdump', '-d', path))
- if not res[0]:
+ if res[0]:
+ printWarning(pkg, 'binaryinfo-objdump-failed', file)
+ self.chroot_near_chdir = True # avoid false positive
+ else:
call = []
# we want that :
# 401eb8: e8 c3 f0 ff ff callq 400f80 <free@plt>
@@ -645,6 +648,9 @@ def check_binary(self, pkg):
'binaryinfo-readelf-failed',
'''Executing readelf on this file failed, all checks could not be run.''',
+'binaryinfo-objdump-failed',
+'''Executing objdump on this file failed, all checks could not be run.''',
+
'binaryinfo-tail-failed',
'''Reading trailing bytes of this file failed, all checks could not be run.''',

View File

@ -1,83 +0,0 @@
From be76ea6216987eefe9e863b193657318720bca51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sun, 13 Mar 2016 16:01:37 +0100
Subject: [PATCH 1/3] BinariesCheck: lower memory requirements, fix
chroot/chdir detection
Do not read whole output of objdump -d into memory, but read and process
the output while it is created (issue #67).
Also correct expression to find 'chdir@plt' in output (issue #66)
---
BinariesCheck.py | 49 ++++++++++++++++++++++++++++++-------------------
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index 33dfae5..ee6d00b 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -10,6 +10,7 @@
import re
import stat
import sys
+import subprocess
import rpm
@@ -205,27 +206,37 @@ def __init__(self, pkg, path, file, is_ar, is_shlib):
# check if chroot is near chdir (since otherwise, chroot is called
# without chdir)
if self.chroot and self.chdir:
- # FIXME this check is too slow, because forking for objdump is
- # quite slow according to a quick test and that's quite visible
- # on a server like postfix
- res = Pkg.getstatusoutput(
- ('env', 'LC_ALL=C', 'objdump', '-d', path))
- if res[0]:
+ p = subprocess.Popen(
+ ['env', 'LC_ALL=C', 'objdump', '-d', path],
+ stdout=subprocess.PIPE, bufsize=1)
+ with p.stdout:
+ # we want that :
+ # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
+ objdump_call_regex = re.compile(b'callq?\s(.*)')
+ index = 0
+ chroot_index = -99
+ chdir_index = -99
+ for line in p.stdout:
+ r = objdump_call_regex.search(line)
+ if not r:
+ continue
+ if b'@plt' not in r.group(1):
+ pass
+ elif b'chroot@plt' in r.group(1):
+ chroot_index = index
+ if abs(chroot_index - chdir_index) <= 2:
+ self.chroot_near_chdir = True
+ break
+ elif b'chdir@plt' in r.group(1):
+ chdir_index = index
+ if abs(chroot_index - chdir_index) <= 2:
+ self.chroot_near_chdir = True
+ break
+ index += 1
+ if p.wait():
printWarning(pkg, 'binaryinfo-objdump-failed', file)
self.chroot_near_chdir = True # avoid false positive
- else:
- call = []
- # we want that :
- # 401eb8: e8 c3 f0 ff ff callq 400f80 <free@plt>
- for l in res[1].splitlines():
- # call is for x86 32 bits, callq for x86_64
- if l.find('callq ') >= 0 or l.find('call ') >= 0:
- call.append(l.rpartition(' ')[2])
- for index, c in enumerate(call):
- if c.find('chroot@plt') >= 0:
- for i in call[index-2:index+2]:
- if i.find('chdir@plt'):
- self.chroot_near_chdir = True
+
else:
self.readelf_error = True
printWarning(pkg, 'binaryinfo-readelf-failed',

View File

@ -1,35 +0,0 @@
From f61aab52fdcbdc9096f2346ee4ecf9668d8a0fbc Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Wed, 29 Jun 2016 18:28:55 +0200
Subject: [PATCH 2/3] Use default bufsize, move regex compile to common place
---
BinariesCheck.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Index: rpmlint-rpmlint-1.8/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.8/BinariesCheck.py
@@ -64,6 +64,8 @@ class BinaryInfo:
setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
setgroups_call_regex = create_regexp_call(['initgroups', 'setgroups'])
chroot_call_regex = create_regexp_call('chroot')
+ # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
+ objdump_call_regex = re.compile(b'callq?\s(.*)')
forbidden_functions = Config.getOption("WarnOnFunction")
if forbidden_functions:
@@ -234,11 +236,8 @@ class BinaryInfo:
if self.chroot and self.chdir:
p = subprocess.Popen(
['env', 'LC_ALL=C', 'objdump', '-d', path],
- stdout=subprocess.PIPE, bufsize=1)
+ stdout=subprocess.PIPE, bufsize=-1)
with p.stdout:
- # we want that :
- # 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
- objdump_call_regex = re.compile(b'callq?\s(.*)')
index = 0
chroot_index = -99
chdir_index = -99

View File

@ -1,22 +0,0 @@
From 643f42c51f46ed1f377fc099cca818fba2d5a7d0 Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Wed, 29 Jun 2016 18:38:51 +0200
Subject: [PATCH 3/3] Fix last commit
---
BinariesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index f19ae29..89517c2 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -216,7 +216,7 @@ def __init__(self, pkg, path, file, is_ar, is_shlib):
chroot_index = -99
chdir_index = -99
for line in p.stdout:
- r = objdump_call_regex.search(line)
+ r = BinaryInfo.objdump_call_regex.search(line)
if not r:
continue
if b'@plt' not in r.group(1):

View File

@ -7,11 +7,11 @@ Subject: [PATCH] libtool-wrapper-check.diff
BinariesCheck.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index c7fadab..62951d6 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -359,8 +359,19 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
@@ -370,8 +370,19 @@ class BinariesCheck(AbstractCheck.Abstra
is_ar = 'current ar archive' in pkgfile.magic
is_ocaml_native = 'Objective caml native' in pkgfile.magic
is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
@ -31,7 +31,7 @@ index c7fadab..62951d6 100644
if not is_binary:
if reference_regex.search(fname):
lines = pkg.grep(invalid_dir_ref_regex, fname)
@@ -626,6 +637,15 @@ recompiled separately from the static libraries with the -fPIC option.
@@ -640,6 +651,15 @@ to list code compiled without -fPIC.
Another common mistake that causes this problem is linking with
``gcc -Wl,-shared'' instead of ``gcc -shared''.''',

View File

@ -8,11 +8,11 @@ Subject: [PATCH] no-badness-return.diff
rpmlint | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Filter.py b/Filter.py
index 5ce6219..e50abe1 100644
--- a/Filter.py
+++ b/Filter.py
@@ -128,7 +128,7 @@ def printAllReasons():
Index: rpmlint-rpmlint-1.10/Filter.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/Filter.py
+++ rpmlint-rpmlint-1.10/Filter.py
@@ -130,7 +130,7 @@ def printAllReasons():
if len(last_reason):
printDescriptions(last_reason)
last_reason = reason
@ -21,11 +21,11 @@ index 5ce6219..e50abe1 100644
if Config.info and len(last_reason):
printDescriptions(last_reason)
_diagnostic = list()
diff --git a/rpmlint b/rpmlint
index acbda29..810d677 100755
--- a/rpmlint
+++ b/rpmlint
@@ -203,7 +203,7 @@ def main():
Index: rpmlint-rpmlint-1.10/rpmlint
===================================================================
--- rpmlint-rpmlint-1.10.orig/rpmlint
+++ rpmlint-rpmlint-1.10/rpmlint
@@ -206,7 +206,7 @@ def main():
% (packages_checked, specfiles_checked,
printed_messages["E"], printed_messages["W"]))

View File

@ -7,11 +7,11 @@ Subject: [PATCH] no-doc-for-lib.diff
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 14ef030..ee5039c 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -847,7 +847,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.9/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.9.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.9/FilesCheck.py
@@ -434,7 +434,7 @@ class FilesCheck(AbstractCheck.AbstractC
debuginfo_srcs = False
debuginfo_debugs = False

View File

@ -7,11 +7,11 @@ Subject: [PATCH] noarch-lib64.diff
BinariesCheck.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index 62951d6..eb19387 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -337,6 +337,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
@@ -348,6 +348,7 @@ class BinariesCheck(AbstractCheck.Abstra
binary = False
binary_in_usr_lib = False
has_usr_lib_file = False
@ -19,7 +19,7 @@ index 62951d6..eb19387 100644
multi_pkg = False
srpm = pkg[rpm.RPMTAG_SOURCERPM]
@@ -355,6 +356,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
@@ -366,6 +367,10 @@ class BinariesCheck(AbstractCheck.Abstra
# only-non-binary-in-usr-lib false positives
binary_in_usr_lib = True
@ -30,7 +30,7 @@ index 62951d6..eb19387 100644
is_elf = 'ELF' in pkgfile.magic
is_ar = 'current ar archive' in pkgfile.magic
is_ocaml_native = 'Objective caml native' in pkgfile.magic
@@ -588,9 +593,12 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
@@ -599,9 +604,12 @@ class BinariesCheck(AbstractCheck.Abstra
if version and version != -1 and version not in pkg.name:
printError(pkg, 'incoherent-version-in-name', version)
@ -44,7 +44,7 @@ index 62951d6..eb19387 100644
if has_usr_lib_file and not binary_in_usr_lib:
printWarning(pkg, 'only-non-binary-in-usr-lib')
@@ -614,6 +622,11 @@ FHS and the FSSTND forbid this.''',
@@ -626,6 +634,11 @@ FHS and the FSSTND forbid this.''',
# 'non-sparc32-binary',
# '',

View File

@ -1,14 +0,0 @@
diff -u rpmlint-rpmlint-1.8.orig/Makefile rpmlint-rpmlint-1.8/Makefile
--- rpmlint-rpmlint-1.8.orig/Makefile 2016-05-03 18:21:47.823504438 +0200
+++ rpmlint-rpmlint-1.8/Makefile 2016-05-03 18:25:11.746636047 +0200
@@ -39,9 +39,7 @@
$(DESTDIR)$(LIBDIR)/[A-Z]*.py \
$(DESTDIR)$(LIBDIR)/__*__.py ; \
fi
- $(PYTHON) -O -m py_compile \
- $(DESTDIR)$(LIBDIR)/[A-Z]*.py \
- $(DESTDIR)$(LIBDIR)/__*__.py ; \
+ $(PYTHON) -O -m compileall -d $(LIBDIR) $(DESTDIR)$(LIBDIR)
for file in rpmlint rpmdiff ; do \
sed -e "s,#!/usr/bin/python ,#!$(PYTHON) ," $$file > $(DESTDIR)$(BINDIR)/$$file ; \
chmod +x $(DESTDIR)$(BINDIR)/$$file ; \

View File

@ -7,20 +7,20 @@ Subject: [PATCH] only-reg-files-are-scripts.diff
InitScriptCheck.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
index 0559405..f9b13a1 100644
--- a/InitScriptCheck.py
+++ b/InitScriptCheck.py
@@ -18,7 +18,7 @@ from Filter import addDetails, printError, printWarning
import AbstractCheck
Index: rpmlint-rpmlint-1.10/InitScriptCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/InitScriptCheck.py
+++ rpmlint-rpmlint-1.10/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('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE)
@@ -50,6 +50,9 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
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
@ -29,4 +29,4 @@ index 0559405..f9b13a1 100644
+
basename = os.path.basename(fname)
initscript_list.append(basename)
if pkgfile.mode & int("500", 8) != int("500", 8):
if pkgfile.mode & 0o500 != 0o500:

View File

@ -1,47 +0,0 @@
From 1436dd7bc41115af658cf8f36a3149ab90a61fcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sun, 1 Nov 2015 19:32:57 +0100
Subject: [PATCH] Expand postin/postun once per pkg instead once per file
---
FilesCheck.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
Index: rpmlint-rpmlint-1.8/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.8/FilesCheck.py
@@ -863,6 +863,16 @@ class FilesCheck(AbstractCheck.AbstractC
elif debuginfo_package:
printError(pkg, 'empty-debuginfo-package')
+ # Prefetch scriptlets, strip quotes from them (#169)
+ postin = pkg[rpm.RPMTAG_POSTIN] or \
+ pkg.scriptprog(rpm.RPMTAG_POSTINPROG)
+ if postin:
+ postin = quotes_regex.sub('', postin)
+ postun = pkg[rpm.RPMTAG_POSTUN] or \
+ pkg.scriptprog(rpm.RPMTAG_POSTUNPROG)
+ if postun:
+ postun = quotes_regex.sub('', postun)
+
# Unique (rdev, inode) combinations
hardlinks = {}
@@ -976,16 +986,6 @@ class FilesCheck(AbstractCheck.AbstractC
printError(pkg, 'non-standard-executable-perm', f,
"%o" % perm)
- # Prefetch scriptlets, strip quotes from them (#169)
- postin = pkg[rpm.RPMTAG_POSTIN] or \
- pkg.scriptprog(rpm.RPMTAG_POSTINPROG)
- if postin:
- postin = quotes_regex.sub('', postin)
- postun = pkg[rpm.RPMTAG_POSTUN] or \
- pkg.scriptprog(rpm.RPMTAG_POSTUNPROG)
- if postun:
- postun = quotes_regex.sub('', postun)
-
if not devel_pkg:
if lib_path_regex.search(f):
lib_file = True

View File

@ -1,64 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:40 +0200
Subject: [PATCH] remove-expand-macros.diff
commit 29e43a3e1676aa452f730a741d00ef4ac7baec96
Author: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Tue May 17 12:56:38 2011 +0200
remove-expand-macros.diff
---
TagsCheck.py | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/TagsCheck.py b/TagsCheck.py
index f229a28..3f9c0bc 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -432,15 +432,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a-zA-z]+)*(\([^)]*\))*$')
# 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', '%ruby_sitearch', '%php_extdir'):
- epath = rpm.expandMacro(path)
- if 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 = {}
@@ -887,30 +878,12 @@ class TagsCheck(AbstractCheck.AbstractCheck):
(Pkg.formatRequire(*obs),
Pkg.formatRequire(*prov)))
- expfmt = rpm.expandMacro("%{_build_name_fmt}")
- if pkg.isSource():
- # _build_name_fmt often (always?) ends up not outputting src/nosrc
- # as arch for source packages, do it ourselves
- expfmt = re.sub(r'(?i)%\{?ARCH\b\}?', pkg.arch, expfmt)
- expected = pkg.header.sprintf(expfmt).split("/")[-1]
- basename = os.path.basename(pkg.filename)
- if basename != expected:
- printWarning(pkg, 'non-coherent-filename', basename, expected)
-
for tag in ('Distribution', 'DistTag', 'ExcludeArch', 'ExcludeOS',
'Vendor'):
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
self._unexpanded_macros(pkg, tag,
Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())]))
- 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:

View File

@ -1,55 +0,0 @@
From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Tue, 19 May 2015 13:24:34 +0200
Subject: [PATCH] remove files-attr-not-set check
%defattr(-,root,root) is default since rpm 4.4, released > 10
years go so it's about time to remove that check
---
SpecCheck.py | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/SpecCheck.py b/SpecCheck.py
index 5149dc3..e00c0a8 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -64,7 +64,6 @@ biarch_package_regex = re.compile(DEFAULT_BIARCH_PACKAGES)
hardcoded_lib_path_exceptions_regex = re.compile(Config.getOption('HardcodedLibPathExceptions', DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONS))
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
-comment_or_empty_regex = re.compile('^\s*(#|$)')
defattr_regex = re.compile('^\s*%defattr\\b')
attr_regex = re.compile('^\s*%attr\\b')
suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)')
@@ -179,7 +178,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
patch_fuzz_override = False
indent_spaces = 0
indent_tabs = 0
- files_has_defattr = False
section = {}
# None == main package
current_package = None
@@ -231,9 +229,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
if section_marker:
- if current_section == 'files':
- files_has_defattr = False
-
if not is_lib_pkg and lib_package_regex.search(line):
is_lib_pkg = True
@@ -471,14 +466,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
if current_section == 'files':
- if not comment_or_empty_regex.search(line) and not \
- (ifarch_regex.search(line) or if_regex.search(line) or
- endif_regex.search(line)):
- if defattr_regex.search(line):
- files_has_defattr = True
- elif not (files_has_defattr or attr_regex.search(line)):
- printWarning(pkg, 'files-attr-not-set')
-
# TODO: check scriptlets for these too?
if package_noarch.get(current_package) or \
(current_package not in package_noarch and

View File

@ -7,11 +7,11 @@ Subject: [PATCH] rpmgroup-checks.diff
TagsCheck.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/TagsCheck.py b/TagsCheck.py
index dd09e62..0a5f839 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -722,6 +722,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -753,6 +753,8 @@ class TagsCheck(AbstractCheck.AbstractCh
self._unexpanded_macros(pkg, 'Group', group)
if not group:
printError(pkg, 'no-group-tag')
@ -20,7 +20,7 @@ index dd09e62..0a5f839 100644
elif VALID_GROUPS and group not in VALID_GROUPS:
printWarning(pkg, 'non-standard-group', group)
@@ -1040,6 +1042,10 @@ won't fool the specfile parser, and rebuild the package.''',
@@ -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.''',

3
rpmlint-1.10.tar.gz Normal file
View File

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

View File

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

View File

@ -1,8 +1,8 @@
Index: rpmlint-rpmlint-1.8/BinariesCheck.py
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.8/BinariesCheck.py
@@ -560,6 +560,9 @@ class BinariesCheck(AbstractCheck.Abstra
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
@@ -537,6 +537,9 @@ class BinariesCheck(AbstractCheck.Abstra
if not is_shobj and pie_exec_re and pie_exec_re.search(fname):
printError(pkg, 'non-position-independent-executable',
fname)
@ -12,7 +12,7 @@ Index: rpmlint-rpmlint-1.8/BinariesCheck.py
if bin_info.readelf_error:
continue
@@ -809,6 +812,10 @@ stripping process.''',
@@ -789,6 +792,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.''',

View File

@ -1,22 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:40 +0200
Subject: [PATCH] rpmlint-pkg-quoting.diff
===================================================================
---
Pkg.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Pkg.py b/Pkg.py
index 360ec39..aaa006f 100644
--- a/Pkg.py
+++ b/Pkg.py
@@ -550,7 +550,7 @@ class Pkg(AbstractPkg):
dir=self.dirname)
# TODO: better shell escaping or sequence based command invocation
command_str = \
- 'rpm2cpio "%s" | (cd "%s"; cpio -id); chmod -R +rX "%s"' % \
+ "rpm2cpio '%s' | (cd '%s'; cpio -id); chmod -R +rX '%s'" % \
(self.filename, self.dirname, self.dirname)
cmd = getstatusoutput(command_str, shell=True)
self.extracted = True

View File

@ -8,23 +8,23 @@ Subject: [PATCH] rpmlint-suse.diff
I18NCheck.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 7fcacbd..777f8aa 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -184,7 +184,7 @@ compr_regex = re.compile('\.(gz|z|Z|zip|bz2|lzma|xz)$')
absolute_regex = re.compile('^/([^/]+)')
absolute2_regex = re.compile('^/?([^/]+)')
points_regex = re.compile('^\.\./(.*)')
-doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/')
+doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help')
bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
diff --git a/I18NCheck.py b/I18NCheck.py
index 54b42cd..3bcf9d0 100644
--- a/I18NCheck.py
+++ b/I18NCheck.py
Index: rpmlint-rpmlint-1.10/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.10/FilesCheck.py
@@ -184,7 +184,7 @@ compr_regex = re.compile(r'\.(gz|z|Z|zip
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)/')
+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.10/I18NCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/I18NCheck.py
+++ rpmlint-rpmlint-1.10/I18NCheck.py
@@ -30,7 +30,7 @@ INCORRECT_LOCALES = {
'en_UK': 'en_GB'}

View File

@ -1,3 +1,164 @@
-------------------------------------------------------------------
Thu Sep 28 10:40:08 UTC 2017 - dmueller@suse.com
- update to 1.10:
* test: Skip fedoradev GPG checks at least for now
* test: Refresh fedora* packages on image build
* test: Use assertEqual where appropriate, thanks to flake8/hacking
* test: Update fedora24 config to fedora26, run it on Travis
* Add a new test for tmpfiles.d snippets in the /etc/ tree.
* Add new tests for systemd units and udev rules in /etc/ tree
* test: Disable hacking for now until it's flake8 3.4+ compatible
* test: Set up flake8-bugbear, enable it in fedoradev container
* rpmlint: Avoid unused loop control variable
* ZipCheck: Add TODO
* *: Avoid mutable argument defaults
* Be aware of -debugsource packages
* rpmdiff: Fix unused variable from previous commit
* rpmdiff: Support soft dependencies
* BinariesCheck, FilesCheck: Ignore various .build-id dirs
* Add python3-devel and rpm-build to fedoradev container to provoke some issues
* BinariesCheck: Popen env consistency fix
* Pkg.getstatusoutput: Set LC_ALL for all Popens, defaulting to C
* rpmlint: Fix checking specfile from stdin
* test.sh: Extract rpmlint command to run_rpmlint
* Revert "Remove unused spec_lines check_spec argument"
* BinariesCheck: Trivial cleanups
* travis: Run make install too
* FilesCheck: Allow multiple bytecode magic values per Python version
* tests: Make output test tools easier to reuse
* FilesCheck: hg.python.org -> github.com/python
* Pkg: Return vendor and distribution as unicode strings
* FilesCheck: Add Python 3.7 bytecode magic value
* Pkg.b2s: Add some more test cases
* Pkg.b2s: Pass through str as-is on Python 3
* TagsCheck.py: accept SPDX "and" and "or" operators in all-uppercase spelling
* rb'foo' is not supported in Python 2, use br'foo' instead
* travis: Enable centos6
* Avoid Python 3.6 invalid esc seq warnings, use more raw strings
* flake8 fixes
* SpecCheck: Detect patches applied with "patch <" and "patch -i"
* add /usr/lib/systemd to DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONS (#93)
* SpecCheck: Do not demand versioned filename Provides/Obsoletes
* FilesCheck: Update Python 3.6 bytecode magic value again
* Config: Fix flake8 3.2 / pycodestyle 2.2 errors (closes #82)
* *: Fix various low hanging issues flagged by pycodestyle 2.1.0 (#82)
* test.sh: Output flake8 --version
* rpmdiff.1: update Arturo Borrero Gonzalez email address
* FilesCheck: Update Python 3.6 bytecode magic value
* Skip chroot-without-chdir check on non-x86_64
* shlib-with-non-pic-code: add text on how to figure files compiled without -fPIC (#79)
* *: Move indentation etc settings to .editorconfig
* AbstractCheck: Close urllib responses explicitly also on error
* tests: Switch Travis tests to Docker
* Use importlib to load checks where available
* FilesCheck: Use os.devnull
* Testing: Avoid ResourceWarning on config read
* Run tests with warnings on
* Ignore negative returncode after SIGPIPE caused by closing on purpose
* Fix last commit
* Use default bufsize, move regex compile to common place
* BinariesCheck: lower memory requirements, fix chroot/chdir detection
* FilesCheck: Avoid crash accessing non-ASCII filenames in some cases
* Filter: More non-ASCII print fixing, including in e.g. C locale
* SpecCheck: Output spec basename, not tempfile when checking srpm
* Cleanups
* FilesCheck: Update Python 3.5 and 3.6 bytecode magic values
* test: Test for unexpected errors in default and C locales
* Remove obsolete LC_ALL setting from Makefile
- drop version-control-internal-file.diff, boo1027577-license_tag.patch: upstream
- drop sourced-dirs.diff, fix-shared-library-matching.diff: obsolete
- drop suse-readd_terminator_in_regex.patch: merged into original patch
- add suse-tests-without-badness.patch
-------------------------------------------------------------------
Thu Sep 28 09:37:04 UTC 2017 - dmueller@suse.com
- update to 1.9:
* Pkg: Fix magic.descriptor availability check
* warn: Define only once, with print_function
* FilesCheck: Check for *.gir in devel, *.typelib in non-devel, fixes #74
* FilesCheck: Improve devel-file-in-non-devel-package description
* flake8: Ignore H105
* Makefile: Remove generate-isocodes dep from __isocodes__
* __isocodes__: Regenerate
* generate-isocodes: Switch to JSON source files (#72)
* test.sh: Check man pages for warnings
* Delete dead if-block
* Filter: Line wrap cleanup
* Filter: Use sys.version_info to check Python version
* Fix octal string literals
* Solve exceptions on printing str (Fixes #61)
* tests: Add autofs binary rpm for testing non-ASCII output issues
* test: Add some test packages containing non-UTF-8 filenames
* BinariesCheck: avoid false chroot w/o chdir when objdump fails
* flake8 fixes
* rpmdiff: Import site only if needed
* Testing: Add and use default for path to tests
* FilesCheck: Update Python 3.6 bytecode magic value
* FilesCheck: Fix regression in finding shebangs without arguments
* Ignore .cache dir
* Clean up Python < 2.6 cruft
* Add hacking flake8 to Travis and ignores
* flake8 fixes
* Use new style classes
* Run flake8 on rpmdiff and rpmlint too
* Handle more file open/close with "with"
* Exception handling cleanups
* FilesCheck: Look for shebang only at start of file
* travis: python3-rpm doesn't exist even for Trusty, so can't test with 3.4
* travis: Switch to Ubuntu Trusty, test with Python 2.7 and 3.4
* Use Travis apt addon for whitelisted packages
* Test import order
* Sort imports per PEP8, Google Python Style Guide
* Add Python 3.6 magic value
* Fix resolving Python source from 3.5 *.opt-[12].pyc
* Move most Emacs settings to .dir-locals.el
* Add %python2_sitearch and %python3_sitearch to private SO paths
* Prevent empty paths from entering private SO paths
* remove files-attr-not-set check
* Expand postin/postun once per pkg instead once per file
* Install rpm in travis for signature check
* Avoid running some regexps
* Run flake8 in test suite
* flake8 fixes
* make test suite fail on more errors
* Comment update
* Note and test libmagic >= 5.05 dep
* Fix magic processing for Python 3
* Mimic magic closer for symbolic links
* Workaround slowness due to python-magic bug
* Shortcut file magic, derive from file mode
* Spelling fix
* Unbreak create_*regex_call now that lines are shortened by call_regex
* Drop unnecessary symbol_table_regex
* Avoid false function call vs definition positives, thanks to Stefan Bruens
* pep8 fixes
* Add some pep8 settings
* Split parsing of readelf output into header and symbols part
* Skip checks for problematic function calls if common prefix does not match
* Use shlex.quote for better shell escaping where available
* TODO update
* Don't limit build badge to master branch
* Convert README to markdown
* Travis: install rpm2cpio
* +TODO
* Travis: Use Python 2.7 and system site packages
* Travis: try pytest from pip instead of apt-get
* Initial travis setup
* Include interpreter arguments in output messages for filtering control
* Flag /usr/bin/env as a wrong interpreter
- drop rpmlint-pkg-quoting.diff, suse-g-ir-chech.diff, remove-expand-macros.diff,
remove-files-attr-not-set-check.diff, postin-speedup.diff, binaryinfo-speedup.diff,
0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch,
issue_68_BinariesCheck_lower_memory-1.patch, issue_68_BinariesCheck_lower_memory-2.patch,
issue_68_BinariesCheck_lower_memory-3.patch, issue_68_BinariesCheck_lower_memory-4.patch,
BinariesCheck_fix_chroot_check_on_non_x86.patch: either upstreamed as is or slightly different
- drop suse-sysv-init-checks.diff, 0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch,
suse-filesystem.diff: obsolete
- drop update_git.sh related stuff: this is obsolete, patches are
either supposed to be upstreamed or handled via quilt
-------------------------------------------------------------------
Thu Sep 28 09:31:24 UTC 2017 - opensuse-packaging@opensuse.org

View File

@ -21,12 +21,14 @@
Name: rpmlint
BuildRequires: obs-service-format_spec_file
BuildRequires: python-pytest
BuildRequires: python3-flake8
BuildRequires: python3-rpm
BuildRequires: rpm-python
BuildRequires: xz
Summary: Rpm correctness checker
License: GPL-2.0+
Group: System/Packages
Version: 1.8
Version: 1.10
Release: 0
Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz
Source1: rpmlint-checks-master.tar.xz
@ -34,7 +36,6 @@ Source2: config
Source3: config.in
Source11: pie.config
Source12: licenses.config
Source98: update_git.sh
Source99: README.packaging.txt
Source100: syntax-validator.py
Url: https://github.com/rpm-software-management/rpmlint
@ -61,15 +62,13 @@ Patch01: suse-checks.diff
Patch02: suse-version.diff
Patch03: suse-url-check.diff
Patch04: suse-python3-naming-policy.diff
Patch05: suse-filesystem.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
Patch20: usr-arch.diff
Patch21: script-interpreter-only-for-exec-sc.diff
Patch22: sourced-dirs.diff
Patch23: suse-filter-more-verbose.diff
Patch24: docdata-examples.diff
Patch25: yast-provides.diff
@ -89,12 +88,8 @@ Patch38: add-weak-dependencies.diff
Patch39: selfconflicts-provide.diff
Patch40: no-badness-return.diff
Patch41: suse-shlib-devel-dependency.diff
Patch42: version-control-internal-file.diff
Patch43: stricter-interpreter-check.diff
Patch44: confusing-invalid-spec-name.diff
Patch45: rpmlint-pkg-quoting.diff
Patch46: suse-g-ir-chech.diff
Patch47: remove-expand-macros.diff
Patch48: suse-whitelist-opensuse.diff
Patch49: extend-suse-conffiles-check.diff
Patch50: compressed-backup-regex.diff
@ -103,28 +98,8 @@ Patch52: suse-python-abi-check.diff
Patch53: suse-manpages-for-rc-scripts.diff
Patch54: suse-ignore-specfile-errors.diff
Patch55: invalid-filerequires.diff
Patch56: suse-sysv-init-checks.diff
Patch57: check-for-self-provides.diff
Patch58: add-check-for-tmpfiles-created-at-r.diff
Patch59: remove-files-attr-not-set-check.diff
Patch60: fix-shared-library-matching.diff
# https://github.com/rpm-software-management/rpmlint/commit/1436dd7bc41115af658cf8f36a3149ab90a61fcf.patch
Patch61: postin-speedup.diff
# https://github.com/rpm-software-management/rpmlint/commit/37fe9d4f237c2cb29fcb3b60d1ece189e578eeaf.patch and followup regression fixes
Patch62: binaryinfo-speedup.diff
Patch63: 0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch
Patch64: omit_BUILDROOT_from_pyo_files.patch
# PATCH-FIX-UPSTREAM 0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch alarrosa@suse.com -- Fixes resolving python source from files generated following PEP0488
Patch65: 0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch
Patch661: issue_68_BinariesCheck_lower_memory-1.patch
Patch662: issue_68_BinariesCheck_lower_memory-2.patch
Patch663: issue_68_BinariesCheck_lower_memory-3.patch
Patch664: issue_68_BinariesCheck_lower_memory-4.patch
# Fix a regression introduced by suse-shlib-devel-dependency.diff
Patch67: suse-readd_terminator_in_regex.patch
Patch68: boo1027577-license_tag.patch
# Fix check for 'missing-call-to-chdir-with-chroot' on ARM, relax check on PPC
Patch69: BinariesCheck_fix_chroot_check_on_non_x86.patch
Patch70: rpmlint-all-pie.patch
# PATCHLIST END
# BuildArch must at the end. is a bug: https://bugzilla.suse.com/show_bug.cgi?id=926766

View File

@ -1,22 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:38 +0200
Subject: [PATCH] script-interpreter-only-for-exec-scripts.diff
===================================================================
---
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index ee5039c..4a698cd 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -1245,7 +1245,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
# ...but executed ones should
elif interpreter or mode_is_exec or script_regex.search(f):
if interpreter:
- if not interpreter_regex.search(interpreter):
+ if mode & 0o111 != 0 and not interpreter_regex.search(interpreter):
printError(pkg, 'wrong-script-interpreter',
f, interpreter)
elif not nonexec_file and not \

View File

@ -7,11 +7,11 @@ Subject: [PATCH] selfconflicts-provide.diff
TagsCheck.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/TagsCheck.py b/TagsCheck.py
index 00ec2e8..8dccbf1 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -830,6 +830,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -875,6 +875,7 @@ class TagsCheck(AbstractCheck.AbstractCh
obs_names = [x[0] for x in pkg.obsoletes()]
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
@ -19,7 +19,7 @@ index 00ec2e8..8dccbf1 100644
for o in (x for x in obs_names if x not in prov_names):
printWarning(pkg, 'obsolete-not-provided', o)
@@ -841,6 +842,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
@@ -886,6 +887,8 @@ class TagsCheck(AbstractCheck.AbstractCh
# https://bugzilla.redhat.com/460872
useless_provides = []
for p in prov_names:
@ -28,7 +28,7 @@ index 00ec2e8..8dccbf1 100644
if prov_names.count(p) != 1 and p not in useless_provides:
useless_provides.append(p)
for p in useless_provides:
@@ -1003,6 +1006,10 @@ the Release tag.''',
@@ -1048,6 +1051,10 @@ the Release tag.''',
'''There is no Name tag in your package. You have to specify a name using the
Name tag.''',

View File

@ -1,22 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:38 +0200
Subject: [PATCH] sourced-dirs.diff
===================================================================
---
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 4a698cd..1011a25 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -642,7 +642,7 @@ manifest_perl_regex = re.compile('^/usr/share/doc/perl-.*/MANIFEST(\.SKIP)?$')
shebang_regex = re.compile(b'^#!\s*(\S+)')
interpreter_regex = re.compile('^/(usr/)?(s?bin|games|libexec(/.+)?|(lib(64)?|share)/.+)/[^/]+$')
script_regex = re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/')
-sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d)/')
+sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d|/sbin/conf.d)/')
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
skipdocs_regex = re.compile(Config.getOption('SkipDocsRegexp', '\.(?:rtf|x?html?|svg|ml[ily]?)$'), re.IGNORECASE)
meta_package_regex = re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-'))

View File

@ -7,11 +7,11 @@ Subject: [PATCH] stricter-interpreter-check.diff
FilesCheck.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 59901e7..6c322c6 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -1268,7 +1268,8 @@ class FilesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.9/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.9.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.9/FilesCheck.py
@@ -853,7 +853,8 @@ class FilesCheck(AbstractCheck.AbstractC
f.endswith('.la')):
printError(pkg, 'script-without-shebang', f)
@ -19,5 +19,5 @@ index 59901e7..6c322c6 100644
+ if not mode_is_exec and not is_doc and \
+ interpreter and interpreter.startswith("/"):
printError(pkg, 'non-executable-script', f,
"%o" % perm, interpreter)
if b'\r' in chunk:
"%o" % perm, interpreter,
interpreter_args)

View File

@ -7,31 +7,31 @@ Subject: [PATCH] suse-binarieschecks.diff
BinariesCheck.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 56 insertions(+), 2 deletions(-)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index d2ed87a..2e5758e 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -14,7 +14,7 @@ import sys
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
@@ -16,7 +16,7 @@ import rpm
import rpm
-from Filter import addDetails, printError, printWarning
+from Filter import addDetails, printError, printWarning, printInfo
import AbstractCheck
import Config
-from Filter import addDetails, printError, printWarning
+from Filter import addDetails, printError, printWarning, printInfo
import Pkg
@@ -53,6 +53,10 @@ class BinaryInfo:
unused_regex = re.compile('^\s+(\S+)')
exit_call_regex = create_regexp_call('_?exit')
fork_call_regex = create_regexp_call('fork')
@@ -56,6 +56,10 @@ class BinaryInfo(object):
chroot_call_regex = create_regexp_call('chroot')
# 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
objdump_call_regex = re.compile(br'callq?\s(.*)')
+ debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+')
+ symtab_regex=re.compile('^\s+\[\s*\d+\]\s+\.symtab\s+')
+ gethostbyname_call_regex = create_regexp_call(['gethostbyname', 'gethostbyname2',
+ 'gethostbyaddr', 'gethostbyname_r', 'gethostbyname2_r', 'gethostbyaddr_r'])
# regexp for setgid setegid setresgid set(?:res|e)?gid
setgid_call_regex = create_regexp_call(['setresgid', 'setegid', 'setgid'])
setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
@@ -86,7 +89,10 @@ class BinaryInfo:
forbidden_functions = Config.getOption("WarnOnFunction")
if forbidden_functions:
@@ -84,7 +88,10 @@ class BinaryInfo(object):
self.exec_stack = False
self.exit_calls = []
self.forbidden_calls = []
@ -42,7 +42,7 @@ index d2ed87a..2e5758e 100644
self.tail = ''
self.setgid = False
@@ -160,6 +166,11 @@ class BinaryInfo:
@@ -167,6 +174,11 @@ class BinaryInfo(object):
if ret:
self.forbidden_calls.append(r_name)
@ -54,7 +54,7 @@ index d2ed87a..2e5758e 100644
if is_shlib:
r = BinaryInfo.exit_call_regex.search(l)
if r:
@@ -170,6 +181,14 @@ class BinaryInfo:
@@ -177,6 +189,14 @@ class BinaryInfo(object):
fork_called = True
continue
@ -69,7 +69,7 @@ index d2ed87a..2e5758e 100644
# check if we don't have a string that will automatically
# waive the presence of a forbidden call
if self.forbidden_calls:
@@ -382,13 +401,26 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
@@ -392,13 +412,26 @@ class BinariesCheck(AbstractCheck.Abstra
continue
# stripped ?
@ -97,7 +97,7 @@ index d2ed87a..2e5758e 100644
if is_shlib:
has_lib = True
@@ -443,6 +475,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
@@ -453,6 +486,10 @@ class BinariesCheck(AbstractCheck.Abstra
printWarning(pkg, ec, fname,
BinaryInfo.forbidden_functions[ec]['f_name'])
@ -108,7 +108,7 @@ index d2ed87a..2e5758e 100644
# rpath ?
if bin_info.rpath:
for p in bin_info.rpath:
@@ -650,6 +686,14 @@ with the intended shared libraries only.''',
@@ -666,6 +703,14 @@ with the intended shared libraries only.
'ldd-failed',
'''Executing ldd on this file failed, all checks could not be run.''',
@ -123,7 +123,7 @@ index d2ed87a..2e5758e 100644
'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
@@ -662,6 +706,10 @@ don\'t define a proper .note.GNU-stack section.''',
@@ -678,6 +723,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.''',
@ -134,7 +134,7 @@ index d2ed87a..2e5758e 100644
'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
@@ -680,6 +728,12 @@ that use prelink, make sure that prelink does not strip it either, usually by
@@ -696,6 +745,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''',

View File

@ -7,11 +7,11 @@ Subject: [PATCH] suse-check-optional-dependencies.diff
FilesCheck.py | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/FilesCheck.py b/FilesCheck.py
index cdffaea..aa1fa25 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -927,6 +927,16 @@ class FilesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.10/FilesCheck.py
@@ -535,6 +535,16 @@ class FilesCheck(AbstractCheck.AbstractC
if res.group(1) != pkg.name:
printError(pkg, 'incoherent-logrotate-file', f)
@ -28,7 +28,7 @@ index cdffaea..aa1fa25 100644
if link != '':
ext = compr_regex.search(link)
if ext:
@@ -1723,6 +1733,24 @@ consequences), or other compiler flags which result in rpmbuild's debuginfo
@@ -1338,6 +1348,24 @@ consequences), or other compiler flags w
extraction not working as expected. Verify that the binaries are not
unexpectedly stripped and that the intended compiler flags are used.''',

View File

@ -1,501 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:38 +0200
Subject: [PATCH] suse-filesystem.diff
===================================================================
---
FilesCheck.py | 454 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 437 insertions(+), 17 deletions(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 777f8aa..14ef030 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -102,24 +102,415 @@ STANDARD_DIRS = (
'/usr/local/man/mann',
'/usr/local/sbin',
'/usr/local/share',
- '/usr/local/share/man',
- '/usr/local/share/man/man1',
- '/usr/local/share/man/man2',
- '/usr/local/share/man/man3',
- '/usr/local/share/man/man4',
- '/usr/local/share/man/man5',
- '/usr/local/share/man/man6',
- '/usr/local/share/man/man7',
- '/usr/local/share/man/man8',
- '/usr/local/share/man/man9',
- '/usr/local/share/man/mann',
'/usr/local/src',
'/usr/sbin',
'/usr/share',
+ '/usr/share/applications',
'/usr/share/dict',
'/usr/share/doc',
+ '/usr/share/doc/packages',
+ '/usr/share/fonts',
+ '/usr/share/games',
'/usr/share/icons',
'/usr/share/info',
+ '/usr/share/java',
+ '/usr/share/locale',
+ '/usr/share/locale/aa',
+ '/usr/share/locale/aa/LC_MESSAGES',
+ '/usr/share/locale/af',
+ '/usr/share/locale/af/LC_MESSAGES',
+ '/usr/share/locale/am',
+ '/usr/share/locale/am/LC_MESSAGES',
+ '/usr/share/locale/ang',
+ '/usr/share/locale/ang/LC_MESSAGES',
+ '/usr/share/locale/ar',
+ '/usr/share/locale/ar/LC_MESSAGES',
+ '/usr/share/locale/as',
+ '/usr/share/locale/as/LC_MESSAGES',
+ '/usr/share/locale/az',
+ '/usr/share/locale/az/LC_MESSAGES',
+ '/usr/share/locale/az_IR',
+ '/usr/share/locale/az_IR/LC_MESSAGES',
+ '/usr/share/locale/be',
+ '/usr/share/locale/be/LC_MESSAGES',
+ '/usr/share/locale/be@latin',
+ '/usr/share/locale/be@latin/LC_MESSAGES',
+ '/usr/share/locale/bg',
+ '/usr/share/locale/bg/LC_MESSAGES',
+ '/usr/share/locale/bn',
+ '/usr/share/locale/bn/LC_MESSAGES',
+ '/usr/share/locale/bn_IN',
+ '/usr/share/locale/bn_IN/LC_MESSAGES',
+ '/usr/share/locale/bo',
+ '/usr/share/locale/bo/LC_MESSAGES',
+ '/usr/share/locale/br',
+ '/usr/share/locale/br/LC_MESSAGES',
+ '/usr/share/locale/bs',
+ '/usr/share/locale/bs/LC_MESSAGES',
+ '/usr/share/locale/byn',
+ '/usr/share/locale/byn/LC_MESSAGES',
+ '/usr/share/locale/ca',
+ '/usr/share/locale/ca/LC_MESSAGES',
+ '/usr/share/locale/ca@valencia',
+ '/usr/share/locale/ca@valencia/LC_MESSAGES',
+ '/usr/share/locale/cs',
+ '/usr/share/locale/cs/LC_MESSAGES',
+ '/usr/share/locale/cs_CZ',
+ '/usr/share/locale/cs_CZ/LC_MESSAGES',
+ '/usr/share/locale/cy',
+ '/usr/share/locale/cy/LC_MESSAGES',
+ '/usr/share/locale/da',
+ '/usr/share/locale/da/LC_MESSAGES',
+ '/usr/share/locale/de',
+ '/usr/share/locale/de/LC_MESSAGES',
+ '/usr/share/locale/de_AT',
+ '/usr/share/locale/de_AT/LC_MESSAGES',
+ '/usr/share/locale/de_CH',
+ '/usr/share/locale/de_CH/LC_MESSAGES',
+ '/usr/share/locale/de_DE',
+ '/usr/share/locale/de_DE/LC_MESSAGES',
+ '/usr/share/locale/dv',
+ '/usr/share/locale/dv/LC_MESSAGES',
+ '/usr/share/locale/dz',
+ '/usr/share/locale/dz/LC_MESSAGES',
+ '/usr/share/locale/ee',
+ '/usr/share/locale/ee/LC_MESSAGES',
+ '/usr/share/locale/el',
+ '/usr/share/locale/el/LC_MESSAGES',
+ '/usr/share/locale/el_GR',
+ '/usr/share/locale/el_GR/LC_MESSAGES',
+ '/usr/share/locale/en',
+ '/usr/share/locale/en/LC_MESSAGES',
+ '/usr/share/locale/en@IPA',
+ '/usr/share/locale/en@IPA/LC_MESSAGES',
+ '/usr/share/locale/en@boldquot',
+ '/usr/share/locale/en@boldquot/LC_MESSAGES',
+ '/usr/share/locale/en@quot',
+ '/usr/share/locale/en@quot/LC_MESSAGES',
+ '/usr/share/locale/en_AU',
+ '/usr/share/locale/en_AU/LC_MESSAGES',
+ '/usr/share/locale/en_CA',
+ '/usr/share/locale/en_CA/LC_MESSAGES',
+ '/usr/share/locale/en_GB',
+ '/usr/share/locale/en_GB/LC_MESSAGES',
+ '/usr/share/locale/en_US',
+ '/usr/share/locale/en_US/LC_MESSAGES',
+ '/usr/share/locale/eo',
+ '/usr/share/locale/eo/LC_MESSAGES',
+ '/usr/share/locale/es',
+ '/usr/share/locale/es/LC_MESSAGES',
+ '/usr/share/locale/es_AR',
+ '/usr/share/locale/es_AR/LC_MESSAGES',
+ '/usr/share/locale/es_CL',
+ '/usr/share/locale/es_CL/LC_MESSAGES',
+ '/usr/share/locale/es_CO',
+ '/usr/share/locale/es_CO/LC_MESSAGES',
+ '/usr/share/locale/es_CR',
+ '/usr/share/locale/es_CR/LC_MESSAGES',
+ '/usr/share/locale/es_DO',
+ '/usr/share/locale/es_DO/LC_MESSAGES',
+ '/usr/share/locale/es_EC',
+ '/usr/share/locale/es_EC/LC_MESSAGES',
+ '/usr/share/locale/es_ES',
+ '/usr/share/locale/es_ES/LC_MESSAGES',
+ '/usr/share/locale/es_GT',
+ '/usr/share/locale/es_GT/LC_MESSAGES',
+ '/usr/share/locale/es_HN',
+ '/usr/share/locale/es_HN/LC_MESSAGES',
+ '/usr/share/locale/es_MX',
+ '/usr/share/locale/es_MX/LC_MESSAGES',
+ '/usr/share/locale/es_NI',
+ '/usr/share/locale/es_NI/LC_MESSAGES',
+ '/usr/share/locale/es_PA',
+ '/usr/share/locale/es_PA/LC_MESSAGES',
+ '/usr/share/locale/es_PE',
+ '/usr/share/locale/es_PE/LC_MESSAGES',
+ '/usr/share/locale/es_PR',
+ '/usr/share/locale/es_PR/LC_MESSAGES',
+ '/usr/share/locale/es_SV',
+ '/usr/share/locale/es_SV/LC_MESSAGES',
+ '/usr/share/locale/es_UY',
+ '/usr/share/locale/es_UY/LC_MESSAGES',
+ '/usr/share/locale/es_VE',
+ '/usr/share/locale/es_VE/LC_MESSAGES',
+ '/usr/share/locale/et',
+ '/usr/share/locale/et/LC_MESSAGES',
+ '/usr/share/locale/et_EE',
+ '/usr/share/locale/et_EE/LC_MESSAGES',
+ '/usr/share/locale/eu',
+ '/usr/share/locale/eu/LC_MESSAGES',
+ '/usr/share/locale/eu_ES',
+ '/usr/share/locale/eu_ES/LC_MESSAGES',
+ '/usr/share/locale/fa',
+ '/usr/share/locale/fa/LC_MESSAGES',
+ '/usr/share/locale/fi',
+ '/usr/share/locale/fi/LC_MESSAGES',
+ '/usr/share/locale/fi_FI',
+ '/usr/share/locale/fi_FI/LC_MESSAGES',
+ '/usr/share/locale/fo',
+ '/usr/share/locale/fo/LC_MESSAGES',
+ '/usr/share/locale/fr',
+ '/usr/share/locale/fr/LC_MESSAGES',
+ '/usr/share/locale/fr_CA',
+ '/usr/share/locale/fr_CA/LC_MESSAGES',
+ '/usr/share/locale/fr_CH',
+ '/usr/share/locale/fr_CH/LC_MESSAGES',
+ '/usr/share/locale/fr_FR',
+ '/usr/share/locale/fr_FR/LC_MESSAGES',
+ '/usr/share/locale/fy',
+ '/usr/share/locale/fy/LC_MESSAGES',
+ '/usr/share/locale/ga',
+ '/usr/share/locale/ga/LC_MESSAGES',
+ '/usr/share/locale/gd',
+ '/usr/share/locale/gd/LC_MESSAGES',
+ '/usr/share/locale/gez',
+ '/usr/share/locale/gez/LC_MESSAGES',
+ '/usr/share/locale/gl',
+ '/usr/share/locale/gl/LC_MESSAGES',
+ '/usr/share/locale/gn',
+ '/usr/share/locale/gn/LC_MESSAGES',
+ '/usr/share/locale/gr',
+ '/usr/share/locale/gr/LC_MESSAGES',
+ '/usr/share/locale/gu',
+ '/usr/share/locale/gu/LC_MESSAGES',
+ '/usr/share/locale/gv',
+ '/usr/share/locale/gv/LC_MESSAGES',
+ '/usr/share/locale/haw',
+ '/usr/share/locale/haw/LC_MESSAGES',
+ '/usr/share/locale/he',
+ '/usr/share/locale/he/LC_MESSAGES',
+ '/usr/share/locale/hi',
+ '/usr/share/locale/hi/LC_MESSAGES',
+ '/usr/share/locale/hr',
+ '/usr/share/locale/hr/LC_MESSAGES',
+ '/usr/share/locale/hu',
+ '/usr/share/locale/hu/LC_MESSAGES',
+ '/usr/share/locale/hy',
+ '/usr/share/locale/hy/LC_MESSAGES',
+ '/usr/share/locale/ia',
+ '/usr/share/locale/ia/LC_MESSAGES',
+ '/usr/share/locale/id',
+ '/usr/share/locale/id/LC_MESSAGES',
+ '/usr/share/locale/is',
+ '/usr/share/locale/is/LC_MESSAGES',
+ '/usr/share/locale/it',
+ '/usr/share/locale/it/LC_MESSAGES',
+ '/usr/share/locale/it_CH',
+ '/usr/share/locale/it_CH/LC_MESSAGES',
+ '/usr/share/locale/it_IT',
+ '/usr/share/locale/it_IT/LC_MESSAGES',
+ '/usr/share/locale/iu',
+ '/usr/share/locale/iu/LC_MESSAGES',
+ '/usr/share/locale/ja',
+ '/usr/share/locale/ja/LC_MESSAGES',
+ '/usr/share/locale/ja_JP.EUC',
+ '/usr/share/locale/ja_JP.EUC/LC_MESSAGES',
+ '/usr/share/locale/ja_JP.SJIS',
+ '/usr/share/locale/ja_JP.SJIS/LC_MESSAGES',
+ '/usr/share/locale/ja_JP.eucJP',
+ '/usr/share/locale/ja_JP.eucJP/LC_MESSAGES',
+ '/usr/share/locale/ka',
+ '/usr/share/locale/ka/LC_MESSAGES',
+ '/usr/share/locale/kk',
+ '/usr/share/locale/kk/LC_MESSAGES',
+ '/usr/share/locale/kl',
+ '/usr/share/locale/kl/LC_MESSAGES',
+ '/usr/share/locale/km',
+ '/usr/share/locale/km/LC_MESSAGES',
+ '/usr/share/locale/kn',
+ '/usr/share/locale/kn/LC_MESSAGES',
+ '/usr/share/locale/ko',
+ '/usr/share/locale/ko/LC_MESSAGES',
+ '/usr/share/locale/kok',
+ '/usr/share/locale/kok/LC_MESSAGES',
+ '/usr/share/locale/ku',
+ '/usr/share/locale/ku/LC_MESSAGES',
+ '/usr/share/locale/kw',
+ '/usr/share/locale/kw/LC_MESSAGES',
+ '/usr/share/locale/ky',
+ '/usr/share/locale/ky/LC_MESSAGES',
+ '/usr/share/locale/lg',
+ '/usr/share/locale/lg/LC_MESSAGES',
+ '/usr/share/locale/li',
+ '/usr/share/locale/li/LC_MESSAGES',
+ '/usr/share/locale/lo',
+ '/usr/share/locale/lo/LC_MESSAGES',
+ '/usr/share/locale/lt',
+ '/usr/share/locale/lt/LC_MESSAGES',
+ '/usr/share/locale/lv',
+ '/usr/share/locale/lv/LC_MESSAGES',
+ '/usr/share/locale/mg',
+ '/usr/share/locale/mg/LC_MESSAGES',
+ '/usr/share/locale/mi',
+ '/usr/share/locale/mi/LC_MESSAGES',
+ '/usr/share/locale/mk',
+ '/usr/share/locale/mk/LC_MESSAGES',
+ '/usr/share/locale/ml',
+ '/usr/share/locale/ml/LC_MESSAGES',
+ '/usr/share/locale/mn',
+ '/usr/share/locale/mn/LC_MESSAGES',
+ '/usr/share/locale/mr',
+ '/usr/share/locale/mr/LC_MESSAGES',
+ '/usr/share/locale/ms',
+ '/usr/share/locale/ms/LC_MESSAGES',
+ '/usr/share/locale/mt',
+ '/usr/share/locale/mt/LC_MESSAGES',
+ '/usr/share/locale/my',
+ '/usr/share/locale/my/LC_MESSAGES',
+ '/usr/share/locale/nb',
+ '/usr/share/locale/nb/LC_MESSAGES',
+ '/usr/share/locale/nb_NO',
+ '/usr/share/locale/nb_NO/LC_MESSAGES',
+ '/usr/share/locale/nds',
+ '/usr/share/locale/nds/LC_MESSAGES',
+ '/usr/share/locale/ne',
+ '/usr/share/locale/ne/LC_MESSAGES',
+ '/usr/share/locale/nl',
+ '/usr/share/locale/nl/LC_MESSAGES',
+ '/usr/share/locale/nl_BE',
+ '/usr/share/locale/nl_BE/LC_MESSAGES',
+ '/usr/share/locale/nn',
+ '/usr/share/locale/nn/LC_MESSAGES',
+ '/usr/share/locale/nn_NO',
+ '/usr/share/locale/nn_NO/LC_MESSAGES',
+ '/usr/share/locale/nso',
+ '/usr/share/locale/nso/LC_MESSAGES',
+ '/usr/share/locale/oc',
+ '/usr/share/locale/oc/LC_MESSAGES',
+ '/usr/share/locale/om',
+ '/usr/share/locale/om/LC_MESSAGES',
+ '/usr/share/locale/or',
+ '/usr/share/locale/or/LC_MESSAGES',
+ '/usr/share/locale/pa',
+ '/usr/share/locale/pa/LC_MESSAGES',
+ '/usr/share/locale/pl',
+ '/usr/share/locale/pl/LC_MESSAGES',
+ '/usr/share/locale/pl_PL',
+ '/usr/share/locale/pl_PL/LC_MESSAGES',
+ '/usr/share/locale/ps',
+ '/usr/share/locale/ps/LC_MESSAGES',
+ '/usr/share/locale/pt',
+ '/usr/share/locale/pt/LC_MESSAGES',
+ '/usr/share/locale/pt_BR',
+ '/usr/share/locale/pt_BR/LC_MESSAGES',
+ '/usr/share/locale/pt_PT',
+ '/usr/share/locale/pt_PT/LC_MESSAGES',
+ '/usr/share/locale/rm',
+ '/usr/share/locale/rm/LC_MESSAGES',
+ '/usr/share/locale/ro',
+ '/usr/share/locale/ro/LC_MESSAGES',
+ '/usr/share/locale/ru',
+ '/usr/share/locale/ru/LC_MESSAGES',
+ '/usr/share/locale/ru_RU',
+ '/usr/share/locale/ru_RU/LC_MESSAGES',
+ '/usr/share/locale/ru_UA.koi8u',
+ '/usr/share/locale/ru_UA.koi8u/LC_MESSAGES',
+ '/usr/share/locale/rw',
+ '/usr/share/locale/rw/LC_MESSAGES',
+ '/usr/share/locale/sa',
+ '/usr/share/locale/sa/LC_MESSAGES',
+ '/usr/share/locale/se',
+ '/usr/share/locale/se/LC_MESSAGES',
+ '/usr/share/locale/si',
+ '/usr/share/locale/si/LC_MESSAGES',
+ '/usr/share/locale/sid',
+ '/usr/share/locale/sid/LC_MESSAGES',
+ '/usr/share/locale/sk',
+ '/usr/share/locale/sk/LC_MESSAGES',
+ '/usr/share/locale/sl',
+ '/usr/share/locale/sl/LC_MESSAGES',
+ '/usr/share/locale/sl_SI',
+ '/usr/share/locale/sl_SI/LC_MESSAGES',
+ '/usr/share/locale/so',
+ '/usr/share/locale/so/LC_MESSAGES',
+ '/usr/share/locale/sp',
+ '/usr/share/locale/sp/LC_MESSAGES',
+ '/usr/share/locale/sq',
+ '/usr/share/locale/sq/LC_MESSAGES',
+ '/usr/share/locale/sq_AL',
+ '/usr/share/locale/sq_AL/LC_MESSAGES',
+ '/usr/share/locale/sr',
+ '/usr/share/locale/sr/LC_MESSAGES',
+ '/usr/share/locale/sr@Latn',
+ '/usr/share/locale/sr@Latn/LC_MESSAGES',
+ '/usr/share/locale/sr@ije',
+ '/usr/share/locale/sr@ije/LC_MESSAGES',
+ '/usr/share/locale/ss',
+ '/usr/share/locale/ss/LC_MESSAGES',
+ '/usr/share/locale/st',
+ '/usr/share/locale/st/LC_MESSAGES',
+ '/usr/share/locale/sv',
+ '/usr/share/locale/sv/LC_MESSAGES',
+ '/usr/share/locale/sw',
+ '/usr/share/locale/sw/LC_MESSAGES',
+ '/usr/share/locale/syr',
+ '/usr/share/locale/syr/LC_MESSAGES',
+ '/usr/share/locale/ta',
+ '/usr/share/locale/ta/LC_MESSAGES',
+ '/usr/share/locale/te',
+ '/usr/share/locale/te/LC_MESSAGES',
+ '/usr/share/locale/tg',
+ '/usr/share/locale/tg/LC_MESSAGES',
+ '/usr/share/locale/th',
+ '/usr/share/locale/th/LC_MESSAGES',
+ '/usr/share/locale/ti',
+ '/usr/share/locale/ti/LC_MESSAGES',
+ '/usr/share/locale/tig',
+ '/usr/share/locale/tig/LC_MESSAGES',
+ '/usr/share/locale/tk',
+ '/usr/share/locale/tk/LC_MESSAGES',
+ '/usr/share/locale/tl',
+ '/usr/share/locale/tl/LC_MESSAGES',
+ '/usr/share/locale/tr',
+ '/usr/share/locale/tr/LC_MESSAGES',
+ '/usr/share/locale/tt',
+ '/usr/share/locale/tt/LC_MESSAGES',
+ '/usr/share/locale/ug',
+ '/usr/share/locale/ug/LC_MESSAGES',
+ '/usr/share/locale/uk',
+ '/usr/share/locale/uk/LC_MESSAGES',
+ '/usr/share/locale/uk_UA',
+ '/usr/share/locale/uk_UA/LC_MESSAGES',
+ '/usr/share/locale/ur',
+ '/usr/share/locale/ur/LC_MESSAGES',
+ '/usr/share/locale/urd',
+ '/usr/share/locale/urd/LC_MESSAGES',
+ '/usr/share/locale/uz',
+ '/usr/share/locale/uz/LC_MESSAGES',
+ '/usr/share/locale/uz@cyrillic',
+ '/usr/share/locale/uz@cyrillic/LC_MESSAGES',
+ '/usr/share/locale/ve',
+ '/usr/share/locale/ve/LC_MESSAGES',
+ '/usr/share/locale/ven',
+ '/usr/share/locale/ven/LC_MESSAGES',
+ '/usr/share/locale/vi',
+ '/usr/share/locale/vi/LC_MESSAGES',
+ '/usr/share/locale/wa',
+ '/usr/share/locale/wa/LC_MESSAGES',
+ '/usr/share/locale/wal',
+ '/usr/share/locale/wal/LC_MESSAGES',
+ '/usr/share/locale/wo',
+ '/usr/share/locale/wo/LC_MESSAGES',
+ '/usr/share/locale/xh',
+ '/usr/share/locale/xh/LC_MESSAGES',
+ '/usr/share/locale/yi',
+ '/usr/share/locale/yi/LC_MESSAGES',
+ '/usr/share/locale/yo',
+ '/usr/share/locale/yo/LC_MESSAGES',
+ '/usr/share/locale/zh',
+ '/usr/share/locale/zh/LC_MESSAGES',
+ '/usr/share/locale/zh_CN',
+ '/usr/share/locale/zh_CN.GB2312',
+ '/usr/share/locale/zh_CN.GB2312/LC_MESSAGES',
+ '/usr/share/locale/zh_CN/LC_MESSAGES',
+ '/usr/share/locale/zh_HK',
+ '/usr/share/locale/zh_HK/LC_MESSAGES',
+ '/usr/share/locale/zh_TW',
+ '/usr/share/locale/zh_TW.Big5',
+ '/usr/share/locale/zh_TW.Big5/LC_MESSAGES',
+ '/usr/share/locale/zh_TW/LC_MESSAGES',
+ '/usr/share/locale/zu',
+ '/usr/share/locale/zu/LC_MESSAGES',
'/usr/share/man',
'/usr/share/man/man1',
'/usr/share/man/man2',
@@ -131,25 +522,54 @@ STANDARD_DIRS = (
'/usr/share/man/man8',
'/usr/share/man/man9',
'/usr/share/man/mann',
+ '/usr/share/mime',
+ '/usr/share/mime/packages',
'/usr/share/misc',
+ '/usr/share/nls',
+ '/usr/share/pixmaps',
+ '/usr/share/pkgconfig',
+ '/usr/share/sgml',
+ '/usr/share/sgml/docbook',
+ '/usr/share/sounds',
+ '/usr/share/themes',
+ '/usr/share/tmac',
+ '/usr/share/xml',
+ '/usr/share/xml/docbook',
+ '/usr/share/xsessions',
'/usr/src',
+ '/usr/src/packages',
'/usr/tmp',
'/var',
+ '/var/X11R6',
+ '/var/adm',
+ '/var/adm/backup',
+ '/var/adm/backup/rpmdb',
+ '/var/adm/backup/sysconfig',
+ '/var/adm/fillup-templates',
+ '/var/adm/perl-modules',
'/var/cache',
- '/var/db',
+ '/var/cache/fonts',
+ '/var/cache/man',
+ '/var/games',
'/var/lib',
- '/var/lib/games',
+ '/var/lib/empty',
'/var/lib/misc',
- '/var/lib/rpm',
- '/var/local',
+ '/var/lib/news',
+ '/var/lib/nobody',
+ '/var/lib/pam_devperm',
+ '/var/lib/wwwrun',
'/var/log',
'/var/mail',
- '/var/nis',
'/var/opt',
- '/var/preserve',
'/var/spool',
+ '/var/spool/clientmqueue',
+ '/var/spool/locks',
+ '/var/spool/lpd',
'/var/spool/mail',
+ '/var/spool/uucp',
+ '/var/spool/uucp/uucp',
'/var/tmp',
+ '/var/tmp/vi.recover',
)
DEFAULT_GAMES_GROUPS = 'Games'

View File

@ -7,11 +7,11 @@ Subject: [PATCH] suse-filter-exception.diff
Config.py | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 54 insertions(+), 7 deletions(-)
diff --git a/Config.py b/Config.py
index f27607c..b4e19cc 100644
--- a/Config.py
+++ b/Config.py
@@ -111,12 +111,23 @@ def getOption(name, default=""):
Index: rpmlint-rpmlint-1.10/Config.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/Config.py
+++ rpmlint-rpmlint-1.10/Config.py
@@ -114,12 +114,23 @@ def getOption(name, default=""):
_filters = []
_filters_re = None
@ -37,7 +37,7 @@ index f27607c..b4e19cc 100644
def removeFilter(s):
@@ -133,8 +144,13 @@ _scoring = {}
@@ -137,8 +148,13 @@ _scoring = {}
def setBadness(s, score):
@ -51,7 +51,7 @@ index f27607c..b4e19cc 100644
def badness(s):
return _scoring.get(s, 0)
@@ -144,11 +160,24 @@ _non_named_group_re = re.compile('[^\\](\()[^:]')
@@ -149,11 +165,24 @@ _non_named_group_re = re.compile(r'[^\\]
def isFiltered(s):
global _filters_re
@ -80,7 +80,7 @@ index f27607c..b4e19cc 100644
_filters_re = '(?:' + _filters[0] + ')'
for idx in range(1, len(_filters)):
@@ -160,9 +189,27 @@ def isFiltered(s):
@@ -165,9 +194,27 @@ def isFiltered(s):
_filters_re = _filters_re + '|(?:' + _filters[idx] + ')'
_filters_re = re.compile(_filters_re)

View File

@ -7,10 +7,10 @@ Subject: [PATCH] suse-filter-more-verbose.diff
Config.py | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/Config.py b/Config.py
index b4e19cc..c29db24 100644
--- a/Config.py
+++ b/Config.py
Index: rpmlint-rpmlint-1.10/Config.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/Config.py
+++ rpmlint-rpmlint-1.10/Config.py
@@ -10,6 +10,7 @@
import locale
import os.path
@ -19,7 +19,7 @@ index b4e19cc..c29db24 100644
try:
from __version__ import __version__
@@ -175,7 +176,17 @@ def isFiltered(s):
@@ -180,7 +181,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] +')'
@ -38,7 +38,7 @@ index b4e19cc..c29db24 100644
if _filters_re == None and len(_filters):
_filters_re = '(?:' + _filters[0] + ')'
@@ -187,7 +198,17 @@ def isFiltered(s):
@@ -192,7 +203,17 @@ def isFiltered(s):
if '(' in _filters[idx]:
_non_named_group_re.subn('(:?', _filters[idx])
_filters_re = _filters_re + '|(?:' + _filters[idx] + ')'

View File

@ -1,22 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:40 +0200
Subject: [PATCH] suse-g-ir-chech.diff
===================================================================
---
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 6c322c6..24029f1 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -607,7 +607,7 @@ points_regex = re.compile('^\.\./(.*)')
doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help')
bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
-develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
+develfile_regex = re.compile('\.(a|cmxa?|mli?|gir)$')
buildconfigfile_regex = re.compile('(\.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...

View File

@ -7,11 +7,11 @@ Subject: [PATCH] suse-ignore-specfile-errors.diff
SpecCheck.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/SpecCheck.py b/SpecCheck.py
index 4dafdb9..5149dc3 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -563,9 +563,8 @@ class SpecCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/SpecCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
+++ rpmlint-rpmlint-1.10/SpecCheck.py
@@ -559,9 +559,8 @@ class SpecCheck(AbstractCheck.AbstractCh
printWarning(pkg, "patch-not-applied",
"Patch%d:" % pnum, pfile)

View File

@ -7,11 +7,11 @@ Subject: [PATCH] suse-manpages-for-rc-scripts
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 806b886..81c5680 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -1429,7 +1429,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/FilesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
+++ rpmlint-rpmlint-1.10/FilesCheck.py
@@ -1031,7 +1031,7 @@ class FilesCheck(AbstractCheck.AbstractC
for exe, paths in bindir_exes.items():
if len(paths) > 1:
printWarning(pkg, "duplicate-executable", exe, paths)
@ -19,4 +19,4 @@ index 806b886..81c5680 100644
+ if exe not in man_basenames and not exe.startswith("rc") and len(paths) is not 0:
printWarning(pkg, "no-manual-page-for-binary", exe)
# Create an object to enable the auto registration of the test

View File

@ -7,11 +7,11 @@ Subject: [PATCH] suse-no-run-ldconfig.diff
SpecCheck.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/SpecCheck.py b/SpecCheck.py
index 8fc6e94..0d77a03 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -449,6 +449,10 @@ class SpecCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/SpecCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
+++ rpmlint-rpmlint-1.10/SpecCheck.py
@@ -454,6 +454,10 @@ class SpecCheck(AbstractCheck.AbstractCh
'comparison-operator-in-deptoken',
conf)
@ -22,7 +22,7 @@ index 8fc6e94..0d77a03 100644
if current_section == 'changelog':
for match in AbstractCheck.macro_regex.findall(line):
res = re.match('%+', match)
@@ -774,6 +778,14 @@ may break short circuit builds.''',
@@ -771,6 +775,14 @@ may break short circuit builds.''',
'''Make check or other automated regression test should be run in %check, as
they can be disabled with a rpm macro for short circuiting purposes.''',

View File

@ -7,19 +7,19 @@ Subject: [PATCH] suse-pkg-config-check.diff
TagsCheck.py | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/TagsCheck.py b/TagsCheck.py
index 01ef3ee..e161aec 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -416,6 +416,7 @@ lib_devel_number_regex = re.compile('^lib(.*?)([0-9.]+)(_[0-9.]+)?-devel')
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -416,6 +416,7 @@ lib_devel_number_regex = re.compile(r'^l
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
leading_space_regex = re.compile('^\s+')
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('^/usr/(?:lib\d*|share)/pkgconfig/')
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
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
@@ -634,10 +635,12 @@ class TagsCheck(AbstractCheck.AbstractCheck):
@@ -635,10 +636,12 @@ class TagsCheck(AbstractCheck.AbstractCh
base = is_devel.group(1)
dep = None
has_so = False
@ -33,7 +33,7 @@ index 01ef3ee..e161aec 100644
if has_so:
base_or_libs = base + '/' + base + '-libs/lib' + base
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
@@ -674,6 +677,15 @@ class TagsCheck(AbstractCheck.AbstractCheck):
@@ -675,6 +678,15 @@ class TagsCheck(AbstractCheck.AbstractCh
if prov not in (x[0] for x in pkg.provides()):
printWarning(pkg, 'no-provides', prov)
@ -49,7 +49,7 @@ index 01ef3ee..e161aec 100644
# List of words to ignore in spell check
ignored_words = set()
for pf in pkg.files():
@@ -1107,6 +1119,11 @@ once.''',
@@ -1108,6 +1120,11 @@ once.''',
'no-url-tag',
'''The URL tag is missing. Please add a http or ftp link to the project location.''',

View File

@ -7,12 +7,12 @@ Subject: [PATCH] suse-python3-naming-policy.diff
NamingPolicyCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NamingPolicyCheck.py b/NamingPolicyCheck.py
index 231b936..96fb91d 100644
--- a/NamingPolicyCheck.py
+++ b/NamingPolicyCheck.py
@@ -90,7 +90,7 @@ check = NamingPolicyCheck()
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])?')

View File

@ -1,24 +0,0 @@
From 0d93fa7656cb68c63c11d451d7894cac17af33e2 Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Mon, 12 Dec 2016 20:12:46 +0100
Subject: [PATCH] Readd dropped '$' in regex, fix broken check on devel
dependency
The current regex also maches "Requires: libzork-data", although it should only match e.g. "libzork1" or "zork-libs". As the latter sorts after "libzork-data", an existing correct dependency may be missed.
---
TagsCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TagsCheck.py b/TagsCheck.py
index fa6154c..e71d90b 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -640,7 +640,7 @@ def check(self, pkg):
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(
- '^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?' % re.escape(base))
+ '^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?$' % re.escape(base))
for d in deps:
if base_or_libs_re.match(d[0]):
dep = d

View File

@ -7,20 +7,20 @@ Subject: [PATCH] suse-shlib-devel-dependency.diff
TagsCheck.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TagsCheck.py b/TagsCheck.py
index 8dccbf1..f229a28 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -642,10 +642,10 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -673,10 +673,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 + '*'
+ 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(
- '^(lib)?%s(-libs)?(\(\w+-\d+\))?$' % re.escape(base))
+ '^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?' % re.escape(base))
- 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

View File

@ -7,13 +7,13 @@ Subject: [PATCH] Handle SPDX style license exceptions
TagsCheck.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 50 insertions(+), 1 deletion(-)
Index: rpmlint-rpmlint-1.8/TagsCheck.py
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.8/TagsCheck.py
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -139,6 +139,34 @@ DEFAULT_VALID_LICENSES = (
'Shareware',
)
)
+DEFAULT_VALID_LICENSE_EXCEPTIONS = (
+ '389-exception',
@ -53,16 +53,16 @@ Index: rpmlint-rpmlint-1.8/TagsCheck.py
+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('[^>]([^ >]+)\s*$')
@@ -418,6 +447,7 @@ lib_package_regex = re.compile('(?:^(?:c
leading_space_regex = re.compile('^\s+')
changelog_version_regex = re.compile(r'[^>]([^ >]+)\s*$')
@@ -418,6 +447,7 @@ lib_package_regex = re.compile(r'(?:^(?:
leading_space_regex = re.compile(r'^\s+')
pkg_config_regex = re.compile('^/usr/(?:lib\d*|share)/pkgconfig/')
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
+license_exception_regex = re.compile('(\S+)\sWITH\s(\S+)')
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
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('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
@@ -787,6 +817,10 @@ class TagsCheck(AbstractCheck.AbstractCh
forbidden_words_regex = re.compile(r'(%s)' % Config.getOption('ForbiddenWords'), re.IGNORECASE)
@@ -788,6 +818,10 @@ class TagsCheck(AbstractCheck.AbstractCh
# printWarning(pkg, 'package-provides-itself')
# break
@ -73,7 +73,7 @@ Index: rpmlint-rpmlint-1.8/TagsCheck.py
def split_license(license):
return (x.strip() for x in
(l for l in license_regex.split(license) if l))
@@ -797,7 +831,17 @@ class TagsCheck(AbstractCheck.AbstractCh
@@ -798,7 +832,17 @@ class TagsCheck(AbstractCheck.AbstractCh
else:
valid_license = True
if rpm_license not in VALID_LICENSES:
@ -92,7 +92,7 @@ Index: rpmlint-rpmlint-1.8/TagsCheck.py
if l1 in VALID_LICENSES:
continue
for l2 in split_license(l1):
@@ -1073,6 +1117,11 @@ your specfile.''',
@@ -1074,6 +1118,11 @@ your specfile.''',
'''The value of the License tag was not recognized. Known values are:
"%s".''' % '", "'.join(VALID_LICENSES),

View File

@ -1,82 +0,0 @@
From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Fri, 10 Apr 2015 14:38:22 +0200
Subject: [PATCH] suse sysv init checks
we don't use chkconfig but have different macros
---
InitScriptCheck.py | 48 ++++++++++++++++++++++++++++++++++--------------
1 file changed, 34 insertions(+), 14 deletions(-)
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
index f9b13a1..f81a450 100644
--- a/InitScriptCheck.py
+++ b/InitScriptCheck.py
@@ -36,6 +36,10 @@ LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
RECOMMENDED_LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop',
'Default-Stop', 'Short-Description')
+suse = True
+stop_on_removal_regex=re.compile('bin/systemctl stop (?!.+\.service).+')
+restart_on_update_regex=re.compile('bin/systemctl try-restart (?!.+\.service).+')
+insserv_cleanup_regex=re.compile('^\s*/sbin/insserv /etc/init.d$', re.MULTILINE)
class InitScriptCheck(AbstractCheck.AbstractCheck):
@@ -44,6 +48,12 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
def check_binary(self, pkg):
initscript_list = []
+
+ # check chkconfig call in %post and %preun
+ postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(rpm.RPMTAG_POSTINPROG)
+ preun = pkg[rpm.RPMTAG_PREUN] or pkg.scriptprog(rpm.RPMTAG_PREUNPROG)
+ postun = pkg[rpm.RPMTAG_POSTUN] or pkg.scriptprog(rpm.RPMTAG_POSTUNPROG)
+
for fname, pkgfile in pkg.files().items():
if not fname.startswith('/etc/init.d/') and \
@@ -61,20 +71,30 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
if "." in basename:
printError(pkg, 'init-script-name-with-dot', fname)
- # check chkconfig call in %post and %preun
- postin = pkg[rpm.RPMTAG_POSTIN] or \
- pkg.scriptprog(rpm.RPMTAG_POSTINPROG)
- if not postin:
- printError(pkg, 'init-script-without-chkconfig-postin', fname)
- elif not chkconfig_regex.search(postin):
- printError(pkg, 'postin-without-chkconfig', fname)
-
- preun = pkg[rpm.RPMTAG_PREUN] or \
- pkg.scriptprog(rpm.RPMTAG_PREUNPROG)
- if not preun:
- printError(pkg, 'init-script-without-chkconfig-preun', fname)
- elif not chkconfig_regex.search(preun):
- printError(pkg, 'preun-without-chkconfig', fname)
+ if not suse:
+ # check chkconfig call in %post and %preun
+ postin = pkg[rpm.RPMTAG_POSTIN] or \
+ pkg.scriptprog(rpm.RPMTAG_POSTINPROG)
+ if not postin:
+ printError(pkg, 'init-script-without-chkconfig-postin', fname)
+ elif not chkconfig_regex.search(postin):
+ printError(pkg, 'postin-without-chkconfig', fname)
+
+ preun = pkg[rpm.RPMTAG_PREUN] or \
+ pkg.scriptprog(rpm.RPMTAG_PREUNPROG)
+ if not preun:
+ printError(pkg, 'init-script-without-chkconfig-preun', fname)
+ elif not chkconfig_regex.search(preun):
+ printError(pkg, 'preun-without-chkconfig', fname)
+ else:
+ if not preun or not stop_on_removal_regex.search(preun):
+ printError(pkg, 'init-script-without-%stop_on_removal-preun', fname)
+
+ if not postun or not restart_on_update_regex.search(postun):
+ printError(pkg, 'init-script-without-%restart_on_update-postun', fname)
+
+ if not postun or not insserv_cleanup_regex.search(postun):
+ printError(pkg, 'init-script-without-%insserv_cleanup-postun', fname)
status_found = False
reload_found = False

View File

@ -0,0 +1,47 @@
Index: rpmlint-rpmlint-1.10/test.sh
===================================================================
--- rpmlint-rpmlint-1.10.orig/test.sh
+++ rpmlint-rpmlint-1.10/test.sh
@@ -19,7 +19,13 @@ 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 "Removing Badness.."
+cp config config.backup
+sed -e "s,setOption(\"Badnes.*,," config
echo "Check that rpmlint executes with no unexpected errors"
echo "...in default locale"
@@ -40,10 +46,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.10/rpmlint
===================================================================
--- rpmlint-rpmlint-1.10.orig/rpmlint
+++ rpmlint-rpmlint-1.10/rpmlint
@@ -269,8 +269,10 @@ if not os.path.exists(os.path.expanduser
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)

View File

@ -7,11 +7,11 @@ Subject: [PATCH] suse-url-check.diff
TagsCheck.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TagsCheck.py b/TagsCheck.py
index cdb8eb4..01ef3ee 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -795,7 +795,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.9/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.9.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.9/TagsCheck.py
@@ -796,7 +796,7 @@ class TagsCheck(AbstractCheck.AbstractCh
if not valid_license:
self._unexpanded_macros(pkg, 'License', rpm_license)
@ -20,7 +20,7 @@ index cdb8eb4..01ef3ee 100644
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)
@@ -1105,7 +1105,7 @@ once.''',
@@ -1106,7 +1106,7 @@ once.''',
'''This rpm requires a specific release of another package.''',
'no-url-tag',

View File

@ -7,19 +7,19 @@ Subject: [PATCH] suse-version.diff
SpecCheck.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/SpecCheck.py b/SpecCheck.py
index b69bead..2e3ba56 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -67,6 +67,7 @@ libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
comment_or_empty_regex = re.compile('^\s*(#|$)')
defattr_regex = re.compile('^\s*%defattr\\b')
attr_regex = re.compile('^\s*%attr\\b')
Index: rpmlint-rpmlint-1.10/SpecCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
+++ rpmlint-rpmlint-1.10/SpecCheck.py
@@ -51,6 +51,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('%suse_version\s*[<>=]+\s*(\d+)')
section_regexs = dict(
([x, re.compile('^%' + x + '(?:\s|$)')]
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
@@ -388,6 +389,12 @@ class SpecCheck(AbstractCheck.AbstractCheck):
make_check_regex = re.compile(r'(^|\s|%{?__)make}?\s+(check|test)')
rm_regex = re.compile(r'(^|\s)((.*/)?rm|%{?__rm}?) ')
@@ -391,6 +392,12 @@ class SpecCheck(AbstractCheck.AbstractCh
if not res.group(1).startswith('%'):
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
@ -32,9 +32,9 @@ index b69bead..2e3ba56 100644
res = prereq_regex.search(line)
if res:
printError(pkg, 'prereq-use', res.group(2))
@@ -816,6 +823,15 @@ in the resulting binary package depending on the build environment and rpmbuild
version (typically < 4.4). Add default attributes using %defattr before it in
the %files section, or use per entry %attr's.''',
@@ -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

View File

@ -1,151 +0,0 @@
#!/bin/bash -e
#
# based on qemu's update_git.sh this program updates the patches
# applied on top of a tarball based on commmits in git
#
# how to use:
# quilt setup rpmlint.spec
# cp rpmlint-$RPMLINTVERSION/series .
# mkdir ~/git; cd ~/git
# git clone git://git.code.sf.net/p/rpmlint/code rpmlint-code
# git checkout -b opensuse-$RPMLINTVERSION v$RPMLINTVERSION
# git quiltimport --patches /where/rpmlint/checkout/is
# ... add/remove/rebase patches
# ... to rebase to a new version create branch and modify versions below
# when done run update_git.sh
GIT_TREE=https://github.com/lnussel/rpmlint-code.git
GIT_LOCAL_TREE=~/git/rpmlint-code
GIT_BRANCH=opensuse-1.8
GIT_UPSTREAM_TAG=rpmlint-1.8
cleanup()
{
[ -z "$GIT_DIR" ] || rm -rf "$GIT_DIR"
[ -z "$CMP_DIR" ] || rm -rf "$GIT_DIR"
}
trap cleanup EXIT
GIT_DIR=`mktemp -d --tmpdir update_git.XXXXXXXXXX`
CMP_DIR=`mktemp -d --tmpdir update_git.XXXXXXXXXX`
rm -f .update_git.*
if [ -d "$GIT_LOCAL_TREE" ]; then
echo "Processing $GIT_BRANCH branch of local git tree, using tag:" \
"$GIT_UPSTREAM_TAG"
if ! (cd $GIT_LOCAL_TREE && git show-branch $GIT_BRANCH &>/dev/null); then
echo "Error: Branch $GIT_BRANCH not found - please create a remote" \
"tracking branch of origin/$GIT_BRANCH"
exit
fi
git clone -ls $GIT_LOCAL_TREE $GIT_DIR -b $GIT_BRANCH
if ! (cd $GIT_LOCAL_TREE && git remote show upstream &>/dev/null); then
echo "Remote for upstream git tree not found. Next time add remote" \
"named upstream for $GIT_TREE and update"
(cd $GIT_DIR && git remote add upstream "$GIT_TREE")
(cd $GIT_DIR && git remote update)
fi
else
echo "Processing $GIT_BRANCH branch of remote git tree, using tag:" \
"$GIT_UPSTREAM_TAG"
echo "(For much fast processing, consider establishing a local git tree" \
"at $GIT_LOCAL_TREE)"
git clone $GIT_TREE $GIT_DIR -b $GIT_BRANCH
(cd $GIT_DIR && git remote add upstream "$GIT_TREE")
(cd $GIT_DIR && git remote update)
fi
(cd $GIT_DIR && git format-patch -N $GIT_UPSTREAM_TAG --suffix=.tmp -o $CMP_DIR >/dev/null)
CHANGED_COUNT=0
UNCHANGED_COUNT=0
DELETED_COUNT=0
ADDED_COUNT=0
shopt -s nullglob
patches=()
for i in $CMP_DIR/*.tmp; do
basename="${i##*/}"
newname=${basename%.tmp}
newname=${newname%.diff} # remove .diff suffix it exist
# limit file names to 40 chars before extension
newname=${newname:0:40}.diff
# remove git signature and commit hash to make content
# independent of git version
head -n -3 "$i" | tail -n +2 > "$CMP_DIR/$newname"
rm "$i"
localname=${newname#*-}
patches+=("$localname")
if [ -e "$localname" ]; then
if cmp -s "$CMP_DIR/$newname" "$localname"; then
rm "$CMP_DIR/$newname"
let UNCHANGED_COUNT+=1
else
mv "$CMP_DIR/$newname" "$localname"
let CHANGED_COUNT+=1
fi
else
mv "$CMP_DIR/$newname" "$localname"
let ADDED_COUNT+=1
echo " $localname" >> .update_git.changes.added
osc add "$localname"
fi
done
# delete dropped patches
for patch in *.diff; do
keep=
for i in "${patches[@]}"; do
if [ "$i" = "$patch" ]; then
keep=1
break
fi
done
if [ -z "$keep" ]; then
osc rm --force $patch
let DELETED_COUNT+=1
echo " $patch" >> .update_git.changes.deleted
fi
done
for package in rpmlint; do
skip=
while IFS= read -r line; do
if [ "$line" = "# PATCHLIST END" ]; then
skip=
i=0
for patch in "${patches[@]}"; do
printf "Patch%02d: %s\n" "$i" "$patch"
let i+=1
done
fi
if [ -z "$skip" ]; then
echo "$line"
fi
if [ "$line" = "# PATCHLIST BEGIN" ]; then
skip=1
fi
done < $package.spec > $package.spec.new
mv $package.spec.new $package.spec
if [ -e .update_git.changes.deleted ]; then
echo "* Patches dropped:" >> $package.changes.proposed
cat .update_git.changes.deleted >> $package.changes.proposed
fi
if [ -e .update_git.changes.added ]; then
echo "* Patches added:" >> $package.changes.proposed
cat .update_git.changes.added >> $package.changes.proposed
fi
if [ -e $package.changes.proposed ]; then
osc vc --file=$package.changes.proposed $package
rm -f $package.changes.proposed
fi
done
rm -f .update_git.*
echo "git patch summary"
echo " unchanged: $UNCHANGED_COUNT"
echo " changed: $CHANGED_COUNT"
echo " deleted: $DELETED_COUNT"
echo " added: $ADDED_COUNT"

View File

@ -7,19 +7,19 @@ Subject: [PATCH] usr-arch.diff
BinariesCheck.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/BinariesCheck.py b/BinariesCheck.py
index 2e5758e..c7fadab 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -313,6 +313,7 @@ usr_lib_exception_regex = re.compile(Config.getOption('UsrLibBinaryException', '
srcname_regex = re.compile('(.*?)-[0-9]')
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
@@ -324,6 +324,7 @@ usr_lib_exception_regex = re.compile(Con
srcname_regex = re.compile(r'(.*?)-[0-9]')
invalid_dir_ref_regex = re.compile(r'/(home|tmp)(\W|$)')
ocaml_mixed_regex = re.compile(r'^Caml1999X0\d\d$')
+usr_arch_share_regex = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64|m68k|arm|aarch64)')
def dir_base(path):
@@ -386,7 +387,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
@@ -397,7 +398,7 @@ class BinariesCheck(AbstractCheck.Abstra
# arch dependent packages only from here on
# in /usr/share ?

View File

@ -1,22 +0,0 @@
From: Some One <nobody@opensuse.org>
Date: Thu, 9 Apr 2015 14:55:39 +0200
Subject: [PATCH] version-control-internal-file.diff
also detect RCS files
---
FilesCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index aa1fa25..59901e7 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -620,7 +620,7 @@ ldconfig_regex = re.compile('^[^#]*ldconfig', re.MULTILINE)
depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE)
install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE)
perl_temp_file_regex = re.compile('.*perl.*/(\.packlist|perllocal\.pod)$')
-scm_regex = re.compile('/CVS/[^/]+$|/\.(bzr|cvs|git|hg)ignore$|/\.hgtags$|/\.(bzr|git|hg|svn)/|/(\.arch-ids|{arch})/')
+scm_regex=re.compile('/(CVS|RCS)(/[^/]+)?$|/\.(bzr|cvs|git|hg)ignore$|/\.hgtags$|/\.(bzr|git|hg|svn)/|/(\.arch-ids|{arch})/|,v$')
games_path_regex = re.compile('^/usr(/lib(64)?)?/games/')
games_group_regex = re.compile(Config.getOption('RpmGamesGroups', DEFAULT_GAMES_GROUPS))
dangling_exceptions = Config.getOption('DanglingSymlinkExceptions', DEFAULT_DANGLING_EXCEPTIONS)

View File

@ -7,16 +7,16 @@ Subject: [PATCH] xdg-paths-update.diff
MenuXDGCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MenuXDGCheck.py b/MenuXDGCheck.py
index 4aab385..158db23 100644
--- a/MenuXDGCheck.py
+++ b/MenuXDGCheck.py
@@ -24,7 +24,7 @@ class MenuXDGCheck(AbstractCheck.AbstractFilesCheck):
Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/MenuXDGCheck.py
+++ rpmlint-rpmlint-1.10/MenuXDGCheck.py
@@ -25,7 +25,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
# $ echo $XDG_DATA_DIRS/applications
# /var/lib/menu-xdg:/usr/share
AbstractCheck.AbstractFilesCheck.__init__(
- self, "MenuXDGCheck", "/usr/share/applications/.*\.desktop$")
+ self, "MenuXDGCheck", "(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
- self, "MenuXDGCheck", r"/usr/share/applications/.*\.desktop$")
+ self, "MenuXDGCheck", r"(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
def check_file(self, pkg, filename):
root = pkg.dirName()

View File

@ -7,11 +7,11 @@ Subject: [PATCH] yast-provides.diff
TagsCheck.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TagsCheck.py b/TagsCheck.py
index e161aec..dd09e62 100644
--- a/TagsCheck.py
+++ b/TagsCheck.py
@@ -824,7 +824,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
Index: rpmlint-rpmlint-1.10/TagsCheck.py
===================================================================
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
+++ rpmlint-rpmlint-1.10/TagsCheck.py
@@ -869,7 +869,7 @@ class TagsCheck(AbstractCheck.AbstractCh
printWarning(pkg, 'no-url-tag')
obs_names = [x[0] for x in pkg.obsoletes()]