forked from pool/rpmlint
Accepting request 346358 from home:lnussel:branches:devel:openSUSE:Factory:rpmlint
- rpmlint 1.8 update * python 3 fixes * Add support for file triggers * Mechanism to black list certain C calls * new error: non-devel-file-in-devel-package * appdata check configurable * project moved to github * Patches dropped: avoid-mismatched-libregex.diff filename-non-utf8-exception.diff fix-ghost-file-handling.diff save-content-to-an-array.diff fix-TmpFilesCheck-pattern-match.diff move-ghost-file-check-to-TmpFilesCh.diff OBS-URL: https://build.opensuse.org/request/show/346358 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=353
This commit is contained in:
parent
3420293293
commit
912bea2445
@ -2,19 +2,60 @@ 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.
|
||||
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.
|
||||
---
|
||||
TmpFilesCheck.py | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 76 insertions(+)
|
||||
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..8c4db8d
|
||||
index 0000000..d1ef824
|
||||
--- /dev/null
|
||||
+++ b/TmpFilesCheck.py
|
||||
@@ -0,0 +1,76 @@
|
||||
@@ -0,0 +1,111 @@
|
||||
+# -*- coding: utf-8 -*-
|
||||
+#############################################################################
|
||||
+# File : TmpFilesCheck.py
|
||||
@ -31,6 +72,7 @@ index 0000000..8c4db8d
|
||||
+import AbstractCheck
|
||||
+import Pkg
|
||||
+import stat
|
||||
+import rpm
|
||||
+
|
||||
+class TmpFilesCheck(AbstractCheck.AbstractCheck):
|
||||
+ '''Check systemd created tmpfiles are included in filelist'''
|
||||
@ -43,6 +85,11 @@ index 0000000..8c4db8d
|
||||
+ 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')
|
||||
+
|
||||
@ -52,6 +99,13 @@ index 0000000..8c4db8d
|
||||
+ 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]
|
||||
@ -71,15 +125,37 @@ index 0000000..8c4db8d
|
||||
+ 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',
|
||||
|
@ -4,15 +4,15 @@ Subject: [PATCH] add-weak-dependencies.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
Pkg.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
Pkg.py | 29 +++++++++++++++++++++++++++--
|
||||
TagsCheck.py | 19 +++++++++++++++++++
|
||||
2 files changed, 70 insertions(+), 2 deletions(-)
|
||||
2 files changed, 46 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Pkg.py b/Pkg.py
|
||||
index e97d7ef..cfaa5a9 100644
|
||||
index 8884dce..360ec39 100644
|
||||
--- a/Pkg.py
|
||||
+++ b/Pkg.py
|
||||
@@ -466,6 +466,10 @@ class Pkg:
|
||||
@@ -475,6 +475,10 @@ class Pkg(AbstractPkg):
|
||||
self._missingok_files = None
|
||||
self._files = None
|
||||
self._requires = None
|
||||
@ -23,7 +23,7 @@ index e97d7ef..cfaa5a9 100644
|
||||
self._req_names = -1
|
||||
|
||||
if header:
|
||||
@@ -716,6 +720,22 @@ class Pkg:
|
||||
@@ -730,6 +734,22 @@ class Pkg(AbstractPkg):
|
||||
self._gatherDepInfo()
|
||||
return self._requires
|
||||
|
||||
@ -46,7 +46,7 @@ index e97d7ef..cfaa5a9 100644
|
||||
def prereq(self):
|
||||
"""Get package PreReqs as list of
|
||||
(name, flags, (epoch, version, release)) tuples."""
|
||||
@@ -752,7 +772,7 @@ class Pkg:
|
||||
@@ -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,
|
||||
@ -55,7 +55,7 @@ index e97d7ef..cfaa5a9 100644
|
||||
names = header[nametag]
|
||||
flags = header[flagstag]
|
||||
versions = header[versiontag]
|
||||
@@ -763,7 +783,11 @@ class Pkg:
|
||||
@@ -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))
|
||||
@ -68,46 +68,8 @@ index e97d7ef..cfaa5a9 100644
|
||||
list.append((name, flags[loop], evr))
|
||||
|
||||
def _gatherDepInfo(self):
|
||||
@@ -773,6 +797,10 @@ class Pkg:
|
||||
self._provides = []
|
||||
self._conflicts = []
|
||||
self._obsoletes = []
|
||||
+ self._suggests = []
|
||||
+ self._supplements = []
|
||||
+ self._enhances = []
|
||||
+ self._recommends = []
|
||||
|
||||
self._gather_aux(self.header, self._requires,
|
||||
rpm.RPMTAG_REQUIRENAME,
|
||||
@@ -791,6 +819,26 @@ class Pkg:
|
||||
rpm.RPMTAG_OBSOLETENAME,
|
||||
rpm.RPMTAG_OBSOLETEFLAGS,
|
||||
rpm.RPMTAG_OBSOLETEVERSION)
|
||||
+ try:
|
||||
+ self._gather_aux(self.header, self._recommends,
|
||||
+ rpm.RPMTAG_RECOMMENDNAME,
|
||||
+ rpm.RPMTAG_RECOMMENDFLAGS,
|
||||
+ rpm.RPMTAG_RECOMMENDVERSION)
|
||||
+ self._gather_aux(self.header, self._suggests,
|
||||
+ rpm.RPMTAG_SUGGESTNAME,
|
||||
+ rpm.RPMTAG_SUGGESTFLAGS,
|
||||
+ rpm.RPMTAG_SUGGESTVERSION)
|
||||
+ self._gather_aux(self.header, self._supplements,
|
||||
+ rpm.RPMTAG_SUPPLEMENTNAME,
|
||||
+ rpm.RPMTAG_SUPPLEMENTFLAGS,
|
||||
+ rpm.RPMTAG_SUPPLEMENTVERSION)
|
||||
+ self._gather_aux(self.header, self._enhances,
|
||||
+ rpm.RPMTAG_ENHANCENAME,
|
||||
+ rpm.RPMTAG_ENHANCEFLAGS,
|
||||
+ rpm.RPMTAG_ENHANCEVERSION)
|
||||
+ except:
|
||||
+ pass
|
||||
+
|
||||
|
||||
def scriptprog(self, which):
|
||||
"""Get the specified script interpreter as a string.
|
||||
@@ -805,6 +853,7 @@ class Pkg:
|
||||
return b2s(prog)
|
||||
@@ -867,6 +891,7 @@ class Pkg(AbstractPkg):
|
||||
return prog
|
||||
|
||||
|
||||
+
|
||||
@ -115,10 +77,10 @@ index e97d7ef..cfaa5a9 100644
|
||||
"""Get list of installed package objects by name."""
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index bc79283..6528d5b 100644
|
||||
index 13dbb95..00ec2e8 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -853,8 +853,27 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -854,8 +854,27 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
value = Pkg.formatRequire(*c)
|
||||
self._unexpanded_macros(pkg, 'Conflicts %s' % (value,), value)
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] avoid-mismatched-libregex.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
FilesCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index efda328..14cfca3 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -615,7 +615,7 @@ 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\..*')
|
||||
+lib_regex = re.compile('/lib(64)?/lib[^/]*\.so\.[\d\.-]*$')
|
||||
ldconfig_regex = re.compile('^[^#]*ldconfig', re.MULTILINE)
|
||||
depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE)
|
||||
install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE)
|
@ -8,10 +8,10 @@ Subject: [PATCH] better-wrong-script.diff
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 7504167..72bdf54 100644
|
||||
index ca3e96a..ad77589 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -1657,7 +1657,10 @@ executed.''',
|
||||
@@ -1663,7 +1663,10 @@ executed.''',
|
||||
executed.''',
|
||||
|
||||
'wrong-script-interpreter',
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] buildroot-doc.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index 9ea5c6e..dde66fc 100644
|
||||
index 2e3ba56..62c5d9f 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -672,7 +672,7 @@ versions you can ignore this warning.''',
|
||||
@@ -673,7 +673,7 @@ versions you can ignore this warning.''',
|
||||
|
||||
'hardcoded-path-in-buildroot-tag',
|
||||
'''A path is hardcoded in your Buildroot tag. It should be replaced
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] buildroot-in-scripts.diff
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index dde66fc..63897f2 100644
|
||||
index 62c5d9f..8fc6e94 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -238,7 +238,9 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -239,7 +239,9 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
continue
|
||||
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] check for self provides
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 4141bbc..fa6154c 100644
|
||||
index 8071f1d..39b7544 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -846,6 +846,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -847,6 +847,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
for p in pkg.provides():
|
||||
value = Pkg.formatRequire(*p)
|
||||
self._unexpanded_macros(pkg, 'Provides %s' % (value,), value)
|
||||
@ -19,7 +19,7 @@ index 4141bbc..fa6154c 100644
|
||||
|
||||
for c in pkg.conflicts():
|
||||
value = Pkg.formatRequire(*c)
|
||||
@@ -1180,6 +1182,10 @@ objects should thus not be depended on and they should not result in provides
|
||||
@@ -1175,6 +1177,10 @@ objects should thus not be depended on and they should not result in provides
|
||||
in the containing package. Get rid of the provides if appropriate, for example
|
||||
by filtering it out during build. Note that in some cases this may require
|
||||
disabling rpmbuild's internal dependency generator.''',
|
||||
@ -29,4 +29,4 @@ index 4141bbc..fa6154c 100644
|
||||
+upgrade path. self-provides are autogenerated. Remove the provide.''',
|
||||
)
|
||||
|
||||
# TagsCheck.py ends here
|
||||
for i in "obsoletes", "conflicts", "provides", "recommends", "suggests", \
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] compressed-backup-regex.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index fc44b50..acb379f 100644
|
||||
index a8ac7f4..f73cda1 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -599,7 +599,7 @@ DEFAULT_DISALLOWED_DIRS = (
|
||||
|
@ -9,10 +9,10 @@ Subject: [PATCH] confusing-invalid-spec-name
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index 12b6f2b..d0d381a 100644
|
||||
index 0d77a03..739410f 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -646,8 +646,8 @@ addDetails(
|
||||
@@ -647,8 +647,8 @@ addDetails(
|
||||
SPEC file to build a valid RPM package.''',
|
||||
|
||||
'invalid-spec-name',
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] description-check.diff
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index b1c4c7a..bc79283 100644
|
||||
index 0a5f839..13dbb95 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -716,6 +716,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -715,6 +715,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
else:
|
||||
for lang in langs:
|
||||
self.check_description(pkg, lang, ignored_words)
|
||||
@ -21,7 +21,7 @@ index b1c4c7a..bc79283 100644
|
||||
else:
|
||||
printError(pkg, 'no-description-tag')
|
||||
|
||||
@@ -997,6 +1000,10 @@ Name tag.''',
|
||||
@@ -1001,6 +1004,10 @@ Name tag.''',
|
||||
'''The major number of the library isn't included in the package's name.
|
||||
''',
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] devel-provide-is-devel-package.diff
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 72bdf54..ae9c364 100644
|
||||
index ad77589..cdffaea 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -829,6 +829,10 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -830,6 +830,10 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
# Check if the package is a development package
|
||||
devel_pkg = devel_regex.search(pkg.name)
|
||||
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] docdata-examples.diff
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index c485125..7504167 100644
|
||||
index 1011a25..ca3e96a 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -609,6 +609,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
|
||||
@ -19,7 +19,7 @@ index c485125..7504167 100644
|
||||
# room for improvement with catching more -R, but also for false positives...
|
||||
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
|
||||
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||
@@ -1181,7 +1182,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -1184,7 +1185,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
includefile_regex.search(f) or \
|
||||
develfile_regex.search(f) or \
|
||||
logrotate_regex.search(f)
|
||||
@ -28,7 +28,7 @@ index c485125..7504167 100644
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/') and f not in config_files and \
|
||||
f not in ghost_files:
|
||||
@@ -1534,7 +1535,10 @@ included in your package.''',
|
||||
@@ -1540,7 +1541,10 @@ included in your package.''',
|
||||
'spurious-executable-perm',
|
||||
'''The file is installed with executable permissions, but was identified as one
|
||||
that probably should not be executable. Verify if the executable bits are
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] extend-suse-conffiles-check.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 0bb4b3d..fc44b50 100644
|
||||
index 24029f1..a8ac7f4 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -1199,7 +1199,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -1202,7 +1202,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
if nonexec_file and not docdir_examples_regex.search(f):
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/') and f not in config_files and \
|
||||
|
@ -1,30 +0,0 @@
|
||||
From: Some One <nobody@opensuse.org>
|
||||
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
||||
Subject: [PATCH] filename-non-utf8-exception.diff
|
||||
|
||||
===================================================================
|
||||
---
|
||||
Filter.py | 10 ++--------
|
||||
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Filter.py b/Filter.py
|
||||
index 40fbf79..37ba038 100644
|
||||
--- a/Filter.py
|
||||
+++ b/Filter.py
|
||||
@@ -23,14 +23,8 @@ _diagnostic = list()
|
||||
_badness_score = 0
|
||||
printed_messages = {"I": 0, "W": 0, "E": 0}
|
||||
|
||||
-if sys.stdout.isatty():
|
||||
- def __print(s):
|
||||
- print(s)
|
||||
-else:
|
||||
- def __print(s):
|
||||
- if isinstance(s, unicode):
|
||||
- s = s.encode(locale.getpreferredencoding(), "replace")
|
||||
- print(s)
|
||||
+def __print(s):
|
||||
+ print(s)
|
||||
|
||||
|
||||
def printInfo(pkg, reason, *details):
|
@ -1,24 +0,0 @@
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Fri, 13 Nov 2015 12:56:25 +0100
|
||||
Subject: [PATCH] fix TmpFilesCheck pattern match
|
||||
|
||||
need to use search() instead of match() find the systemd-tmpfiles call
|
||||
---
|
||||
TmpFilesCheck.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/TmpFilesCheck.py b/TmpFilesCheck.py
|
||||
index 06be7bb..d1ef824 100644
|
||||
--- a/TmpFilesCheck.py
|
||||
+++ b/TmpFilesCheck.py
|
||||
@@ -43,8 +43,8 @@ class TmpFilesCheck(AbstractCheck.AbstractCheck):
|
||||
continue
|
||||
|
||||
pattern = re.compile(r'systemd-tmpfiles --create .*%s'%re.escape(fn))
|
||||
- if (not postin or not pattern.match(postin)) and \
|
||||
- (not prein or not pattern.match(prein)):
|
||||
+ if (not postin or not pattern.search(postin)) and \
|
||||
+ (not prein or not pattern.search(prein)):
|
||||
printWarning(pkg,
|
||||
'postin-without-tmpfile-creation', fn)
|
||||
|
@ -1,39 +0,0 @@
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Thu, 9 Apr 2015 12:01:29 +0200
|
||||
Subject: [PATCH] fix ghost file handling
|
||||
|
||||
always take into consideration the missingok files when checking for
|
||||
missing ghost files.
|
||||
---
|
||||
PostCheck.py | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/PostCheck.py b/PostCheck.py
|
||||
index a87964a..aeb18d3 100644
|
||||
--- a/PostCheck.py
|
||||
+++ b/PostCheck.py
|
||||
@@ -123,15 +123,15 @@ class PostCheck(AbstractCheck.AbstractCheck):
|
||||
if ghost_files:
|
||||
postin = pkg[rpm.RPMTAG_POSTIN]
|
||||
prein = pkg[rpm.RPMTAG_PREIN]
|
||||
- if not postin and not prein:
|
||||
- printWarning(pkg, 'ghost-files-without-postin')
|
||||
- else:
|
||||
- for f in ghost_files:
|
||||
- if (not postin or f not in postin) and \
|
||||
- (not prein or f not in prein) and \
|
||||
- f not in pkg.missingOkFiles():
|
||||
- printWarning(pkg,
|
||||
- 'postin-without-ghost-file-creation', f)
|
||||
+ 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:
|
@ -8,7 +8,7 @@ Subject: [PATCH] invalid-filerequires.diff
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 3c68d28..4141bbc 100644
|
||||
index 9856f9e..8071f1d 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -422,6 +422,7 @@ invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECA
|
||||
@ -29,7 +29,7 @@ index 3c68d28..4141bbc 100644
|
||||
if is_source:
|
||||
if lib_devel_number_regex.search(d[0]):
|
||||
printError(pkg, 'invalid-build-requires', d[0])
|
||||
@@ -1127,6 +1131,12 @@ unneeded explicit Requires: tags.''',
|
||||
@@ -1122,6 +1126,12 @@ unneeded explicit Requires: tags.''',
|
||||
'''This package provides 2 times the same capacity. It should only provide it
|
||||
once.''',
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] libtool-wrapper-check.diff
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
||||
index c1c566d..b92c01e 100644
|
||||
index c7fadab..62951d6 100644
|
||||
--- a/BinariesCheck.py
|
||||
+++ b/BinariesCheck.py
|
||||
@@ -316,8 +316,19 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -359,8 +359,19 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
is_ar = 'current ar archive' in pkgfile.magic
|
||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||
is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
|
||||
@ -31,7 +31,7 @@ index c1c566d..b92c01e 100644
|
||||
if not is_binary:
|
||||
if reference_regex.search(fname):
|
||||
lines = pkg.grep(invalid_dir_ref_regex, fname)
|
||||
@@ -579,6 +590,15 @@ recompiled separately from the static libraries with the -fPIC option.
|
||||
@@ -626,6 +637,15 @@ recompiled separately from the static libraries with the -fPIC option.
|
||||
Another common mistake that causes this problem is linking with
|
||||
``gcc -Wl,-shared'' instead of ``gcc -shared''.''',
|
||||
|
||||
|
@ -1,123 +0,0 @@
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Wed, 20 May 2015 09:57:28 +0200
|
||||
Subject: [PATCH] move ghost file check to TmpFilesCheck
|
||||
|
||||
files handled by the tmpfiles mechanism can be skipped by the normal
|
||||
ghost check
|
||||
---
|
||||
PostCheck.py | 18 ------------------
|
||||
TmpFilesCheck.py | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/PostCheck.py b/PostCheck.py
|
||||
index aeb18d3..53f2d0c 100644
|
||||
--- a/PostCheck.py
|
||||
+++ b/PostCheck.py
|
||||
@@ -119,20 +119,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:
|
||||
@@ -201,10 +187,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
|
||||
index 8c4db8d..06be7bb 100644
|
||||
--- a/TmpFilesCheck.py
|
||||
+++ b/TmpFilesCheck.py
|
||||
@@ -14,6 +14,7 @@ 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'''
|
||||
@@ -26,6 +27,11 @@ class TmpFilesCheck(AbstractCheck.AbstractCheck):
|
||||
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')
|
||||
|
||||
@@ -35,6 +41,13 @@ class TmpFilesCheck(AbstractCheck.AbstractCheck):
|
||||
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.match(postin)) and \
|
||||
+ (not prein or not pattern.match(prein)):
|
||||
+ printWarning(pkg,
|
||||
+ 'postin-without-tmpfile-creation', fn)
|
||||
+
|
||||
for line in open(pkgfile.path):
|
||||
# skip comments
|
||||
line = line.split('#')[0].split('\n')[0]
|
||||
@@ -54,15 +67,37 @@ class TmpFilesCheck(AbstractCheck.AbstractCheck):
|
||||
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',
|
@ -9,10 +9,10 @@ Subject: [PATCH] no-badness-return.diff
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Filter.py b/Filter.py
|
||||
index eaa8384..40fbf79 100644
|
||||
index 5ce6219..e50abe1 100644
|
||||
--- a/Filter.py
|
||||
+++ b/Filter.py
|
||||
@@ -120,7 +120,7 @@ def printAllReasons():
|
||||
@@ -128,7 +128,7 @@ def printAllReasons():
|
||||
if len(last_reason):
|
||||
printDescriptions(last_reason)
|
||||
last_reason = reason
|
||||
@ -22,10 +22,10 @@ index eaa8384..40fbf79 100644
|
||||
printDescriptions(last_reason)
|
||||
_diagnostic = list()
|
||||
diff --git a/rpmlint b/rpmlint
|
||||
index aa37c3a..8853e79 100755
|
||||
index acbda29..810d677 100755
|
||||
--- a/rpmlint
|
||||
+++ b/rpmlint
|
||||
@@ -202,7 +202,7 @@ def main():
|
||||
@@ -203,7 +203,7 @@ def main():
|
||||
% (packages_checked, specfiles_checked,
|
||||
printed_messages["E"], printed_messages["W"]))
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] no-doc-for-lib.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 9532011..5929146 100644
|
||||
index 14ef030..ee5039c 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -846,7 +846,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -847,7 +847,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
debuginfo_srcs = False
|
||||
debuginfo_debugs = False
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] noarch-lib64.diff
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
||||
index b92c01e..aff0f9f 100644
|
||||
index 62951d6..eb19387 100644
|
||||
--- a/BinariesCheck.py
|
||||
+++ b/BinariesCheck.py
|
||||
@@ -294,6 +294,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -337,6 +337,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
binary = False
|
||||
binary_in_usr_lib = False
|
||||
has_usr_lib_file = False
|
||||
@ -19,7 +19,7 @@ index b92c01e..aff0f9f 100644
|
||||
|
||||
multi_pkg = False
|
||||
srpm = pkg[rpm.RPMTAG_SOURCERPM]
|
||||
@@ -312,6 +313,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -355,6 +356,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
# only-non-binary-in-usr-lib false positives
|
||||
binary_in_usr_lib = True
|
||||
|
||||
@ -30,7 +30,7 @@ index b92c01e..aff0f9f 100644
|
||||
is_elf = 'ELF' in pkgfile.magic
|
||||
is_ar = 'current ar archive' in pkgfile.magic
|
||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||
@@ -541,9 +546,12 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -588,9 +593,12 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
if version and version != -1 and version not in pkg.name:
|
||||
printError(pkg, 'incoherent-version-in-name', version)
|
||||
|
||||
@ -44,7 +44,7 @@ index b92c01e..aff0f9f 100644
|
||||
if has_usr_lib_file and not binary_in_usr_lib:
|
||||
printWarning(pkg, 'only-non-binary-in-usr-lib')
|
||||
|
||||
@@ -567,6 +575,11 @@ FHS and the FSSTND forbid this.''',
|
||||
@@ -614,6 +622,11 @@ FHS and the FSSTND forbid this.''',
|
||||
# 'non-sparc32-binary',
|
||||
# '',
|
||||
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] only-reg-files-are-scripts.diff
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
|
||||
index 5d851d4..fb53d93 100644
|
||||
index 0559405..f9b13a1 100644
|
||||
--- a/InitScriptCheck.py
|
||||
+++ b/InitScriptCheck.py
|
||||
@@ -18,7 +18,7 @@ from Filter import addDetails, printError, printWarning
|
||||
|
@ -12,7 +12,7 @@ Date: Tue May 17 12:56:38 2011 +0200
|
||||
1 file changed, 27 deletions(-)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index fc392e5..40ce77a 100644
|
||||
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]+)*(\([^)]*\))*$')
|
||||
@ -31,7 +31,7 @@ index fc392e5..40ce77a 100644
|
||||
_enchant_checkers = {}
|
||||
|
||||
|
||||
@@ -886,30 +877,12 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -887,30 +878,12 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
(Pkg.formatRequire(*obs),
|
||||
Pkg.formatRequire(*prov)))
|
||||
|
||||
@ -61,4 +61,4 @@ index fc392e5..40ce77a 100644
|
||||
-
|
||||
def check_description(self, pkg, lang, ignored_words):
|
||||
description = pkg.langtag(rpm.RPMTAG_DESCRIPTION, lang)
|
||||
self._unexpanded_macros(pkg, '%%description -l %s' % lang, description)
|
||||
if use_utf8:
|
||||
|
@ -9,10 +9,10 @@ years go so it's about time to remove that check
|
||||
1 file changed, 13 deletions(-)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index ace044c..4842bef 100644
|
||||
index 5149dc3..e00c0a8 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -63,7 +63,6 @@ biarch_package_regex = re.compile(DEFAULT_BIARCH_PACKAGES)
|
||||
@@ -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')
|
||||
@ -28,7 +28,7 @@ index ace044c..4842bef 100644
|
||||
section = {}
|
||||
# None == main package
|
||||
current_package = None
|
||||
@@ -230,9 +228,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -231,9 +229,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
if section_marker:
|
||||
|
||||
@ -38,7 +38,7 @@ index ace044c..4842bef 100644
|
||||
if not is_lib_pkg and lib_package_regex.search(line):
|
||||
is_lib_pkg = True
|
||||
|
||||
@@ -470,14 +465,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -471,14 +466,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
if current_section == 'files':
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] rpmgroup-checks.diff
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 9e00892..b1c4c7a 100644
|
||||
index dd09e62..0a5f839 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -723,6 +723,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -722,6 +722,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
self._unexpanded_macros(pkg, 'Group', group)
|
||||
if not group:
|
||||
printError(pkg, 'no-group-tag')
|
||||
@ -20,7 +20,7 @@ index 9e00892..b1c4c7a 100644
|
||||
elif VALID_GROUPS and group not in VALID_GROUPS:
|
||||
printWarning(pkg, 'non-standard-group', group)
|
||||
|
||||
@@ -1036,6 +1038,10 @@ won't fool the specfile parser, and rebuild the package.''',
|
||||
@@ -1040,6 +1042,10 @@ won't fool the specfile parser, and rebuild the package.''',
|
||||
'''There is no Group tag in your package. You have to specify a valid group
|
||||
in your spec file using the Group tag.''',
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0dae71a3fed413ee5c47bd04f393cd6598c68c0dcf1504fa020d62814ff674b
|
||||
size 13563040
|
3
rpmlint-1.8.tar.gz
Normal file
3
rpmlint-1.8.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ba78ad9ae556cad2590400935d406c4e5cb9cd88348d312b8f13561c76f5f105
|
||||
size 20275235
|
@ -8,10 +8,10 @@ Subject: [PATCH] rpmlint-pkg-quoting.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Pkg.py b/Pkg.py
|
||||
index cfaa5a9..f7dc31d 100644
|
||||
index 360ec39..aaa006f 100644
|
||||
--- a/Pkg.py
|
||||
+++ b/Pkg.py
|
||||
@@ -536,7 +536,7 @@ class Pkg:
|
||||
@@ -550,7 +550,7 @@ class Pkg(AbstractPkg):
|
||||
dir=self.dirname)
|
||||
# TODO: better shell escaping or sequence based command invocation
|
||||
command_str = \
|
||||
|
@ -9,7 +9,7 @@ Subject: [PATCH] rpmlint-suse.diff
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 1ad548b..1a70779 100644
|
||||
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)$')
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 13:31:45 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- rpmlint 1.8 update
|
||||
* python 3 fixes
|
||||
* Add support for file triggers
|
||||
* Mechanism to black list certain C calls
|
||||
* new error: non-devel-file-in-devel-package
|
||||
* appdata check configurable
|
||||
* project moved to github
|
||||
* Patches dropped:
|
||||
avoid-mismatched-libregex.diff
|
||||
filename-non-utf8-exception.diff
|
||||
fix-ghost-file-handling.diff
|
||||
save-content-to-an-array.diff
|
||||
fix-TmpFilesCheck-pattern-match.diff
|
||||
move-ghost-file-check-to-TmpFilesCh.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 12:24:38 UTC 2015 - lnussel@suse.de
|
||||
|
||||
|
50
rpmlint.spec
50
rpmlint.spec
@ -25,9 +25,9 @@ BuildRequires: xz
|
||||
Summary: Rpm correctness checker
|
||||
License: GPL-2.0+
|
||||
Group: System/Packages
|
||||
Version: 1.6
|
||||
Version: 1.8
|
||||
Release: 0
|
||||
Source0: https://downloads.sourceforge.net/project/rpmlint/rpmlint-%{version}.tar.xz
|
||||
Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz
|
||||
Source1: rpmlint-checks-master.tar.xz
|
||||
Source2: config
|
||||
Source3: config.in
|
||||
@ -36,7 +36,7 @@ Source12: licenses.config
|
||||
Source98: update_git.sh
|
||||
Source99: README.packaging.txt
|
||||
Source100: syntax-validator.py
|
||||
Url: https://sourceforge.net/projects/rpmlint/
|
||||
Url: https://github.com/rpm-software-management/rpmlint
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: /usr/bin/readelf
|
||||
Requires: bash
|
||||
@ -88,29 +88,23 @@ Patch29: selfconflicts-provide.diff
|
||||
Patch30: no-badness-return.diff
|
||||
Patch31: suse-shlib-devel-dependency.diff
|
||||
Patch32: version-control-internal-file.diff
|
||||
Patch33: avoid-mismatched-libregex.diff
|
||||
Patch34: filename-non-utf8-exception.diff
|
||||
Patch35: stricter-interpreter-check.diff
|
||||
Patch36: confusing-invalid-spec-name.diff
|
||||
Patch37: rpmlint-pkg-quoting.diff
|
||||
Patch38: suse-g-ir-chech.diff
|
||||
Patch39: remove-expand-macros.diff
|
||||
Patch40: suse-whitelist-opensuse.diff
|
||||
Patch41: extend-suse-conffiles-check.diff
|
||||
Patch42: compressed-backup-regex.diff
|
||||
Patch43: suse-speccheck-utf8.diff
|
||||
Patch44: suse-python-abi-check.diff
|
||||
Patch45: suse-manpages-for-rc-scripts.diff
|
||||
Patch46: suse-ignore-specfile-errors.diff
|
||||
Patch47: invalid-filerequires.diff
|
||||
Patch48: suse-sysv-init-checks.diff
|
||||
Patch49: check-for-self-provides.diff
|
||||
Patch50: save-content-to-an-array.diff
|
||||
Patch51: add-check-for-tmpfiles-created-at-r.diff
|
||||
Patch52: fix-ghost-file-handling.diff
|
||||
Patch53: remove-files-attr-not-set-check.diff
|
||||
Patch54: move-ghost-file-check-to-TmpFilesCh.diff
|
||||
Patch55: fix-TmpFilesCheck-pattern-match.diff
|
||||
Patch33: stricter-interpreter-check.diff
|
||||
Patch34: confusing-invalid-spec-name.diff
|
||||
Patch35: rpmlint-pkg-quoting.diff
|
||||
Patch36: suse-g-ir-chech.diff
|
||||
Patch37: remove-expand-macros.diff
|
||||
Patch38: suse-whitelist-opensuse.diff
|
||||
Patch39: extend-suse-conffiles-check.diff
|
||||
Patch40: compressed-backup-regex.diff
|
||||
Patch41: suse-speccheck-utf8.diff
|
||||
Patch42: suse-python-abi-check.diff
|
||||
Patch43: suse-manpages-for-rc-scripts.diff
|
||||
Patch44: suse-ignore-specfile-errors.diff
|
||||
Patch45: invalid-filerequires.diff
|
||||
Patch46: suse-sysv-init-checks.diff
|
||||
Patch47: check-for-self-provides.diff
|
||||
Patch48: add-check-for-tmpfiles-created-at-r.diff
|
||||
Patch49: remove-files-attr-not-set-check.diff
|
||||
# PATCHLIST END
|
||||
# BuildArch must at the end. is a bug: https://bugzilla.suse.com/show_bug.cgi?id=926766
|
||||
BuildArch: noarch
|
||||
@ -122,7 +116,7 @@ Rpmlint is a tool to check common errors on rpm packages. Binary and
|
||||
source packages can be checked.
|
||||
|
||||
%prep
|
||||
%autosetup -n rpmlint-%{version} -a1 -p1
|
||||
%autosetup -n rpmlint-rpmlint-%{version} -a1 -p1
|
||||
|
||||
cp -p %{SOURCE2} .
|
||||
# Only move top-level python files
|
||||
@ -154,7 +148,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,0755)
|
||||
%doc COPYING ChangeLog INSTALL README*
|
||||
%doc COPYING INSTALL README*
|
||||
%{_prefix}/bin/*
|
||||
%{_prefix}/share/rpmlint
|
||||
%config(noreplace) /etc/rpmlint/config
|
||||
|
@ -1,28 +0,0 @@
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Fri, 10 Apr 2015 16:22:26 +0200
|
||||
Subject: [PATCH] save content to an array
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
due to the following join the generator would be at the end so iterating
|
||||
through lines wouldn't work
|
||||
|
||||
Modified-by: Ville Skyttä <ville.skytta@iki.fi> (pep8 fixes)
|
||||
---
|
||||
InitScriptCheck.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
|
||||
index 1a58562..aab1d2d 100644
|
||||
--- a/InitScriptCheck.py
|
||||
+++ b/InitScriptCheck.py
|
||||
@@ -103,7 +103,7 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||||
# check common error in file content
|
||||
content = None
|
||||
try:
|
||||
- content = Pkg.readlines(pkgfile.path)
|
||||
+ content = [x for x in Pkg.readlines(pkgfile.path)]
|
||||
except Exception:
|
||||
e = sys.exc_info()[1]
|
||||
printWarning(pkg, 'read-error', e)
|
@ -8,10 +8,10 @@ Subject: [PATCH] script-interpreter-only-for-exec-scripts.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 5929146..80148c4 100644
|
||||
index ee5039c..4a698cd 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -1242,7 +1242,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -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:
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] selfconflicts-provide.diff
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 6528d5b..18cbb6e 100644
|
||||
index 00ec2e8..8dccbf1 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -829,6 +829,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -830,6 +830,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
||||
@ -19,7 +19,7 @@ index 6528d5b..18cbb6e 100644
|
||||
|
||||
for o in (x for x in obs_names if x not in prov_names):
|
||||
printWarning(pkg, 'obsolete-not-provided', o)
|
||||
@@ -840,6 +841,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -841,6 +842,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
# https://bugzilla.redhat.com/460872
|
||||
useless_provides = []
|
||||
for p in prov_names:
|
||||
@ -28,7 +28,7 @@ index 6528d5b..18cbb6e 100644
|
||||
if prov_names.count(p) != 1 and p not in useless_provides:
|
||||
useless_provides.append(p)
|
||||
for p in useless_provides:
|
||||
@@ -999,6 +1002,10 @@ the Release tag.''',
|
||||
@@ -1003,6 +1006,10 @@ the Release tag.''',
|
||||
'''There is no Name tag in your package. You have to specify a name using the
|
||||
Name tag.''',
|
||||
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] sourced-dirs.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 80148c4..c485125 100644
|
||||
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)?$')
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] stricter-interpreter-check.diff
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 14cfca3..1b68dd5 100644
|
||||
index 59901e7..6c322c6 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -1265,7 +1265,8 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -1268,7 +1268,8 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
f.endswith('.la')):
|
||||
printError(pkg, 'script-without-shebang', f)
|
||||
|
||||
@ -19,5 +19,5 @@ index 14cfca3..1b68dd5 100644
|
||||
+ if not mode_is_exec and not is_doc and \
|
||||
+ interpreter and interpreter.startswith("/"):
|
||||
printError(pkg, 'non-executable-script', f,
|
||||
oct(perm), interpreter)
|
||||
"%o" % perm, interpreter)
|
||||
if b'\r' in chunk:
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] suse-binarieschecks.diff
|
||||
1 file changed, 56 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
||||
index 4634eed..a74d3e3 100644
|
||||
index d2ed87a..2e5758e 100644
|
||||
--- a/BinariesCheck.py
|
||||
+++ b/BinariesCheck.py
|
||||
@@ -14,7 +14,7 @@ import sys
|
||||
@ -20,7 +20,7 @@ index 4634eed..a74d3e3 100644
|
||||
import AbstractCheck
|
||||
import Config
|
||||
import Pkg
|
||||
@@ -46,6 +46,9 @@ class BinaryInfo:
|
||||
@@ -53,6 +53,9 @@ class BinaryInfo:
|
||||
unused_regex = re.compile('^\s+(\S+)')
|
||||
exit_call_regex = create_regexp_call('_?exit')
|
||||
fork_call_regex = create_regexp_call('fork')
|
||||
@ -30,10 +30,10 @@ index 4634eed..a74d3e3 100644
|
||||
# regexp for setgid setegid setresgid set(?:res|e)?gid
|
||||
setgid_call_regex = create_regexp_call(['setresgid', 'setegid', 'setgid'])
|
||||
setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
|
||||
@@ -66,7 +69,10 @@ class BinaryInfo:
|
||||
self.stack = False
|
||||
@@ -86,7 +89,10 @@ class BinaryInfo:
|
||||
self.exec_stack = False
|
||||
self.exit_calls = []
|
||||
self.forbidden_calls = []
|
||||
+ self.calls_gethostbyname = False
|
||||
fork_called = False
|
||||
+ self.debuginfo = 0
|
||||
@ -41,9 +41,9 @@ index 4634eed..a74d3e3 100644
|
||||
self.tail = ''
|
||||
|
||||
self.setgid = False
|
||||
@@ -135,6 +141,11 @@ class BinaryInfo:
|
||||
self.exec_stack = True
|
||||
continue
|
||||
@@ -160,6 +166,11 @@ class BinaryInfo:
|
||||
if ret:
|
||||
self.forbidden_calls.append(r_name)
|
||||
|
||||
+ r = BinaryInfo.gethostbyname_call_regex.search(l)
|
||||
+ if r:
|
||||
@ -53,7 +53,7 @@ index 4634eed..a74d3e3 100644
|
||||
if is_shlib:
|
||||
r = BinaryInfo.exit_call_regex.search(l)
|
||||
if r:
|
||||
@@ -145,6 +156,14 @@ class BinaryInfo:
|
||||
@@ -170,6 +181,14 @@ class BinaryInfo:
|
||||
fork_called = True
|
||||
continue
|
||||
|
||||
@ -65,10 +65,10 @@ index 4634eed..a74d3e3 100644
|
||||
+ self.symtab=1
|
||||
+ continue
|
||||
+
|
||||
if self.non_pic:
|
||||
self.non_pic = 'TEXTREL' in res[1]
|
||||
|
||||
@@ -339,13 +358,26 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
# check if we don't have a string that will automatically
|
||||
# waive the presence of a forbidden call
|
||||
if self.forbidden_calls:
|
||||
@@ -382,13 +401,26 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
continue
|
||||
|
||||
# stripped ?
|
||||
@ -96,9 +96,9 @@ index 4634eed..a74d3e3 100644
|
||||
if is_shlib:
|
||||
has_lib = True
|
||||
|
||||
@@ -396,6 +428,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
for ec in bin_info.exit_calls:
|
||||
printWarning(pkg, 'shared-lib-calls-exit', fname, ec)
|
||||
@@ -443,6 +475,10 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
printWarning(pkg, ec, fname,
|
||||
BinaryInfo.forbidden_functions[ec]['f_name'])
|
||||
|
||||
+ # gethostbyname ?
|
||||
+ if bin_info.calls_gethostbyname:
|
||||
@ -107,7 +107,7 @@ index 4634eed..a74d3e3 100644
|
||||
# rpath ?
|
||||
if bin_info.rpath:
|
||||
for p in bin_info.rpath:
|
||||
@@ -603,6 +639,14 @@ with the intended shared libraries only.''',
|
||||
@@ -650,6 +686,14 @@ with the intended shared libraries only.''',
|
||||
'ldd-failed',
|
||||
'''Executing ldd on this file failed, all checks could not be run.''',
|
||||
|
||||
@ -122,7 +122,7 @@ index 4634eed..a74d3e3 100644
|
||||
'executable-stack',
|
||||
'''The binary declares the stack as executable. Executable stack is usually an
|
||||
error as it is only needed if the code contains GCC trampolines or similar
|
||||
@@ -615,6 +659,10 @@ don\'t define a proper .note.GNU-stack section.''',
|
||||
@@ -662,6 +706,10 @@ don\'t define a proper .note.GNU-stack section.''',
|
||||
make the stack executable. Usual suspects include use of a non-GNU linker or
|
||||
an old GNU linker version.''',
|
||||
|
||||
@ -133,7 +133,7 @@ index 4634eed..a74d3e3 100644
|
||||
'shared-lib-calls-exit',
|
||||
'''This library package calls exit() or _exit(), probably in a non-fork()
|
||||
context. Doing so from a library is strongly discouraged - when a library
|
||||
@@ -633,6 +681,12 @@ that use prelink, make sure that prelink does not strip it either, usually by
|
||||
@@ -680,6 +728,12 @@ that use prelink, make sure that prelink does not strip it either, usually by
|
||||
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-check-optional-dependencies.diff
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index ae9c364..7d2b92f 100644
|
||||
index cdffaea..aa1fa25 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -926,6 +926,16 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -927,6 +927,16 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
if res.group(1) != pkg.name:
|
||||
printError(pkg, 'incoherent-logrotate-file', f)
|
||||
|
||||
@ -28,7 +28,7 @@ index ae9c364..7d2b92f 100644
|
||||
if link != '':
|
||||
ext = compr_regex.search(link)
|
||||
if ext:
|
||||
@@ -1717,6 +1727,24 @@ consequences), or other compiler flags which result in rpmbuild's debuginfo
|
||||
@@ -1723,6 +1733,24 @@ consequences), or other compiler flags which result in rpmbuild's debuginfo
|
||||
extraction not working as expected. Verify that the binaries are not
|
||||
unexpectedly stripped and that the intended compiler flags are used.''',
|
||||
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] suse-filesystem.diff
|
||||
1 file changed, 437 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 1a70779..9532011 100644
|
||||
index 777f8aa..14ef030 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -102,24 +102,415 @@ STANDARD_DIRS = (
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] suse-g-ir-chech.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 1b68dd5..0bb4b3d 100644
|
||||
index 6c322c6..24029f1 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -607,7 +607,7 @@ points_regex = re.compile('^\.\./(.*)')
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-ignore-specfile-errors.diff
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index 60e946b..ace044c 100644
|
||||
index 4dafdb9..5149dc3 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -562,9 +562,8 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -563,9 +563,8 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
printWarning(pkg, "patch-not-applied",
|
||||
"Patch%d:" % pnum, pfile)
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-manpages-for-rc-scripts
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 214ac76..5342871 100644
|
||||
index 806b886..81c5680 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -1426,7 +1426,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -1429,7 +1429,7 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
for exe, paths in bindir_exes.items():
|
||||
if len(paths) > 1:
|
||||
printWarning(pkg, "duplicate-executable", exe, paths)
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-no-run-ldconfig.diff
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index 63897f2..12b6f2b 100644
|
||||
index 8fc6e94..0d77a03 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -448,6 +448,10 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -449,6 +449,10 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
'comparison-operator-in-deptoken',
|
||||
conf)
|
||||
|
||||
@ -22,7 +22,7 @@ index 63897f2..12b6f2b 100644
|
||||
if current_section == 'changelog':
|
||||
for match in AbstractCheck.macro_regex.findall(line):
|
||||
res = re.match('%+', match)
|
||||
@@ -773,6 +777,14 @@ may break short circuit builds.''',
|
||||
@@ -774,6 +778,14 @@ may break short circuit builds.''',
|
||||
'''Make check or other automated regression test should be run in %check, as
|
||||
they can be disabled with a rpm macro for short circuiting purposes.''',
|
||||
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] suse-pkg-config-check.diff
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index d49239f..0a56b7d 100644
|
||||
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')
|
||||
@ -49,7 +49,7 @@ index d49239f..0a56b7d 100644
|
||||
# List of words to ignore in spell check
|
||||
ignored_words = set()
|
||||
for pf in pkg.files():
|
||||
@@ -1112,6 +1124,11 @@ once.''',
|
||||
@@ -1107,6 +1119,11 @@ once.''',
|
||||
'no-url-tag',
|
||||
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
||||
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-python-abi-check.diff
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index acb379f..214ac76 100644
|
||||
index f73cda1..806b886 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -1129,8 +1129,11 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -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',
|
||||
|
@ -8,7 +8,7 @@ Subject: [PATCH] suse-shlib-devel-dependency.diff
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 18cbb6e..fc392e5 100644
|
||||
index 8dccbf1..f229a28 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -642,10 +642,10 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-speccheck-utf8.diff
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index d0d381a..60e946b 100644
|
||||
index 739410f..4dafdb9 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -650,8 +650,8 @@ SPEC file to build a valid RPM package.''',
|
||||
@@ -651,8 +651,8 @@ SPEC file to build a valid RPM package.''',
|
||||
("Name:" tag). Either rename your package or the specfile.''',
|
||||
|
||||
'non-utf8-spec-file',
|
||||
|
@ -4,11 +4,11 @@ Subject: [PATCH] suse sysv init checks
|
||||
|
||||
we don't use chkconfig but have different macros
|
||||
---
|
||||
InitScriptCheck.py | 44 ++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 30 insertions(+), 14 deletions(-)
|
||||
InitScriptCheck.py | 48 ++++++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 34 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/InitScriptCheck.py b/InitScriptCheck.py
|
||||
index fb53d93..1a58562 100644
|
||||
index f9b13a1..f81a450 100644
|
||||
--- a/InitScriptCheck.py
|
||||
+++ b/InitScriptCheck.py
|
||||
@@ -36,6 +36,10 @@ LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
|
||||
@ -35,35 +35,39 @@ index fb53d93..1a58562 100644
|
||||
for fname, pkgfile in pkg.files().items():
|
||||
|
||||
if not fname.startswith('/etc/init.d/') and \
|
||||
@@ -61,20 +71,26 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -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.b2s(pkg[rpm.RPMTAG_POSTIN]) or \
|
||||
- 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.b2s(pkg[rpm.RPMTAG_PREUN]) or \
|
||||
- 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)
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-url-check.diff
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index fa38a07..d49239f 100644
|
||||
index cdb8eb4..01ef3ee 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -794,7 +794,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -795,7 +795,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
if not valid_license:
|
||||
self._unexpanded_macros(pkg, 'License', rpm_license)
|
||||
|
||||
@ -20,7 +20,7 @@ index fa38a07..d49239f 100644
|
||||
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
||||
url = Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())])
|
||||
self._unexpanded_macros(pkg, tag, url, is_url=True)
|
||||
@@ -1110,7 +1110,7 @@ once.''',
|
||||
@@ -1105,7 +1105,7 @@ once.''',
|
||||
'''This rpm requires a specific release of another package.''',
|
||||
|
||||
'no-url-tag',
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] suse-version.diff
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/SpecCheck.py b/SpecCheck.py
|
||||
index 2b24b43..9ea5c6e 100644
|
||||
index b69bead..2e3ba56 100644
|
||||
--- a/SpecCheck.py
|
||||
+++ b/SpecCheck.py
|
||||
@@ -66,6 +66,7 @@ libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
|
||||
@@ -67,6 +67,7 @@ libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
|
||||
comment_or_empty_regex = re.compile('^\s*(#|$)')
|
||||
defattr_regex = re.compile('^\s*%defattr\\b')
|
||||
attr_regex = re.compile('^\s*%attr\\b')
|
||||
@ -19,7 +19,7 @@ index 2b24b43..9ea5c6e 100644
|
||||
section_regexs = dict(
|
||||
([x, re.compile('^%' + x + '(?:\s|$)')]
|
||||
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
||||
@@ -387,6 +388,12 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -388,6 +389,12 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
||||
if not res.group(1).startswith('%'):
|
||||
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
|
||||
|
||||
@ -32,7 +32,7 @@ index 2b24b43..9ea5c6e 100644
|
||||
res = prereq_regex.search(line)
|
||||
if res:
|
||||
printError(pkg, 'prereq-use', res.group(2))
|
||||
@@ -815,6 +822,15 @@ in the resulting binary package depending on the build environment and rpmbuild
|
||||
@@ -816,6 +823,15 @@ in the resulting binary package depending on the build environment and rpmbuild
|
||||
version (typically < 4.4). Add default attributes using %defattr before it in
|
||||
the %files section, or use per entry %attr's.''',
|
||||
|
||||
|
@ -8,11 +8,11 @@ Subject: [PATCH] suse-whitelist-opensuse.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 40ce77a..3c68d28 100644
|
||||
index 3f9c0bc..9856f9e 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -912,7 +912,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
spell_check(pkg, utf8summary, 'Summary(%s)', lang, ignored_words)
|
||||
@@ -918,7 +918,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
spell_check(pkg, summary, 'Summary(%s)', lang, ignored_words)
|
||||
if '\n' in summary:
|
||||
printError(pkg, 'summary-on-multiple-lines', lang)
|
||||
- if summary[0] != summary[0].upper():
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
GIT_TREE=https://github.com/lnussel/rpmlint-code.git
|
||||
GIT_LOCAL_TREE=~/git/rpmlint-code
|
||||
GIT_BRANCH=opensuse-1.6
|
||||
GIT_UPSTREAM_TAG=v1.6
|
||||
GIT_BRANCH=opensuse-1.8
|
||||
GIT_UPSTREAM_TAG=rpmlint-1.8
|
||||
|
||||
cleanup()
|
||||
{
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] usr-arch.diff
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
||||
index a74d3e3..c1c566d 100644
|
||||
index 2e5758e..c7fadab 100644
|
||||
--- a/BinariesCheck.py
|
||||
+++ b/BinariesCheck.py
|
||||
@@ -270,6 +270,7 @@ usr_lib_exception_regex = re.compile(Config.getOption('UsrLibBinaryException', '
|
||||
@@ -313,6 +313,7 @@ usr_lib_exception_regex = re.compile(Config.getOption('UsrLibBinaryException', '
|
||||
srcname_regex = re.compile('(.*?)-[0-9]')
|
||||
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
|
||||
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
|
||||
@ -19,7 +19,7 @@ index a74d3e3..c1c566d 100644
|
||||
|
||||
|
||||
def dir_base(path):
|
||||
@@ -343,7 +344,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -386,7 +387,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck):
|
||||
# arch dependent packages only from here on
|
||||
|
||||
# in /usr/share ?
|
||||
|
@ -8,7 +8,7 @@ also detect RCS files
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||
index 7d2b92f..efda328 100644
|
||||
index aa1fa25..59901e7 100644
|
||||
--- a/FilesCheck.py
|
||||
+++ b/FilesCheck.py
|
||||
@@ -620,7 +620,7 @@ ldconfig_regex = re.compile('^[^#]*ldconfig', re.MULTILINE)
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] yast-provides.diff
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/TagsCheck.py b/TagsCheck.py
|
||||
index 0a56b7d..9e00892 100644
|
||||
index e161aec..dd09e62 100644
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -823,7 +823,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
@@ -824,7 +824,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
printWarning(pkg, 'no-url-tag')
|
||||
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
|
Loading…
Reference in New Issue
Block a user