forked from pool/rpmlint
Accepting request 531393 from devel:openSUSE:Factory:rpmlint
- Update to version 84.87+git20170930.921e051: * Update reference files against rpmlint 1.10 - Update to version 84.87+git20170928.27b6cb3: * Adjustments for newer rpmlint drop 0001-Update-varrun-test-for-Leap-42.2-severity-reduction.patch rpmlint-pie-factory.patch, rpmlint-pie-leap42.patch: this belongs into git - Update to version 84.87+git20170928.d2c55ee: * Remove some outdated sysv init check, we have switched to systemd - Update rpmlint-checks: * Flake8 fixes * Properly anchor systemd path checks * Python 3.x porting * Add TmpFilesCheck * Flake8 / Stop leaking filedescriptors * Port LibraryPolicyCheck to Python 3.x - Update rpmlint-tests: * Stop leaking filedescriptors * Address various deprecation warnings * Avoid leaking fds and further Python 3.x porting - 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. OBS-URL: https://build.opensuse.org/request/show/531393 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=281
This commit is contained in:
commit
d514666ca5
@ -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):
|
|
34
0001-Execute-chroot-tests-also-on-x86-rpms.patch
Normal file
34
0001-Execute-chroot-tests-also-on-x86-rpms.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 9140901be1ab2c41df6ec7b21bd68e2e695b201f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Thu, 28 Sep 2017 23:59:34 +0200
|
||||||
|
Subject: [PATCH] Execute chroot tests also on x86 rpms
|
||||||
|
|
||||||
|
x86 and x86_64 are reasonably similar, so this is safe
|
||||||
|
to do.
|
||||||
|
---
|
||||||
|
BinariesCheck.py | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
|
@@ -223,7 +223,8 @@ class BinaryInfo(object):
|
||||||
|
# without chdir)
|
||||||
|
# Currently this implementation works only on x86_64 due to reliance
|
||||||
|
# on x86_64 specific assembly. Skip it on other architectures
|
||||||
|
- if pkg.arch == 'x86_64' and self.chroot and self.chdir:
|
||||||
|
+ if ((pkg.arch.endswith('86') or pkg.arch == 'x86_64') and
|
||||||
|
+ self.chroot and self.chdir):
|
||||||
|
p = subprocess.Popen(('objdump', '-d', path),
|
||||||
|
stdout=subprocess.PIPE, bufsize=-1,
|
||||||
|
env=dict(os.environ, LC_ALL="C"))
|
||||||
|
@@ -578,7 +579,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
|
printError(pkg, 'missing-call-to-setgroups-before-setuid',
|
||||||
|
fname)
|
||||||
|
|
||||||
|
- if pkg.arch == 'x86_64' and bin_info.chroot:
|
||||||
|
+ if ((pkg.arch.endswith('86') or pkg.arch == 'x86_64') and bin_info.chroot):
|
||||||
|
if not bin_info.chdir or not bin_info.chroot_near_chdir:
|
||||||
|
printError(pkg, 'missing-call-to-chdir-with-chroot', fname)
|
||||||
|
|
44
0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch
Normal file
44
0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 1d70b641e5f755de72b0fa0059d4979a79f9553c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Thu, 28 Sep 2017 22:16:30 +0200
|
||||||
|
Subject: [PATCH 1/3] Extend scm_regex to capture more SCM system files
|
||||||
|
|
||||||
|
Also add unit test coverage for it.
|
||||||
|
---
|
||||||
|
FilesCheck.py | 4 +++-
|
||||||
|
test/test_files.py | 10 ++++++++++
|
||||||
|
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
@@ -202,7 +202,9 @@ ldconfig_regex = re.compile(r'^[^#]*ldco
|
||||||
|
depmod_regex = re.compile(r'^[^#]*depmod', re.MULTILINE)
|
||||||
|
install_info_regex = re.compile(r'^[^#]*install-info', re.MULTILINE)
|
||||||
|
perl_temp_file_regex = re.compile(r'.*perl.*/(\.packlist|perllocal\.pod)$')
|
||||||
|
-scm_regex = re.compile(r'/CVS/[^/]+$|/\.(bzr|cvs|git|hg)ignore$|/\.hgtags$|/\.(bzr|git|hg|svn)/|/(\.arch-ids|{arch})/')
|
||||||
|
+scm_regex = re.compile(
|
||||||
|
+ r'/(?:RCS|CVS)/[^/]+$|/\.(?:bzr|cvs|git|hg|svn)ignore$|'
|
||||||
|
+ r',v$|/\.hgtags$|/\.(?:bzr|git|hg|svn)/|/(?:\.arch-ids|{arch})/')
|
||||||
|
games_path_regex = re.compile(r'^/usr(/lib(64)?)?/games/')
|
||||||
|
games_group_regex = re.compile(Config.getOption('RpmGamesGroups', DEFAULT_GAMES_GROUPS))
|
||||||
|
dangling_exceptions = Config.getOption('DanglingSymlinkExceptions', DEFAULT_DANGLING_EXCEPTIONS)
|
||||||
|
Index: rpmlint-rpmlint-1.10/test/test_files.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/test/test_files.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/test/test_files.py
|
||||||
|
@@ -52,3 +52,13 @@ def test_script_interpreter():
|
||||||
|
assert se(b"#! /usr/bin/perl -wT \n") == ("/usr/bin/perl", "-wT")
|
||||||
|
assert se(b"#!/usr/bin/env python3 foo") == ("/usr/bin/env", "python3 foo")
|
||||||
|
assert se(b"# something here\n#!not a shebang") == (None, "")
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def test_scm_regex():
|
||||||
|
+ from FilesCheck import scm_regex
|
||||||
|
+
|
||||||
|
+ assert scm_regex.search('/foo/CVS/bar')
|
||||||
|
+ assert scm_regex.search('/foo/RCS/bar')
|
||||||
|
+ assert scm_regex.search('/bar/foo,v')
|
||||||
|
+ assert scm_regex.search('bar/.svnignore')
|
||||||
|
+ assert scm_regex.search('bar/.git/refs')
|
@ -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
|
|
120
0001-Handle-post-scripts-that-contain-non-ascii-character.patch
Normal file
120
0001-Handle-post-scripts-that-contain-non-ascii-character.patch
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
From 53b868fcaba87016c623f47e8d40e09f4fccaafa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Wed, 4 Oct 2017 14:40:02 +0200
|
||||||
|
Subject: [PATCH] Handle %post scripts that contain non-ascii characters
|
||||||
|
|
||||||
|
when running LC_ALL=C and python3 this otherwise traces with:
|
||||||
|
|
||||||
|
File "rpmlint/PostCheck.py", line 83, in check_syntax_script
|
||||||
|
tmpfile.write(script)
|
||||||
|
UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 16: ordinal not in range(128)
|
||||||
|
|
||||||
|
Add test coverage.
|
||||||
|
---
|
||||||
|
PostCheck.py | 31 +++++++++++++++++------------
|
||||||
|
test/binary/Nonutfpostcheck-0-0.x86_64.rpm | Bin 0 -> 6028 bytes
|
||||||
|
2 files changed, 18 insertions(+), 13 deletions(-)
|
||||||
|
create mode 100644 test/binary/Nonutfpostcheck-0-0.x86_64.rpm
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/PostCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/PostCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/PostCheck.py
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
+import tempfile
|
||||||
|
|
||||||
|
import rpm
|
||||||
|
|
||||||
|
@@ -78,7 +79,8 @@ def check_syntax_script(prog, commandlin
|
||||||
|
if not script:
|
||||||
|
return False
|
||||||
|
# TODO: test that "prog" is available/executable
|
||||||
|
- tmpfile, tmpname = Pkg.mktemp()
|
||||||
|
+ tmpfd, tmpname = tempfile.mkstemp(prefix='rpmlint.')
|
||||||
|
+ tmpfile = os.fdopen(tmpfd, 'wb')
|
||||||
|
try:
|
||||||
|
tmpfile.write(script)
|
||||||
|
tmpfile.close()
|
||||||
|
@@ -105,35 +107,38 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||||
|
prog = pkg.scriptprog(tag[1])
|
||||||
|
if prog:
|
||||||
|
prog = prog.split()[0]
|
||||||
|
- self.check_aux(pkg, files, prog, script, tag[2], prereq)
|
||||||
|
+ self.check_aux(pkg, files, prog, pkg.header[tag[0]],
|
||||||
|
+ tag[2], prereq)
|
||||||
|
else:
|
||||||
|
prog = pkg[tag[1]]
|
||||||
|
for idx in range(0, len(prog)):
|
||||||
|
self.check_aux(
|
||||||
|
- pkg, files, prog[idx], script[idx], tag[2], prereq)
|
||||||
|
+ pkg, files, prog[idx],
|
||||||
|
+ pkg.header[tag[0]][idx], tag[2], prereq)
|
||||||
|
|
||||||
|
def check_aux(self, pkg, files, prog, script, tag, prereq):
|
||||||
|
if script:
|
||||||
|
+ script_str = Pkg.b2s(script)
|
||||||
|
if prog:
|
||||||
|
if prog not in valid_shells:
|
||||||
|
printError(pkg, 'invalid-shell-in-' + tag, prog)
|
||||||
|
if prog in empty_shells:
|
||||||
|
printError(pkg, 'non-empty-' + tag, prog)
|
||||||
|
if prog in syntaxcheck_shells or prog == '/usr/bin/perl':
|
||||||
|
- if percent_regex.search(script):
|
||||||
|
+ if percent_regex.search(script_str):
|
||||||
|
printWarning(pkg, 'percent-in-' + tag)
|
||||||
|
- if bracket_regex.search(script):
|
||||||
|
+ if bracket_regex.search(script_str):
|
||||||
|
printWarning(pkg, 'spurious-bracket-in-' + tag)
|
||||||
|
- res = dangerous_command_regex.search(script)
|
||||||
|
+ res = dangerous_command_regex.search(script_str)
|
||||||
|
if res:
|
||||||
|
printWarning(pkg, 'dangerous-command-in-' + tag,
|
||||||
|
res.group(2))
|
||||||
|
- res = selinux_regex.search(script)
|
||||||
|
+ res = selinux_regex.search(script_str)
|
||||||
|
if res:
|
||||||
|
printError(pkg, 'forbidden-selinux-command-in-' + tag,
|
||||||
|
res.group(2))
|
||||||
|
|
||||||
|
- if 'update-menus' in script:
|
||||||
|
+ if 'update-menus' in script_str:
|
||||||
|
menu_error = True
|
||||||
|
for f in files:
|
||||||
|
if menu_regex.search(f):
|
||||||
|
@@ -142,10 +147,10 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||||
|
if menu_error:
|
||||||
|
printError(pkg, 'update-menus-without-menu-file-in-' +
|
||||||
|
tag)
|
||||||
|
- if tmp_regex.search(script):
|
||||||
|
+ if tmp_regex.search(script_str):
|
||||||
|
printError(pkg, 'use-tmp-in-' + tag)
|
||||||
|
for c in prereq_assoc:
|
||||||
|
- if c[0].search(script):
|
||||||
|
+ if c[0].search(script_str):
|
||||||
|
found = False
|
||||||
|
for p in c[1]:
|
||||||
|
if p in prereq or p in files:
|
||||||
|
@@ -157,9 +162,9 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||||
|
if prog in syntaxcheck_shells:
|
||||||
|
if incorrect_shell_script(prog, script):
|
||||||
|
printError(pkg, 'shell-syntax-error-in-' + tag)
|
||||||
|
- if home_regex.search(script):
|
||||||
|
+ if home_regex.search(script_str):
|
||||||
|
printError(pkg, 'use-of-home-in-' + tag)
|
||||||
|
- res = bogus_var_regex.search(script)
|
||||||
|
+ res = bogus_var_regex.search(script_str)
|
||||||
|
if res:
|
||||||
|
printWarning(pkg, 'bogus-variable-use-in-' + tag,
|
||||||
|
res.group(1))
|
||||||
|
@@ -168,7 +173,7 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||||
|
if incorrect_perl_script(prog, script):
|
||||||
|
printError(pkg, 'perl-syntax-error-in-' + tag)
|
||||||
|
elif prog.endswith('sh'):
|
||||||
|
- res = single_command_regex.search(script)
|
||||||
|
+ res = single_command_regex.search(script_str)
|
||||||
|
if res:
|
||||||
|
printWarning(pkg, 'one-line-command-in-' + tag,
|
||||||
|
res.group(1))
|
122
0001-Improve-XDG-Menu-checks-stability.patch
Normal file
122
0001-Improve-XDG-Menu-checks-stability.patch
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
From 3df5fd9507215cf70a1147ea631cf061475c7b34 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Fri, 29 Sep 2017 09:12:33 +0200
|
||||||
|
Subject: [PATCH] Improve XDG Menu checks stability
|
||||||
|
|
||||||
|
Running RawConfigParser on untrusted input can cause a lot
|
||||||
|
of exceptions. Handle them gracefully and raise appropriate
|
||||||
|
rpmlint errors. Also separate the code a little and cleaning it up.
|
||||||
|
---
|
||||||
|
MenuXDGCheck.py | 76 ++++++++++++++++++++++++++++++++++++++++-----------------
|
||||||
|
1 file changed, 53 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/MenuXDGCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
||||||
|
@@ -8,15 +8,15 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
- from ConfigParser import RawConfigParser
|
||||||
|
+ import ConfigParser as cfgparser
|
||||||
|
except:
|
||||||
|
- from configparser import RawConfigParser
|
||||||
|
+ import configparser as cfgparser
|
||||||
|
|
||||||
|
import AbstractCheck
|
||||||
|
from Filter import addDetails, printError, printWarning
|
||||||
|
from Pkg import getstatusoutput, is_utf8
|
||||||
|
|
||||||
|
-STANDARD_BIN_DIRS = ['/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/']
|
||||||
|
+STANDARD_BIN_DIRS = ('/bin', '/sbin', '/usr/bin', '/usr/sbin')
|
||||||
|
|
||||||
|
|
||||||
|
class MenuXDGCheck(AbstractCheck.AbstractFilesCheck):
|
||||||
|
@@ -27,6 +27,43 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||||
|
AbstractCheck.AbstractFilesCheck.__init__(
|
||||||
|
self, "MenuXDGCheck", r"(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
||||||
|
|
||||||
|
+ def parse_desktop_file(self, pkg, root, f, filename):
|
||||||
|
+ cfp = cfgparser.RawConfigParser()
|
||||||
|
+ try:
|
||||||
|
+ cfp.read(f)
|
||||||
|
+ except cfgparser.DuplicateSectionError as e:
|
||||||
|
+ printError(
|
||||||
|
+ pkg, 'desktopfile-duplicate-section', filename,
|
||||||
|
+ '[%s]' % e.section)
|
||||||
|
+ except cfgparser.DuplicateOptionError as e:
|
||||||
|
+ printError(
|
||||||
|
+ pkg, 'desktopfile-duplicate-option', filename,
|
||||||
|
+ '[%s]/%s' % (e.section, e.option))
|
||||||
|
+ except cfgparser.MissingSectionHeaderError:
|
||||||
|
+ printError(
|
||||||
|
+ pkg, 'desktopfile-missing-header', filename)
|
||||||
|
+ except (cfgparser.ParsingError, UnicodeDecodeError) as e:
|
||||||
|
+ printWarning(
|
||||||
|
+ pkg, 'invalid-desktopfile', filename)
|
||||||
|
+ else:
|
||||||
|
+ binary = None
|
||||||
|
+ if cfp.has_option('Desktop Entry', 'Exec'):
|
||||||
|
+ binary = cfp.get('Desktop Entry', 'Exec').partition(' ')[0]
|
||||||
|
+ if binary:
|
||||||
|
+ found = False
|
||||||
|
+ if binary.startswith('/'):
|
||||||
|
+ found = os.path.exists(root + binary)
|
||||||
|
+ else:
|
||||||
|
+ for i in STANDARD_BIN_DIRS:
|
||||||
|
+ if os.path.exists(root + i + '/' + binary):
|
||||||
|
+ # no need to check if the binary is +x, rpmlint does it
|
||||||
|
+ # in another place
|
||||||
|
+ found = True
|
||||||
|
+ break
|
||||||
|
+ if not found:
|
||||||
|
+ printWarning(
|
||||||
|
+ pkg, 'desktopfile-without-binary', filename, binary)
|
||||||
|
+
|
||||||
|
def check_file(self, pkg, filename):
|
||||||
|
root = pkg.dirName()
|
||||||
|
f = root + filename
|
||||||
|
@@ -43,25 +80,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||||
|
if not is_utf8(f):
|
||||||
|
printError(pkg, 'non-utf8-desktopfile', filename)
|
||||||
|
|
||||||
|
- cfp = RawConfigParser()
|
||||||
|
- cfp.read(f)
|
||||||
|
- binary = None
|
||||||
|
- if cfp.has_option('Desktop Entry', 'Exec'):
|
||||||
|
- binary = cfp.get('Desktop Entry', 'Exec').split(' ', 1)[0]
|
||||||
|
- if binary:
|
||||||
|
- found = False
|
||||||
|
- if binary.startswith('/'):
|
||||||
|
- found = os.path.exists(root + binary)
|
||||||
|
- else:
|
||||||
|
- for i in STANDARD_BIN_DIRS:
|
||||||
|
- if os.path.exists(root + i + binary):
|
||||||
|
- # no need to check if the binary is +x, rpmlint does it
|
||||||
|
- # in another place
|
||||||
|
- found = True
|
||||||
|
- break
|
||||||
|
- if not found:
|
||||||
|
- printWarning(pkg, 'desktopfile-without-binary', filename,
|
||||||
|
- binary)
|
||||||
|
+ self.parse_desktop_file(pkg, root, f, filename)
|
||||||
|
|
||||||
|
|
||||||
|
check = MenuXDGCheck()
|
||||||
|
@@ -76,4 +95,15 @@ addDetails(
|
||||||
|
'desktopfile-without-binary',
|
||||||
|
'''the .desktop file is for a file not present in the package. You
|
||||||
|
should check the requires or see if this is not a error''',
|
||||||
|
+
|
||||||
|
+'desktopfile-duplicate-section',
|
||||||
|
+'''The .desktop file contains the mentioned section name twice, which
|
||||||
|
+can trigger parsing ambiguities. Remove the duplicate.''',
|
||||||
|
+
|
||||||
|
+'desktopfile-duplicate-option',
|
||||||
|
+'''The .desktop file contains the mentioned option key twice,
|
||||||
|
+which can trigger parsing ambiguities. Remove the duplicate.''',
|
||||||
|
+
|
||||||
|
+'desktopfile-missing-header',
|
||||||
|
+'''The .desktop file should start with a section header.''',
|
||||||
|
)
|
@ -0,0 +1,32 @@
|
|||||||
|
From 3433a3cc77a05af3a7e0588899f61028b5546e64 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Sun, 1 Oct 2017 14:00:26 +0200
|
||||||
|
Subject: [PATCH] Tighten wrong-script-interpreter check to lower false
|
||||||
|
positives
|
||||||
|
|
||||||
|
The check wasn't looking if the file is actually marked as
|
||||||
|
executable or in one of the known-scripts-only directories. Without
|
||||||
|
this patch, the check will fire on documentation examples that
|
||||||
|
just happen to be detected as script, but where the shebang
|
||||||
|
isn't actually captured by the find_requires rpm scripts. Omit
|
||||||
|
warning about those, as there are more likely legitimate reasons.
|
||||||
|
---
|
||||||
|
FilesCheck.py | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
@@ -861,7 +861,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
|
elif interpreter or mode_is_exec or script_regex.search(f):
|
||||||
|
if interpreter:
|
||||||
|
res = interpreter_regex.search(interpreter)
|
||||||
|
- if (res and res.group(1) == 'env') or not res:
|
||||||
|
+ is_wrong_interpreter = (not res or (res and
|
||||||
|
+ res.group(1) == 'env'))
|
||||||
|
+ if ((mode_is_exec or script_regex.search(f)) and
|
||||||
|
+ is_wrong_interpreter):
|
||||||
|
printError(pkg, 'wrong-script-interpreter',
|
||||||
|
f, interpreter, interpreter_args)
|
||||||
|
elif not nonexec_file and not \
|
@ -1,29 +0,0 @@
|
|||||||
From 4565372c418433d3d8ff47e59924791f62a20b3a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jimmy Berry <jberry@suse.com>
|
|
||||||
Date: Tue, 25 Oct 2016 13:27:06 -0500
|
|
||||||
Subject: [PATCH 1/2] Update varrun test for Leap 42.2 severity reduction.
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/varrun.ref | 12 ++++++------
|
|
||||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/varrun.ref b/tests/varrun.ref
|
|
||||||
index 9982344..6b0d28a 100644
|
|
||||||
--- a/tests/varrun.ref
|
|
||||||
+++ b/tests/varrun.ref
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
-varrun: E: non-ghost-in-run (Badness: 10000) /run/bar
|
|
||||||
-varrun: E: non-ghost-in-run (Badness: 10000) /run/lock/foo
|
|
||||||
-varrun: E: dir-or-file-in-var-run (Badness: 10000) /var/run
|
|
||||||
-varrun: E: dir-or-file-in-var-run (Badness: 10000) /var/run/bar
|
|
||||||
-varrun: E: dir-or-file-in-var-lock (Badness: 10000) /var/lock/foo
|
|
||||||
-1 packages and 0 specfiles checked; 5 errors, 0 warnings.
|
|
||||||
+varrun: W: non-ghost-in-run /run/bar
|
|
||||||
+varrun: W: non-ghost-in-run /run/lock/foo
|
|
||||||
+varrun: W: dir-or-file-in-var-run /var/run
|
|
||||||
+varrun: W: dir-or-file-in-var-run /var/run/bar
|
|
||||||
+varrun: W: dir-or-file-in-var-lock /var/lock/foo
|
|
||||||
+1 packages and 0 specfiles checked; 0 errors, 5 warnings.
|
|
||||||
--
|
|
||||||
2.10.1
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From a4618650898aece5c4838e71853310b54f6e29fa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Sun, 1 Oct 2017 22:08:20 +0200
|
||||||
|
Subject: [PATCH] split wrong-script-interpreter into env-script-interpreter
|
||||||
|
|
||||||
|
For mere mortals, details message for wrong-script-interpreter
|
||||||
|
does not explain why the env as shebang is an issue. Splitting
|
||||||
|
that case into a separate diagnostic allows a more detailed
|
||||||
|
info message alongside that gives a better rationale.
|
||||||
|
---
|
||||||
|
FilesCheck.py | 32 ++++++++++++++++++++++++++------
|
||||||
|
1 file changed, 26 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
@@ -863,12 +863,15 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
|
elif interpreter or mode_is_exec or script_regex.search(f):
|
||||||
|
if interpreter:
|
||||||
|
res = interpreter_regex.search(interpreter)
|
||||||
|
- is_wrong_interpreter = (not res or (res and
|
||||||
|
- res.group(1) == 'env'))
|
||||||
|
- if ((mode_is_exec or script_regex.search(f)) and
|
||||||
|
- is_wrong_interpreter):
|
||||||
|
- printError(pkg, 'wrong-script-interpreter',
|
||||||
|
- f, interpreter, interpreter_args)
|
||||||
|
+ if (mode_is_exec or script_regex.search(f)):
|
||||||
|
+ if res and res.group(1) == 'env':
|
||||||
|
+ printError(pkg, 'env-script-interpreter',
|
||||||
|
+ f, interpreter,
|
||||||
|
+ interpreter_args)
|
||||||
|
+ elif not res:
|
||||||
|
+ printError(pkg, 'wrong-script-interpreter',
|
||||||
|
+ f, interpreter,
|
||||||
|
+ interpreter_args)
|
||||||
|
elif not nonexec_file and not \
|
||||||
|
(lib_path_regex.search(f) and
|
||||||
|
f.endswith('.la')):
|
||||||
|
@@ -1303,6 +1306,22 @@ Alternatively, if the file isn't suppose
|
||||||
|
it is not marked as being executable.
|
||||||
|
''',
|
||||||
|
|
||||||
|
+'env-script-interpreter',
|
||||||
|
+'''This script uses 'env' as an interpreter.
|
||||||
|
+For the rpm runtime dependency detection to work, the shebang
|
||||||
|
+#!/usr/bin/env python
|
||||||
|
+
|
||||||
|
+needs to be patched into
|
||||||
|
+#!/usr/bin/python
|
||||||
|
+
|
||||||
|
+otherwise the package dependency generator merely adds a dependency
|
||||||
|
+on /usr/bin/env rather than the actual interpreter /usr/bin/python.
|
||||||
|
+
|
||||||
|
+Alternatively, if the file should not be executed, then ensure that
|
||||||
|
+it is not marked as executable or don't install it in a path that
|
||||||
|
+is reserved for executables.
|
||||||
|
+''',
|
||||||
|
+
|
||||||
|
'non-executable-script',
|
||||||
|
'''This text file contains a shebang or is located in a path dedicated for
|
||||||
|
executables, but lacks the executable bits and cannot thus be executed. If
|
@ -0,0 +1,52 @@
|
|||||||
|
From bcc9a315dae3aacf27854f16328c59e32eab2816 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Thu, 28 Sep 2017 23:04:22 +0200
|
||||||
|
Subject: [PATCH 3/3] Tighten lib_regex to avoid false positive in python
|
||||||
|
bindings
|
||||||
|
|
||||||
|
Also add unit test coverage for it.
|
||||||
|
---
|
||||||
|
FilesCheck.py | 2 +-
|
||||||
|
test/test_files.py | 17 +++++++++++++++++
|
||||||
|
2 files changed, 18 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
|
@@ -197,7 +197,7 @@ devel_regex = re.compile(r'(.*)-(debug(i
|
||||||
|
debuginfo_package_regex = re.compile(r'-debug(info)?$')
|
||||||
|
debugsource_package_regex = re.compile(r'-debugsource$')
|
||||||
|
use_debugsource = Config.getOption('UseDebugSource', False)
|
||||||
|
-lib_regex = re.compile(r'lib(64)?/lib[^/]*(\.so\..*|-[0-9.]+\.so)')
|
||||||
|
+lib_regex = re.compile(r'/lib(?:64)?/lib[^/]+(?:\.so\.[\d\.]+|-[\d\.]+\.so)$')
|
||||||
|
ldconfig_regex = re.compile(r'^[^#]*ldconfig', re.MULTILINE)
|
||||||
|
depmod_regex = re.compile(r'^[^#]*depmod', re.MULTILINE)
|
||||||
|
install_info_regex = re.compile(r'^[^#]*install-info', re.MULTILINE)
|
||||||
|
Index: rpmlint-rpmlint-1.10/test/test_files.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/test/test_files.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/test/test_files.py
|
||||||
|
@@ -62,3 +62,22 @@ def test_scm_regex():
|
||||||
|
assert scm_regex.search('/bar/foo,v')
|
||||||
|
assert scm_regex.search('bar/.svnignore')
|
||||||
|
assert scm_regex.search('bar/.git/refs')
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def test_lib_regex():
|
||||||
|
+ from FilesCheck import lib_regex
|
||||||
|
+
|
||||||
|
+ # true matches
|
||||||
|
+ assert all(
|
||||||
|
+ lib_regex.search(x) for x in
|
||||||
|
+ ('/lib/libnsl-2.26.so',
|
||||||
|
+ '/usr/lib64/libgnomeui.so.3',
|
||||||
|
+ '/lib64/libgcc_s.so.1'))
|
||||||
|
+
|
||||||
|
+ # false positives
|
||||||
|
+ assert not any(
|
||||||
|
+ lib_regex.search(x) for x in
|
||||||
|
+ ('/usr/share/gdb/auto-load/usr/lib/libglib-2.0.so.0.4600.1-gdb.py',
|
||||||
|
+ '/usr/share/doc/findlib/lib-1.0.so',
|
||||||
|
+ '/usr/lib64/libvulkan_radeon.so',
|
||||||
|
+ '/usr/lib64/rsocket/binary',))
|
@ -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)
|
|
@ -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 =
|
= rpmlint-checks, rpmlint-tests =
|
||||||
|
|
||||||
The files from rpmlint-checks and rpmlint-tests managed in git. If
|
The files from rpmlint-checks and rpmlint-tests managed in git. If
|
||||||
|
4
_service
4
_service
@ -2,14 +2,14 @@
|
|||||||
<service name="tar_scm" mode="disabled">
|
<service name="tar_scm" mode="disabled">
|
||||||
<param name="version">1</param>
|
<param name="version">1</param>
|
||||||
<param name="versionformat">84.87+git%cd.%h</param>
|
<param name="versionformat">84.87+git%cd.%h</param>
|
||||||
<param name="url">http://github.com/openSUSE/rpmlint-tests.git</param>
|
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="changesgenerate">enable</param>
|
<param name="changesgenerate">enable</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="tar_scm" mode="disabled">
|
<service name="tar_scm" mode="disabled">
|
||||||
<param name="version">1</param>
|
<param name="version">1</param>
|
||||||
<param name="versionformat">master</param>
|
<param name="versionformat">master</param>
|
||||||
<param name="url">http://github.com/openSUSE/rpmlint-checks.git</param>
|
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="changesgenerate">enable</param>
|
<param name="changesgenerate">enable</param>
|
||||||
</service>
|
</service>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">http://github.com/openSUSE/rpmlint-tests.git</param>
|
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
||||||
<param name="changesrevision">092177d4fccb48dfb4164faddf11442b63249bff</param></service><service name="tar_scm">
|
<param name="changesrevision">a05216ca4502eb1c029f68534ada12092e139999</param></service><service name="tar_scm">
|
||||||
<param name="url">http://github.com/openSUSE/rpmlint-checks.git</param>
|
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
||||||
<param name="changesrevision">8d8fc8774ada96397e437d451b2461b64338db08</param></service></servicedata>
|
<param name="changesrevision">b82179a9c8d48a3573e8c4f4770500d1fe932921</param></service></servicedata>
|
@ -1,169 +0,0 @@
|
|||||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
||||||
Date: Fri, 5 Sep 2014 12:53:40 +0200
|
|
||||||
Subject: [PATCH] add check for tmpfiles created at runtime
|
|
||||||
|
|
||||||
this check parses files in /usr/lib/tmpfiles.d and verifies that
|
|
||||||
entries that create files or directories are actually listed in
|
|
||||||
%files.
|
|
||||||
|
|
||||||
The check also handles the ghost file check as rpmlint shouldn't
|
|
||||||
complain about ghost files handled by the tmpfiles mechanism.
|
|
||||||
---
|
|
||||||
PostCheck.py | 18 ---------
|
|
||||||
TmpFilesCheck.py | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
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):
|
|
||||||
self.check_aux(
|
|
||||||
pkg, files, prog[idx], script[idx], tag[2], prereq)
|
|
||||||
|
|
||||||
- ghost_files = pkg.ghostFiles()
|
|
||||||
- if ghost_files:
|
|
||||||
- postin = pkg[rpm.RPMTAG_POSTIN]
|
|
||||||
- prein = pkg[rpm.RPMTAG_PREIN]
|
|
||||||
- for f in ghost_files:
|
|
||||||
- if f in pkg.missingOkFiles():
|
|
||||||
- continue
|
|
||||||
- if not postin and not prein:
|
|
||||||
- printWarning(pkg, 'ghost-files-without-postin')
|
|
||||||
- if (not postin or f not in postin) and \
|
|
||||||
- (not prein or f not in prein):
|
|
||||||
- printWarning(pkg,
|
|
||||||
- 'postin-without-ghost-file-creation', f)
|
|
||||||
-
|
|
||||||
def check_aux(self, pkg, files, prog, script, tag, prereq):
|
|
||||||
if script:
|
|
||||||
if prog:
|
|
||||||
@@ -194,10 +180,6 @@ class PostCheck(AbstractCheck.AbstractCheck):
|
|
||||||
check = PostCheck()
|
|
||||||
|
|
||||||
# Add information about checks
|
|
||||||
-addDetails(
|
|
||||||
-'postin-without-ghost-file-creation',
|
|
||||||
-'''A file tagged as ghost is not created during %prein nor during %postin.''',
|
|
||||||
-)
|
|
||||||
for scriptlet in map(lambda x: '%' + x, RPM_SCRIPTLETS):
|
|
||||||
addDetails(
|
|
||||||
'one-line-command-in-%s' % scriptlet,
|
|
||||||
diff --git a/TmpFilesCheck.py b/TmpFilesCheck.py
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d1ef824
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/TmpFilesCheck.py
|
|
||||||
@@ -0,0 +1,111 @@
|
|
||||||
+# -*- coding: utf-8 -*-
|
|
||||||
+#############################################################################
|
|
||||||
+# File : TmpFilesCheck.py
|
|
||||||
+# Package : rpmlint
|
|
||||||
+# Author : Ludwig Nussel
|
|
||||||
+# Created on : Wed Sep 03 10:36 2014
|
|
||||||
+# Purpose : Check systemd created tmpfiles are included in filelist
|
|
||||||
+#############################################################################
|
|
||||||
+
|
|
||||||
+import os
|
|
||||||
+import re
|
|
||||||
+
|
|
||||||
+from Filter import addDetails, printError, printWarning
|
|
||||||
+import AbstractCheck
|
|
||||||
+import Pkg
|
|
||||||
+import stat
|
|
||||||
+import rpm
|
|
||||||
+
|
|
||||||
+class TmpFilesCheck(AbstractCheck.AbstractCheck):
|
|
||||||
+ '''Check systemd created tmpfiles are included in filelist'''
|
|
||||||
+
|
|
||||||
+ def __init__(self):
|
|
||||||
+ AbstractCheck.AbstractCheck.__init__(self, "TmpFilesCheck")
|
|
||||||
+ self._spec_file = None
|
|
||||||
+
|
|
||||||
+ def check(self, pkg):
|
|
||||||
+ if pkg.isSource():
|
|
||||||
+ return
|
|
||||||
+
|
|
||||||
+ # file names handled by systemd-tmpfiles
|
|
||||||
+ tmp_files = set()
|
|
||||||
+ postin = pkg[rpm.RPMTAG_POSTIN]
|
|
||||||
+ prein = pkg[rpm.RPMTAG_PREIN]
|
|
||||||
+
|
|
||||||
+ # see tmpfiles.d(5)
|
|
||||||
+ interesting_types = ('f', 'F', 'w', 'd', 'D', 'p', 'L', 'c', 'b')
|
|
||||||
+
|
|
||||||
+ for fn, pkgfile in pkg.files().items():
|
|
||||||
+ if not fn.startswith('/usr/lib/tmpfiles.d/'):
|
|
||||||
+ continue
|
|
||||||
+ if not stat.S_ISREG(pkgfile.mode):
|
|
||||||
+ printWarning(pkg, "tmpfile-not-regular-file", fn)
|
|
||||||
+ continue
|
|
||||||
+
|
|
||||||
+ pattern = re.compile(r'systemd-tmpfiles --create .*%s'%re.escape(fn))
|
|
||||||
+ if (not postin or not pattern.search(postin)) and \
|
|
||||||
+ (not prein or not pattern.search(prein)):
|
|
||||||
+ printWarning(pkg,
|
|
||||||
+ 'postin-without-tmpfile-creation', fn)
|
|
||||||
+
|
|
||||||
+ for line in open(pkgfile.path):
|
|
||||||
+ # skip comments
|
|
||||||
+ line = line.split('#')[0].split('\n')[0]
|
|
||||||
+ line = line.lstrip()
|
|
||||||
+ if not len(line):
|
|
||||||
+ continue
|
|
||||||
+ line = re.split(r'\s+', line)
|
|
||||||
+ # format is
|
|
||||||
+ #Type Path Mode UID GID Age Argument
|
|
||||||
+ # we only need type and path
|
|
||||||
+ if len(line) < 3:
|
|
||||||
+ continue
|
|
||||||
+ t = line[0]
|
|
||||||
+ p = line[1]
|
|
||||||
+ if t.endswith('!'):
|
|
||||||
+ t = t[:-1]
|
|
||||||
+ if not t in interesting_types:
|
|
||||||
+ continue
|
|
||||||
+
|
|
||||||
+ tmp_files.add(p)
|
|
||||||
+
|
|
||||||
+ if not p in pkg.files():
|
|
||||||
+ printWarning(pkg, "tmpfile-not-in-filelist", p)
|
|
||||||
+ continue
|
|
||||||
+ if not pkg.files()[p].is_ghost:
|
|
||||||
+ printWarning(pkg, "tmpfile-not-ghost", p)
|
|
||||||
+
|
|
||||||
+ # now check remaining ghost files that are not already
|
|
||||||
+ # handled by systemd-tmpfiles
|
|
||||||
+ ghost_files = set(pkg.ghostFiles()) - tmp_files
|
|
||||||
+ if ghost_files:
|
|
||||||
+ for f in ghost_files:
|
|
||||||
+ if f in pkg.missingOkFiles():
|
|
||||||
+ continue
|
|
||||||
+ if not postin and not prein:
|
|
||||||
+ printWarning(pkg, 'ghost-files-without-postin')
|
|
||||||
+ if (not postin or f not in postin) and \
|
|
||||||
+ (not prein or f not in prein):
|
|
||||||
+ printWarning(pkg,
|
|
||||||
+ 'postin-without-ghost-file-creation', f)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+check = TmpFilesCheck()
|
|
||||||
+
|
|
||||||
+addDetails(
|
|
||||||
+'postin-without-ghost-file-creation',
|
|
||||||
+'''A file tagged as ghost is not created during %prein nor during %postin.''',
|
|
||||||
+'postin-without-tmpfile-creation',
|
|
||||||
+'''Please use the %tmpfiles_create macro in %post for each of your tmpfiles.d files''',
|
|
||||||
+'tmpfile-not-regular-file',
|
|
||||||
+'''files in tmpfiles.d need to be regular files''', # otherwise we won't open it :-)
|
|
||||||
+'tmpfile-not-in-filelist',
|
|
||||||
+'''please add the specified file to your %files section as %ghost so
|
|
||||||
+users can easily query who created the file, it gets uninstalled on
|
|
||||||
+package removal and finally other rpmlint checks see it''',
|
|
||||||
+'tmpfile-not-ghost',
|
|
||||||
+'''the specified file is not marked as %ghost although created at
|
|
||||||
+runtime via tmpfiles mechanism.'''
|
|
||||||
+)
|
|
||||||
+# vim: sw=4 et
|
|
@ -1,110 +0,0 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
|
||||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
|
||||||
Subject: [PATCH] add-weak-dependencies.diff
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
Pkg.py | 29 +++++++++++++++++++++++++++--
|
|
||||||
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):
|
|
||||||
self._missingok_files = None
|
|
||||||
self._files = None
|
|
||||||
self._requires = None
|
|
||||||
+ self._suggests = None
|
|
||||||
+ self._supplements = None
|
|
||||||
+ self._enhances = None
|
|
||||||
+ self._recommends = None
|
|
||||||
self._req_names = -1
|
|
||||||
|
|
||||||
if header:
|
|
||||||
@@ -730,6 +734,22 @@ class Pkg(AbstractPkg):
|
|
||||||
self._gatherDepInfo()
|
|
||||||
return self._requires
|
|
||||||
|
|
||||||
+ def recommends(self):
|
|
||||||
+ self._gatherDepInfo()
|
|
||||||
+ return self._recommends
|
|
||||||
+
|
|
||||||
+ def suggests(self):
|
|
||||||
+ self._gatherDepInfo()
|
|
||||||
+ return self._suggests
|
|
||||||
+
|
|
||||||
+ def supplements(self):
|
|
||||||
+ self._gatherDepInfo()
|
|
||||||
+ return self._supplements
|
|
||||||
+
|
|
||||||
+ def enhances(self):
|
|
||||||
+ self._gatherDepInfo()
|
|
||||||
+ 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):
|
|
||||||
|
|
||||||
# internal function to gather dependency info used by the above ones
|
|
||||||
def _gather_aux(self, header, list, nametag, flagstag, versiontag,
|
|
||||||
- prereq=None):
|
|
||||||
+ prereq = None, strong_only = False, weak_only = False):
|
|
||||||
names = header[nametag]
|
|
||||||
flags = header[flagstag]
|
|
||||||
versions = header[versiontag]
|
|
||||||
@@ -801,7 +821,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))
|
|
||||||
- else:
|
|
||||||
+ elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG:
|
|
||||||
+ list.append((names[loop], versions[loop], flags[loop] & (~rpm.RPMSENSE_STRONG)))
|
|
||||||
+ elif weak_only and not (flags[loop] & rpm.RPMSENSE_STRONG):
|
|
||||||
+ list.append((names[loop], versions[loop], flags[loop]))
|
|
||||||
+ elif not (weak_only or strong_only):
|
|
||||||
list.append((name, flags[loop], evr))
|
|
||||||
|
|
||||||
def _gatherDepInfo(self):
|
|
||||||
@@ -867,6 +891,7 @@ class Pkg(AbstractPkg):
|
|
||||||
return prog
|
|
||||||
|
|
||||||
|
|
||||||
+
|
|
||||||
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):
|
|
||||||
value = Pkg.formatRequire(*c)
|
|
||||||
self._unexpanded_macros(pkg, 'Conflicts %s' % (value,), value)
|
|
||||||
|
|
||||||
+ for i in pkg.supplements():
|
|
||||||
+ value = Pkg.formatRequire(*i)
|
|
||||||
+ self._unexpanded_macros(pkg, 'Supplements %s' % (value,), value)
|
|
||||||
+
|
|
||||||
+ for i in pkg.suggests():
|
|
||||||
+ value = Pkg.formatRequire(*i)
|
|
||||||
+ self._unexpanded_macros(pkg, 'Suggests %s' % (value,), value)
|
|
||||||
+
|
|
||||||
+ for i in pkg.enhances():
|
|
||||||
+ value = Pkg.formatRequire(*i)
|
|
||||||
+ self._unexpanded_macros(pkg, 'Enhances %s' % (value,), value)
|
|
||||||
+
|
|
||||||
+ for i in pkg.recommends():
|
|
||||||
+ value = Pkg.formatRequire(*i)
|
|
||||||
+ self._unexpanded_macros(pkg, 'Recommends %s' % (value,), value)
|
|
||||||
+
|
|
||||||
obss = pkg.obsoletes()
|
|
||||||
if obss:
|
|
||||||
+ for obs in obss:
|
|
||||||
+ value = Pkg.formatRequire(*obs)
|
|
||||||
+ self._unexpanded_macros(pkg, 'Obsoletes %s' % (value,), value)
|
|
||||||
provs = pkg.provides()
|
|
||||||
for prov in provs:
|
|
||||||
for obs in obss:
|
|
@ -1,25 +1,16 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
|
||||||
Subject: [PATCH] better-wrong-script.diff
|
|
||||||
|
|
||||||
===================================================================
|
===================================================================
|
||||||
---
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
FilesCheck.py | 5 ++++-
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
@@ -1278,7 +1278,10 @@ executed.''',
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
|
||||||
index ca3e96a..ad77589 100644
|
|
||||||
--- a/FilesCheck.py
|
|
||||||
+++ b/FilesCheck.py
|
|
||||||
@@ -1663,7 +1663,10 @@ executed.''',
|
|
||||||
executed.''',
|
|
||||||
|
|
||||||
'wrong-script-interpreter',
|
'wrong-script-interpreter',
|
||||||
-'''This script uses an incorrect interpreter.''',
|
'''This script uses an interpreter which is either an inappropriate one
|
||||||
+'''This script uses an incorrect interpreter. Correct interpreters should
|
-or located in an inappropriate directory for packaged system software.''',
|
||||||
+be an absolute path to a file in in /(s)bin or /usr/(s)bin.
|
+or located in an inappropriate directory for packaged system software.
|
||||||
+Alternatively, if the file isn't supposed to be executed, then don't
|
+Alternatively, if the file isn't supposed to be executed, then ensure that
|
||||||
+mark it as executable. ''',
|
+it is not marked as being executable.
|
||||||
|
+''',
|
||||||
|
|
||||||
'non-executable-script',
|
'non-executable-script',
|
||||||
'''This text file contains a shebang or is located in a path dedicated for
|
'''This text file contains a shebang or is located in a path dedicated for
|
||||||
|
@ -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:
|
|
@ -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
|
|
@ -1,17 +1,6 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
Subject: [PATCH] buildroot-doc.diff
|
@@ -670,7 +670,7 @@ versions you can ignore this warning.'''
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
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.''',
|
|
||||||
|
|
||||||
'hardcoded-path-in-buildroot-tag',
|
'hardcoded-path-in-buildroot-tag',
|
||||||
'''A path is hardcoded in your Buildroot tag. It should be replaced
|
'''A path is hardcoded in your Buildroot tag. It should be replaced
|
||||||
|
@ -1,17 +1,6 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
Subject: [PATCH] buildroot-in-scripts.diff
|
@@ -235,7 +235,9 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
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):
|
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -6,11 +6,11 @@ Subject: [PATCH] check for self provides
|
|||||||
TagsCheck.py | 6 ++++++
|
TagsCheck.py | 6 ++++++
|
||||||
1 file changed, 6 insertions(+)
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index 8071f1d..39b7544 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -847,6 +847,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -891,6 +891,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
for p in pkg.provides():
|
for p in pkg.provides():
|
||||||
value = Pkg.formatRequire(*p)
|
value = Pkg.formatRequire(*p)
|
||||||
self._unexpanded_macros(pkg, 'Provides %s' % (value,), value)
|
self._unexpanded_macros(pkg, 'Provides %s' % (value,), value)
|
||||||
@ -19,7 +19,7 @@ index 8071f1d..39b7544 100644
|
|||||||
|
|
||||||
for c in pkg.conflicts():
|
for c in pkg.conflicts():
|
||||||
value = Pkg.formatRequire(*c)
|
value = Pkg.formatRequire(*c)
|
||||||
@@ -1175,6 +1177,10 @@ objects should thus not be depended on and they should not result in provides
|
@@ -1215,6 +1217,10 @@ objects should thus not be depended on a
|
||||||
in the containing package. Get rid of the provides if appropriate, for example
|
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
|
by filtering it out during build. Note that in some cases this may require
|
||||||
disabling rpmbuild's internal dependency generator.''',
|
disabling rpmbuild's internal dependency generator.''',
|
||||||
@ -29,4 +29,4 @@ index 8071f1d..39b7544 100644
|
|||||||
+upgrade path. self-provides are autogenerated. Remove the provide.''',
|
+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",
|
||||||
|
@ -7,16 +7,16 @@ Subject: [PATCH] compressed-backup-regex.diff
|
|||||||
FilesCheck.py | 2 +-
|
FilesCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index a8ac7f4..f73cda1 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -599,7 +599,7 @@ DEFAULT_DISALLOWED_DIRS = (
|
@@ -179,7 +179,7 @@ DEFAULT_DISALLOWED_DIRS = (
|
||||||
)
|
)
|
||||||
|
|
||||||
sub_bin_regex = re.compile('^(/usr)?/s?bin/\S+/')
|
sub_bin_regex = re.compile(r'^(/usr)?/s?bin/\S+/')
|
||||||
-backup_regex = re.compile('(~|\#[^/]+\#|\.orig|\.rej)$')
|
-backup_regex = re.compile(r'(~|\#[^/]+\#|\.orig|\.rej)$')
|
||||||
+backup_regex = re.compile('(~|\#[^/]+\#|\.orig|\.orig\.gz|\.rej)$')
|
+backup_regex = re.compile(r'(~|\#[^/]+\#|\.orig|\.orig\.gz|\.rej)$')
|
||||||
compr_regex = re.compile('\.(gz|z|Z|zip|bz2|lzma|xz)$')
|
compr_regex = re.compile(r'\.(gz|z|Z|zip|bz2|lzma|xz)$')
|
||||||
absolute_regex = re.compile('^/([^/]+)')
|
absolute_regex = re.compile(r'^/([^/]+)')
|
||||||
absolute2_regex = re.compile('^/?([^/]+)')
|
absolute2_regex = re.compile(r'^/?([^/]+)')
|
||||||
|
376
config
376
config
@ -44,19 +44,19 @@ addCheck("TmpFilesCheck")
|
|||||||
addCheck("CheckSysVinitOnSystemd")
|
addCheck("CheckSysVinitOnSystemd")
|
||||||
|
|
||||||
# stuff autobuild takes care about
|
# stuff autobuild takes care about
|
||||||
addFilter(".*invalid-version.*")
|
addFilter('.*invalid-version.*')
|
||||||
addFilter(".*invalid-packager.*")
|
addFilter('.*invalid-packager.*')
|
||||||
addFilter(".*not-standard-release-extension.*")
|
addFilter('.*not-standard-release-extension.*')
|
||||||
#addFilter(".*non-standard-group.*")
|
#addFilter('.*non-standard-group.*')
|
||||||
addFilter(".*invalid-buildhost.*")
|
addFilter('.*invalid-buildhost.*')
|
||||||
addFilter(".*executable-in-library-package.*")
|
addFilter('.*executable-in-library-package.*')
|
||||||
addFilter(".*non-versioned-file-in-library-package.*")
|
addFilter('.*non-versioned-file-in-library-package.*')
|
||||||
addFilter(".*incoherent-version-in-name.*")
|
addFilter('.*incoherent-version-in-name.*')
|
||||||
addFilter(".*invalid-vendor.*")
|
addFilter('.*invalid-vendor.*')
|
||||||
addFilter(".*invalid-distribution.*")
|
addFilter('.*invalid-distribution.*')
|
||||||
addFilter(".*hardcoded-path-in-buildroot-tag.*")
|
addFilter('.*hardcoded-path-in-buildroot-tag.*')
|
||||||
addFilter(".*no-buildroot-tag.*")
|
addFilter('.*no-buildroot-tag.*')
|
||||||
addFilter(".*cross-directory-hard-link.*")
|
addFilter('.*cross-directory-hard-link.*')
|
||||||
|
|
||||||
# Configuration options used by the checks
|
# Configuration options used by the checks
|
||||||
|
|
||||||
@ -908,223 +908,223 @@ setOption("PAMModules.WhiteList", (
|
|||||||
))
|
))
|
||||||
|
|
||||||
# Output filters
|
# Output filters
|
||||||
addFilter(".*spurious-bracket-in-.*")
|
addFilter(r'.*spurious-bracket-in-.*')
|
||||||
addFilter(".*one-line-command-in-.*")
|
addFilter(r'.*one-line-command-in-.*')
|
||||||
addFilter(" dir-or-file-in-opt ") # handled by CheckFilelist.py
|
addFilter(' dir-or-file-in-opt ') # handled by CheckFilelist.py
|
||||||
addFilter(" dir-or-file-in-usr-local ") # handled by CheckFilelist.py
|
addFilter(' dir-or-file-in-usr-local ') # handled by CheckFilelist.py
|
||||||
addFilter(" non-standard-dir-in-usr ") # handled by CheckFilelist.py
|
addFilter(' non-standard-dir-in-usr ') # handled by CheckFilelist.py
|
||||||
addFilter("incoherent-version-in-changelog")
|
addFilter('incoherent-version-in-changelog')
|
||||||
addFilter(" no-signature")
|
addFilter(' no-signature')
|
||||||
addFilter(" symlink-crontab-file") #bnc591431
|
addFilter(' symlink-crontab-file') #bnc591431
|
||||||
addFilter(" without-chkconfig")
|
addFilter(' without-chkconfig')
|
||||||
addFilter("unstripped-binary-or-object.*\.ko")
|
addFilter(r'unstripped-binary-or-object.*\.ko')
|
||||||
addFilter(" no-chkconfig")
|
addFilter(' no-chkconfig')
|
||||||
addFilter(" subsys-not-used")
|
addFilter(' subsys-not-used')
|
||||||
addFilter(" dangerous-command.*")
|
addFilter(r' dangerous-command.*')
|
||||||
addFilter(" setuid-binary.*")
|
addFilter(r' setuid-binary.*')
|
||||||
addFilter(".*FSSTND-dir-in-var /var/adm/.*")
|
addFilter(r'.*FSSTND-dir-in-var /var/adm/.*')
|
||||||
addFilter("subdir-in-bin /sbin/conf.d/")
|
addFilter('subdir-in-bin /sbin/conf.d/')
|
||||||
addFilter(".* nss_db non-standard-dir-in-var db")
|
addFilter(r'.* nss_db non-standard-dir-in-var db')
|
||||||
addFilter("non-standard-dir-in-usr openwin")
|
addFilter('non-standard-dir-in-usr openwin')
|
||||||
addFilter("ibcs2 non-standard-dir-in-usr i486-sysv4")
|
addFilter('ibcs2 non-standard-dir-in-usr i486-sysv4')
|
||||||
addFilter("shlibs5 non-standard-dir-in-usr i486-linux-libc5")
|
addFilter('shlibs5 non-standard-dir-in-usr i486-linux-libc5')
|
||||||
addFilter("explicit-lib-dependency libtool")
|
addFilter('explicit-lib-dependency libtool')
|
||||||
|
|
||||||
# filesystem package needs special exceptions
|
# filesystem package needs special exceptions
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-var-run")
|
addFilter(r'^filesystem\..*: dir-or-file-in-var-run')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-var-lock")
|
addFilter(r'^filesystem\..*: dir-or-file-in-var-lock')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-var-tmp")
|
addFilter(r'^filesystem\..*: dir-or-file-in-var-tmp')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-var-run")
|
addFilter(r'^filesystem\..*: dir-or-file-in-var-run')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-var-lock")
|
addFilter(r'^filesystem\..*: dir-or-file-in-var-lock')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-usr-tmp")
|
addFilter(r'^filesystem\..*: dir-or-file-in-usr-tmp')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-tmp")
|
addFilter(r'^filesystem\..*: dir-or-file-in-tmp')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-mnt")
|
addFilter(r'^filesystem\..*: dir-or-file-in-mnt')
|
||||||
addFilter("^filesystem\..*: dir-or-file-in-home")
|
addFilter(r'^filesystem\..*: dir-or-file-in-home')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /root/.gnupg")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /root/.gnupg')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /root/.gnupg")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /root/.gnupg')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /etc/skel/.config")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /etc/skel/.config')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /etc/skel/.local")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /etc/skel/.local')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /tmp/.X11-unix")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /tmp/.X11-unix')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /tmp/.ICE-unix")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /tmp/.ICE-unix')
|
||||||
addFilter("^filesystem\..*: hidden-file-or-dir /etc/skel/.fonts")
|
addFilter(r'^filesystem\..*: hidden-file-or-dir /etc/skel/.fonts')
|
||||||
addFilter("^filesystem\..*: suse-filelist-forbidden-fhs23")
|
addFilter(r'^filesystem\..*: suse-filelist-forbidden-fhs23')
|
||||||
addFilter("^filesystem\..*: suse-filelist-forbidden-opt")
|
addFilter(r'^filesystem\..*: suse-filelist-forbidden-opt')
|
||||||
addFilter("^filesystem\..*: non-standard-uid /var/lib/nobody nobody")
|
addFilter(r'^filesystem\..*: non-standard-uid /var/lib/nobody nobody')
|
||||||
addFilter("^filesystem\..*: missing-dependency-to-cron")
|
addFilter(r'^filesystem\..*: missing-dependency-to-cron')
|
||||||
# has arch specific dirs in /usr
|
# has arch specific dirs in /usr
|
||||||
addFilter("^filesystem\..*: no-binary")
|
addFilter(r'^filesystem\..*: no-binary')
|
||||||
|
|
||||||
# suppress any errors about internal packages
|
# suppress any errors about internal packages
|
||||||
addFilter("^qa\S+: [EWI]:")
|
addFilter(r'^qa\S+: [EWI]:')
|
||||||
addFilter("^\S*(?:INTERNAL|internal)\.\S+: [EWI]:")
|
addFilter(r'^\S*(?:INTERNAL|internal)\.\S+: [EWI]:')
|
||||||
|
|
||||||
|
|
||||||
# exceptions for devel-files
|
# exceptions for devel-files
|
||||||
addFilter("devel-file-in-non-devel-package.*/boot/vmlinuz-.*autoconf.h")
|
addFilter(r'devel-file-in-non-devel-package.*/boot/vmlinuz-.*autoconf.h')
|
||||||
addFilter("devel-file-in-non-devel-package.*/usr/src/linux-")
|
addFilter(r'devel-file-in-non-devel-package.*/usr/src/linux-')
|
||||||
addFilter("devel-file-in-non-devel-package.*/usr/share/systemtap")
|
addFilter(r'devel-file-in-non-devel-package.*/usr/share/systemtap')
|
||||||
addFilter("kde4-kapptemplate\.\S+:.*devel-file-in-non-devel-package")
|
addFilter(r'kde4-kapptemplate\.\S+:.*devel-file-in-non-devel-package')
|
||||||
addFilter("kdesdk3\.\S+:.*devel-file-in-non-devel-package")
|
addFilter(r'kdesdk3\.\S+:.*devel-file-in-non-devel-package')
|
||||||
addFilter("-(?:examples|doc)\.\S+: \w: devel-file-in-non-devel-package")
|
addFilter(r'-(?:examples|doc)\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter("java\S+-demo\.\S+: \w: devel-file-in-non-devel-package")
|
addFilter(r'java\S+-demo\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter('avr-libc\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'avr-libc\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter('dietlibc\.\S+ \w: devel-file-in-non-devel-package')
|
addFilter(r'dietlibc\.\S+ \w: devel-file-in-non-devel-package')
|
||||||
addFilter('cross-.*devel-file-in-non-devel-package')
|
addFilter(r'cross-.*devel-file-in-non-devel-package')
|
||||||
addFilter('cmake.*devel-file-in-non-devel-package')
|
addFilter(r'cmake.*devel-file-in-non-devel-package')
|
||||||
addFilter('gcc\d\d.*devel-file-in-non-devel-package')
|
addFilter(r'gcc\d\d.*devel-file-in-non-devel-package')
|
||||||
addFilter('OpenOffice_org-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'OpenOffice_org-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter('wnn-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'wnn-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter('ocaml\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'ocaml\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter('xorg-x11-server-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'xorg-x11-server-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter('linux-kernel-headers\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'linux-kernel-headers\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
addFilter(' devel-file-in-non-devel-package.*-config')
|
addFilter(r' devel-file-in-non-devel-package.*-config')
|
||||||
addFilter('libtool\.\S+: \w: devel-file-in-non-devel-package')
|
addFilter(r'libtool\.\S+: \w: devel-file-in-non-devel-package')
|
||||||
|
|
||||||
addFilter('update-desktop-files\.\S+: \w: untranslated-desktop-file')
|
addFilter(r'update-desktop-files\.\S+: \w: untranslated-desktop-file')
|
||||||
addFilter("sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs")
|
addFilter(r'sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs')
|
||||||
addFilter("kernel-modules-not-in-kernel-packages")
|
addFilter('kernel-modules-not-in-kernel-packages')
|
||||||
# SUSE kmp's don't need manual depmod (bnc#456048)
|
# SUSE kmp's don't need manual depmod (bnc#456048)
|
||||||
addFilter("module-without-depmod-postin")
|
addFilter('module-without-depmod-postin')
|
||||||
addFilter("postin-with-wrong-depmod")
|
addFilter('postin-with-wrong-depmod')
|
||||||
addFilter("module-without-depmod-postun")
|
addFilter('module-without-depmod-postun')
|
||||||
addFilter("postun-with-wrong-depmod")
|
addFilter('postun-with-wrong-depmod')
|
||||||
#
|
#
|
||||||
addFilter("configure-without-libdir-spec")
|
addFilter('configure-without-libdir-spec')
|
||||||
addFilter("conffile-without-noreplace-flag /etc/init.d")
|
addFilter('conffile-without-noreplace-flag /etc/init.d')
|
||||||
addFilter("use-of-RPM_SOURCE_DIR")
|
addFilter('use-of-RPM_SOURCE_DIR')
|
||||||
addFilter("use-tmp-in-")
|
addFilter('use-tmp-in-')
|
||||||
addFilter("symlink-contains-up-and-down-segments /var/lib/named")
|
addFilter('symlink-contains-up-and-down-segments /var/lib/named')
|
||||||
addFilter("no-ldconfig-symlink")
|
addFilter('no-ldconfig-symlink')
|
||||||
addFilter("aaa_base\.\S+: \w: use-of-home-in-%post")
|
addFilter(r'aaa_base\.\S+: \w: use-of-home-in-%post')
|
||||||
addFilter("description-line-too-long")
|
addFilter('description-line-too-long')
|
||||||
addFilter("hardcoded-library-path")
|
addFilter('hardcoded-library-path')
|
||||||
# addFilter("incoherent-subsys")
|
# addFilter('incoherent-subsys')
|
||||||
# doesn't seem to make sense
|
# doesn't seem to make sense
|
||||||
addFilter("invalid-ldconfig-symlink")
|
addFilter('invalid-ldconfig-symlink')
|
||||||
addFilter("invalid-soname")
|
addFilter('invalid-soname')
|
||||||
addFilter("library-not-linked-against-libc")
|
addFilter('library-not-linked-against-libc')
|
||||||
addFilter("only-non-binary-in-usr-lib")
|
addFilter('only-non-binary-in-usr-lib')
|
||||||
addFilter("outside-libdir-files")
|
addFilter('outside-libdir-files')
|
||||||
# we want these files
|
# we want these files
|
||||||
addFilter(" perl-temp-file ")
|
addFilter(' perl-temp-file ')
|
||||||
addFilter(" hidden-file-or-dir .*/\.packlist")
|
addFilter(r' hidden-file-or-dir .*/\.packlist')
|
||||||
addFilter(" hidden-file-or-dir .*/\.directory")
|
addFilter(r' hidden-file-or-dir .*/\.directory')
|
||||||
addFilter("perl-.*no-binary")
|
addFilter(r'perl-.*no-binary')
|
||||||
addFilter(" no-major-in-name ")
|
addFilter(' no-major-in-name ')
|
||||||
# we check for that already
|
# we check for that already
|
||||||
addFilter("dangling-relative-symlink")
|
addFilter('dangling-relative-symlink')
|
||||||
addFilter(" lib-package-without-%mklibname")
|
addFilter(' lib-package-without-%mklibname')
|
||||||
addFilter(" requires-on-release")
|
addFilter(' requires-on-release')
|
||||||
addFilter(" non-executable-script /etc/profile.d/")
|
addFilter(' non-executable-script /etc/profile.d/')
|
||||||
addFilter(" non-executable-script /var/adm/fillup-templates/")
|
addFilter(' non-executable-script /var/adm/fillup-templates/')
|
||||||
addFilter(" init-script-name-with-dot ")
|
addFilter(' init-script-name-with-dot ')
|
||||||
addFilter('.* statically-linked-binary /sbin/ldconfig')
|
addFilter(r'.* statically-linked-binary /sbin/ldconfig')
|
||||||
addFilter('.* statically-linked-binary /sbin/init')
|
addFilter(r'.* statically-linked-binary /sbin/init')
|
||||||
addFilter('valgrind.* statically-linked-binary')
|
addFilter(r'valgrind.* statically-linked-binary')
|
||||||
addFilter('ldconfig-post.*/ddiwrapper/wine/')
|
addFilter(r'ldconfig-post.*/ddiwrapper/wine/')
|
||||||
addFilter('glibc\.\S+: \w: statically-linked-binary /usr/sbin/glibc_post_upgrade')
|
addFilter(r'glibc\.\S+: \w: statically-linked-binary /usr/sbin/glibc_post_upgrade')
|
||||||
addFilter(" symlink-should-be-relative ")
|
addFilter(' symlink-should-be-relative ')
|
||||||
addFilter(" binary-or-shlib-defines-rpath .*ORIGIN")
|
addFilter(' binary-or-shlib-defines-rpath .*ORIGIN')
|
||||||
addFilter("libzypp.*shlib-policy-name-error.*libzypp")
|
addFilter(r'libzypp.*shlib-policy-name-error.*libzypp')
|
||||||
addFilter("libtool.*shlib-policy.*")
|
addFilter(r'libtool.*shlib-policy.*')
|
||||||
|
|
||||||
# stuff that is currently too noisy, but might become relevant in the future
|
# stuff that is currently too noisy, but might become relevant in the future
|
||||||
addFilter(" prereq-use")
|
addFilter(' prereq-use')
|
||||||
addFilter(" file-not-utf8")
|
addFilter(' file-not-utf8')
|
||||||
addFilter(" tag-not-utf8")
|
addFilter(' tag-not-utf8')
|
||||||
addFilter(" setup-not-quiet")
|
addFilter(' setup-not-quiet')
|
||||||
addFilter(" no-cleaning-of-buildroot ")
|
addFilter(' no-cleaning-of-buildroot ')
|
||||||
addFilter(" mixed-use-of-spaces-and-tabs ")
|
addFilter(' mixed-use-of-spaces-and-tabs ')
|
||||||
addFilter(" prereq-use ")
|
addFilter(' prereq-use ')
|
||||||
# an issue with OBS, works with autobuild
|
# an issue with OBS, works with autobuild
|
||||||
addFilter(" no-packager-tag")
|
addFilter(' no-packager-tag')
|
||||||
addFilter(" unversioned-explicit-provides ")
|
addFilter(' unversioned-explicit-provides ')
|
||||||
addFilter(" unversioned-explicit-obsoletes ")
|
addFilter(' unversioned-explicit-obsoletes ')
|
||||||
addFilter(" no-%clean-section")
|
addFilter(' no-%clean-section')
|
||||||
addFilter(" service-default-enabled ")
|
addFilter(' service-default-enabled ')
|
||||||
addFilter(" non-standard-dir-perm ")
|
addFilter(' non-standard-dir-perm ')
|
||||||
addFilter(" conffile-without-noreplace-flag ")
|
addFilter(' conffile-without-noreplace-flag ')
|
||||||
addFilter(" non-standard-executable-perm ")
|
addFilter(' non-standard-executable-perm ')
|
||||||
addFilter(" jar-not-indexed ")
|
addFilter(' jar-not-indexed ')
|
||||||
addFilter(" uncompressed-zip ")
|
addFilter(' uncompressed-zip ')
|
||||||
addFilter(" %ifarch-applied-patch ")
|
addFilter(' %ifarch-applied-patch ')
|
||||||
addFilter(" read-error ")
|
addFilter(' read-error ')
|
||||||
addFilter(" init-script-without-chkconfig-postin ")
|
addFilter(' init-script-without-chkconfig-postin ')
|
||||||
addFilter(" init-script-without-chkconfig-preun ")
|
addFilter(' init-script-without-chkconfig-preun ')
|
||||||
addFilter(" postin-without-chkconfig ")
|
addFilter(' postin-without-chkconfig ')
|
||||||
addFilter(" preun-without-chkconfig ")
|
addFilter(' preun-without-chkconfig ')
|
||||||
addFilter(" no-dependency-on locales")
|
addFilter(' no-dependency-on locales')
|
||||||
addFilter(" incoherent-version-in-name")
|
addFilter(' incoherent-version-in-name')
|
||||||
addFilter(" binary-or-shlib-defines-rpath")
|
addFilter(' binary-or-shlib-defines-rpath')
|
||||||
addFilter(" executable-marked-as-config-file")
|
addFilter(' executable-marked-as-config-file')
|
||||||
addFilter(" log-files-without-logrotate")
|
addFilter(' log-files-without-logrotate')
|
||||||
addFilter(" hardcoded-prefix-tag")
|
addFilter(' hardcoded-prefix-tag')
|
||||||
addFilter(" no-documentation")
|
addFilter(' no-documentation')
|
||||||
addFilter(" multiple-specfiles")
|
addFilter(' multiple-specfiles')
|
||||||
addFilter(" apache2-naming-policy-not-applied")
|
addFilter(' apache2-naming-policy-not-applied')
|
||||||
addFilter(" no-default-runlevel ")
|
addFilter(' no-default-runlevel ')
|
||||||
addFilter(" setgid-binary ")
|
addFilter(' setgid-binary ')
|
||||||
addFilter(" non-readable ")
|
addFilter(' non-readable ')
|
||||||
addFilter(" manpage-not-bzipped ")
|
addFilter(' manpage-not-bzipped ')
|
||||||
addFilter(" postin-without-ghost-file-creation ")
|
addFilter(' postin-without-ghost-file-creation ')
|
||||||
# bug 287090
|
# bug 287090
|
||||||
addFilter(" file-in-usr-marked-as-conffile")
|
addFilter(' file-in-usr-marked-as-conffile')
|
||||||
addFilter(" non-remote_fs-dependency.*/boot")
|
addFilter(' non-remote_fs-dependency.*/boot')
|
||||||
|
|
||||||
# exceptions for non-devel-buildrequires
|
# exceptions for non-devel-buildrequires
|
||||||
addFilter(" non-devel-buildrequires apache2-mod_perl")
|
addFilter(' non-devel-buildrequires apache2-mod_perl')
|
||||||
addFilter(" non-devel-buildrequires ksh")
|
addFilter(' non-devel-buildrequires ksh')
|
||||||
addFilter(" non-devel-buildrequires perl")
|
addFilter(' non-devel-buildrequires perl')
|
||||||
addFilter(" non-devel-buildrequires php5")
|
addFilter(' non-devel-buildrequires php5')
|
||||||
addFilter(" non-devel-buildrequires postfix")
|
addFilter(' non-devel-buildrequires postfix')
|
||||||
addFilter(" non-devel-buildrequires python")
|
addFilter(' non-devel-buildrequires python')
|
||||||
addFilter(" non-devel-buildrequires ruby")
|
addFilter(' non-devel-buildrequires ruby')
|
||||||
addFilter(" non-devel-buildrequires valgrind")
|
addFilter(' non-devel-buildrequires valgrind')
|
||||||
addFilter(" non-devel-buildrequires yasm")
|
addFilter(' non-devel-buildrequires yasm')
|
||||||
addFilter(" non-devel-buildrequires tcl")
|
addFilter(' non-devel-buildrequires tcl')
|
||||||
|
|
||||||
addFilter("beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires")
|
addFilter(r'beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires')
|
||||||
addFilter("collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires")
|
addFilter(r'collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires')
|
||||||
addFilter("installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires")
|
addFilter(r'installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires')
|
||||||
|
|
||||||
# exceptions for filelist checks
|
# exceptions for filelist checks
|
||||||
addFilter("nfs-client\.\S+: \w: suse-filelist-forbidden-backup-file /var/lib/nfs/sm.bak ")
|
addFilter(r'nfs-client\.\S+: \w: suse-filelist-forbidden-backup-file /var/lib/nfs/sm.bak ')
|
||||||
addFilter("perl\.\S+: \w: suse-filelist-forbidden-perl-dir ")
|
addFilter(r'perl\.\S+: \w: suse-filelist-forbidden-perl-dir ')
|
||||||
addFilter("info\.\S+: \w: info-dir-file .*/usr/share/info/dir")
|
addFilter(r'info\.\S+: \w: info-dir-file .*/usr/share/info/dir')
|
||||||
|
|
||||||
# fillup is known to break SuSEfirewall's sysconfig file on many
|
# fillup is known to break SuSEfirewall's sysconfig file on many
|
||||||
# systems as people tend to break up long lines into several ones.
|
# systems as people tend to break up long lines into several ones.
|
||||||
# This bug remains unfixed since years (bnc#340926).
|
# This bug remains unfixed since years (bnc#340926).
|
||||||
# So we have to avoid fillup and therefore break the SUSE policy
|
# So we have to avoid fillup and therefore break the SUSE policy
|
||||||
addFilter("SuSEfirewall2\.\S+: \w: suse-filelist-forbidden-sysconfig.*/etc/sysconfig/SuSEfirewall2")
|
addFilter(r'SuSEfirewall2\.\S+: \w: suse-filelist-forbidden-sysconfig.*/etc/sysconfig/SuSEfirewall2')
|
||||||
|
|
||||||
# these packages are used for CD creation and are not supposed to be
|
# these packages are used for CD creation and are not supposed to be
|
||||||
# installed. It's still a dirty hack to make an exception. The
|
# installed. It's still a dirty hack to make an exception. The
|
||||||
# packages should either be built in a separate project with
|
# packages should either be built in a separate project with
|
||||||
# different config or file be put somewhere below /opt/suse/*
|
# different config or file be put somewhere below /opt/suse/*
|
||||||
addFilter("(?:dosutils|skelcd|installation-images|yast2-slide-show|instlux|skelcd-.*|patterns-.*)\.\S+: \w: suse-filelist-forbidden-fhs23 /CD1")
|
addFilter(r'(?:dosutils|skelcd|installation-images|yast2-slide-show|instlux|skelcd-.*|patterns-.*)\.\S+: \w: suse-filelist-forbidden-fhs23 /CD1')
|
||||||
|
|
||||||
# suboptimal library packaging
|
# suboptimal library packaging
|
||||||
addFilter(" non-devel-buildrequires graphviz")
|
addFilter(' non-devel-buildrequires graphviz')
|
||||||
addFilter(" non-devel-buildrequires ImageMagick")
|
addFilter(' non-devel-buildrequires ImageMagick')
|
||||||
addFilter(" non-devel-buildrequires aspell")
|
addFilter(' non-devel-buildrequires aspell')
|
||||||
addFilter(" non-devel-buildrequires autotrace")
|
addFilter(' non-devel-buildrequires autotrace')
|
||||||
addFilter(" non-devel-buildrequires gettext")
|
addFilter(' non-devel-buildrequires gettext')
|
||||||
addFilter(" non-devel-buildrequires devhelp")
|
addFilter(' non-devel-buildrequires devhelp')
|
||||||
addFilter(" non-devel-buildrequires libxml2")
|
addFilter(' non-devel-buildrequires libxml2')
|
||||||
addFilter(" non-devel-buildrequires libxslt")
|
addFilter(' non-devel-buildrequires libxslt')
|
||||||
addFilter(" non-devel-buildrequires recode")
|
addFilter(' non-devel-buildrequires recode')
|
||||||
|
|
||||||
|
|
||||||
# many places have shorter paths
|
# many places have shorter paths
|
||||||
addFilter(" non-coherent-filename ")
|
addFilter(' non-coherent-filename ')
|
||||||
|
|
||||||
# mandriva specific stuff that we don't want
|
# mandriva specific stuff that we don't want
|
||||||
addFilter(" invalid-build-requires ")
|
addFilter(' invalid-build-requires ')
|
||||||
addFilter(" no-provides ")
|
addFilter(' no-provides ')
|
||||||
|
|
||||||
# bash completion files are not scripts, do not require them marked as %config
|
# bash completion files are not scripts, do not require them marked as %config
|
||||||
addFilter("W: non-conffile-in-etc /etc/bash_completion.d/")
|
addFilter('W: non-conffile-in-etc /etc/bash_completion.d/')
|
||||||
|
|
||||||
# config ends here
|
# config ends here
|
||||||
|
|
||||||
|
240
config.in
240
config.in
@ -1,240 +0,0 @@
|
|||||||
# -*- python -*-
|
|
||||||
# Configuration for the rpmlint utility.
|
|
||||||
# Loaded before ~/.rpmlintrc
|
|
||||||
# $Id: config,v 1.39 2003/12/22 11:20:55 flepied Exp $
|
|
||||||
|
|
||||||
# This line is mandatory to access the configuration functions
|
|
||||||
from Config import *
|
|
||||||
|
|
||||||
# Additionale path to look for checks
|
|
||||||
|
|
||||||
#addCheckDir("~/mandrake/rpmlint")
|
|
||||||
|
|
||||||
# Configure the checks if you don't want the default ones
|
|
||||||
|
|
||||||
allChecks()
|
|
||||||
|
|
||||||
addCheck("CheckBuildRoot")
|
|
||||||
addCheck("CheckExecDocs")
|
|
||||||
addCheck("CheckPkgConfig")
|
|
||||||
addCheck("CheckCommonFiles")
|
|
||||||
addCheck("CheckInitScripts")
|
|
||||||
addCheck("DuplicatesCheck")
|
|
||||||
addCheck("LibraryPolicyCheck")
|
|
||||||
addCheck("CheckIconSizes")
|
|
||||||
#addCheck("CheckStaticLibraries")
|
|
||||||
addCheck("BrandingPolicyCheck")
|
|
||||||
addCheck("CheckSUIDPermissions")
|
|
||||||
# polkit-default-privs would need to be installed always
|
|
||||||
#addCheck("CheckPolkitPrivs")
|
|
||||||
addCheck("CheckDBUSServices")
|
|
||||||
addCheck("CheckDBusPolicy")
|
|
||||||
addCheck("CheckFilelist")
|
|
||||||
|
|
||||||
# stuff autobuild takes care about
|
|
||||||
addFilter(".*invalid-version.*")
|
|
||||||
addFilter(".*invalid-packager.*")
|
|
||||||
addFilter(".*not-standard-release-extension.*")
|
|
||||||
#addFilter(".*non-standard-group.*")
|
|
||||||
addFilter(".*invalid-buildhost.*")
|
|
||||||
addFilter(".*executable-in-library-package.*")
|
|
||||||
addFilter(".*non-versioned-file-in-library-package.*")
|
|
||||||
addFilter(".*incoherent-version-in-name.*")
|
|
||||||
addFilter(".*invalid-vendor.*")
|
|
||||||
addFilter(".*invalid-distribution.*")
|
|
||||||
|
|
||||||
# Configuration options used by the checks
|
|
||||||
|
|
||||||
#setOption("Vendor", "MySelf")
|
|
||||||
#setOption("Distribution", "MyDistrib")
|
|
||||||
setOption("UseBzip2", 0)
|
|
||||||
setOption("UseUTF8", 1)
|
|
||||||
#setOption("ReleaseExtension", None)
|
|
||||||
#setOption("ValidGroups", ("Group1", "Group2"))
|
|
||||||
#setOption("KernelModuleRPMsOK", 0)
|
|
||||||
|
|
||||||
@STDGROUPS@
|
|
||||||
@STDUSERS@
|
|
||||||
|
|
||||||
setOption('DanglingSymlinkExceptions',
|
|
||||||
(['/usr/share/doc/licenses/', 'licenses'],
|
|
||||||
['consolehelper$', 'usermode-consoleonly'],
|
|
||||||
))
|
|
||||||
|
|
||||||
# Output filters
|
|
||||||
addFilter(".*spurious-bracket-in-.*")
|
|
||||||
addFilter(".*one-line-command-in-.*")
|
|
||||||
addFilter(" dir-or-file-in-opt")
|
|
||||||
addFilter("incoherent-version-in-changelog")
|
|
||||||
addFilter(" no-signature")
|
|
||||||
addFilter(" without-chkconfig")
|
|
||||||
addFilter("unstripped-binary-or-object.*\.ko")
|
|
||||||
addFilter(" no-chkconfig")
|
|
||||||
addFilter(" subsys-not-used")
|
|
||||||
addFilter(" dangerous-command.*")
|
|
||||||
addFilter(" setuid-binary.*")
|
|
||||||
addFilter(".*FSSTND-dir-in-var /var/adm/.*")
|
|
||||||
addFilter("no-url-tag")
|
|
||||||
addFilter("subdir-in-bin /sbin/conf.d/")
|
|
||||||
addFilter(" invalid-license")
|
|
||||||
addFilter(".* nss_db non-standard-dir-in-var db")
|
|
||||||
addFilter("non-standard-dir-in-usr openwin")
|
|
||||||
addFilter("ibcs2 non-standard-dir-in-usr i486-sysv4")
|
|
||||||
addFilter("shlibs5 non-standard-dir-in-usr i486-linux-libc5")
|
|
||||||
addFilter("filesystem dir-or-file")
|
|
||||||
addFilter("filesystem hidden-")
|
|
||||||
addFilter("explicit-lib-dependency libtool")
|
|
||||||
|
|
||||||
|
|
||||||
# suppress any errors about internal packages
|
|
||||||
addFilter("^qa\S+: [EWI]:")
|
|
||||||
addFilter("^\S*(?:INTERNAL|internal)\.\S+: [EWI]:")
|
|
||||||
|
|
||||||
|
|
||||||
# exceptions for devel-files
|
|
||||||
addFilter("devel-file-in-non-devel-package.*/boot/vmlinuz-.*autoconf.h")
|
|
||||||
addFilter("devel-file-in-non-devel-package.*/usr/src/linux-")
|
|
||||||
addFilter("devel-file-in-non-devel-package.*/usr/share/systemtap")
|
|
||||||
addFilter("kde4-kapptemplate\.\S+:.*devel-file-in-non-devel-package")
|
|
||||||
addFilter("kdesdk3\.\S+:.*devel-file-in-non-devel-package")
|
|
||||||
addFilter("-(?:examples|doc)\.\S+: \w: devel-file-in-non-devel-package")
|
|
||||||
addFilter("java\S+-demo\.\S+: \w: devel-file-in-non-devel-package")
|
|
||||||
addFilter('avr-libc\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter('dietlibc\.\S+ \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter('cross-.*devel-file-in-non-devel-package')
|
|
||||||
addFilter('cmake.*devel-file-in-non-devel-package')
|
|
||||||
addFilter('gcc\d\d.*devel-file-in-non-devel-package')
|
|
||||||
addFilter('OpenOffice_org-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter('wnn-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter('ocaml\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter('xorg-x11-server-sdk\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter('linux-kernel-headers\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
addFilter(' devel-file-in-non-devel-package.*-config')
|
|
||||||
addFilter('libtool\.\S+: \w: devel-file-in-non-devel-package')
|
|
||||||
|
|
||||||
addFilter('update-desktop-files\.\S+: \w: untranslated-desktop-file')
|
|
||||||
addFilter("sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs")
|
|
||||||
addFilter("kernel-modules-not-in-kernel-packages")
|
|
||||||
# SUSE kmp's don't need manual depmod (bnc#456048)
|
|
||||||
addFilter("module-without-depmod-postin")
|
|
||||||
addFilter("postin-with-wrong-depmod")
|
|
||||||
addFilter("module-without-depmod-postun")
|
|
||||||
addFilter("postun-with-wrong-depmod")
|
|
||||||
#
|
|
||||||
addFilter("configure-without-libdir-spec")
|
|
||||||
addFilter("conffile-without-noreplace-flag /etc/init.d")
|
|
||||||
addFilter("use-of-RPM_SOURCE_DIR")
|
|
||||||
addFilter(" info info-dir-file /usr/share/info/dir")
|
|
||||||
addFilter("use-tmp-in-")
|
|
||||||
addFilter("symlink-contains-up-and-down-segments /var/lib/named")
|
|
||||||
addFilter("no-ldconfig-symlink")
|
|
||||||
addFilter("aaa_base\.\S+: \w: use-of-home-in-%post")
|
|
||||||
addFilter("description-line-too-long")
|
|
||||||
addFilter("hardcoded-library-path")
|
|
||||||
# addFilter("incoherent-subsys")
|
|
||||||
# doesn't seem to make sense
|
|
||||||
addFilter("invalid-ldconfig-symlink")
|
|
||||||
addFilter("invalid-soname")
|
|
||||||
addFilter("library-not-linked-against-libc")
|
|
||||||
addFilter("only-non-binary-in-usr-lib")
|
|
||||||
addFilter("outside-libdir-files")
|
|
||||||
# we want these files
|
|
||||||
addFilter(" perl-temp-file ")
|
|
||||||
addFilter(" hidden-file-or-dir .*/\.packlist")
|
|
||||||
addFilter(" hidden-file-or-dir .*/\.directory")
|
|
||||||
addFilter("perl-.*no-binary")
|
|
||||||
addFilter(" no-major-in-name ")
|
|
||||||
# we check for that already
|
|
||||||
addFilter("dangling-relative-symlink")
|
|
||||||
addFilter(" lib-package-without-%mklibname")
|
|
||||||
addFilter(" requires-on-release")
|
|
||||||
addFilter(" non-executable-script /etc/profile.d/")
|
|
||||||
addFilter(" non-executable-script /var/adm/fillup-templates/")
|
|
||||||
addFilter(" init-script-name-with-dot ")
|
|
||||||
addFilter('.* statically-linked-binary /sbin/ldconfig')
|
|
||||||
addFilter('.* statically-linked-binary /sbin/init')
|
|
||||||
addFilter('ldconfig-post.*/ddiwrapper/wine/')
|
|
||||||
addFilter('glibc\.\S+: \w: statically-linked-binary /usr/sbin/glibc_post_upgrade')
|
|
||||||
addFilter(" symlink-should-be-relative ")
|
|
||||||
addFilter(" binary-or-shlib-defines-rpath .*ORIGIN")
|
|
||||||
addFilter("libzypp.*shlib-policy-name-error.*libzypp")
|
|
||||||
|
|
||||||
# stuff that is currently too noisy, but might become relevant in the future
|
|
||||||
addFilter(" file-not-utf8")
|
|
||||||
addFilter(" tag-not-utf8")
|
|
||||||
addFilter(" setup-not-quiet")
|
|
||||||
addFilter(" no-cleaning-of-buildroot ")
|
|
||||||
addFilter(" mixed-use-of-spaces-and-tabs ")
|
|
||||||
addFilter(" prereq-use ")
|
|
||||||
addFilter(" unversioned-explicit-provides ")
|
|
||||||
addFilter(" unversioned-explicit-obsoletes ")
|
|
||||||
addFilter(" no-%clean-section")
|
|
||||||
addFilter(" service-default-enabled ")
|
|
||||||
addFilter(" non-standard-dir-perm ")
|
|
||||||
addFilter(" conffile-without-noreplace-flag ")
|
|
||||||
addFilter(" non-standard-executable-perm ")
|
|
||||||
addFilter(" jar-not-indexed ")
|
|
||||||
addFilter(" non-conffile-in-etc ")
|
|
||||||
addFilter(" uncompressed-zip ")
|
|
||||||
addFilter(" %ifarch-applied-patch ")
|
|
||||||
addFilter(" read-error ")
|
|
||||||
addFilter(" init-script-without-chkconfig-postin ")
|
|
||||||
addFilter(" init-script-without-chkconfig-preun ")
|
|
||||||
addFilter(" postin-without-chkconfig ")
|
|
||||||
addFilter(" preun-without-chkconfig ")
|
|
||||||
addFilter(" no-dependency-on locales")
|
|
||||||
addFilter(" incoherent-version-in-name")
|
|
||||||
addFilter(" binary-or-shlib-defines-rpath")
|
|
||||||
addFilter(" executable-marked-as-config-file")
|
|
||||||
addFilter(" log-files-without-logrotate")
|
|
||||||
addFilter(" hardcoded-prefix-tag")
|
|
||||||
addFilter(" no-documentation")
|
|
||||||
addFilter(" multiple-specfiles")
|
|
||||||
addFilter(" apache2-naming-policy-not-applied")
|
|
||||||
addFilter(" no-default-runlevel ")
|
|
||||||
addFilter(" setgid-binary ")
|
|
||||||
addFilter(" non-standard-gid ")
|
|
||||||
addFilter(" non-readable ")
|
|
||||||
addFilter(" manpage-not-bzipped ")
|
|
||||||
addFilter(" postin-without-ghost-file-creation ")
|
|
||||||
# bug 287090
|
|
||||||
addFilter(" file-in-usr-marked-as-conffile")
|
|
||||||
addFilter(" non-remote_fs-dependency.*/boot")
|
|
||||||
|
|
||||||
# exceptions for non-devel-buildrequires
|
|
||||||
addFilter(" non-devel-buildrequires apache2-mod_perl")
|
|
||||||
addFilter(" non-devel-buildrequires ksh")
|
|
||||||
addFilter(" non-devel-buildrequires perl")
|
|
||||||
addFilter(" non-devel-buildrequires php5")
|
|
||||||
addFilter(" non-devel-buildrequires postfix")
|
|
||||||
addFilter(" non-devel-buildrequires python")
|
|
||||||
addFilter(" non-devel-buildrequires ruby")
|
|
||||||
addFilter(" non-devel-buildrequires valgrind")
|
|
||||||
addFilter(" non-devel-buildrequires yasm")
|
|
||||||
addFilter(" non-devel-buildrequires tcl")
|
|
||||||
|
|
||||||
addFilter("beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires")
|
|
||||||
addFilter("collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires")
|
|
||||||
addFilter("installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires")
|
|
||||||
|
|
||||||
# suboptimal library packaging
|
|
||||||
addFilter(" non-devel-buildrequires graphviz")
|
|
||||||
addFilter(" non-devel-buildrequires ImageMagick")
|
|
||||||
addFilter(" non-devel-buildrequires aspell")
|
|
||||||
addFilter(" non-devel-buildrequires autotrace")
|
|
||||||
addFilter(" non-devel-buildrequires gettext")
|
|
||||||
addFilter(" non-devel-buildrequires devhelp")
|
|
||||||
addFilter(" non-devel-buildrequires libxml2")
|
|
||||||
addFilter(" non-devel-buildrequires libxslt")
|
|
||||||
addFilter(" non-devel-buildrequires recode")
|
|
||||||
|
|
||||||
|
|
||||||
# many places have shorter paths
|
|
||||||
addFilter(" non-coherent-filename ")
|
|
||||||
|
|
||||||
# mandriva specific stuff that we don't want
|
|
||||||
addFilter(" invalid-build-requires ")
|
|
||||||
addFilter(" no-provides ")
|
|
||||||
|
|
||||||
# config ends here
|
|
||||||
|
|
@ -8,11 +8,11 @@ Subject: [PATCH] confusing-invalid-spec-name
|
|||||||
SpecCheck.py | 4 ++--
|
SpecCheck.py | 4 ++--
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
Index: rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
index 0d77a03..739410f 100644
|
===================================================================
|
||||||
--- a/SpecCheck.py
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
+++ b/SpecCheck.py
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
@@ -647,8 +647,8 @@ addDetails(
|
@@ -644,8 +644,8 @@ addDetails(
|
||||||
SPEC file to build a valid RPM package.''',
|
SPEC file to build a valid RPM package.''',
|
||||||
|
|
||||||
'invalid-spec-name',
|
'invalid-spec-name',
|
||||||
|
@ -7,21 +7,21 @@ Subject: [PATCH] description-check.diff
|
|||||||
TagsCheck.py | 7 +++++++
|
TagsCheck.py | 7 +++++++
|
||||||
1 file changed, 7 insertions(+)
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index 0a5f839..13dbb95 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -715,6 +715,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -736,6 +736,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
else:
|
else:
|
||||||
for lang in langs:
|
for lang in langs:
|
||||||
self.check_description(pkg, lang, ignored_words)
|
self.check_description(pkg, lang, ignored_words)
|
||||||
+
|
+
|
||||||
+ if len(pkg[rpm.RPMTAG_DESCRIPTION].partition('Authors:')[0])-4 < len(pkg[rpm.RPMTAG_SUMMARY]):
|
+ if len(Pkg.b2s(pkg[rpm.RPMTAG_DESCRIPTION]).partition('Authors:')[0]) - 4 < len(pkg[rpm.RPMTAG_SUMMARY]):
|
||||||
+ printWarning(pkg, 'description-shorter-than-summary')
|
+ printWarning(pkg, 'description-shorter-than-summary')
|
||||||
else:
|
else:
|
||||||
printError(pkg, 'no-description-tag')
|
printError(pkg, 'no-description-tag')
|
||||||
|
|
||||||
@@ -1001,6 +1004,10 @@ Name tag.''',
|
@@ -1028,6 +1031,10 @@ Name tag.''',
|
||||||
'''The major number of the library isn't included in the package's name.
|
'''The major number of the library isn't included in the package's name.
|
||||||
''',
|
''',
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] devel-provide-is-devel-package.diff
|
|||||||
FilesCheck.py | 4 ++++
|
FilesCheck.py | 4 ++++
|
||||||
1 file changed, 4 insertions(+)
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index ad77589..cdffaea 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -830,6 +830,10 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -422,6 +422,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
# Check if the package is a development package
|
# Check if the package is a development package
|
||||||
devel_pkg = devel_regex.search(pkg.name)
|
devel_pkg = devel_regex.search(pkg.name)
|
||||||
|
|
||||||
|
@ -7,19 +7,19 @@ Subject: [PATCH] docdata-examples.diff
|
|||||||
FilesCheck.py | 8 ++++++--
|
FilesCheck.py | 8 ++++++--
|
||||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index 1011a25..ca3e96a 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -609,6 +609,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
|
@@ -189,6 +189,7 @@ bin_regex = re.compile(r'^/(?:usr/(?:s?b
|
||||||
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
includefile_regex = re.compile(r'\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||||
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
develfile_regex = re.compile(r'\.(a|cmxa?|mli?|gir)$')
|
||||||
buildconfigfile_regex = re.compile('(\.pc|/bin/.+-config)$')
|
buildconfigfile_regex = re.compile(r'(\.pc|/bin/.+-config)$')
|
||||||
+docdir_examples_regex = re.compile('^/usr/(?:share/doc/packages|lib(?:64))/[^/]+/(?:example|demo|script|contrib)')
|
+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...
|
# room for improvement with catching more -R, but also for false positives...
|
||||||
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
|
buildconfig_rpath_regex = re.compile(r'(?:-rpath|Wl,-R)\b')
|
||||||
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
sofile_regex = re.compile(r'/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||||
@@ -1184,7 +1185,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -785,7 +786,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
includefile_regex.search(f) or \
|
includefile_regex.search(f) or \
|
||||||
develfile_regex.search(f) or \
|
develfile_regex.search(f) or \
|
||||||
logrotate_regex.search(f)
|
logrotate_regex.search(f)
|
||||||
@ -28,7 +28,7 @@ index 1011a25..ca3e96a 100644
|
|||||||
printWarning(pkg, 'spurious-executable-perm', f)
|
printWarning(pkg, 'spurious-executable-perm', f)
|
||||||
elif f.startswith('/etc/') and f not in config_files and \
|
elif f.startswith('/etc/') and f not in config_files and \
|
||||||
f not in ghost_files:
|
f not in ghost_files:
|
||||||
@@ -1540,7 +1541,10 @@ included in your package.''',
|
@@ -1154,7 +1155,10 @@ included in your package.''',
|
||||||
'spurious-executable-perm',
|
'spurious-executable-perm',
|
||||||
'''The file is installed with executable permissions, but was identified as one
|
'''The file is installed with executable permissions, but was identified as one
|
||||||
that probably should not be executable. Verify if the executable bits are
|
that probably should not be executable. Verify if the executable bits are
|
||||||
|
21
drop-unicodedata-dep.diff
Normal file
21
drop-unicodedata-dep.diff
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Index: rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
|
@@ -9,7 +9,6 @@
|
||||||
|
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
-import unicodedata
|
||||||
|
try:
|
||||||
|
from urlparse import urlparse
|
||||||
|
except ImportError: # Python 3
|
||||||
|
@@ -107,7 +106,7 @@ filelist_regex = re.compile(r'\s+-f\s+\S
|
||||||
|
pkgname_regex = re.compile(r'\s+(?:-n\s+)?(\S+)')
|
||||||
|
tarball_regex = re.compile(r'\.(?:t(?:ar|[glx]z|bz2?)|zip)\b', re.IGNORECASE)
|
||||||
|
|
||||||
|
-UNICODE_NBSP = unicodedata.lookup('NO-BREAK SPACE')
|
||||||
|
+UNICODE_NBSP = u'\xa0'
|
||||||
|
|
||||||
|
|
||||||
|
def unversioned(deps):
|
@ -7,11 +7,11 @@ Subject: [PATCH] extend-suse-conffiles-check.diff
|
|||||||
FilesCheck.py | 2 +-
|
FilesCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index 24029f1..a8ac7f4 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -1202,7 +1202,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -803,7 +803,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
if nonexec_file and not docdir_examples_regex.search(f):
|
if nonexec_file and not docdir_examples_regex.search(f):
|
||||||
printWarning(pkg, 'spurious-executable-perm', f)
|
printWarning(pkg, 'spurious-executable-perm', f)
|
||||||
elif f.startswith('/etc/') and f not in config_files and \
|
elif f.startswith('/etc/') and f not in config_files and \
|
||||||
|
43
fix-diag-sortorder.diff
Normal file
43
fix-diag-sortorder.diff
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
--- a/Filter.py
|
||||||
|
+++ b/Filter.py
|
||||||
|
@@ -43,15 +43,15 @@ else:
|
||||||
|
|
||||||
|
|
||||||
|
def printInfo(pkg, reason, *details):
|
||||||
|
- _print("I", pkg, reason, details)
|
||||||
|
+ _print('I', pkg, reason, details)
|
||||||
|
|
||||||
|
|
||||||
|
def printWarning(pkg, reason, *details):
|
||||||
|
- _print("W", pkg, reason, details)
|
||||||
|
+ _print('W', pkg, reason, details)
|
||||||
|
|
||||||
|
|
||||||
|
def printError(pkg, reason, *details):
|
||||||
|
- _print("E", pkg, reason, details)
|
||||||
|
+ _print('E', pkg, reason, details)
|
||||||
|
|
||||||
|
|
||||||
|
def _print(msgtype, pkg, reason, details):
|
||||||
|
@@ -111,8 +111,10 @@ def printDescriptions(reason):
|
||||||
|
|
||||||
|
|
||||||
|
def _diag_sortkey(x):
|
||||||
|
- xs = x.split()
|
||||||
|
- return (xs[2], xs[1])
|
||||||
|
+ xs = x.split(maxsplit=2)
|
||||||
|
+ # Sort Category (Info/Warnings/Errors), Diagnostic, Name
|
||||||
|
+ # ['game.x86_64:', 'W:', 'call-to-mktemp /usr/games/lib/blub\n']
|
||||||
|
+ return (str('IWE'.find(xs[1][0])), xs[2], xs[0])
|
||||||
|
|
||||||
|
|
||||||
|
def printAllReasons():
|
||||||
|
@@ -121,7 +123,7 @@ def printAllReasons():
|
||||||
|
return False
|
||||||
|
|
||||||
|
global _diagnostic
|
||||||
|
- _diagnostic.sort(key=_diag_sortkey, reverse=True)
|
||||||
|
+ _diagnostic.sort(key=_diag_sortkey)
|
||||||
|
last_reason = ''
|
||||||
|
for diag in _diagnostic:
|
||||||
|
if Config.info:
|
@ -1,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)
|
|
18
ignore-readelf-ar-error.diff
Normal file
18
ignore-readelf-ar-error.diff
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
|
@@ -255,8 +255,11 @@ class BinaryInfo(object):
|
||||||
|
|
||||||
|
else:
|
||||||
|
self.readelf_error = True
|
||||||
|
- printWarning(pkg, 'binaryinfo-readelf-failed',
|
||||||
|
- file, re.sub('\n.*', '', res[1]))
|
||||||
|
+ # Go and others are producing ar archives that don't have ELF
|
||||||
|
+ # headers, so don't complain about it
|
||||||
|
+ if not is_ar:
|
||||||
|
+ printWarning(pkg, 'binaryinfo-readelf-failed',
|
||||||
|
+ file, re.sub('\n.*', '', res[1]))
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(path, 'rb') as fobj:
|
@ -7,19 +7,19 @@ Subject: [PATCH] invalid-filerequires.diff
|
|||||||
TagsCheck.py | 10 ++++++++++
|
TagsCheck.py | 10 ++++++++++
|
||||||
1 file changed, 10 insertions(+)
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index 9856f9e..8071f1d 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -422,6 +422,7 @@ invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECA
|
@@ -452,6 +452,7 @@ invalid_version_regex = re.compile(r'([0
|
||||||
# () are here for grouping purpose in the regexp
|
# () 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_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
||||||
+valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
+valid_filedep_regex = re.compile(r'(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
||||||
use_epoch = Config.getOption('UseEpoch', False)
|
use_epoch = Config.getOption('UseEpoch', False)
|
||||||
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||||
max_line_len = Config.getOption('MaxLineLength', 79)
|
max_line_len = Config.getOption('MaxLineLength', 79)
|
||||||
@@ -602,6 +603,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -632,6 +633,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if d[0].startswith('/usr/local/'):
|
if d[0].startswith('/usr/local/'):
|
||||||
printError(pkg, 'invalid-dependency', d[0])
|
printError(pkg, 'invalid-dependency', d[0])
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ index 9856f9e..8071f1d 100644
|
|||||||
if is_source:
|
if is_source:
|
||||||
if lib_devel_number_regex.search(d[0]):
|
if lib_devel_number_regex.search(d[0]):
|
||||||
printError(pkg, 'invalid-build-requires', d[0])
|
printError(pkg, 'invalid-build-requires', d[0])
|
||||||
@@ -1122,6 +1126,12 @@ unneeded explicit Requires: tags.''',
|
@@ -1162,6 +1166,12 @@ unneeded explicit Requires: tags.''',
|
||||||
'''This package provides 2 times the same capacity. It should only provide it
|
'''This package provides 2 times the same capacity. It should only provide it
|
||||||
once.''',
|
once.''',
|
||||||
|
|
||||||
|
@ -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.''',
|
|
||||||
|
|
@ -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',
|
|
||||||
|
|
@ -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
|
|
@ -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):
|
|
@ -1,17 +1,6 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
||||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
Subject: [PATCH] libtool-wrapper-check.diff
|
@@ -367,8 +367,15 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
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):
|
|
||||||
is_ar = 'current ar archive' in pkgfile.magic
|
is_ar = 'current ar archive' in pkgfile.magic
|
||||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||||
is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
|
is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
|
||||||
@ -19,26 +8,22 @@ index c7fadab..62951d6 100644
|
|||||||
is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode
|
is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode
|
||||||
|
|
||||||
+ if is_shell:
|
+ if is_shell:
|
||||||
+ count= 0
|
+ with open(pkgfile.path, 'rb') as inputf:
|
||||||
+ for l in open(pkgfile.path, "r"):
|
+ if (b'This wrapper script should never '
|
||||||
+ count = count + 1
|
+ b'be moved out of the build directory' in inputf.read(2048)):
|
||||||
+ if (l.find("This wrapper script should never be moved out of the build directory") != -1):
|
|
||||||
+ printError(pkg, 'libtool-wrapper-in-package', fname)
|
+ printError(pkg, 'libtool-wrapper-in-package', fname)
|
||||||
+ break
|
|
||||||
+ if (count > 20):
|
|
||||||
+ break;
|
|
||||||
+
|
+
|
||||||
if not is_binary:
|
if not is_binary:
|
||||||
if reference_regex.search(fname):
|
if reference_regex.search(fname):
|
||||||
lines = pkg.grep(invalid_dir_ref_regex, fname)
|
lines = pkg.grep(invalid_dir_ref_regex, fname)
|
||||||
@@ -626,6 +637,15 @@ recompiled separately from the static libraries with the -fPIC option.
|
@@ -637,6 +644,15 @@ to list code compiled without -fPIC.
|
||||||
Another common mistake that causes this problem is linking with
|
Another common mistake that causes this problem is linking with
|
||||||
``gcc -Wl,-shared'' instead of ``gcc -shared''.''',
|
``gcc -Wl,-shared'' instead of ``gcc -shared''.''',
|
||||||
|
|
||||||
+'libtool-wrapper-in-package',
|
+'libtool-wrapper-in-package',
|
||||||
+'''Your package contains a libtool wrapper shell script. This
|
+'''Your package contains a libtool wrapper shell script. This
|
||||||
+will not work. Instead of install'ing the libtool wrapper file,
|
+will not work. Instead of install'ing the libtool wrapper file,
|
||||||
+run·
|
+run
|
||||||
+
|
+
|
||||||
+libtool --mode=install install -m perm <file> <dest>
|
+libtool --mode=install install -m perm <file> <dest>
|
||||||
+
|
+
|
||||||
|
@ -8,11 +8,11 @@ Subject: [PATCH] no-badness-return.diff
|
|||||||
rpmlint | 2 +-
|
rpmlint | 2 +-
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Filter.py b/Filter.py
|
Index: rpmlint-rpmlint-1.10/Filter.py
|
||||||
index 5ce6219..e50abe1 100644
|
===================================================================
|
||||||
--- a/Filter.py
|
--- rpmlint-rpmlint-1.10.orig/Filter.py
|
||||||
+++ b/Filter.py
|
+++ rpmlint-rpmlint-1.10/Filter.py
|
||||||
@@ -128,7 +128,7 @@ def printAllReasons():
|
@@ -130,7 +130,7 @@ def printAllReasons():
|
||||||
if len(last_reason):
|
if len(last_reason):
|
||||||
printDescriptions(last_reason)
|
printDescriptions(last_reason)
|
||||||
last_reason = reason
|
last_reason = reason
|
||||||
@ -21,11 +21,11 @@ index 5ce6219..e50abe1 100644
|
|||||||
if Config.info and len(last_reason):
|
if Config.info and len(last_reason):
|
||||||
printDescriptions(last_reason)
|
printDescriptions(last_reason)
|
||||||
_diagnostic = list()
|
_diagnostic = list()
|
||||||
diff --git a/rpmlint b/rpmlint
|
Index: rpmlint-rpmlint-1.10/rpmlint
|
||||||
index acbda29..810d677 100755
|
===================================================================
|
||||||
--- a/rpmlint
|
--- rpmlint-rpmlint-1.10.orig/rpmlint
|
||||||
+++ b/rpmlint
|
+++ rpmlint-rpmlint-1.10/rpmlint
|
||||||
@@ -203,7 +203,7 @@ def main():
|
@@ -206,7 +206,7 @@ def main():
|
||||||
% (packages_checked, specfiles_checked,
|
% (packages_checked, specfiles_checked,
|
||||||
printed_messages["E"], printed_messages["W"]))
|
printed_messages["E"], printed_messages["W"]))
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] no-doc-for-lib.diff
|
|||||||
FilesCheck.py | 2 +-
|
FilesCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index 14ef030..ee5039c 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -847,7 +847,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -440,7 +440,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
debuginfo_srcs = False
|
debuginfo_srcs = False
|
||||||
debuginfo_debugs = False
|
debuginfo_debugs = False
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] noarch-lib64.diff
|
|||||||
BinariesCheck.py | 15 ++++++++++++++-
|
BinariesCheck.py | 15 ++++++++++++++-
|
||||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
index 62951d6..eb19387 100644
|
===================================================================
|
||||||
--- a/BinariesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
||||||
+++ b/BinariesCheck.py
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
@@ -337,6 +337,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
@@ -345,6 +345,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
binary = False
|
binary = False
|
||||||
binary_in_usr_lib = False
|
binary_in_usr_lib = False
|
||||||
has_usr_lib_file = False
|
has_usr_lib_file = False
|
||||||
@ -19,7 +19,7 @@ index 62951d6..eb19387 100644
|
|||||||
|
|
||||||
multi_pkg = False
|
multi_pkg = False
|
||||||
srpm = pkg[rpm.RPMTAG_SOURCERPM]
|
srpm = pkg[rpm.RPMTAG_SOURCERPM]
|
||||||
@@ -355,6 +356,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
@@ -363,6 +364,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
# only-non-binary-in-usr-lib false positives
|
# only-non-binary-in-usr-lib false positives
|
||||||
binary_in_usr_lib = True
|
binary_in_usr_lib = True
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ index 62951d6..eb19387 100644
|
|||||||
is_elf = 'ELF' in pkgfile.magic
|
is_elf = 'ELF' in pkgfile.magic
|
||||||
is_ar = 'current ar archive' in pkgfile.magic
|
is_ar = 'current ar archive' in pkgfile.magic
|
||||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||||
@@ -588,9 +593,12 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
@@ -592,9 +597,12 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
if version and version != -1 and version not in pkg.name:
|
if version and version != -1 and version not in pkg.name:
|
||||||
printError(pkg, 'incoherent-version-in-name', version)
|
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:
|
if has_usr_lib_file and not binary_in_usr_lib:
|
||||||
printWarning(pkg, 'only-non-binary-in-usr-lib')
|
printWarning(pkg, 'only-non-binary-in-usr-lib')
|
||||||
|
|
||||||
@@ -614,6 +622,11 @@ FHS and the FSSTND forbid this.''',
|
@@ -619,6 +627,11 @@ FHS and the FSSTND forbid this.''',
|
||||||
# 'non-sparc32-binary',
|
# 'non-sparc32-binary',
|
||||||
# '',
|
# '',
|
||||||
|
|
||||||
|
@ -7,20 +7,20 @@ Subject: [PATCH] only-reg-files-are-scripts.diff
|
|||||||
InitScriptCheck.py | 5 ++++-
|
InitScriptCheck.py | 5 ++++-
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
|
Index: rpmlint-rpmlint-1.10/InitScriptCheck.py
|
||||||
index 0559405..f9b13a1 100644
|
===================================================================
|
||||||
--- a/InitScriptCheck.py
|
--- rpmlint-rpmlint-1.10.orig/InitScriptCheck.py
|
||||||
+++ b/InitScriptCheck.py
|
+++ rpmlint-rpmlint-1.10/InitScriptCheck.py
|
||||||
@@ -18,7 +18,7 @@ from Filter import addDetails, printError, printWarning
|
@@ -17,7 +17,7 @@ import AbstractCheck
|
||||||
import AbstractCheck
|
|
||||||
import Config
|
import Config
|
||||||
|
from Filter import addDetails, printError, printWarning
|
||||||
import Pkg
|
import Pkg
|
||||||
-
|
-
|
||||||
+import stat
|
+import stat
|
||||||
|
|
||||||
chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
chkconfig_content_regex = re.compile(r'^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
||||||
subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE)
|
subsys_regex = re.compile(r'/var/lock/subsys/([^/"\'\s;&|]+)', re.MULTILINE)
|
||||||
@@ -50,6 +50,9 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
@@ -49,6 +49,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
not fname.startswith('/etc/rc.d/init.d/'):
|
not fname.startswith('/etc/rc.d/init.d/'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ index 0559405..f9b13a1 100644
|
|||||||
+
|
+
|
||||||
basename = os.path.basename(fname)
|
basename = os.path.basename(fname)
|
||||||
initscript_list.append(basename)
|
initscript_list.append(basename)
|
||||||
if pkgfile.mode & int("500", 8) != int("500", 8):
|
if pkgfile.mode & 0o500 != 0o500:
|
||||||
|
@ -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
|
|
@ -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:
|
|
@ -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
|
|
34
remove-ghostfile-checks.diff
Normal file
34
remove-ghostfile-checks.diff
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
--- 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)
|
||||||
|
|
||||||
|
- ghost_files = pkg.ghostFiles()
|
||||||
|
- if ghost_files:
|
||||||
|
- postin = pkg[rpm.RPMTAG_POSTIN]
|
||||||
|
- prein = pkg[rpm.RPMTAG_PREIN]
|
||||||
|
- for f in ghost_files:
|
||||||
|
- if f in pkg.missingOkFiles():
|
||||||
|
- continue
|
||||||
|
- if not postin and not prein:
|
||||||
|
- printWarning(pkg, 'ghost-files-without-postin')
|
||||||
|
- if (not postin or f not in postin) and \
|
||||||
|
- (not prein or f not in prein):
|
||||||
|
- printWarning(pkg,
|
||||||
|
- 'postin-without-ghost-file-creation', f)
|
||||||
|
-
|
||||||
|
def check_aux(self, pkg, files, prog, script, tag, prereq):
|
||||||
|
if script:
|
||||||
|
if prog:
|
||||||
|
@@ -195,10 +181,6 @@ class PostCheck(AbstractCheck.AbstractCh
|
||||||
|
check = PostCheck()
|
||||||
|
|
||||||
|
# Add information about checks
|
||||||
|
-addDetails(
|
||||||
|
-'postin-without-ghost-file-creation',
|
||||||
|
-'''A file tagged as ghost is not created during %prein nor during %postin.''',
|
||||||
|
-)
|
||||||
|
for scriptlet in map(lambda x: '%' + x, RPM_SCRIPTLETS):
|
||||||
|
addDetails(
|
||||||
|
'one-line-command-in-%s' % scriptlet,
|
@ -7,11 +7,11 @@ Subject: [PATCH] rpmgroup-checks.diff
|
|||||||
TagsCheck.py | 6 ++++++
|
TagsCheck.py | 6 ++++++
|
||||||
1 file changed, 6 insertions(+)
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index dd09e62..0a5f839 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -722,6 +722,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -743,6 +743,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
self._unexpanded_macros(pkg, 'Group', group)
|
self._unexpanded_macros(pkg, 'Group', group)
|
||||||
if not group:
|
if not group:
|
||||||
printError(pkg, 'no-group-tag')
|
printError(pkg, 'no-group-tag')
|
||||||
@ -20,7 +20,7 @@ index dd09e62..0a5f839 100644
|
|||||||
elif VALID_GROUPS and group not in VALID_GROUPS:
|
elif VALID_GROUPS and group not in VALID_GROUPS:
|
||||||
printWarning(pkg, 'non-standard-group', group)
|
printWarning(pkg, 'non-standard-group', group)
|
||||||
|
|
||||||
@@ -1040,6 +1042,10 @@ won't fool the specfile parser, and rebuild the package.''',
|
@@ -1067,6 +1069,10 @@ won't fool the specfile parser, and rebu
|
||||||
'''There is no Group tag in your package. You have to specify a valid group
|
'''There is no Group tag in your package. You have to specify a valid group
|
||||||
in your spec file using the Group tag.''',
|
in your spec file using the Group tag.''',
|
||||||
|
|
||||||
|
3
rpmlint-1.10.tar.gz
Normal file
3
rpmlint-1.10.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e69290bebcce9581ba417c3db81cc5f51731927f0b7ea172b94446df8fab49cd
|
||||||
|
size 20763016
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ba78ad9ae556cad2590400935d406c4e5cb9cd88348d312b8f13561c76f5f105
|
|
||||||
size 20275235
|
|
@ -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.10.orig/BinariesCheck.py
|
||||||
+++ rpmlint-rpmlint-1.8/BinariesCheck.py
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
@@ -560,6 +560,9 @@ class BinariesCheck(AbstractCheck.Abstra
|
@@ -534,6 +534,9 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
if not is_shobj and pie_exec_re and pie_exec_re.search(fname):
|
if not is_shobj and pie_exec_re and pie_exec_re.search(fname):
|
||||||
printError(pkg, 'non-position-independent-executable',
|
printError(pkg, 'non-position-independent-executable',
|
||||||
fname)
|
fname)
|
||||||
@ -12,7 +12,7 @@ Index: rpmlint-rpmlint-1.8/BinariesCheck.py
|
|||||||
|
|
||||||
if bin_info.readelf_error:
|
if bin_info.readelf_error:
|
||||||
continue
|
continue
|
||||||
@@ -809,6 +812,10 @@ stripping process.''',
|
@@ -786,6 +789,10 @@ stripping process.''',
|
||||||
'''This executable must be position independent. Check that it is built with
|
'''This executable must be position independent. Check that it is built with
|
||||||
-fPIE/-fpie in compiler flags and -pie in linker flags.''',
|
-fPIE/-fpie in compiler flags and -pie in linker flags.''',
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:d64b3726bf7a3353f1806e1f06afebd42bb934e84c87013f5a84381137579e79
|
oid sha256:9a0d1c0f84b777aa36e5f31dda97ce4cf4d803eb4f2d256edd75063c6e679bcb
|
||||||
size 22404
|
size 23192
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/pie.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/pie.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/pie.ref
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
+pie: W: position-independent-executable-suggested /usr/bin/telnet
|
|
||||||
pie: W: permissions-incorrect /bin/mount has mode 0755 but should be 04755
|
|
||||||
pie: E: non-position-independent-executable (Badness: 10000) /usr/bin/telnet
|
|
||||||
pie: W: missing-call-to-setgroups-before-setuid /bin/mount
|
|
||||||
-1 packages and 0 specfiles checked; 1 errors, 2 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 1 errors, 3 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/permissions1.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/permissions1.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/permissions1.ref
|
|
||||||
@@ -1,3 +1,4 @@
|
|
||||||
+permissions1: W: position-independent-executable-suggested /bin/ls
|
|
||||||
permissions1: E: permissions-unauthorized-file (Badness: 10000) /etc/permissions.d/test
|
|
||||||
permissions1: W: permissions-missing-verifyscript missing %verify_permissions -e /bin/ls
|
|
||||||
permissions1: W: permissions-missing-verifyscript missing %verify_permissions -e /bin/su
|
|
||||||
@@ -8,4 +9,4 @@ permissions1: W: permissions-incorrect-o
|
|
||||||
permissions1: W: permissions-incorrect /bin/su has mode 0755 but should be 04755
|
|
||||||
permissions1: E: permissions-file-setuid-bit (Badness: 10000) /bin/ls is packaged with setuid/setgid bits (04755)
|
|
||||||
permissions1: W: non-position-independent-executable /bin/ls
|
|
||||||
-1 packages and 0 specfiles checked; 2 errors, 8 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 2 errors, 9 warnings.
|
|
@ -1,88 +0,0 @@
|
|||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/srv.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/srv.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/srv.ref
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
srv: E: suse-filelist-forbidden-srv (Badness: 10000) /usr/local/ftp is not allowed in SUSE
|
|
||||||
srv: W: suse-filelist-forbidden-fhs23 /usr/local is not allowed in FHS 2.3
|
|
||||||
+srv: W: position-independent-executable-suggested /usr/local/ftp/foo
|
|
||||||
srv: W: call-to-mktemp /usr/local/ftp/foo
|
|
||||||
-1 packages and 0 specfiles checked; 1 errors, 2 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 1 errors, 3 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/debug.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/debug.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/debug.ref
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
debug: W: static-library-without-symtab /usr/lib/foo/t2.a
|
|
||||||
debug: W: static-library-without-debuginfo /usr/lib/foo/t.a
|
|
||||||
+debug: W: position-independent-executable-suggested /usr/bin/t
|
|
||||||
debug: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib/foo/t.a
|
|
||||||
debug: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib/foo/t2.a
|
|
||||||
-1 packages and 0 specfiles checked; 2 errors, 2 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 2 errors, 3 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/game.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/game.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/game.ref
|
|
||||||
@@ -1,5 +1,7 @@
|
|
||||||
game: E: suse-filelist-forbidden-games (Badness: 10000) /usr/games/lib/blub is not allowed in SUSE
|
|
||||||
game: E: suse-filelist-forbidden-games (Badness: 10000) /usr/games/lib is not allowed in SUSE
|
|
||||||
+game: W: position-independent-executable-suggested /usr/games/foo
|
|
||||||
+game: W: position-independent-executable-suggested /usr/games/lib/blub
|
|
||||||
game: W: call-to-mktemp /usr/games/foo
|
|
||||||
game: W: call-to-mktemp /usr/games/lib/blub
|
|
||||||
-1 packages and 0 specfiles checked; 2 errors, 2 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 2 errors, 4 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/debug2.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/debug2.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/debug2.ref
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
debug2: W: static-library-without-symtab /usr/lib/foo/t2.a
|
|
||||||
+debug2: W: position-independent-executable-suggested /usr/bin/t
|
|
||||||
debug2: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib/foo/t.a
|
|
||||||
debug2: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib/foo/t2.a
|
|
||||||
-1 packages and 0 specfiles checked; 2 errors, 1 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 2 errors, 2 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/chroot.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/chroot.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/chroot.ref
|
|
||||||
@@ -1,2 +1,4 @@
|
|
||||||
+chroot: W: position-independent-executable-suggested /usr/bin/call_chroot_with_chdir
|
|
||||||
+chroot: W: position-independent-executable-suggested /usr/bin/call_chroot
|
|
||||||
chroot: W: missing-call-to-chdir-with-chroot /usr/bin/call_chroot
|
|
||||||
-1 packages and 0 specfiles checked; 0 errors, 1 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 0 errors, 3 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/debug1.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/debug1.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/debug1.ref
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
debug1: W: static-library-without-symtab /usr/lib/foo/t2.a
|
|
||||||
debug1: W: static-library-without-debuginfo /usr/lib/foo/t.a
|
|
||||||
+debug1: W: position-independent-executable-suggested /usr/bin/t
|
|
||||||
debug1: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib/foo/t.a
|
|
||||||
debug1: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib/foo/t2.a
|
|
||||||
-1 packages and 0 specfiles checked; 2 errors, 2 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 2 errors, 3 warnings.
|
|
||||||
Index: rpmlint-tests-84.87+git20170418.092177d/tests/gethostbyname.ref
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-tests-84.87+git20170418.092177d.orig/tests/gethostbyname.ref
|
|
||||||
+++ rpmlint-tests-84.87+git20170418.092177d/tests/gethostbyname.ref
|
|
||||||
@@ -1,7 +1,13 @@
|
|
||||||
+gethostbyname: W: position-independent-executable-suggested /usr/bin/call_gethostbyaddr
|
|
||||||
+gethostbyname: W: position-independent-executable-suggested /usr/bin/call_gethostbyname2
|
|
||||||
+gethostbyname: W: position-independent-executable-suggested /usr/bin/call_gethostbyname
|
|
||||||
+gethostbyname: W: position-independent-executable-suggested /usr/bin/call_gethostbyname2_r
|
|
||||||
+gethostbyname: W: position-independent-executable-suggested /usr/bin/call_gethostbyaddr_r
|
|
||||||
+gethostbyname: W: position-independent-executable-suggested /usr/bin/call_gethostbyname_r
|
|
||||||
gethostbyname: I: binary-or-shlib-calls-gethostbyname /usr/bin/call_gethostbyaddr
|
|
||||||
gethostbyname: I: binary-or-shlib-calls-gethostbyname /usr/bin/call_gethostbyname2
|
|
||||||
gethostbyname: I: binary-or-shlib-calls-gethostbyname /usr/bin/call_gethostbyname
|
|
||||||
gethostbyname: I: binary-or-shlib-calls-gethostbyname /usr/bin/call_gethostbyname2_r
|
|
||||||
gethostbyname: I: binary-or-shlib-calls-gethostbyname /usr/bin/call_gethostbyaddr_r
|
|
||||||
gethostbyname: I: binary-or-shlib-calls-gethostbyname /usr/bin/call_gethostbyname_r
|
|
||||||
-1 packages and 0 specfiles checked; 0 errors, 0 warnings.
|
|
||||||
+1 packages and 0 specfiles checked; 0 errors, 6 warnings.
|
|
@ -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
|
|
@ -1,36 +1,24 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
Date: Thu, 9 Apr 2015 14:55:37 +0200
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
Subject: [PATCH] rpmlint-suse.diff
|
@@ -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
|
||||||
FilesCheck.py | 2 +-
|
+++ rpmlint-rpmlint-1.10/I18NCheck.py
|
||||||
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
|
|
||||||
@@ -30,7 +30,7 @@ INCORRECT_LOCALES = {
|
@@ -30,7 +30,7 @@ INCORRECT_LOCALES = {
|
||||||
'en_UK': 'en_GB'}
|
'en_UK': 'en_GB'}
|
||||||
|
|
||||||
package_regex = re.compile('-(' + '|'.join(LANGUAGES) + ')$')
|
package_regex = re.compile('-(' + '|'.join(LANGUAGES) + ')$')
|
||||||
-locale_regex = re.compile('^(/usr/share/locale/([^/]+))/')
|
-locale_regex = re.compile('^(/usr/share/locale/([^/]+))/')
|
||||||
+locale_regex = re.compile('^(/(usr|opt/kde3|opt/gnome)/share/locale/([^/]+))/')
|
+locale_regex = re.compile(r'^(/(usr|opt/kde3|opt/gnome)/share/locale/([^/]+))/')
|
||||||
correct_subdir_regex = re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$')
|
correct_subdir_regex = re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$')
|
||||||
lc_messages_regex = re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$')
|
lc_messages_regex = re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$')
|
||||||
man_regex = re.compile('/usr(?:/share)?/man/([^/]+)/man[0-9n][^/]*/[^/]+$')
|
man_regex = re.compile('/usr(?:/share)?/man/([^/]+)/man[0-9n][^/]*/[^/]+$')
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:31d10b7286df08b73336c314ade702381f09913ad141a6a2b5c16cefe3ddf784
|
|
||||||
size 11452
|
|
3
rpmlint-tests-84.87+git20170930.a05216c.tar.xz
Normal file
3
rpmlint-tests-84.87+git20170930.a05216c.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:68342457aa0a0e55de2482a10ff6607b2ae0540cea0a5e8bee734e67cb41ef1a
|
||||||
|
size 11204
|
@ -1,3 +1,24 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 30 16:19:07 UTC 2017 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 84.87+git20170930.921e051:
|
||||||
|
* Update reference files against rpmlint 1.10
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 28 21:16:42 UTC 2017 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 84.87+git20170928.27b6cb3:
|
||||||
|
* Adjustments for newer rpmlint
|
||||||
|
drop 0001-Update-varrun-test-for-Leap-42.2-severity-reduction.patch
|
||||||
|
rpmlint-pie-factory.patch, rpmlint-pie-leap42.patch:
|
||||||
|
this belongs into git
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 28 12:47:02 UTC 2017 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 84.87+git20170928.d2c55ee:
|
||||||
|
* Remove some outdated sysv init check, we have switched to systemd
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jul 2 16:30:01 UTC 2017 - meissner@suse.com
|
Sun Jul 2 16:30:01 UTC 2017 - meissner@suse.com
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ BuildRequires: rpmlint-Factory-strict
|
|||||||
BuildRequires: rpmlint-mini
|
BuildRequires: rpmlint-mini
|
||||||
|
|
||||||
Name: rpmlint-tests
|
Name: rpmlint-tests
|
||||||
Version: 84.87+git20170418.092177d
|
Version: 84.87+git20170930.a05216c
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: rpmlint regression tests
|
Summary: rpmlint regression tests
|
||||||
License: SUSE-Public-Domain
|
License: SUSE-Public-Domain
|
||||||
@ -31,9 +31,6 @@ Group: Development/Tools/Building
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Url: http://www.opensuse.org/
|
Url: http://www.opensuse.org/
|
||||||
Source: rpmlint-tests-%version.tar.xz
|
Source: rpmlint-tests-%version.tar.xz
|
||||||
Patch1: 0001-Update-varrun-test-for-Leap-42.2-severity-reduction.patch
|
|
||||||
Patch2: rpmlint-pie-leap42.patch
|
|
||||||
Patch3: rpmlint-pie-factory.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package doesn't actually contain any files and is not meant to
|
This package doesn't actually contain any files and is not meant to
|
||||||
@ -42,13 +39,6 @@ regression tests against rpmlint(-mini).
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%if 0%{?sle_version} >= 120200
|
|
||||||
%patch1 -p1
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} < 1330
|
|
||||||
%patch2 -p1
|
|
||||||
%endif
|
|
||||||
%patch3 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir rpms
|
mkdir rpms
|
||||||
|
191
rpmlint.changes
191
rpmlint.changes
@ -1,3 +1,194 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 29 12:06:57 UTC 2017 - dmueller@suse.com
|
||||||
|
|
||||||
|
- Update rpmlint-checks:
|
||||||
|
* Flake8 fixes
|
||||||
|
* Properly anchor systemd path checks
|
||||||
|
* Python 3.x porting
|
||||||
|
* Add TmpFilesCheck
|
||||||
|
* Flake8 / Stop leaking filedescriptors
|
||||||
|
* Port LibraryPolicyCheck to Python 3.x
|
||||||
|
|
||||||
|
- Update rpmlint-tests:
|
||||||
|
* Stop leaking filedescriptors
|
||||||
|
* Address various deprecation warnings
|
||||||
|
* Avoid leaking fds and further Python 3.x porting
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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,
|
||||||
|
add-weak-dependencies.diff: upstream
|
||||||
|
- drop sourced-dirs.diff, fix-shared-library-matching.diff,
|
||||||
|
suse-python-abi-check.diff, add-check-for-tmpfiles-created-at-r.diff: obsolete
|
||||||
|
- drop suse-readd_terminator_in_regex.patch: merged into original patch
|
||||||
|
- add suse-tests-without-badness.patch,
|
||||||
|
0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch,
|
||||||
|
0003-Tighten-lib_regex-to-avoid-false-positive-in-python-.patch,
|
||||||
|
0001-Execute-chroot-tests-also-on-x86-rpms.patch,
|
||||||
|
ignore-readelf-ar-error.diff, remove-ghostfile-checks.diff,
|
||||||
|
fix-diag-sortorder.diff, drop-unicodedata-dep.diff,
|
||||||
|
0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch,
|
||||||
|
0001-Improve-XDG-Menu-checks-stability.patch,
|
||||||
|
0001-split-wrong-script-interpreter-into-env-script-inter.patch,
|
||||||
|
0001-Handle-post-scripts-that-contain-non-ascii-character.patch
|
||||||
|
- drop config.in: unused
|
||||||
|
- switch to python 3.x
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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, script-interpreter-only-for-exec-sc.diff: obsolete
|
||||||
|
- drop update_git.sh related stuff: this is obsolete, patches are
|
||||||
|
either supposed to be upstreamed or handled via quilt
|
||||||
|
- add suse-skip-macro-expansion.diff: rename from remove-expand-macros.diff
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 28 09:31:24 UTC 2017 - opensuse-packaging@opensuse.org
|
Thu Sep 28 09:31:24 UTC 2017 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
140
rpmlint.spec
140
rpmlint.spec
@ -16,60 +16,33 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
#!BuildIgnore: rpmlint-mini
|
|
||||||
|
|
||||||
Name: rpmlint
|
Name: rpmlint
|
||||||
BuildRequires: obs-service-format_spec_file
|
Version: 1.10
|
||||||
BuildRequires: python-pytest
|
Release: 0
|
||||||
BuildRequires: rpm-python
|
|
||||||
BuildRequires: xz
|
|
||||||
Summary: Rpm correctness checker
|
Summary: Rpm correctness checker
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
Version: 1.8
|
Url: https://github.com/rpm-software-management/rpmlint
|
||||||
Release: 0
|
|
||||||
Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz
|
Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz
|
||||||
Source1: rpmlint-checks-master.tar.xz
|
Source1: rpmlint-checks-master.tar.xz
|
||||||
Source2: config
|
Source2: config
|
||||||
Source3: config.in
|
|
||||||
Source11: pie.config
|
Source11: pie.config
|
||||||
Source12: licenses.config
|
Source12: licenses.config
|
||||||
Source98: update_git.sh
|
|
||||||
Source99: README.packaging.txt
|
Source99: README.packaging.txt
|
||||||
Source100: syntax-validator.py
|
Source100: syntax-validator.py
|
||||||
Url: https://github.com/rpm-software-management/rpmlint
|
|
||||||
Requires: /usr/bin/readelf
|
|
||||||
Requires: bash
|
|
||||||
Requires: checkbashisms
|
|
||||||
Requires: cpio
|
|
||||||
Requires: dash
|
|
||||||
Requires: desktop-file-utils
|
|
||||||
Requires: file
|
|
||||||
Requires: findutils
|
|
||||||
Requires: python-magic
|
|
||||||
Requires: python-xml
|
|
||||||
Requires: rpm-python
|
|
||||||
# Requirement for ErlangCheck.py (pull-request #2).
|
|
||||||
Requires: python-pybeam
|
|
||||||
#
|
|
||||||
# Read README.packaging.txt before making any changes to this
|
|
||||||
# package
|
|
||||||
#
|
|
||||||
# PATCHLIST BEGIN
|
|
||||||
Patch00: rpmlint-suse.diff
|
Patch00: rpmlint-suse.diff
|
||||||
Patch01: suse-checks.diff
|
Patch01: suse-checks.diff
|
||||||
Patch02: suse-version.diff
|
Patch02: suse-version.diff
|
||||||
Patch03: suse-url-check.diff
|
Patch03: suse-url-check.diff
|
||||||
Patch04: suse-python3-naming-policy.diff
|
Patch04: suse-python3-naming-policy.diff
|
||||||
Patch05: suse-filesystem.diff
|
Patch05: suse-tests-without-badness.patch
|
||||||
Patch06: suse-pkg-config-check.diff
|
Patch06: suse-pkg-config-check.diff
|
||||||
Patch07: suse-binarieschecks.diff
|
Patch07: suse-binarieschecks.diff
|
||||||
Patch08: no-doc-for-lib.diff
|
Patch08: no-doc-for-lib.diff
|
||||||
Patch09: suse-filter-exception.diff
|
Patch09: suse-filter-exception.diff
|
||||||
Patch10: suse-spdx-license-exceptions.patch
|
Patch10: suse-spdx-license-exceptions.patch
|
||||||
|
Patch11: suse-skip-macro-expansion.diff
|
||||||
Patch20: usr-arch.diff
|
Patch20: usr-arch.diff
|
||||||
Patch21: script-interpreter-only-for-exec-sc.diff
|
|
||||||
Patch22: sourced-dirs.diff
|
|
||||||
Patch23: suse-filter-more-verbose.diff
|
Patch23: suse-filter-more-verbose.diff
|
||||||
Patch24: docdata-examples.diff
|
Patch24: docdata-examples.diff
|
||||||
Patch25: yast-provides.diff
|
Patch25: yast-provides.diff
|
||||||
@ -85,53 +58,52 @@ Patch34: suse-check-optional-dependencies.diff
|
|||||||
Patch35: noarch-lib64.diff
|
Patch35: noarch-lib64.diff
|
||||||
Patch36: suse-no-run-ldconfig.diff
|
Patch36: suse-no-run-ldconfig.diff
|
||||||
Patch37: description-check.diff
|
Patch37: description-check.diff
|
||||||
Patch38: add-weak-dependencies.diff
|
Patch38: 0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch
|
||||||
Patch39: selfconflicts-provide.diff
|
Patch39: selfconflicts-provide.diff
|
||||||
Patch40: no-badness-return.diff
|
Patch40: no-badness-return.diff
|
||||||
Patch41: suse-shlib-devel-dependency.diff
|
Patch41: suse-shlib-devel-dependency.diff
|
||||||
Patch42: version-control-internal-file.diff
|
Patch42: 0001-Improve-XDG-Menu-checks-stability.patch
|
||||||
Patch43: stricter-interpreter-check.diff
|
Patch43: stricter-interpreter-check.diff
|
||||||
Patch44: confusing-invalid-spec-name.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
|
Patch48: suse-whitelist-opensuse.diff
|
||||||
Patch49: extend-suse-conffiles-check.diff
|
Patch49: extend-suse-conffiles-check.diff
|
||||||
Patch50: compressed-backup-regex.diff
|
Patch50: compressed-backup-regex.diff
|
||||||
Patch51: suse-speccheck-utf8.diff
|
Patch51: suse-speccheck-utf8.diff
|
||||||
Patch52: suse-python-abi-check.diff
|
|
||||||
Patch53: suse-manpages-for-rc-scripts.diff
|
Patch53: suse-manpages-for-rc-scripts.diff
|
||||||
Patch54: suse-ignore-specfile-errors.diff
|
Patch54: suse-ignore-specfile-errors.diff
|
||||||
Patch55: invalid-filerequires.diff
|
Patch55: invalid-filerequires.diff
|
||||||
Patch56: suse-sysv-init-checks.diff
|
|
||||||
Patch57: check-for-self-provides.diff
|
Patch57: check-for-self-provides.diff
|
||||||
Patch58: add-check-for-tmpfiles-created-at-r.diff
|
Patch58: remove-ghostfile-checks.diff
|
||||||
Patch59: remove-files-attr-not-set-check.diff
|
Patch59: 0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch
|
||||||
Patch60: fix-shared-library-matching.diff
|
Patch60: 0003-Tighten-lib_regex-to-avoid-false-positive-in-python-.patch
|
||||||
# https://github.com/rpm-software-management/rpmlint/commit/1436dd7bc41115af658cf8f36a3149ab90a61fcf.patch
|
Patch61: 0001-Execute-chroot-tests-also-on-x86-rpms.patch
|
||||||
Patch61: postin-speedup.diff
|
Patch62: ignore-readelf-ar-error.diff
|
||||||
# https://github.com/rpm-software-management/rpmlint/commit/37fe9d4f237c2cb29fcb3b60d1ece189e578eeaf.patch and followup regression fixes
|
Patch63: fix-diag-sortorder.diff
|
||||||
Patch62: binaryinfo-speedup.diff
|
Patch64: drop-unicodedata-dep.diff
|
||||||
Patch63: 0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch
|
Patch65: 0001-split-wrong-script-interpreter-into-env-script-inter.patch
|
||||||
Patch64: omit_BUILDROOT_from_pyo_files.patch
|
Patch66: 0001-Handle-post-scripts-that-contain-non-ascii-character.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
|
Patch67: omit_BUILDROOT_from_pyo_files.patch
|
||||||
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
|
Patch70: rpmlint-all-pie.patch
|
||||||
# PATCHLIST END
|
BuildRequires: obs-service-format_spec_file
|
||||||
# BuildArch must at the end. is a bug: https://bugzilla.suse.com/show_bug.cgi?id=926766
|
BuildRequires: python3-flake8
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
BuildRequires: python3-rpm
|
||||||
|
BuildRequires: xz
|
||||||
|
#!BuildIgnore: rpmlint-mini
|
||||||
|
Requires: %{_bindir}/readelf
|
||||||
|
Requires: bash
|
||||||
|
Requires: checkbashisms
|
||||||
|
Requires: cpio
|
||||||
|
Requires: dash
|
||||||
|
Requires: desktop-file-utils
|
||||||
|
Requires: file
|
||||||
|
Requires: findutils
|
||||||
|
Requires: python3-magic
|
||||||
|
Requires: python3-pybeam
|
||||||
|
Requires: python3-rpm
|
||||||
|
Requires: python3-xml
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%py_requires
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rpmlint is a tool to check common errors on rpm packages. Binary and
|
Rpmlint is a tool to check common errors on rpm packages. Binary and
|
||||||
source packages can be checked.
|
source packages can be checked.
|
||||||
@ -140,43 +112,47 @@ source packages can be checked.
|
|||||||
%autosetup -n rpmlint-rpmlint-%{version} -a1 -p1
|
%autosetup -n rpmlint-rpmlint-%{version} -a1 -p1
|
||||||
|
|
||||||
cp -p %{SOURCE2} .
|
cp -p %{SOURCE2} .
|
||||||
|
chmod a-x rpmlint-checks-master/*.py
|
||||||
# Only move top-level python files
|
# Only move top-level python files
|
||||||
chmod 0755 rpmlint-checks-master/*.py
|
|
||||||
mv rpmlint-checks-master/*.py .
|
mv rpmlint-checks-master/*.py .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags} PYTHON=%{_bindir}/python3
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=%{buildroot} PYTHON=%{_bindir}/python3
|
||||||
# the provided bash-completion does not work and only prints bash errors
|
# the provided bash-completion does not work and only prints bash errors
|
||||||
rm -rf $RPM_BUILD_ROOT/etc/bash_completion.d
|
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||||
mv $RPM_BUILD_ROOT/etc/rpmlint/config $RPM_BUILD_ROOT/usr/share/rpmlint/config
|
mv %{buildroot}%{_sysconfdir}/rpmlint/config %{buildroot}%{_datadir}/rpmlint/config
|
||||||
head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config
|
head -n 8 %{buildroot}%{_datadir}/rpmlint/config > %{buildroot}%{_sysconfdir}/rpmlint/config
|
||||||
# make sure that the package is sane
|
# make sure that the package is sane
|
||||||
python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config
|
for f in %{buildroot}%{_datadir}/rpmlint/*.py %{buildroot}%{_datadir}/rpmlint/config; do
|
||||||
%__install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/
|
echo $f
|
||||||
|
env LC_ALL=C.utf8 python3 -tt %{SOURCE100} $f
|
||||||
|
done
|
||||||
|
install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/
|
||||||
|
|
||||||
cp %{SOURCE12} licenses.config
|
cp %{SOURCE12} licenses.config
|
||||||
# note there is a tab character behind the -d, so don't copy&paste lightly
|
# note there is a tab character behind the -d, so don't copy&paste lightly
|
||||||
cut '-d ' -f1 /usr/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
|
cut '-d ' -f1 %{_prefix}/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
|
||||||
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
||||||
done
|
done
|
||||||
%__install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/
|
install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/
|
||||||
|
|
||||||
%check
|
%check
|
||||||
sh ./test.sh
|
env PYTHON=%{_bindir}/python3 ./test.sh
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,0755)
|
%license COPYING
|
||||||
%doc COPYING INSTALL README*
|
%doc README*
|
||||||
%{_prefix}/bin/*
|
%{_bindir}/rpmlint
|
||||||
%{_prefix}/share/rpmlint
|
%{_bindir}/rpmdiff
|
||||||
%config(noreplace) /etc/rpmlint/config
|
%{_datadir}/rpmlint
|
||||||
|
%config(noreplace) %{_sysconfdir}/rpmlint/config
|
||||||
%config %{_sysconfdir}/rpmlint/pie.config
|
%config %{_sysconfdir}/rpmlint/pie.config
|
||||||
%config %{_sysconfdir}/rpmlint/licenses.config
|
%config %{_sysconfdir}/rpmlint/licenses.config
|
||||||
%dir /etc/rpmlint
|
%dir %{_sysconfdir}/rpmlint
|
||||||
/usr/share/man/man1/rpmlint.1.gz
|
%{_mandir}/man1/rpmlint.1%{ext_man}
|
||||||
/usr/share/man/man1/rpmdiff.1.gz
|
%{_mandir}/man1/rpmdiff.1%{ext_man}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -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 \
|
|
@ -7,11 +7,11 @@ Subject: [PATCH] selfconflicts-provide.diff
|
|||||||
TagsCheck.py | 7 +++++++
|
TagsCheck.py | 7 +++++++
|
||||||
1 file changed, 7 insertions(+)
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index 00ec2e8..8dccbf1 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -830,6 +830,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -865,6 +865,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
|
|
||||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||||
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
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):
|
for o in (x for x in obs_names if x not in prov_names):
|
||||||
printWarning(pkg, 'obsolete-not-provided', o)
|
printWarning(pkg, 'obsolete-not-provided', o)
|
||||||
@@ -841,6 +842,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -876,6 +877,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
# https://bugzilla.redhat.com/460872
|
# https://bugzilla.redhat.com/460872
|
||||||
useless_provides = []
|
useless_provides = []
|
||||||
for p in prov_names:
|
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:
|
if prov_names.count(p) != 1 and p not in useless_provides:
|
||||||
useless_provides.append(p)
|
useless_provides.append(p)
|
||||||
for p in useless_provides:
|
for p in useless_provides:
|
||||||
@@ -1003,6 +1006,10 @@ the Release tag.''',
|
@@ -1011,6 +1014,10 @@ the Release tag.''',
|
||||||
'''There is no Name tag in your package. You have to specify a name using the
|
'''There is no Name tag in your package. You have to specify a name using the
|
||||||
Name tag.''',
|
Name tag.''',
|
||||||
|
|
||||||
|
@ -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)-'))
|
|
@ -7,11 +7,11 @@ Subject: [PATCH] stricter-interpreter-check.diff
|
|||||||
FilesCheck.py | 3 ++-
|
FilesCheck.py | 3 ++-
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index 59901e7..6c322c6 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -1268,7 +1268,8 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -872,7 +872,8 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
f.endswith('.la')):
|
f.endswith('.la')):
|
||||||
printError(pkg, 'script-without-shebang', f)
|
printError(pkg, 'script-without-shebang', f)
|
||||||
|
|
||||||
@ -19,5 +19,5 @@ index 59901e7..6c322c6 100644
|
|||||||
+ if not mode_is_exec and not is_doc and \
|
+ if not mode_is_exec and not is_doc and \
|
||||||
+ interpreter and interpreter.startswith("/"):
|
+ interpreter and interpreter.startswith("/"):
|
||||||
printError(pkg, 'non-executable-script', f,
|
printError(pkg, 'non-executable-script', f,
|
||||||
"%o" % perm, interpreter)
|
"%o" % perm, interpreter,
|
||||||
if b'\r' in chunk:
|
interpreter_args)
|
||||||
|
@ -7,76 +7,73 @@ Subject: [PATCH] suse-binarieschecks.diff
|
|||||||
BinariesCheck.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
|
BinariesCheck.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||||
1 file changed, 56 insertions(+), 2 deletions(-)
|
1 file changed, 56 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
index d2ed87a..2e5758e 100644
|
===================================================================
|
||||||
--- a/BinariesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
||||||
+++ b/BinariesCheck.py
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
@@ -14,7 +14,7 @@ import sys
|
@@ -16,7 +16,7 @@ import rpm
|
||||||
|
|
||||||
import rpm
|
|
||||||
|
|
||||||
-from Filter import addDetails, printError, printWarning
|
|
||||||
+from Filter import addDetails, printError, printWarning, printInfo
|
|
||||||
import AbstractCheck
|
import AbstractCheck
|
||||||
import Config
|
import Config
|
||||||
|
-from Filter import addDetails, printError, printWarning
|
||||||
|
+from Filter import addDetails, printError, printWarning, printInfo
|
||||||
import Pkg
|
import Pkg
|
||||||
@@ -53,6 +53,10 @@ class BinaryInfo:
|
|
||||||
unused_regex = re.compile('^\s+(\S+)')
|
|
||||||
exit_call_regex = create_regexp_call('_?exit')
|
@@ -56,6 +56,9 @@ class BinaryInfo(object):
|
||||||
fork_call_regex = create_regexp_call('fork')
|
chroot_call_regex = create_regexp_call('chroot')
|
||||||
+ debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+')
|
# 401eb8: e8 c3 f0 ff ff callq 400f80 <chdir@plt>
|
||||||
+ symtab_regex=re.compile('^\s+\[\s*\d+\]\s+\.symtab\s+')
|
objdump_call_regex = re.compile(br'callq?\s(.*)')
|
||||||
+ gethostbyname_call_regex = create_regexp_call(['gethostbyname', 'gethostbyname2',
|
+ debuginfo_regex = re.compile(r'^\s+\[\s*\d+\]\s+\.debug_.*\s+')
|
||||||
+ 'gethostbyaddr', 'gethostbyname_r', 'gethostbyname2_r', 'gethostbyaddr_r'])
|
+ symtab_regex = re.compile(r'^\s+\[\s*\d+\]\s+\.symtab\s+')
|
||||||
# regexp for setgid setegid setresgid set(?:res|e)?gid
|
+ gethostbyname_call_regex = create_regexp_call(r'(gethostbyname|gethostbyname2|gethostbyaddr|gethostbyname_r|gethostbyname2_r|gethostbyaddr_r)')
|
||||||
setgid_call_regex = create_regexp_call(['setresgid', 'setegid', 'setgid'])
|
|
||||||
setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
|
forbidden_functions = Config.getOption("WarnOnFunction")
|
||||||
@@ -86,7 +89,10 @@ class BinaryInfo:
|
if forbidden_functions:
|
||||||
|
@@ -84,7 +87,10 @@ class BinaryInfo(object):
|
||||||
self.exec_stack = False
|
self.exec_stack = False
|
||||||
self.exit_calls = []
|
self.exit_calls = []
|
||||||
self.forbidden_calls = []
|
self.forbidden_calls = []
|
||||||
+ self.calls_gethostbyname = False
|
+ self.calls_gethostbyname = False
|
||||||
fork_called = False
|
fork_called = False
|
||||||
+ self.debuginfo = 0
|
+ self.debuginfo = False
|
||||||
+ self.symtab=0
|
+ self.symtab = False
|
||||||
self.tail = ''
|
self.tail = ''
|
||||||
|
|
||||||
self.setgid = False
|
self.setgid = False
|
||||||
@@ -160,6 +166,11 @@ class BinaryInfo:
|
@@ -121,6 +127,14 @@ class BinaryInfo(object):
|
||||||
if ret:
|
self.non_pic = False
|
||||||
self.forbidden_calls.append(r_name)
|
|
||||||
|
|
||||||
+ r = BinaryInfo.gethostbyname_call_regex.search(l)
|
|
||||||
+ if r:
|
|
||||||
+ self.calls_gethostbyname = True
|
|
||||||
+ continue
|
|
||||||
+
|
|
||||||
if is_shlib:
|
|
||||||
r = BinaryInfo.exit_call_regex.search(l)
|
|
||||||
if r:
|
|
||||||
@@ -170,6 +181,14 @@ class BinaryInfo:
|
|
||||||
fork_called = True
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
+ if BinaryInfo.debuginfo_regex.search(l):
|
+ if BinaryInfo.debuginfo_regex.search(l):
|
||||||
+ self.debuginfo=1
|
+ self.debuginfo = True
|
||||||
+ continue
|
+ continue
|
||||||
+
|
+
|
||||||
+ if BinaryInfo.symtab_regex.search(l):
|
+ if BinaryInfo.symtab_regex.search(l):
|
||||||
+ self.symtab=1
|
+ self.symtab = True
|
||||||
+ continue
|
+ continue
|
||||||
+
|
+
|
||||||
# check if we don't have a string that will automatically
|
r = BinaryInfo.soname_regex.search(l)
|
||||||
# waive the presence of a forbidden call
|
if r:
|
||||||
if self.forbidden_calls:
|
self.soname = r.group(1)
|
||||||
@@ -382,13 +401,26 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
@@ -161,6 +175,9 @@ class BinaryInfo(object):
|
||||||
|
if BinaryInfo.chroot_call_regex.search(l):
|
||||||
|
self.chroot = True
|
||||||
|
|
||||||
|
+ if BinaryInfo.gethostbyname_call_regex.search(l):
|
||||||
|
+ self.calls_gethostbyname = True
|
||||||
|
+
|
||||||
|
if BinaryInfo.forbidden_functions:
|
||||||
|
for r_name, func in BinaryInfo.forbidden_functions.items():
|
||||||
|
ret = func['f_regex'].search(l)
|
||||||
|
@@ -392,13 +409,26 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# stripped ?
|
# stripped ?
|
||||||
- if 'not stripped' in pkgfile.magic:
|
- if 'not stripped' in pkgfile.magic:
|
||||||
+ if 'not stripped' in pkgfile.magic and \
|
+ if ('not stripped' in pkgfile.magic and
|
||||||
+ (os.environ.get('BUILD_DIR', '') == '' or
|
+ (os.environ.get('BUILD_DIR', '') == '' or
|
||||||
+ os.environ.get('BUILD_DEBUG', '') != ''):
|
+ os.environ.get('BUILD_DEBUG', '') != '')):
|
||||||
printWarning(pkg, 'unstripped-binary-or-object', fname)
|
printWarning(pkg, 'unstripped-binary-or-object', fname)
|
||||||
|
|
||||||
# inspect binary file
|
# inspect binary file
|
||||||
@ -89,15 +86,15 @@ index d2ed87a..2e5758e 100644
|
|||||||
+ pass
|
+ pass
|
||||||
+ elif not bin_info.symtab:
|
+ elif not bin_info.symtab:
|
||||||
+ printError(pkg, 'static-library-without-symtab', fname)
|
+ printError(pkg, 'static-library-without-symtab', fname)
|
||||||
+ elif not bin_info.debuginfo and \
|
+ elif (not bin_info.debuginfo and
|
||||||
+ (os.environ.get('BUILD_DIR', '') == '' or \
|
+ (os.environ.get('BUILD_DIR', '') == '' or
|
||||||
+ os.environ.get('BUILD_DEBUG','') != ''):
|
+ os.environ.get('BUILD_DEBUG', '') != '')):
|
||||||
+ printWarning(pkg, 'static-library-without-debuginfo', fname)
|
+ printWarning(pkg, 'static-library-without-debuginfo', fname)
|
||||||
+
|
+
|
||||||
if is_shlib:
|
if is_shlib:
|
||||||
has_lib = True
|
has_lib = True
|
||||||
|
|
||||||
@@ -443,6 +475,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
@@ -453,6 +483,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
printWarning(pkg, ec, fname,
|
printWarning(pkg, ec, fname,
|
||||||
BinaryInfo.forbidden_functions[ec]['f_name'])
|
BinaryInfo.forbidden_functions[ec]['f_name'])
|
||||||
|
|
||||||
@ -108,7 +105,7 @@ index d2ed87a..2e5758e 100644
|
|||||||
# rpath ?
|
# rpath ?
|
||||||
if bin_info.rpath:
|
if bin_info.rpath:
|
||||||
for p in bin_info.rpath:
|
for p in bin_info.rpath:
|
||||||
@@ -650,6 +686,14 @@ with the intended shared libraries only.''',
|
@@ -666,6 +700,14 @@ with the intended shared libraries only.
|
||||||
'ldd-failed',
|
'ldd-failed',
|
||||||
'''Executing ldd on this file failed, all checks could not be run.''',
|
'''Executing ldd on this file failed, all checks could not be run.''',
|
||||||
|
|
||||||
@ -123,7 +120,7 @@ index d2ed87a..2e5758e 100644
|
|||||||
'executable-stack',
|
'executable-stack',
|
||||||
'''The binary declares the stack as executable. Executable stack is usually an
|
'''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
|
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 +720,10 @@ don\'t define a proper .note.GNU-stack s
|
||||||
make the stack executable. Usual suspects include use of a non-GNU linker or
|
make the stack executable. Usual suspects include use of a non-GNU linker or
|
||||||
an old GNU linker version.''',
|
an old GNU linker version.''',
|
||||||
|
|
||||||
@ -134,7 +131,7 @@ index d2ed87a..2e5758e 100644
|
|||||||
'shared-lib-calls-exit',
|
'shared-lib-calls-exit',
|
||||||
'''This library package calls exit() or _exit(), probably in a non-fork()
|
'''This library package calls exit() or _exit(), probably in a non-fork()
|
||||||
context. Doing so from a library is strongly discouraged - when a library
|
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 +742,12 @@ that use prelink, make sure that prelink
|
||||||
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
||||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-check-optional-dependencies.diff
|
|||||||
FilesCheck.py | 28 ++++++++++++++++++++++++++++
|
FilesCheck.py | 28 ++++++++++++++++++++++++++++
|
||||||
1 file changed, 28 insertions(+)
|
1 file changed, 28 insertions(+)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index cdffaea..aa1fa25 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -927,6 +927,16 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -535,6 +535,16 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
if res.group(1) != pkg.name:
|
if res.group(1) != pkg.name:
|
||||||
printError(pkg, 'incoherent-logrotate-file', f)
|
printError(pkg, 'incoherent-logrotate-file', f)
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ index cdffaea..aa1fa25 100644
|
|||||||
if link != '':
|
if link != '':
|
||||||
ext = compr_regex.search(link)
|
ext = compr_regex.search(link)
|
||||||
if ext:
|
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
|
extraction not working as expected. Verify that the binaries are not
|
||||||
unexpectedly stripped and that the intended compiler flags are used.''',
|
unexpectedly stripped and that the intended compiler flags are used.''',
|
||||||
|
|
||||||
|
@ -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'
|
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-filter-exception.diff
|
|||||||
Config.py | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
Config.py | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||||
1 file changed, 54 insertions(+), 7 deletions(-)
|
1 file changed, 54 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
diff --git a/Config.py b/Config.py
|
Index: rpmlint-rpmlint-1.10/Config.py
|
||||||
index f27607c..b4e19cc 100644
|
===================================================================
|
||||||
--- a/Config.py
|
--- rpmlint-rpmlint-1.10.orig/Config.py
|
||||||
+++ b/Config.py
|
+++ rpmlint-rpmlint-1.10/Config.py
|
||||||
@@ -111,12 +111,23 @@ def getOption(name, default=""):
|
@@ -114,12 +114,23 @@ def getOption(name, default=""):
|
||||||
_filters = []
|
_filters = []
|
||||||
_filters_re = None
|
_filters_re = None
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ index f27607c..b4e19cc 100644
|
|||||||
|
|
||||||
|
|
||||||
def removeFilter(s):
|
def removeFilter(s):
|
||||||
@@ -133,8 +144,13 @@ _scoring = {}
|
@@ -137,8 +148,13 @@ _scoring = {}
|
||||||
|
|
||||||
|
|
||||||
def setBadness(s, score):
|
def setBadness(s, score):
|
||||||
@ -51,7 +51,7 @@ index f27607c..b4e19cc 100644
|
|||||||
|
|
||||||
def badness(s):
|
def badness(s):
|
||||||
return _scoring.get(s, 0)
|
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):
|
def isFiltered(s):
|
||||||
global _filters_re
|
global _filters_re
|
||||||
@ -80,7 +80,7 @@ index f27607c..b4e19cc 100644
|
|||||||
_filters_re = '(?:' + _filters[0] + ')'
|
_filters_re = '(?:' + _filters[0] + ')'
|
||||||
|
|
||||||
for idx in range(1, len(_filters)):
|
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 = _filters_re + '|(?:' + _filters[idx] + ')'
|
||||||
_filters_re = re.compile(_filters_re)
|
_filters_re = re.compile(_filters_re)
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] suse-filter-more-verbose.diff
|
|||||||
Config.py | 25 +++++++++++++++++++++++--
|
Config.py | 25 +++++++++++++++++++++++--
|
||||||
1 file changed, 23 insertions(+), 2 deletions(-)
|
1 file changed, 23 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Config.py b/Config.py
|
Index: rpmlint-rpmlint-1.10/Config.py
|
||||||
index b4e19cc..c29db24 100644
|
===================================================================
|
||||||
--- a/Config.py
|
--- rpmlint-rpmlint-1.10.orig/Config.py
|
||||||
+++ b/Config.py
|
+++ rpmlint-rpmlint-1.10/Config.py
|
||||||
@@ -10,6 +10,7 @@
|
@@ -10,6 +10,7 @@
|
||||||
import locale
|
import locale
|
||||||
import os.path
|
import os.path
|
||||||
@ -19,7 +19,7 @@ index b4e19cc..c29db24 100644
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from __version__ import __version__
|
from __version__ import __version__
|
||||||
@@ -175,7 +176,17 @@ def isFiltered(s):
|
@@ -180,7 +181,17 @@ def isFiltered(s):
|
||||||
if '(' in _filters_non_except[idx]:
|
if '(' in _filters_non_except[idx]:
|
||||||
_non_named_group_re.subn('(:?', _filters_non_except[idx])
|
_non_named_group_re.subn('(:?', _filters_non_except[idx])
|
||||||
_filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
|
_filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
|
||||||
@ -38,7 +38,7 @@ index b4e19cc..c29db24 100644
|
|||||||
|
|
||||||
if _filters_re == None and len(_filters):
|
if _filters_re == None and len(_filters):
|
||||||
_filters_re = '(?:' + _filters[0] + ')'
|
_filters_re = '(?:' + _filters[0] + ')'
|
||||||
@@ -187,7 +198,17 @@ def isFiltered(s):
|
@@ -192,7 +203,17 @@ def isFiltered(s):
|
||||||
if '(' in _filters[idx]:
|
if '(' in _filters[idx]:
|
||||||
_non_named_group_re.subn('(:?', _filters[idx])
|
_non_named_group_re.subn('(:?', _filters[idx])
|
||||||
_filters_re = _filters_re + '|(?:' + _filters[idx] + ')'
|
_filters_re = _filters_re + '|(?:' + _filters[idx] + ')'
|
||||||
|
@ -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...
|
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-ignore-specfile-errors.diff
|
|||||||
SpecCheck.py | 5 ++---
|
SpecCheck.py | 5 ++---
|
||||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
Index: rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
index 4dafdb9..5149dc3 100644
|
===================================================================
|
||||||
--- a/SpecCheck.py
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
+++ b/SpecCheck.py
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
@@ -563,9 +563,8 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
@@ -559,9 +559,8 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
printWarning(pkg, "patch-not-applied",
|
printWarning(pkg, "patch-not-applied",
|
||||||
"Patch%d:" % pnum, pfile)
|
"Patch%d:" % pnum, pfile)
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-manpages-for-rc-scripts
|
|||||||
FilesCheck.py | 2 +-
|
FilesCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index 806b886..81c5680 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -1429,7 +1429,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -1031,7 +1031,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
for exe, paths in bindir_exes.items():
|
for exe, paths in bindir_exes.items():
|
||||||
if len(paths) > 1:
|
if len(paths) > 1:
|
||||||
printWarning(pkg, "duplicate-executable", exe, paths)
|
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:
|
+ 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)
|
printWarning(pkg, "no-manual-page-for-binary", exe)
|
||||||
|
|
||||||
# Create an object to enable the auto registration of the test
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-no-run-ldconfig.diff
|
|||||||
SpecCheck.py | 12 ++++++++++++
|
SpecCheck.py | 12 ++++++++++++
|
||||||
1 file changed, 12 insertions(+)
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
Index: rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
index 8fc6e94..0d77a03 100644
|
===================================================================
|
||||||
--- a/SpecCheck.py
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
+++ b/SpecCheck.py
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
@@ -449,6 +449,10 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
@@ -454,6 +454,10 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
'comparison-operator-in-deptoken',
|
'comparison-operator-in-deptoken',
|
||||||
conf)
|
conf)
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ index 8fc6e94..0d77a03 100644
|
|||||||
if current_section == 'changelog':
|
if current_section == 'changelog':
|
||||||
for match in AbstractCheck.macro_regex.findall(line):
|
for match in AbstractCheck.macro_regex.findall(line):
|
||||||
res = re.match('%+', match)
|
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
|
'''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.''',
|
they can be disabled with a rpm macro for short circuiting purposes.''',
|
||||||
|
|
||||||
|
@ -1,25 +1,14 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
Subject: [PATCH] suse-pkg-config-check.diff
|
@@ -416,6 +416,7 @@ lib_devel_number_regex = re.compile(r'^l
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
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')
|
|
||||||
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
||||||
lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
lib_package_regex = re.compile(r'(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
||||||
leading_space_regex = re.compile('^\s+')
|
leading_space_regex = re.compile(r'^\s+')
|
||||||
+pkg_config_regex = re.compile('^/usr/(?:lib\d*|share)/pkgconfig/')
|
+pkg_config_regex = re.compile(r'^/usr/(?:lib\d*|share)/pkgconfig/')
|
||||||
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
|
license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\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
|
# () 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)
|
base = is_devel.group(1)
|
||||||
dep = None
|
dep = None
|
||||||
has_so = False
|
has_so = False
|
||||||
@ -33,7 +22,7 @@ index 01ef3ee..e161aec 100644
|
|||||||
if has_so:
|
if has_so:
|
||||||
base_or_libs = base + '/' + base + '-libs/lib' + base
|
base_or_libs = base + '/' + base + '-libs/lib' + base
|
||||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
# 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()):
|
if prov not in (x[0] for x in pkg.provides()):
|
||||||
printWarning(pkg, 'no-provides', prov)
|
printWarning(pkg, 'no-provides', prov)
|
||||||
|
|
||||||
@ -49,7 +38,7 @@ index 01ef3ee..e161aec 100644
|
|||||||
# List of words to ignore in spell check
|
# List of words to ignore in spell check
|
||||||
ignored_words = set()
|
ignored_words = set()
|
||||||
for pf in pkg.files():
|
for pf in pkg.files():
|
||||||
@@ -1107,6 +1119,11 @@ once.''',
|
@@ -1108,6 +1120,11 @@ once.''',
|
||||||
'no-url-tag',
|
'no-url-tag',
|
||||||
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
|
||||||
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
|
||||||
Subject: [PATCH] suse-python-abi-check.diff
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
FilesCheck.py | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
|
||||||
index f73cda1..806b886 100644
|
|
||||||
--- a/FilesCheck.py
|
|
||||||
+++ b/FilesCheck.py
|
|
||||||
@@ -1132,8 +1132,11 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
|
||||||
if res and not (pkg.check_versioned_dep('python-base',
|
|
||||||
res.group(1)) or
|
|
||||||
pkg.check_versioned_dep('python',
|
|
||||||
- res.group(1))):
|
|
||||||
- printError(pkg, 'no-dependency-on', 'python-base',
|
|
||||||
+ res.group(1)) or
|
|
||||||
+ pkg.check_versioned_dep('python(abi)',
|
|
||||||
+ res.group(1))
|
|
||||||
+ ):
|
|
||||||
+ printError(pkg, 'no-dependency-on', 'python(abi)',
|
|
||||||
res.group(1))
|
|
||||||
python_dep_error = True
|
|
||||||
|
|
@ -7,12 +7,12 @@ Subject: [PATCH] suse-python3-naming-policy.diff
|
|||||||
NamingPolicyCheck.py | 2 +-
|
NamingPolicyCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/NamingPolicyCheck.py b/NamingPolicyCheck.py
|
Index: rpmlint-rpmlint-1.10/NamingPolicyCheck.py
|
||||||
index 231b936..96fb91d 100644
|
===================================================================
|
||||||
--- a/NamingPolicyCheck.py
|
--- rpmlint-rpmlint-1.10.orig/NamingPolicyCheck.py
|
||||||
+++ b/NamingPolicyCheck.py
|
+++ rpmlint-rpmlint-1.10/NamingPolicyCheck.py
|
||||||
@@ -90,7 +90,7 @@ check = NamingPolicyCheck()
|
@@ -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('xmms', '^xmms(-|$)', '^/usr/lib(64)?/xmms/')
|
||||||
-check.add_check('python', '^python(-|$)', '^/usr/lib(64)?/python[1-9](-[1-9])?')
|
-check.add_check('python', '^python(-|$)', '^/usr/lib(64)?/python[1-9](-[1-9])?')
|
||||||
|
@ -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
|
|
@ -7,20 +7,20 @@ Subject: [PATCH] suse-shlib-devel-dependency.diff
|
|||||||
TagsCheck.py | 4 ++--
|
TagsCheck.py | 4 ++--
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index 8dccbf1..f229a28 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -642,10 +642,10 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -663,10 +663,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
||||||
has_pc = True
|
has_pc = True
|
||||||
if has_so:
|
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 + '*'
|
+ base_or_libs = base + '*' + '/' + base + '-libs/lib' + base + '*'
|
||||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||||||
base_or_libs_re = re.compile(
|
base_or_libs_re = re.compile(
|
||||||
- '^(lib)?%s(-libs)?(\(\w+-\d+\))?$' % re.escape(base))
|
- r'^(lib)?%s(-libs)?(\(\w+-\d+\))?$' % re.escape(base))
|
||||||
+ '^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?' % re.escape(base))
|
+ r'^(lib)?%s(-libs)?[\d_]*(\(\w+-\d+\))?$' % re.escape(base))
|
||||||
for d in deps:
|
for d in deps:
|
||||||
if base_or_libs_re.match(d[0]):
|
if base_or_libs_re.match(d[0]):
|
||||||
dep = d
|
dep = d
|
||||||
|
36
suse-skip-macro-expansion.diff
Normal file
36
suse-skip-macro-expansion.diff
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
|
@@ -462,16 +462,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a
|
||||||
|
# we assume that no rpm packages existed before rpm itself existed...
|
||||||
|
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
|
||||||
|
|
||||||
|
-private_so_paths = set()
|
||||||
|
-for path in ('%perl_archlib', '%perl_vendorarch', '%perl_sitearch',
|
||||||
|
- '%python_sitearch', '%python2_sitearch', '%python3_sitearch',
|
||||||
|
- '%ruby_sitearch', '%php_extdir'):
|
||||||
|
- epath = rpm.expandMacro(path)
|
||||||
|
- if epath and epath != path:
|
||||||
|
- private_so_paths.add(epath)
|
||||||
|
- private_so_paths.add(re.sub(r'/lib64(?=/|$)', '/lib', epath))
|
||||||
|
- private_so_paths.add(re.sub(r'/lib(?=/|$)', '/lib64', epath))
|
||||||
|
-
|
||||||
|
_enchant_checkers = {}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -921,14 +911,6 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
|
res = Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())])
|
||||||
|
self._unexpanded_macros(pkg, tag, res)
|
||||||
|
|
||||||
|
- for path in private_so_paths:
|
||||||
|
- for fname, pkgfile in pkg.files().items():
|
||||||
|
- if fname.startswith(path):
|
||||||
|
- for prov in pkgfile.provides:
|
||||||
|
- if so_dep_regex.search(prov[0]):
|
||||||
|
- printWarning(pkg, "private-shared-object-provides",
|
||||||
|
- fname, Pkg.formatRequire(*prov))
|
||||||
|
-
|
||||||
|
def check_description(self, pkg, lang, ignored_words):
|
||||||
|
description = pkg.langtag(rpm.RPMTAG_DESCRIPTION, lang)
|
||||||
|
if use_utf8:
|
@ -7,10 +7,10 @@ Subject: [PATCH] Handle SPDX style license exceptions
|
|||||||
TagsCheck.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
TagsCheck.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
1 file changed, 50 insertions(+), 1 deletion(-)
|
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.10.orig/TagsCheck.py
|
||||||
+++ rpmlint-rpmlint-1.8/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -139,6 +139,34 @@ DEFAULT_VALID_LICENSES = (
|
@@ -139,6 +139,34 @@ DEFAULT_VALID_LICENSES = (
|
||||||
'Shareware',
|
'Shareware',
|
||||||
)
|
)
|
||||||
@ -53,16 +53,16 @@ Index: rpmlint-rpmlint-1.8/TagsCheck.py
|
|||||||
+VALID_LICENSE_EXCEPTIONS = Config.getOption('ValidLicenseExceptions', DEFAULT_VALID_LICENSE_EXCEPTIONS)
|
+VALID_LICENSE_EXCEPTIONS = Config.getOption('ValidLicenseExceptions', DEFAULT_VALID_LICENSE_EXCEPTIONS)
|
||||||
INVALID_REQUIRES = map(re.compile, Config.getOption('InvalidRequires', DEFAULT_INVALID_REQUIRES))
|
INVALID_REQUIRES = map(re.compile, Config.getOption('InvalidRequires', DEFAULT_INVALID_REQUIRES))
|
||||||
packager_regex = re.compile(Config.getOption('Packager'))
|
packager_regex = re.compile(Config.getOption('Packager'))
|
||||||
changelog_version_regex = re.compile('[^>]([^ >]+)\s*$')
|
changelog_version_regex = re.compile(r'[^>]([^ >]+)\s*$')
|
||||||
@@ -418,6 +447,7 @@ lib_package_regex = re.compile('(?:^(?:c
|
@@ -418,6 +447,7 @@ lib_package_regex = re.compile(r'(?:^(?:
|
||||||
leading_space_regex = re.compile('^\s+')
|
leading_space_regex = re.compile(r'^\s+')
|
||||||
pkg_config_regex = re.compile('^/usr/(?:lib\d*|share)/pkgconfig/')
|
pkg_config_regex = re.compile(r'^/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+)')
|
+license_exception_regex = re.compile(r'(\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
|
# () 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)
|
||||||
@@ -787,6 +817,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -788,6 +818,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
# printWarning(pkg, 'package-provides-itself')
|
# printWarning(pkg, 'package-provides-itself')
|
||||||
# break
|
# break
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ Index: rpmlint-rpmlint-1.8/TagsCheck.py
|
|||||||
def split_license(license):
|
def split_license(license):
|
||||||
return (x.strip() for x in
|
return (x.strip() for x in
|
||||||
(l for l in license_regex.split(license) if l))
|
(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:
|
else:
|
||||||
valid_license = True
|
valid_license = True
|
||||||
if rpm_license not in VALID_LICENSES:
|
if rpm_license not in VALID_LICENSES:
|
||||||
@ -92,7 +92,7 @@ Index: rpmlint-rpmlint-1.8/TagsCheck.py
|
|||||||
if l1 in VALID_LICENSES:
|
if l1 in VALID_LICENSES:
|
||||||
continue
|
continue
|
||||||
for l2 in split_license(l1):
|
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:
|
'''The value of the License tag was not recognized. Known values are:
|
||||||
"%s".''' % '", "'.join(VALID_LICENSES),
|
"%s".''' % '", "'.join(VALID_LICENSES),
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-speccheck-utf8.diff
|
|||||||
SpecCheck.py | 4 ++--
|
SpecCheck.py | 4 ++--
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
Index: rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
index 739410f..4dafdb9 100644
|
===================================================================
|
||||||
--- a/SpecCheck.py
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
+++ b/SpecCheck.py
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
@@ -651,8 +651,8 @@ SPEC file to build a valid RPM package.''',
|
@@ -648,8 +648,8 @@ SPEC file to build a valid RPM package.'
|
||||||
("Name:" tag). Either rename your package or the specfile.''',
|
("Name:" tag). Either rename your package or the specfile.''',
|
||||||
|
|
||||||
'non-utf8-spec-file',
|
'non-utf8-spec-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
|
|
44
suse-tests-without-badness.patch
Normal file
44
suse-tests-without-badness.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Index: rpmlint-rpmlint-1.10/test.sh
|
||||||
|
===================================================================
|
||||||
|
--- rpmlint-rpmlint-1.10.orig/test.sh
|
||||||
|
+++ rpmlint-rpmlint-1.10/test.sh
|
||||||
|
@@ -19,7 +19,10 @@ for i in $TESTPATH/test.*.py; do
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
-run_rpmlint="$PYTHON ./rpmlint -C $(pwd)"
|
||||||
|
+export RPMLINT_SKIP_GLOBAL=1
|
||||||
|
+
|
||||||
|
+run_rpmlint="$PYTHON ./rpmlint -f config -C $(pwd)"
|
||||||
|
+
|
||||||
|
|
||||||
|
echo "Check that rpmlint executes with no unexpected errors"
|
||||||
|
echo "...in default locale"
|
||||||
|
@@ -40,10 +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)
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-url-check.diff
|
|||||||
TagsCheck.py | 4 ++--
|
TagsCheck.py | 4 ++--
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.9/TagsCheck.py
|
||||||
index cdb8eb4..01ef3ee 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.9.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.9/TagsCheck.py
|
||||||
@@ -795,7 +795,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -796,7 +796,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if not valid_license:
|
if not valid_license:
|
||||||
self._unexpanded_macros(pkg, 'License', rpm_license)
|
self._unexpanded_macros(pkg, 'License', rpm_license)
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ index cdb8eb4..01ef3ee 100644
|
|||||||
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
||||||
url = Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())])
|
url = Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())])
|
||||||
self._unexpanded_macros(pkg, tag, url, is_url=True)
|
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.''',
|
'''This rpm requires a specific release of another package.''',
|
||||||
|
|
||||||
'no-url-tag',
|
'no-url-tag',
|
||||||
|
@ -7,19 +7,19 @@ Subject: [PATCH] suse-version.diff
|
|||||||
SpecCheck.py | 16 ++++++++++++++++
|
SpecCheck.py | 16 ++++++++++++++++
|
||||||
1 file changed, 16 insertions(+)
|
1 file changed, 16 insertions(+)
|
||||||
|
|
||||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
Index: rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
index b69bead..2e3ba56 100644
|
===================================================================
|
||||||
--- a/SpecCheck.py
|
--- rpmlint-rpmlint-1.10.orig/SpecCheck.py
|
||||||
+++ b/SpecCheck.py
|
+++ rpmlint-rpmlint-1.10/SpecCheck.py
|
||||||
@@ -67,6 +67,7 @@ libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
|
@@ -51,6 +51,7 @@ packager_regex = re_tag_compile('Package
|
||||||
comment_or_empty_regex = re.compile('^\s*(#|$)')
|
buildarch_regex = re_tag_compile('BuildArch(?:itectures)?')
|
||||||
defattr_regex = re.compile('^\s*%defattr\\b')
|
buildprereq_regex = re_tag_compile('BuildPreReq')
|
||||||
attr_regex = re.compile('^\s*%attr\\b')
|
prereq_regex = re_tag_compile(r'PreReq(\(.*\))')
|
||||||
+suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)')
|
+suse_version_regex = re.compile(r'%suse_version\s*[<>=]+\s*(\d+)')
|
||||||
section_regexs = dict(
|
|
||||||
([x, re.compile('^%' + x + '(?:\s|$)')]
|
make_check_regex = re.compile(r'(^|\s|%{?__)make}?\s+(check|test)')
|
||||||
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
rm_regex = re.compile(r'(^|\s)((.*/)?rm|%{?__rm}?) ')
|
||||||
@@ -388,6 +389,12 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
@@ -391,6 +392,12 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
if not res.group(1).startswith('%'):
|
if not res.group(1).startswith('%'):
|
||||||
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
|
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
|
||||||
|
|
||||||
@ -32,9 +32,9 @@ index b69bead..2e3ba56 100644
|
|||||||
res = prereq_regex.search(line)
|
res = prereq_regex.search(line)
|
||||||
if res:
|
if res:
|
||||||
printError(pkg, 'prereq-use', res.group(2))
|
printError(pkg, 'prereq-use', res.group(2))
|
||||||
@@ -816,6 +823,15 @@ in the resulting binary package depending on the build environment and rpmbuild
|
@@ -806,6 +813,15 @@ architecture independent or if some othe
|
||||||
version (typically < 4.4). Add default attributes using %defattr before it in
|
in some editors but can lead to obscure errors. It should be replaced by a
|
||||||
the %files section, or use per entry %attr's.''',
|
regular space.''',
|
||||||
|
|
||||||
+'obsolete-suse-version-check',
|
+'obsolete-suse-version-check',
|
||||||
+'''The specfile contains a comparison of %suse_version against a suse release
|
+'''The specfile contains a comparison of %suse_version against a suse release
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] suse-whitelist-opensuse.diff
|
|||||||
TagsCheck.py | 2 +-
|
TagsCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index 3f9c0bc..9856f9e 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -918,7 +918,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -953,7 +953,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
spell_check(pkg, summary, 'Summary(%s)', lang, ignored_words)
|
spell_check(pkg, summary, 'Summary(%s)', lang, ignored_words)
|
||||||
if '\n' in summary:
|
if '\n' in summary:
|
||||||
printError(pkg, 'summary-on-multiple-lines', lang)
|
printError(pkg, 'summary-on-multiple-lines', lang)
|
||||||
|
151
update_git.sh
151
update_git.sh
@ -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"
|
|
@ -7,19 +7,19 @@ Subject: [PATCH] usr-arch.diff
|
|||||||
BinariesCheck.py | 3 ++-
|
BinariesCheck.py | 3 ++-
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
index 2e5758e..c7fadab 100644
|
===================================================================
|
||||||
--- a/BinariesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
||||||
+++ b/BinariesCheck.py
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
||||||
@@ -313,6 +313,7 @@ usr_lib_exception_regex = re.compile(Config.getOption('UsrLibBinaryException', '
|
@@ -321,6 +321,7 @@ usr_lib_exception_regex = re.compile(Con
|
||||||
srcname_regex = re.compile('(.*?)-[0-9]')
|
srcname_regex = re.compile(r'(.*?)-[0-9]')
|
||||||
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
|
invalid_dir_ref_regex = re.compile(r'/(home|tmp)(\W|$)')
|
||||||
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
|
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)')
|
+usr_arch_share_regex = re.compile(r'/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64|m68k|arm|aarch64)')
|
||||||
|
|
||||||
|
|
||||||
def dir_base(path):
|
def dir_base(path):
|
||||||
@@ -386,7 +387,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
@@ -394,7 +395,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
# arch dependent packages only from here on
|
# arch dependent packages only from here on
|
||||||
|
|
||||||
# in /usr/share ?
|
# in /usr/share ?
|
||||||
|
@ -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)
|
|
@ -7,16 +7,16 @@ Subject: [PATCH] xdg-paths-update.diff
|
|||||||
MenuXDGCheck.py | 2 +-
|
MenuXDGCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/MenuXDGCheck.py b/MenuXDGCheck.py
|
Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
||||||
index 4aab385..158db23 100644
|
===================================================================
|
||||||
--- a/MenuXDGCheck.py
|
--- rpmlint-rpmlint-1.10.orig/MenuXDGCheck.py
|
||||||
+++ b/MenuXDGCheck.py
|
+++ rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
||||||
@@ -24,7 +24,7 @@ class MenuXDGCheck(AbstractCheck.AbstractFilesCheck):
|
@@ -25,7 +25,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||||
# $ echo $XDG_DATA_DIRS/applications
|
# $ echo $XDG_DATA_DIRS/applications
|
||||||
# /var/lib/menu-xdg:/usr/share
|
# /var/lib/menu-xdg:/usr/share
|
||||||
AbstractCheck.AbstractFilesCheck.__init__(
|
AbstractCheck.AbstractFilesCheck.__init__(
|
||||||
- self, "MenuXDGCheck", "/usr/share/applications/.*\.desktop$")
|
- self, "MenuXDGCheck", r"/usr/share/applications/.*\.desktop$")
|
||||||
+ self, "MenuXDGCheck", "(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
+ self, "MenuXDGCheck", r"(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
||||||
|
|
||||||
def check_file(self, pkg, filename):
|
def check_file(self, pkg, filename):
|
||||||
root = pkg.dirName()
|
root = pkg.dirName()
|
||||||
|
@ -7,11 +7,11 @@ Subject: [PATCH] yast-provides.diff
|
|||||||
TagsCheck.py | 2 +-
|
TagsCheck.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
Index: rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
index e161aec..dd09e62 100644
|
===================================================================
|
||||||
--- a/TagsCheck.py
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
||||||
+++ b/TagsCheck.py
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
||||||
@@ -824,7 +824,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
@@ -859,7 +859,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
printWarning(pkg, 'no-url-tag')
|
printWarning(pkg, 'no-url-tag')
|
||||||
|
|
||||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||||
|
Loading…
Reference in New Issue
Block a user