forked from pool/rpmlint
Accepting request 17759 from Base:System
Copy from Base:System/rpmlint based on submit request 17759 from user thomasbiege OBS-URL: https://build.opensuse.org/request/show/17759 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=43
This commit is contained in:
parent
48ee2419c6
commit
7383a6345e
@ -17,13 +17,13 @@ import stat
|
||||
|
||||
class BuildRootCheck(AbstractCheck.AbstractFilesCheck):
|
||||
def __init__(self):
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "BuildRootCheck", ".*")
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "CheckBuildRoot", ".*")
|
||||
self.build_root_re = re.compile('/var/tmp/[\w\!-\.]{1,60}-build/')
|
||||
|
||||
def check_file(self, pkg, filename):
|
||||
if filename.startswith('/usr/lib/debug') or pkg.isSource():
|
||||
return
|
||||
if not stat.S_ISREG(pkg.files()[filename][0]):
|
||||
if not stat.S_ISREG(pkg.files()[filename].mode):
|
||||
return
|
||||
|
||||
if len(pkg.grep(self.build_root_re, filename)):
|
||||
|
@ -19,7 +19,7 @@ import string
|
||||
class CommonFilesCheck(AbstractCheck.AbstractCheck):
|
||||
def __init__(self):
|
||||
self.map = []
|
||||
AbstractCheck.AbstractCheck.__init__(self, "CommonFilesCheck")
|
||||
AbstractCheck.AbstractCheck.__init__(self, "CheckCommonFiles")
|
||||
self.sources_am_re = re.compile('([\w\d_]+_SOURCES\s*=|\s*SUBDIRS\s*=)')
|
||||
|
||||
def check(self, pkg):
|
||||
@ -27,15 +27,10 @@ class CommonFilesCheck(AbstractCheck.AbstractCheck):
|
||||
if pkg.isSource():
|
||||
return
|
||||
files = pkg.files()
|
||||
for f in files:
|
||||
for f in files.keys():
|
||||
if f in pkg.ghostFiles():
|
||||
continue
|
||||
enreg = files[f]
|
||||
mode = enreg[0]
|
||||
links = enreg[3]
|
||||
size = enreg[4]
|
||||
md5 = enreg[5]
|
||||
rdev = enreg[7]
|
||||
md5 = files[f].md5
|
||||
|
||||
if len(md5) and md5 in (
|
||||
'c59cbaf0df9bcf35feca0d0f1fc01dae',
|
||||
|
@ -17,6 +17,7 @@ import string
|
||||
_services_whitelist = (
|
||||
"ConsoleKit.conf",
|
||||
"hal.conf",
|
||||
"cups.conf", # bnc#515977
|
||||
"org.freedesktop.ConsoleKit.service",
|
||||
"org.freedesktop.PolicyKit.conf",
|
||||
"org.freedesktop.PolicyKit.service",
|
||||
|
@ -39,7 +39,7 @@ def lang_ignore_pkg(name):
|
||||
class ExecDocsCheck(AbstractCheck.AbstractCheck):
|
||||
def __init__(self):
|
||||
self.map = []
|
||||
AbstractCheck.AbstractCheck.__init__(self, "ExecDocsCheck")
|
||||
AbstractCheck.AbstractCheck.__init__(self, "CheckExecDocs")
|
||||
|
||||
def check(self, pkg):
|
||||
|
||||
@ -49,16 +49,16 @@ class ExecDocsCheck(AbstractCheck.AbstractCheck):
|
||||
files = pkg.files()
|
||||
complete_size=0
|
||||
lang_size=0
|
||||
for f in files:
|
||||
if stat.S_ISREG(files[f][0]):
|
||||
complete_size += files[f][4]
|
||||
if pkg.fileLang(f) != '':
|
||||
lang_size += files[f][4]
|
||||
for f, pkgfile in files.items():
|
||||
if stat.S_ISREG(pkgfile.mode):
|
||||
complete_size += pkgfile.size
|
||||
if pkgfile.lang != '':
|
||||
lang_size += pkgfile.size
|
||||
|
||||
doc_size=0
|
||||
for f in pkg.docFiles():
|
||||
if stat.S_ISREG(files[f][0]):
|
||||
doc_size += files[f][4]
|
||||
if stat.S_ISREG(files[f].mode):
|
||||
doc_size += files[f].size
|
||||
|
||||
if doc_size * 2 >= complete_size \
|
||||
and doc_size > 100*1024 and (complete_size - doc_size) * 20 > complete_size \
|
||||
@ -71,8 +71,7 @@ class ExecDocsCheck(AbstractCheck.AbstractCheck):
|
||||
printWarning(pkg, "package-with-huge-translation", ("%3d%%" % (lang_size * 100 / complete_size)))
|
||||
|
||||
for f in pkg.docFiles():
|
||||
enreg=files[f]
|
||||
mode=enreg[0]
|
||||
mode=files[f].mode
|
||||
if not stat.S_ISREG(mode) or not mode & 0111:
|
||||
continue
|
||||
for ext in ['txt', 'gif', 'jpg', 'html', 'pdf', 'ps', 'pdf.gz', 'ps.gz']:
|
||||
|
@ -32,9 +32,7 @@ def isdebuginfo(pkg):
|
||||
return True
|
||||
|
||||
def notsymlink(pkg, f):
|
||||
files = pkg.files()
|
||||
enreg = files[f]
|
||||
mode = enreg[0]
|
||||
mode = pkg.files()[f].mode
|
||||
type = (mode>>12)&017
|
||||
return type != 012
|
||||
|
||||
@ -82,6 +80,7 @@ _goodprefixes = (
|
||||
'/var/adm/',
|
||||
'/var/nis/',
|
||||
'/emul/',
|
||||
'/selinux/',
|
||||
)
|
||||
|
||||
# computed from goodprefixes.
|
||||
@ -376,7 +375,7 @@ class FilelistCheck(AbstractCheck.AbstractCheck):
|
||||
error = _defaulterror
|
||||
|
||||
if 'good' in check or 'bad' in check:
|
||||
for f in files:
|
||||
for f in files.keys():
|
||||
ok = False
|
||||
if 'good' in check:
|
||||
for g in check['good']:
|
||||
@ -405,10 +404,8 @@ class FilelistCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
# the checks here only warn about a directory once rather
|
||||
# than reporting potentially hundreds of files individually
|
||||
for f in files:
|
||||
enreg = files[f]
|
||||
mode = enreg[0]
|
||||
type = (mode>>12)&017
|
||||
for f, pkgfile in files.items():
|
||||
type = (pkgfile.mode>>12)&017
|
||||
|
||||
# append / to directories
|
||||
if type == 04:
|
||||
|
@ -18,7 +18,7 @@ import string
|
||||
|
||||
class IconSizesCheck(AbstractCheck.AbstractCheck):
|
||||
def __init__(self):
|
||||
AbstractCheck.AbstractCheck.__init__(self, "IconSizesCheck")
|
||||
AbstractCheck.AbstractCheck.__init__(self, "CheckIconSizes")
|
||||
self.file_size_regex = re.compile('/icons/[^/]+/(\d+)x(\d+)/')
|
||||
self.info_size_regex = re.compile('(\d+) x (\d+)')
|
||||
|
||||
@ -27,19 +27,17 @@ class IconSizesCheck(AbstractCheck.AbstractCheck):
|
||||
if pkg.isSource():
|
||||
return
|
||||
|
||||
info = pkg.getFilesInfo()
|
||||
for i in info:
|
||||
file = i[0]
|
||||
res = self.file_size_regex.search(file)
|
||||
for fname, pkgfile in pkg.files().items():
|
||||
res = self.file_size_regex.search(fname)
|
||||
if res:
|
||||
sizes = (res.group(1), res.group(2))
|
||||
res = self.info_size_regex.search(i[1])
|
||||
res = self.info_size_regex.search(pkgfile.magic)
|
||||
if res:
|
||||
actualsizes = (res.group(1), res.group(2))
|
||||
|
||||
if abs(int(sizes[0])-int(actualsizes[0])) > 2 or \
|
||||
abs(int(sizes[1])-int(actualsizes[1])) > 2:
|
||||
printError(pkg,"wrong-icon-size", file, "expected:",
|
||||
printError(pkg,"wrong-icon-size", fname, "expected:",
|
||||
"x".join(sizes), "actual:", "x".join(actualsizes))
|
||||
|
||||
|
||||
|
@ -19,9 +19,9 @@ import string
|
||||
insserv_regex=re.compile('^\s*sbin/insserv', re.MULTILINE)
|
||||
preun_regex=re.compile('^\s*/etc/init.d/\S+ stop', re.MULTILINE)
|
||||
|
||||
class InitScriptsCheck(AbstractCheck.AbstractFilesCheck):
|
||||
class CheckInitScripts(AbstractCheck.AbstractFilesCheck):
|
||||
def __init__(self):
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "InitScriptsCheck", "/etc/init.d/.*")
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "CheckInitScripts", "/etc/init.d/.*")
|
||||
|
||||
def check(self, pkg):
|
||||
|
||||
@ -30,13 +30,11 @@ class InitScriptsCheck(AbstractCheck.AbstractFilesCheck):
|
||||
|
||||
files = pkg.files()
|
||||
bins_list = filter(lambda f: (f.startswith("/usr/bin") \
|
||||
or f.startswith("/usr/sbin")) and stat.S_ISREG(files[f][0]), files)
|
||||
or f.startswith("/usr/sbin")) and stat.S_ISREG(files[f].mode), files.keys())
|
||||
|
||||
for f in files:
|
||||
enreg = files[f]
|
||||
mode = enreg[0]
|
||||
for f, pkgfile in files.items():
|
||||
|
||||
if f in pkg.ghostFiles() or not stat.S_ISREG(mode) or not f.startswith("/etc/init.d/"):
|
||||
if f in pkg.ghostFiles() or not stat.S_ISREG(pkgfile.mode) or not f.startswith("/etc/init.d/"):
|
||||
continue
|
||||
|
||||
boot_script = f.startswith('/etc/init.d/boot.')
|
||||
@ -71,7 +69,7 @@ class InitScriptsCheck(AbstractCheck.AbstractFilesCheck):
|
||||
printWarning(pkg, "non-remote_fs-dependency", f)
|
||||
|
||||
|
||||
check=InitScriptsCheck()
|
||||
check=CheckInitScripts()
|
||||
|
||||
if Config.info:
|
||||
addDetails(
|
||||
|
@ -55,7 +55,7 @@ _kde4_libakonadi4 = (
|
||||
|
||||
class KDE4Check(AbstractCheck.AbstractCheck):
|
||||
def __init__(self):
|
||||
AbstractCheck.AbstractCheck.__init__(self, "KDE4Check")
|
||||
AbstractCheck.AbstractCheck.__init__(self, "CheckKDE4Deps")
|
||||
|
||||
def check(self, pkg):
|
||||
|
||||
|
@ -17,7 +17,7 @@ import stat
|
||||
|
||||
class PkgConfigCheck(AbstractCheck.AbstractFilesCheck):
|
||||
def __init__(self):
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "PkgConfigCheck", ".*/pkgconfig/.*\.pc$")
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "CheckPkgConfig", ".*/pkgconfig/.*\.pc$")
|
||||
# currently causes too many failures (2008-03-05)
|
||||
#self.suspicious_dir=re.compile('(?:/usr/src/\w+/BUILD|/var/tmp|/tmp|/home|\@\w{1,50}\@)')
|
||||
self.suspicious_dir=re.compile('(?:/usr/src/\w+/BUILD|/var/tmp|/tmp|/home)')
|
||||
|
@ -11,6 +11,7 @@ import AbstractCheck
|
||||
import re
|
||||
import os
|
||||
import string
|
||||
import pprint
|
||||
|
||||
_permissions_d_whitelist = (
|
||||
"lprng",
|
||||
@ -57,7 +58,7 @@ class SUIDCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
permfiles = {}
|
||||
# first pass, find and parse permissions.d files
|
||||
for f in files:
|
||||
for f in files.keys():
|
||||
if f in pkg.ghostFiles():
|
||||
continue
|
||||
|
||||
@ -79,16 +80,11 @@ class SUIDCheck(AbstractCheck.AbstractCheck):
|
||||
self._parsefile(f)
|
||||
|
||||
# second pass, find permissions violations
|
||||
for f in files:
|
||||
for f, pkgfile in files.items():
|
||||
if f in pkg.ghostFiles():
|
||||
continue
|
||||
enreg = files[f]
|
||||
mode = enreg[0]
|
||||
owner = enreg[1]+':'+enreg[2]
|
||||
links = enreg[3]
|
||||
size = enreg[4]
|
||||
md5 = enreg[5]
|
||||
rdev = enreg[7]
|
||||
mode = pkgfile.mode
|
||||
owner = pkgfile.user+':'+pkgfile.group
|
||||
|
||||
# S_IFSOCK 014 socket
|
||||
# S_IFLNK 012 symbolic link
|
||||
|
@ -17,7 +17,7 @@ desktop_re=re.compile('(services|applets)/.*\.desktop$')
|
||||
|
||||
class DesktopCheck(AbstractCheck.AbstractFilesCheck):
|
||||
def __init__(self):
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "DesktopCheck", ".*\.desktop$")
|
||||
AbstractCheck.AbstractFilesCheck.__init__(self, "DesktopTranslationCheck", ".*\.desktop$")
|
||||
|
||||
def check_file(self, pkg, filename):
|
||||
if pkg.isSource() or filename in pkg.ghostFiles():
|
||||
|
@ -38,22 +38,15 @@ class DuplicatesCheck(AbstractCheck.AbstractCheck):
|
||||
files = pkg.files()
|
||||
configFiles = pkg.configFiles()
|
||||
|
||||
for f in files:
|
||||
for f, pkgfile in files.items():
|
||||
if f in pkg.ghostFiles():
|
||||
continue
|
||||
enreg = files[f]
|
||||
mode = enreg[0]
|
||||
links = enreg[3]
|
||||
size = enreg[4]
|
||||
md5 = enreg[5]
|
||||
rdev = enreg[7]
|
||||
|
||||
if not stat.S_ISREG(mode):
|
||||
if not stat.S_ISREG(pkgfile.mode):
|
||||
continue
|
||||
|
||||
md5s.setdefault(md5, set()).add(f)
|
||||
sizes[md5] = size
|
||||
#print f, links, size, md5, rdev
|
||||
md5s.setdefault(pkgfile.md5, set()).add(f)
|
||||
sizes[pkgfile.md5] = pkgfile.size
|
||||
|
||||
sum=0
|
||||
for f in md5s:
|
||||
|
@ -503,11 +503,11 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck):
|
||||
reqlibs = set()
|
||||
pkg_requires = set(map(lambda x: string.split(x[0],'(')[0], pkg.requires()))
|
||||
|
||||
for f in files:
|
||||
for f in files.keys():
|
||||
if f.find('.so.') != -1 or f.endswith('.so'):
|
||||
filename = pkg.dirName() + '/' + f
|
||||
try:
|
||||
if stat.S_ISREG(files[f][0]):
|
||||
if stat.S_ISREG(files[f].mode):
|
||||
bi = BinaryInfo(pkg, filename, f, False, True)
|
||||
libs_needed = libs_needed.union(bi.needed)
|
||||
if bi.soname != 0:
|
||||
|
@ -1,30 +1,21 @@
|
||||
--- Filter.py
|
||||
+++ Filter.py
|
||||
@@ -74,26 +74,28 @@
|
||||
except KeyError:
|
||||
pass
|
||||
@@ -80,23 +80,24 @@
|
||||
|
||||
+
|
||||
def _diag_compare(x,y):
|
||||
def _diag_compare(x, y):
|
||||
|
||||
- where_a = x.split()[1]
|
||||
- level_a = x.split()[2]
|
||||
+ where_a = x.split()[2]
|
||||
+ level_a = x.split()[1]
|
||||
+
|
||||
+ where_b = y.split()[2]
|
||||
+ level_b = y.split()[1]
|
||||
+
|
||||
+ if (level_b > level_a):
|
||||
+ return 1
|
||||
|
||||
- where_b = y.split()[1]
|
||||
- level_b = y.split()[2]
|
||||
+ if (level_b < level_a):
|
||||
+ return -1
|
||||
+ where_b = y.split()[2]
|
||||
+ level_b = y.split()[1]
|
||||
|
||||
- if level_b > level_a:
|
||||
+ if (where_b < where_a):
|
||||
+ if (level_b > level_a):
|
||||
return 1
|
||||
- elif level_b == level_a:
|
||||
- if where_b > where_b:
|
||||
@ -35,10 +26,15 @@
|
||||
- return -1
|
||||
- else:
|
||||
+
|
||||
+ if (level_b < level_a):
|
||||
+ return -1
|
||||
+
|
||||
+ if (where_b < where_a):
|
||||
+ return 1
|
||||
+
|
||||
+ if (where_b > where_a):
|
||||
return -1
|
||||
|
||||
+ return 0
|
||||
|
||||
|
||||
def printAllReasons():
|
||||
threshold = badnessThreshold()
|
||||
|
@ -1,13 +1,13 @@
|
||||
--- FilesCheck.py
|
||||
+++ FilesCheck.py
|
||||
@@ -282,6 +282,10 @@
|
||||
@@ -285,6 +285,10 @@
|
||||
# Check if the package is a development package
|
||||
devel_pkg=devel_regex.search(pkg.name)
|
||||
devel_pkg = devel_regex.search(pkg.name)
|
||||
|
||||
+ for p in pkg.provides():
|
||||
+ if not devel_pkg and devel_regex.search(p[0]):
|
||||
+ devel_pkg = True
|
||||
+
|
||||
config_files=pkg.configFiles()
|
||||
ghost_files=pkg.ghostFiles()
|
||||
doc_files=pkg.docFiles()
|
||||
config_files = pkg.configFiles()
|
||||
ghost_files = pkg.ghostFiles()
|
||||
doc_files = pkg.docFiles()
|
||||
|
@ -1,10 +1,10 @@
|
||||
--- Config.py
|
||||
+++ Config.py
|
||||
@@ -18,7 +18,6 @@ DEFAULT_CHECKS=("DistributionCheck",
|
||||
"DocFilesCheck",
|
||||
"FHSCheck",
|
||||
"I18NCheck",
|
||||
- "MenuCheck",
|
||||
"PostCheck",
|
||||
"InitScriptCheck",
|
||||
"SourceCheck",
|
||||
@@ -22,7 +22,6 @@
|
||||
"FHSCheck",
|
||||
"SignatureCheck",
|
||||
"I18NCheck",
|
||||
- "MenuCheck",
|
||||
"PostCheck",
|
||||
"InitScriptCheck",
|
||||
"SourceCheck",
|
||||
|
@ -1,23 +1,23 @@
|
||||
--- FilesCheck.py
|
||||
+++ FilesCheck.py
|
||||
@@ -651,6 +651,7 @@
|
||||
bin_regex=re.compile('^(/usr)?/s?bin/')
|
||||
includefile_regex=re.compile('\.(c|h|a|cmi)$')
|
||||
buildconfigfile_regex=re.compile('(\.pc|/bin/.+-config)$')
|
||||
+docdir_examples_regex=re.compile('^/usr/(?:share/doc/packages|lib(?:64))/[^/]+/(?:example|demo|script|contrib)')
|
||||
sofile_regex=re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||
devel_regex=re.compile('(.*)-(debug(info)?|devel|source|static)$')
|
||||
debuginfo_package_regex=re.compile('-debug(info)?$')
|
||||
@@ -990,7 +991,7 @@
|
||||
compr_regex.search(f) or \
|
||||
@@ -179,6 +179,7 @@
|
||||
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
||||
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...
|
||||
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
|
||||
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||
@@ -551,7 +552,7 @@
|
||||
includefile_regex.search(f) or \
|
||||
develfile_regex.search(f) or \
|
||||
logrotate_regex.search(f)
|
||||
- if nonexec_file:
|
||||
+ if nonexec_file and not docdir_examples_regex.search(f):
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/'):
|
||||
if not f in config_files and not f in ghost_files:
|
||||
@@ -1289,7 +1290,10 @@
|
||||
@@ -853,7 +854,10 @@
|
||||
'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
|
||||
|
@ -1,16 +1,16 @@
|
||||
--- TagsCheck.py
|
||||
+++ TagsCheck.py
|
||||
@@ -406,6 +406,7 @@ invalid_version_regex=re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE
|
||||
forbidden_words_regex=re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
|
||||
valid_buildhost_regex=re.compile(Config.getOption('ValidBuildHost'))
|
||||
epoch_regex=re.compile('^[0-9]+:')
|
||||
@@ -402,6 +402,7 @@
|
||||
# () are here for grouping purpose in the regexp
|
||||
forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
|
||||
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
||||
+valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
||||
use_epoch=Config.getOption('UseEpoch', 0)
|
||||
use_utf8=Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||
macro_regex=re.compile('^%(?:[\{\(]|\w{3,})')
|
||||
@@ -490,6 +491,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
||||
if d[0].startswith('/usr/bin/env'):
|
||||
printWarning(pkg, 'invalid-dependency', d[0])
|
||||
epoch_regex = re.compile('^[0-9]+:')
|
||||
use_epoch = Config.getOption('UseEpoch', 0)
|
||||
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||
@@ -484,6 +485,9 @@
|
||||
if d[0].startswith('/usr/local/'):
|
||||
printError(pkg, 'invalid-dependency', d[0])
|
||||
|
||||
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
||||
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
||||
@ -18,12 +18,12 @@
|
||||
if not devel_depend and not is_devel and not is_source:
|
||||
if FilesCheck.devel_regex.search(d[0]):
|
||||
printError(pkg, 'devel-dependency', d[0])
|
||||
@@ -866,6 +870,12 @@ once.''',
|
||||
@@ -885,6 +889,12 @@
|
||||
'obsolete-on-name',
|
||||
'''A package should not obsolete itself, as it can cause weird errors in tools.''',
|
||||
|
||||
+'invalid-filepath-dependency',
|
||||
+'''A package has a file or path based dependency that is not resolveable for
|
||||
+'''A package has a file or path based dependency that is not resolveable for
|
||||
+package solvers because it is not in the whitelist for path based dependencies
|
||||
+and therefore not available in repository metadata. Please use a symbolic requires
|
||||
+instead or require a file in bin or /etc.''',
|
||||
|
@ -1,16 +0,0 @@
|
||||
--- DocFilesCheck.py
|
||||
+++ DocFilesCheck.py
|
||||
@@ -60,8 +60,11 @@
|
||||
name = dep.N()
|
||||
flags = dep.Flags()
|
||||
# skip deps which were found by find-requires
|
||||
- if flags & rpm.RPMSENSE_FIND_REQUIRES != 0:
|
||||
- continue
|
||||
+ try:
|
||||
+ if flags & rpm.RPMSENSE_FIND_REQUIRES != 0:
|
||||
+ continue
|
||||
+ except:
|
||||
+ pass
|
||||
core_reqs[name] = []
|
||||
|
||||
# register things which are provided by the package
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2db36de1c9b60e77ae3fd4b63a89c69deccfb2ee53988dc359c43ec2ec3147f7
|
||||
size 83579
|
3
rpmlint-0.87.tar.bz2
Normal file
3
rpmlint-0.87.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:06789cdd18c87a180c93c2a1dc17c3a5b8cb704b1e121e162f0b3aedf09c17b4
|
||||
size 86223
|
@ -1,48 +1,22 @@
|
||||
--- FilesCheck.py
|
||||
+++ FilesCheck.py
|
||||
@@ -173,7 +173,7 @@
|
||||
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/')
|
||||
@@ -174,7 +174,7 @@
|
||||
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/')
|
||||
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
||||
--- I18NCheck.py
|
||||
+++ I18NCheck.py
|
||||
@@ -69,10 +69,11 @@
|
||||
st += ')$'
|
||||
@@ -67,7 +67,7 @@
|
||||
)
|
||||
|
||||
package_regex=re.compile(st)
|
||||
-locale_regex=re.compile('^(/usr/share/locale/([^/]+))/')
|
||||
+locale_regex=re.compile('^/(usr|opt/kde3)/share/locale/([^/]+)/')
|
||||
correct_subdir_regex=re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$')
|
||||
lc_messages_regex=re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$')
|
||||
man_regex=re.compile('/usr(?:/share)?/man/([^/]+)/man./[^/]+$')
|
||||
+doc_regex=re.compile('^/opt/kde3/share/doc/HTML/(^[/]*)/')
|
||||
|
||||
# list of exceptions
|
||||
#
|
||||
@@ -122,7 +123,7 @@
|
||||
if res:
|
||||
locale=res.group(2)
|
||||
# checks the same locale only once
|
||||
- if not locale in locales:
|
||||
+ if locale and not locale in locales:
|
||||
locales.append(locale)
|
||||
res2=correct_subdir_regex.search(locale)
|
||||
if not res2:
|
||||
@@ -162,6 +163,12 @@
|
||||
if main_lang != lang:
|
||||
main_dir, main_lang = f, lang
|
||||
|
||||
+ res=doc_regex.search(f)
|
||||
+ if res:
|
||||
+ subdir=res.group(1)
|
||||
+ if subdir != 'en' and pkg.fileLang(f) == '':
|
||||
+ printWarning(pkg, 'file-not-in-%lang', f)
|
||||
+
|
||||
name=pkg.name
|
||||
res=package_regex.search(name)
|
||||
if res:
|
||||
package_regex = re.compile('-(' + '|'.join((x[0:2] for x in CORRECT_SUBDIRS)) + ')$')
|
||||
-locale_regex = re.compile('^(/usr/share/locale/([^/]+))/')
|
||||
+locale_regex = re.compile('^(/(usr|opt/kde3|opt/gnome)/share/locale/([^/]+))/')
|
||||
correct_subdir_regex = re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$')
|
||||
lc_messages_regex = re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$')
|
||||
man_regex = re.compile('/usr(?:/share)?/man/([^/]+)/man./[^/]+$')
|
||||
|
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 10 08:07:25 CEST 2009 - thomas@novell.com
|
||||
|
||||
- added /selinux to allowed prefixes in CheckFilelist.py
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 29 14:28:25 UTC 2009 - lnussel@suse.de
|
||||
|
||||
- add cups to dbus whitelist (bnc#515977)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 20 13:26:16 UTC 2009 - lnussel@suse.de
|
||||
|
||||
- fix suse checks for 0.87
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 16 10:04:16 UTC 2009 - lnussel@suse.de
|
||||
|
||||
- fix syntax error in suse-hide-unstripped-outside-build.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 21 15:29:11 CEST 2009 - dmueller@suse.de
|
||||
|
||||
- update to 0.87:
|
||||
* remove old rpm support
|
||||
* improved performance and compat with python 2.6
|
||||
* many pylint/pychecker code fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 5 00:10:20 CEST 2009 - dmueller@suse.de
|
||||
|
||||
|
510
rpmlint.spec
510
rpmlint.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package rpmlint (Version 0.85)
|
||||
# spec file for package rpmlint (Version 0.87)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -21,8 +21,8 @@
|
||||
Name: rpmlint
|
||||
BuildRequires: rpm-python
|
||||
Summary: Rpm correctness checker
|
||||
Version: 0.85
|
||||
Release: 2
|
||||
Version: 0.87
|
||||
Release: 1
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: config
|
||||
Source1001: config.in
|
||||
@ -48,11 +48,10 @@ Url: http://rpmlint.zarb.org/
|
||||
License: GPL v2 or later
|
||||
Group: System/Packages
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: rpm-python, binutils, file, findutils, cpio, grep, bash
|
||||
Requires: rpm-python, /usr/bin/readelf, file, findutils, cpio, bash
|
||||
Requires: desktop-file-utils
|
||||
BuildArch: noarch
|
||||
Patch0: rpmlint-suse.diff
|
||||
Patch1: old-rpm-compat.diff
|
||||
Patch2: suse-version.diff
|
||||
Patch3: disable-menu-check.diff
|
||||
Patch4: invalid-filerequires.diff
|
||||
@ -62,7 +61,6 @@ Patch7: suse-checks.diff
|
||||
Patch8: suse-debuginfo.diff
|
||||
Patch9: no-doc-for-lib.diff
|
||||
Patch10: add-scoring-support.diff
|
||||
Patch11: suse-spec-bzip2.diff
|
||||
Patch12: usr-arch.diff
|
||||
Patch13: script-interpreter-only-for-exec-scripts.diff
|
||||
Patch14: sourced-dirs.diff
|
||||
@ -123,7 +121,6 @@ Authors:
|
||||
%prep
|
||||
%setup -q -n rpmlint-%{version}
|
||||
%patch
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4
|
||||
@ -133,7 +130,6 @@ Authors:
|
||||
%patch8
|
||||
%patch9
|
||||
%patch10
|
||||
%patch11
|
||||
%patch12
|
||||
%patch13
|
||||
%patch14
|
||||
@ -150,34 +146,34 @@ Authors:
|
||||
%patch27
|
||||
%patch29
|
||||
%patch30
|
||||
%patch31
|
||||
%patch33
|
||||
%patch34
|
||||
%patch35
|
||||
%patch37
|
||||
%patch39
|
||||
%patch41
|
||||
%patch42
|
||||
%patch46
|
||||
%patch47
|
||||
%patch49
|
||||
#%patch31
|
||||
#%patch33
|
||||
#%patch34
|
||||
#%patch35
|
||||
#%patch37
|
||||
#%patch39
|
||||
#%patch41
|
||||
#%patch42
|
||||
#%patch46
|
||||
#%patch47
|
||||
#%patch49
|
||||
%patch50
|
||||
%patch51
|
||||
%patch52
|
||||
#%patch51
|
||||
#%patch52
|
||||
%patch54
|
||||
%patch57
|
||||
%patch58
|
||||
%patch60
|
||||
%patch62
|
||||
%patch63
|
||||
%patch65
|
||||
%patch66
|
||||
%patch67
|
||||
%patch68
|
||||
%patch69
|
||||
%patch70
|
||||
%patch71
|
||||
%patch72 -p1
|
||||
#%patch57
|
||||
#%patch58
|
||||
#%patch60
|
||||
#%patch62
|
||||
#%patch63
|
||||
#%patch65
|
||||
#%patch66
|
||||
#%patch67
|
||||
#%patch68
|
||||
#%patch69
|
||||
#%patch70
|
||||
#%patch71
|
||||
#%patch72 -p1
|
||||
cp -p %{SOURCE1} .
|
||||
cp -p %{SOURCE2} .
|
||||
cp -p %{SOURCE3} .
|
||||
@ -222,449 +218,3 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/man/man1/rpmlint.1.gz
|
||||
|
||||
%changelog
|
||||
* Sun Apr 05 2009 dmueller@suse.de
|
||||
- fix library policy checker being inactive due to API change
|
||||
* Fri Feb 27 2009 dmueller@suse.de
|
||||
- update to 0.85:
|
||||
* various new checks and fixes to existing checks
|
||||
* remove upstreamed patches
|
||||
* Thu Feb 26 2009 lnussel@suse.de
|
||||
- use separate error for sysconfig stuff (bnc#470965)
|
||||
- move RCS detection to FilesCheck.py
|
||||
- remove explicit requires on python, already handled by %%py_requires
|
||||
* Mon Feb 09 2009 lnussel@suse.de
|
||||
- remove check for /usr/share/info/dir from CheckFilelist.py,
|
||||
already in upstream FilesCheck.py
|
||||
- fix exception for texinfo
|
||||
* Mon Feb 02 2009 dmueller@suse.de
|
||||
- improve information hint for perl blacklisted paths
|
||||
- fix language list for sr (bnc#471254)
|
||||
* Fri Jan 30 2009 lnussel@suse.de
|
||||
- add exception for nfs-utils, texinfo and perl
|
||||
- allow backup files if they are ghost files
|
||||
* Fri Jan 23 2009 lnussel@suse.de
|
||||
- add check for DBus Policy problems
|
||||
* Tue Jan 13 2009 lnussel@suse.de
|
||||
- CheckFilelist: optimize FHS check to only complain about wrong
|
||||
directories rather than hundreds of individual files
|
||||
* Mon Jan 12 2009 lnussel@suse.de
|
||||
- CheckFilelist: add exceptions for kde and pam
|
||||
- CheckPolkitPrivs: use info instead of warning to avoid badness assignment
|
||||
* Thu Jan 08 2009 lnussel@suse.de
|
||||
- prefix dbus check with suse-
|
||||
- add filelist check
|
||||
* Wed Dec 17 2008 dmueller@suse.de
|
||||
- add whitelist entry for libieee1284
|
||||
* Thu Dec 11 2008 lnussel@suse.de
|
||||
- add a check for PolicyKit privileges (disabled atm)
|
||||
- add check for DBUS services
|
||||
* Wed Dec 03 2008 dmueller@suse.de
|
||||
- update suse version check (add 11.1, drop 10.2)
|
||||
- check library packages more strict (bnc#456053)
|
||||
- ignore shared objects in a versioned non-std subdir (bnc#435588)
|
||||
* Fri Nov 21 2008 dmueller@suse.de
|
||||
- only test for regular files in ChkPkgConfig check
|
||||
* Fri Nov 07 2008 dmueller@suse.de
|
||||
- add check for otherproviders() in branding packages
|
||||
- correct kde4 related dependency checkers to not give false advises
|
||||
- check for wrong-arch references in pkgconfig files (graphviz)
|
||||
- lower false positives of untranslated-desktop files check
|
||||
- support for checking .comment.SUSE.OPTs. real check has been
|
||||
left out for now
|
||||
* Tue Nov 04 2008 lnussel@suse.de
|
||||
- generate a different error for directories with setuid/setgid bit
|
||||
* Tue Oct 28 2008 lnussel@suse.de
|
||||
- add check for /etc/permissions violations
|
||||
* Fri Oct 03 2008 dmueller@suse.de
|
||||
- update to 0.84:
|
||||
* remove upstreamed patches
|
||||
* no significant changes
|
||||
* Wed Sep 03 2008 dmueller@suse.de
|
||||
- add description for useless-explicit-requires (bnc#405887)
|
||||
* Thu Aug 21 2008 dmueller@suse.de
|
||||
- rediff patch
|
||||
* Mon Aug 18 2008 schwab@suse.de
|
||||
- Fix name of completions file.
|
||||
* Tue Aug 12 2008 dmueller@suse.de
|
||||
- be more verbose in the lsb init script checks
|
||||
* Mon Aug 04 2008 dmueller@suse.de
|
||||
- change mandatory-lsb-keyword check to be in line with insserv
|
||||
* Tue Jul 29 2008 dmueller@suse.de
|
||||
- remove python-base in the warning as it is confusing.
|
||||
the warning itself is still valid though
|
||||
- fix config typo
|
||||
* Mon Jul 21 2008 dmueller@suse.de
|
||||
- enable non-conffile-in-etc warning (bnc#409643)
|
||||
- fix shlib policy dependency warnings (bnc#405280)
|
||||
* Tue Jul 01 2008 dmueller@suse.de
|
||||
- update cron dependency checker (bnc#400921)
|
||||
* Sun Jun 29 2008 schwab@suse.de
|
||||
- No PT_GNU_STACK on ia64 and ppc64.
|
||||
* Sat Jun 28 2008 dmueller@suse.de
|
||||
- also read /etc/rpmlint/factory.config
|
||||
* Fri Jun 27 2008 dmueller@suse.de
|
||||
- fix typo in suse-version check
|
||||
* Mon Jun 23 2008 dmueller@suse.de
|
||||
- update to 0.83:
|
||||
* removed upstreamed patches
|
||||
* a couple of new checks, bugfixes
|
||||
* Wed Jun 18 2008 dmueller@suse.de
|
||||
- fix exception in tags check (bnc#399655)
|
||||
- add a warning for self-conflicts
|
||||
* Thu Jun 05 2008 dmueller@suse.de
|
||||
- fix naming policy check for lib64 based archs (bnc#392524)
|
||||
* Tue May 13 2008 dmueller@suse.de
|
||||
- fix typo in kde4 deps check
|
||||
* Mon May 05 2008 dmueller@suse.de
|
||||
- fix typo in branding policy check
|
||||
* Fri May 02 2008 dmueller@suse.de
|
||||
- readd cron check
|
||||
- fix kmp check after the policy change
|
||||
* Wed Apr 30 2008 dmueller@suse.de
|
||||
- add checker for correct deps of kde4 packages
|
||||
- add check for mono requirements (BNC#381979)
|
||||
- improve branding policy checks
|
||||
- add support for weak/reverse dependencies
|
||||
- add checks for percent's in weak/reverse dependencies
|
||||
- add checks for incorrect kmp dependencies (bnc384084#)
|
||||
* Tue Apr 22 2008 dmueller@suse.de
|
||||
- fix exception on testing for unversioned branding provides
|
||||
* Mon Apr 21 2008 dmueller@suse.de
|
||||
- suppress script warnings about /var/adm/fillup-templates (bnc#379601)
|
||||
- add start of a branding policy checker
|
||||
* Fri Apr 18 2008 jblunck@suse.de
|
||||
- Fix some regex in BinariesCheck
|
||||
* Thu Apr 17 2008 jblunck@suse.de
|
||||
- Add symtab and debuginfo tests for static libs
|
||||
* Thu Mar 13 2008 dmueller@suse.de
|
||||
- autogenerate users/groups from autobuild (bnc#374601)
|
||||
- suppress non-devel buildrequire dependency for tcl
|
||||
- fix licenses symlink handling (bnc#370364)
|
||||
- allow /usr/share/locale/be@latin (bnc#370418)
|
||||
* Tue Mar 11 2008 dmueller@suse.de
|
||||
- fix some false positives
|
||||
* Mon Mar 10 2008 dmueller@suse.de
|
||||
- add check for a really short description
|
||||
* Thu Mar 06 2008 dmueller@suse.de
|
||||
- be less restrictive in pkgconfig checks
|
||||
* Mon Mar 03 2008 dmueller@suse.de
|
||||
- suppress tag-not-utf8 warnings for now
|
||||
* Thu Feb 28 2008 dmueller@suse.de
|
||||
- add check for %%run_ldconfig
|
||||
* Thu Feb 28 2008 dmueller@suse.de
|
||||
- improve check output
|
||||
* Wed Feb 27 2008 dmueller@suse.de
|
||||
- improved tags check
|
||||
- cleanups
|
||||
* Mon Feb 25 2008 dmueller@suse.de
|
||||
- reduce package-size-check false positives
|
||||
- add another postscript check
|
||||
* Tue Feb 19 2008 dmueller@suse.de
|
||||
- fix typo in sorting routine
|
||||
* Fri Feb 15 2008 dmueller@suse.de
|
||||
- updated spec file name-guessing to catch more cases
|
||||
- updated dot-in-identifier check
|
||||
- suppression updates
|
||||
* Tue Feb 12 2008 dmueller@suse.de
|
||||
- update to 0.82:
|
||||
* some patches were upstreamed
|
||||
* small bugfixes
|
||||
- rework fix for bnc#354177 to consider python bytecode
|
||||
arch-independent again, but catch it in arch-dependent paths
|
||||
* Sat Feb 09 2008 dmueller@suse.de
|
||||
- fix some minor buglets
|
||||
* Tue Feb 05 2008 dmueller@suse.de
|
||||
- consider python bytecode to not be arch independent (bnc#354177)
|
||||
- improve postcheck to ignore unexpanded macros in comments (bnc#355306)
|
||||
- check binary rpath for perl version dependency (bnc#355053)
|
||||
- add check for unversioned self-provides
|
||||
- update suse checks from SVN
|
||||
- check for dot's in dependencies - forbidden by autobuild policy
|
||||
* Wed Jan 23 2008 dmueller@suse.de
|
||||
- improve documentation
|
||||
* Mon Jan 14 2008 dmueller@suse.de
|
||||
- check for libtool wrapper scripts being packaged (#353240)
|
||||
* Wed Dec 12 2007 dmueller@suse.de
|
||||
- reapply patch-detection fix
|
||||
* Tue Dec 04 2007 dmueller@suse.de
|
||||
- add suppression for libzypp
|
||||
- fix wrong indentation in verify-buildrequires
|
||||
* Fri Nov 30 2007 dmueller@suse.de
|
||||
- bugfixes in check-mkdir-buildroot
|
||||
- bugfix in percent-post check
|
||||
- check for buildroot in %%post scriptlets
|
||||
- remove abused legacy shared lib policy exceptions
|
||||
- suppression update
|
||||
* Tue Nov 27 2007 dmueller@suse.de
|
||||
- fix suppression for internal packages
|
||||
* Fri Nov 23 2007 dmueller@suse.de
|
||||
- add suppression for non-remote_fs on boot.* (#340588)
|
||||
* Wed Nov 21 2007 dmueller@suse.de
|
||||
- add warning for non-utf8 filenames (#343216)
|
||||
* Tue Nov 06 2007 dmueller@suse.de
|
||||
- more prereq checks
|
||||
* Mon Nov 05 2007 dmueller@suse.de
|
||||
- suppression update
|
||||
- add more prereq checks
|
||||
* Fri Nov 02 2007 dmueller@suse.de
|
||||
- fix prereq parsing code (#336712)
|
||||
- update the obsolete-suse-version check to include 10.0 and 11.0
|
||||
- fix prereq checks to check for coreutils
|
||||
* Wed Oct 31 2007 dmueller@suse.de
|
||||
- reporting format change-back got rejected by upstream,
|
||||
so adopt other changes to deal with it
|
||||
* Tue Oct 30 2007 dmueller@suse.de
|
||||
- change back reporting format to list the severity
|
||||
first
|
||||
- add more legacy suppressions found by library policy
|
||||
fix
|
||||
* Mon Oct 29 2007 dmueller@suse.de
|
||||
- also check for Library Policy errors in /opt/kde3/lib
|
||||
* Mon Oct 29 2007 dmueller@suse.de
|
||||
- update to 0.81:
|
||||
* various new checks, some bugfixes
|
||||
* many patches upstreamed
|
||||
* rediffed all other patches
|
||||
- NOTE: output format has changed from
|
||||
W: package check-id ..
|
||||
to
|
||||
package.<arch>: W: check-id ..
|
||||
* Sun Oct 07 2007 dmueller@suse.de
|
||||
- another round of updates
|
||||
* Fri Oct 05 2007 dmueller@suse.de
|
||||
- library policy legacy suppression update
|
||||
* Mon Oct 01 2007 mmarek@suse.cz
|
||||
- added 'mysql' to the list of standard users and groups
|
||||
- removed 'jonas' (dropped package) from that list
|
||||
* Tue Sep 25 2007 dmueller@suse.de
|
||||
- update library policy checker for libgcc and libcaca
|
||||
- check for /usr/share/gnome/help in documentation checks (#310134)
|
||||
* Thu Sep 20 2007 dmueller@suse.de
|
||||
- add check for non-whitelisted filedependencies (#326803)
|
||||
* Mon Sep 03 2007 dmueller@suse.de
|
||||
- fix hardlink check for /bin
|
||||
* Sat Sep 01 2007 schwab@suse.de
|
||||
- Fix last change.
|
||||
* Sat Sep 01 2007 dmueller@suse.de
|
||||
- fix off-by-one in hardlink check
|
||||
* Fri Aug 31 2007 dmueller@suse.de
|
||||
- fix exception in DuplicatesCheck
|
||||
* Thu Aug 30 2007 dmueller@suse.de
|
||||
- fix buildroot false positive
|
||||
- check for hardlinks across partitions (#304167)
|
||||
* Wed Aug 29 2007 dmueller@suse.de
|
||||
- improve mkdir-installroot check
|
||||
- fix rpmlint package regarding check above ;)
|
||||
* Wed Aug 29 2007 mmarek@suse.cz
|
||||
- improved the non-devel-buildrequires check
|
||||
- added some default filters for non-devel-buildrequires and
|
||||
unneccessary-buildrequires
|
||||
* Thu Aug 23 2007 dmueller@suse.de
|
||||
- check for wrong cleaning of buildroot in %%install (#300232)
|
||||
- check for obscure and unneccessary buildrequires
|
||||
- add an icon size check (#163547)
|
||||
* Tue Aug 21 2007 dmueller@suse.de
|
||||
- refine the $remote_fs dependency check
|
||||
* Sun Aug 12 2007 dmueller@suse.de
|
||||
- suppression update
|
||||
* Sat Aug 11 2007 dmueller@suse.de
|
||||
- improved macro checks
|
||||
- documentation update
|
||||
* Fri Aug 10 2007 dmueller@suse.de
|
||||
- detect makefile junk (#217472)
|
||||
- suppression update
|
||||
- fix a couple of false positives
|
||||
* Tue Jul 31 2007 dmueller@suse.de
|
||||
- fix package-with-huge-docs check to not complain about
|
||||
documentation-only packages
|
||||
- remove verbosity from the shared library packaging policy check
|
||||
* Wed Jul 25 2007 dmueller@suse.de
|
||||
- fix man page check false positives
|
||||
- make package-with-huge-docs check less verbose
|
||||
* Tue Jul 17 2007 dmueller@suse.de
|
||||
- accept lua as a builtin shell
|
||||
- fix false positives on filesystem package
|
||||
- add check for init scrips missing $remote_fs
|
||||
* Wed Jul 11 2007 dmueller@suse.de
|
||||
- adjust library policy suppressions for opal and pwlib (#290347)
|
||||
- fix readme check (#291150)
|
||||
* Mon Jul 09 2007 dmueller@suse.de
|
||||
- its also a devel package if it provides a -devel subpackage (#289735)
|
||||
* Wed Jul 04 2007 dmueller@suse.de
|
||||
- suppress %%config check for now (#286231)
|
||||
* Wed Jun 27 2007 dmueller@suse.de
|
||||
- fix typo in devel-rpmgroup check
|
||||
* Mon Jun 25 2007 dmueller@suse.de
|
||||
- another update list of legacy packages
|
||||
* Sat Jun 23 2007 dmueller@suse.de
|
||||
- update list of legacy packages
|
||||
* Fri Jun 22 2007 dmueller@suse.de
|
||||
- suppressions for mono related packages (#282121)
|
||||
* Fri Jun 22 2007 dmueller@suse.de
|
||||
- fix the bzip2/gzip confusion again
|
||||
* Fri Jun 22 2007 dmueller@suse.de
|
||||
- update list of legacy packages
|
||||
* Fri Jun 22 2007 dmueller@suse.de
|
||||
- add list of legacy package names with non-policy conform
|
||||
package name
|
||||
- check updates from SVN
|
||||
* Thu Jun 21 2007 dmueller@suse.de
|
||||
- suppression update
|
||||
- suppress devel-file-in-non-devel package if its just a compat
|
||||
symlink to another .so
|
||||
- avoid unstripped binaries warnings in BETA
|
||||
- fix filesystem lint false positives
|
||||
* Wed Jun 13 2007 dmueller@suse.de
|
||||
- suppression update
|
||||
- add descriptions to sysv5 init checks
|
||||
- use readelf for binary info to improve performace
|
||||
- check if source patch/tarballs is not bzip2'ed and bigger
|
||||
than 100k (suse packaging conventions requirement)
|
||||
- check if package contains excessive sized documentation
|
||||
* Mon Jun 11 2007 dmueller@suse.de
|
||||
- hide errors related to .packlist files from perl
|
||||
still need to figure out though why they're there
|
||||
* Mon Jun 11 2007 dmueller@suse.de
|
||||
- fix build
|
||||
* Sat Jun 09 2007 dmueller@suse.de
|
||||
- make the buildroot check work
|
||||
- make the buildroot check factor 10-15 faster
|
||||
- fix the pkgconfig check
|
||||
* Fri Jun 08 2007 dmueller@suse.de
|
||||
- fix warning-hide hack (#279865)
|
||||
- description update
|
||||
* Fri Jun 08 2007 dmueller@suse.de
|
||||
- hide unstripped-binary-or-object warning outside build (#279865)
|
||||
- fix typo in library policy check
|
||||
- adopt library checks for suse library packaging policy
|
||||
- add check for unnecessarily packaged files
|
||||
- description update
|
||||
- suppression update
|
||||
* Thu May 31 2007 dmueller@suse.de
|
||||
- suppression update
|
||||
- fix various checks
|
||||
- add checks for init scripts
|
||||
* Wed May 30 2007 dmueller@suse.de
|
||||
- update LibraryPolicy Checker
|
||||
* Tue May 29 2007 dmueller@suse.de
|
||||
- suppression update
|
||||
- fix XDG menu checker to also include non-/usr paths
|
||||
- fix ghost-file-creation check to skip missingok files (#278761)
|
||||
* Mon May 28 2007 dmueller@suse.de
|
||||
- suppression-update
|
||||
- Library Policy Checker crash fixes (#278592)
|
||||
* Sat May 26 2007 dmueller@suse.de
|
||||
- add description for missing lsb tags check
|
||||
- fix obsolete-not-provided for yast2-provides
|
||||
- fix devel-file check matching module names (e.g. apache2)
|
||||
* Fri May 25 2007 dmueller@suse.de
|
||||
- avoid spurious executable warnings for docdatadir/examples
|
||||
- add LibraryPolicy checker from Richard (warning only)
|
||||
- suppression update
|
||||
* Thu May 24 2007 dmueller@suse.de
|
||||
- fix suppression for qa_ packages
|
||||
- fix exceptions caused by DesktopTranslation check
|
||||
- fix crash caused by trailing colons in requires
|
||||
* Thu May 24 2007 dmueller@suse.de
|
||||
- fix file paths in Duplicate and DesktopTranslation checks
|
||||
* Thu May 24 2007 dmueller@suse.de
|
||||
- update sourced-dirs list
|
||||
- add some more standard users
|
||||
- add suppression for devel-file-in-non-devel package in java
|
||||
- filter some more noise
|
||||
* Wed May 23 2007 dmueller@suse.de
|
||||
- add descriptions for obsolete suse version check
|
||||
- suppress some more noise
|
||||
- don't run duplicates check for source rpms
|
||||
* Wed May 23 2007 dmueller@suse.de
|
||||
- suppress errors for cross-avr-*
|
||||
- suppress devel-packaging-naming errors for gcc41, gcc42
|
||||
* Wed May 23 2007 dmueller@suse.de
|
||||
- group output by check and put errors last (#276943)
|
||||
- suppress some more noise (#277308)
|
||||
- suppress %%ifarch-applied-patch (#277316)
|
||||
- more suppressions for misnamed devel packages (#277317)
|
||||
* Wed May 23 2007 dmueller@suse.de
|
||||
- Suppress errors about platform dependent code in /usr/share
|
||||
if its inside a platform-dependant subdirectory
|
||||
- Suppress devel-file-in-non-devel-package for systemtap (#277338)
|
||||
- Make sure that the package fails if there is any syntax
|
||||
error anywhere
|
||||
* Wed May 23 2007 dmueller@suse.de
|
||||
- typo fix
|
||||
* Tue May 22 2007 dmueller@suse.de
|
||||
- update config
|
||||
* Sat May 19 2007 coolo@suse.de
|
||||
- add three more checks
|
||||
* Thu May 17 2007 dmueller@suse.de
|
||||
- update Duplicates Check to not crash on ghost files
|
||||
* Tue May 15 2007 dmueller@suse.de
|
||||
- suppress bzip2 related warnings
|
||||
- no documentation for lib packages
|
||||
* Tue May 15 2007 coolo@suse.de
|
||||
- add a check how much space is wasted by duplicated files
|
||||
* Mon May 14 2007 dmueller@suse.de
|
||||
- remove rpm-devel requirement
|
||||
- add check for filerequires on /usr/bin/env
|
||||
- fix syntax errors in previous change
|
||||
* Mon May 14 2007 coolo@suse.de
|
||||
- add a check for /opt/kde3 not in %%doc or in %%lang
|
||||
- fix files not in %%lang check
|
||||
* Wed May 09 2007 dmueller@suse.de
|
||||
- remove tabs from sources
|
||||
* Mon May 07 2007 dmueller@suse.de
|
||||
- fix desktop file check (#252482)
|
||||
* Sat May 05 2007 dmueller@suse.de
|
||||
- allow extensions to LSB starting with "X-" (#271495)
|
||||
* Fri May 04 2007 dmueller@suse.de
|
||||
- remove check for usedforbuild tag. magic happens and
|
||||
it is created automatically
|
||||
* Thu Apr 19 2007 dmueller@suse.de
|
||||
- add spec checks for obsolete suse hacks
|
||||
* Wed Apr 18 2007 dmueller@suse.de
|
||||
- update to 0.80:
|
||||
* many more checks
|
||||
- suppression updates
|
||||
* Thu Apr 05 2007 dmueller@suse.de
|
||||
- suppressions for OpenOffice and linux-kernel-headers
|
||||
* Thu Apr 05 2007 dmueller@suse.de
|
||||
- update suppressions
|
||||
* Wed Nov 08 2006 dmueller@suse.de
|
||||
- fix compatibility with rpm-python of sles9 (#216081)
|
||||
* Mon Sep 11 2006 dmueller@suse.de
|
||||
- update to 0.77:
|
||||
* updated checks regarding FHS compliance
|
||||
* some python-lint fixlets
|
||||
* Wed Apr 12 2006 dmueller@suse.de
|
||||
- update to 0.76
|
||||
* Fri Mar 24 2006 dmueller@suse.de
|
||||
- update to 0.75
|
||||
* Tue Mar 21 2006 dmueller@suse.de
|
||||
- suppress some glibc related errors (#157906)
|
||||
* Wed Feb 22 2006 dmueller@suse.de
|
||||
- add km to the list of valid locales
|
||||
* Wed Jan 25 2006 mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Mon Jan 09 2006 dmueller@suse.de
|
||||
- add check for untranslated desktop files
|
||||
* Tue Dec 20 2005 dmueller@suse.de
|
||||
- fix i18n subdir check
|
||||
* Thu Dec 15 2005 dmueller@suse.de
|
||||
- filter init-script-name-with-dot /etc/init.d/boot.* and
|
||||
script-without-shellbang /etc/profile.d/*
|
||||
* Thu Nov 24 2005 dmueller@suse.de
|
||||
- update to 0.71
|
||||
- strip "requires-on-release" for now, too much noise
|
||||
* Fri Jul 22 2005 dmueller@suse.de
|
||||
- ignore dir-or-file-in-opt
|
||||
* Mon Jun 20 2005 coolo@suse.de
|
||||
- update to 0.70
|
||||
* Thu Jun 16 2005 dmueller@suse.de
|
||||
- upgrade to rpmlint 0.69
|
||||
- split out the config file from the SUSE patch
|
||||
* Thu Nov 11 2004 coolo@suse.de
|
||||
- remove some MDK specific tests and add some SUSE specific tests
|
||||
* Mon Feb 23 2004 hmacht@suse.de
|
||||
- building as non-root
|
||||
* Wed Jun 11 2003 coolo@suse.de
|
||||
- initial version
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- FilesCheck.py
|
||||
+++ FilesCheck.py
|
||||
@@ -683,7 +683,7 @@
|
||||
shebang_regex=re.compile('^#!\s*(\S*)')
|
||||
interpreter_regex=re.compile('^/(usr/)?s?bin/[^/]+$')
|
||||
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)
|
||||
meta_package_re=re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-'))
|
||||
filesys_packages = ['filesystem'] # TODO: make configurable?
|
||||
@@ -211,7 +211,7 @@
|
||||
shebang_regex = re.compile('^#!\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?|ml[ily]?)$'), re.IGNORECASE)
|
||||
meta_package_regex = re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-'))
|
||||
|
@ -1,33 +1,31 @@
|
||||
--- SourceCheck.py
|
||||
+++ SourceCheck.py
|
||||
@@ -14,7 +14,7 @@
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
DEFAULT_VALID_SRC_PERMS=(0644, 0755)
|
||||
DEFAULT_VALID_SRC_PERMS = (0644, 0755)
|
||||
|
||||
-source_regex=re.compile('\\.(tar|patch|tgz|diff)$')
|
||||
+source_regex=re.compile('\\.(tar|patch|tgz|tar\.gz|dif||diff)$')
|
||||
use_bzip2=Config.getOption('UseBzip2', 1)
|
||||
valid_src_perms=Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS)
|
||||
-source_regex = re.compile('\\.(tar|patch|tgz|diff)$')
|
||||
+source_regex = re.compile('\\.(tar|patch|tar\.gz|tgz|diff)$')
|
||||
use_bzip2 = Config.getOption('UseBzip2', 1)
|
||||
valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
printError(pkg, 'multiple-specfiles', spec_file, f)
|
||||
@@ -40,7 +40,7 @@
|
||||
printError(pkg, 'multiple-specfiles', spec_file, fname)
|
||||
else:
|
||||
spec_file=f
|
||||
- elif source_regex.search(f):
|
||||
+ elif source_regex.search(f) and files[f][4] > 120*1024:
|
||||
spec_file = fname
|
||||
- elif source_regex.search(fname):
|
||||
+ elif source_regex.search(fname) and files[f][4] > 120*1024:
|
||||
if use_bzip2:
|
||||
if not f.endswith('.bz2'):
|
||||
printWarning(pkg, 'source-or-patch-not-bzipped', f)
|
||||
@@ -59,8 +59,10 @@
|
||||
all your RPM information.''',
|
||||
if not fname.endswith('.bz2'):
|
||||
printWarning(pkg, 'source-or-patch-not-bzipped', fname)
|
||||
@@ -61,7 +61,9 @@
|
||||
|
||||
'source-or-patch-not-bzipped',
|
||||
-'''A source archive or file in your package is not bzipped (doesn't
|
||||
'''A source archive or file in your package is not bzipped (doesn't
|
||||
-have the .bz2 extension). To bzip it, use bzip2.''',
|
||||
+'''A source archive or patch in your package is not bzipped (doesn't
|
||||
+have the .bz2 extension). Files bigger than 100k should be bzip2'ed
|
||||
+in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source
|
||||
+tarball, use bznew''',
|
||||
++in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source
|
||||
++tarball, use bznew''',
|
||||
|
||||
'source-or-patch-not-gzipped',
|
||||
'''A source archive or file in your package is not gzipped (doesn't
|
||||
|
@ -1,10 +1,10 @@
|
||||
--- Config.py
|
||||
+++ Config.py
|
||||
@@ -17,7 +17,6 @@
|
||||
"FilesCheck",
|
||||
"DocFilesCheck",
|
||||
"FHSCheck",
|
||||
- "SignatureCheck",
|
||||
"I18NCheck",
|
||||
"MenuCheck",
|
||||
"PostCheck",
|
||||
@@ -20,7 +20,6 @@
|
||||
"FilesCheck",
|
||||
"DocFilesCheck",
|
||||
"FHSCheck",
|
||||
- "SignatureCheck",
|
||||
"I18NCheck",
|
||||
"MenuCheck",
|
||||
"PostCheck",
|
||||
|
@ -1,21 +1,21 @@
|
||||
--- BinariesCheck.py
|
||||
+++ BinariesCheck.py
|
||||
@@ -16,6 +16,7 @@
|
||||
import Config
|
||||
import Pkg
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
import re
|
||||
import stat
|
||||
+import os
|
||||
|
||||
DEFAULT_SYSTEM_LIB_PATHS=('/lib', '/usr/lib', '/usr/X11R6/lib',
|
||||
'/lib64', '/usr/lib64', '/usr/X11R6/lib64')
|
||||
@@ -193,7 +194,9 @@
|
||||
import rpm
|
||||
|
||||
@@ -252,7 +253,9 @@
|
||||
|
||||
# stripped ?
|
||||
if not unstrippable.search(i[0]) and not is_ocaml_native:
|
||||
- if not_stripped.search(i[1]):
|
||||
+ if not_stripped.search(i[1]) and \
|
||||
if not unstrippable.search(fname) and not is_ocaml_native:
|
||||
- if not_stripped.search(pkgfile.magic):
|
||||
+ if not_stripped.search(pkgfile.magic) and \
|
||||
+ (os.environ.get('BUILD_IS_RUNNING', None) == None or \
|
||||
+ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1):
|
||||
printWarning(pkg, 'unstripped-binary-or-object', i[0])
|
||||
+ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1):
|
||||
printWarning(
|
||||
pkg, 'unstripped-binary-or-object', fname)
|
||||
|
||||
# inspect binary file
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- SourceCheck.py
|
||||
+++ SourceCheck.py
|
||||
@@ -39,7 +39,7 @@ class SourceCheck(AbstractCheck.AbstractCheck):
|
||||
else:
|
||||
spec_file=f
|
||||
elif source_regex.search(f) and files[f][4] > 120*1024:
|
||||
- if use_bzip2:
|
||||
+ if True:
|
||||
if not f.endswith('.bz2'):
|
||||
printWarning(pkg, 'source-or-patch-not-bzipped', f)
|
||||
else:
|
@ -1,16 +1,16 @@
|
||||
--- SpecCheck.py
|
||||
+++ SpecCheck.py
|
||||
@@ -52,6 +52,7 @@
|
||||
@@ -53,6 +53,7 @@
|
||||
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+)')
|
||||
|
||||
# Only check for /lib, /usr/lib, /usr/X11R6/lib
|
||||
# TODO: better handling of X libraries and modules.
|
||||
@@ -340,6 +341,12 @@
|
||||
section_regexs = dict(
|
||||
([x, re.compile('^%' + x + '(?:\s|$)')]
|
||||
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
||||
@@ -359,6 +360,12 @@
|
||||
if res:
|
||||
noarch = 1
|
||||
package_noarch[current_package] = True
|
||||
|
||||
+ res = suse_version_regex.search(line)
|
||||
+ if res and int(res.group(1)) > 0 and int(res.group(1)) < 1030:
|
||||
@ -21,11 +21,10 @@
|
||||
res = prereq_regex.search(line)
|
||||
if res:
|
||||
printError(pkg, 'prereq-use', res.group(2))
|
||||
@@ -598,6 +605,16 @@
|
||||
set which may result in security issues in the resulting binary package
|
||||
@@ -645,6 +652,15 @@
|
||||
depending on the system where the package is built. Add default attributes
|
||||
using %defattr before it in the %files section, or use per line %attr's.''',
|
||||
+
|
||||
|
||||
+'obsolete-suse-version-check',
|
||||
+'''The specfile contains a comparison of %suse_version against a suse release
|
||||
+that is no longer in maintenance. Consider removing obsolete parts of your
|
||||
@ -33,9 +32,8 @@
|
||||
+
|
||||
+'invalid-suse-version-check',
|
||||
+'''The specfile contains a comparison of %suse_version against a suse release
|
||||
+that does not exist. Please double check.'''
|
||||
+that does not exist. Please double check.''',
|
||||
+
|
||||
)
|
||||
|
||||
# SpecCheck.py ends here
|
||||
Nur in b/rpmlint-0.85: SpecCheck.py.orig.
|
||||
'non-standard-group',
|
||||
'''The value of the Group tag in the package is not valid. Valid groups are:
|
||||
"%s".''' % '", "'.join(VALID_GROUPS),
|
||||
|
@ -1,58 +1,52 @@
|
||||
--- InitScriptCheck.py
|
||||
+++ InitScriptCheck.py
|
||||
@@ -27,6 +27,8 @@
|
||||
use_deflevels=Config.getOption('UseDefaultRunlevels', 1)
|
||||
@@ -30,6 +30,8 @@
|
||||
use_deflevels = Config.getOption('UseDefaultRunlevels', 1)
|
||||
lsb_tags_regex = re.compile('^# ([\w-]+):\s*(.*?)\s*$')
|
||||
lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$')
|
||||
+insserv_regex=re.compile('^\s*sbin/insserv', re.MULTILINE)
|
||||
+preun_regex=re.compile('^\s*/etc/init.d/\S+ stop', re.MULTILINE)
|
||||
|
||||
class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||||
|
||||
@@ -39,6 +41,12 @@
|
||||
LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
|
||||
'Should-Stop', 'Default-Start', 'Default-Stop',
|
||||
@@ -48,6 +50,13 @@
|
||||
return
|
||||
|
||||
initscript_list = []
|
||||
+
|
||||
+ # check chkconfig call in %post and %preun
|
||||
+ postin=pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG]
|
||||
+ preun=pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG]
|
||||
+ postun=pkg[rpm.RPMTAG_POSTUN] or pkg[rpm.RPMTAG_POSTUNPROG]
|
||||
+
|
||||
for f in pkg.files().keys():
|
||||
if rc_regex.search(f):
|
||||
basename=basename_regex.search(f).group(1)
|
||||
@@ -48,20 +56,23 @@
|
||||
+ # check chkconfig call in %post and %preun
|
||||
+ postin = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG]
|
||||
+ preun = pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG]
|
||||
+ postun = pkg[rpm.RPMTAG_POSTUN] or pkg[rpm.RPMTAG_POSTUNPROG]
|
||||
+
|
||||
for fname, pkgfile in pkg.files().items():
|
||||
if rc_regex.search(fname):
|
||||
basename = os.path.basename(fname)
|
||||
@@ -57,13 +66,17 @@
|
||||
|
||||
if dot_in_name_regex.match(basename):
|
||||
printError(pkg, 'init-script-name-with-dot', f)
|
||||
printError(pkg, 'init-script-name-with-dot', fname)
|
||||
- # check chkconfig call in %post and %preun
|
||||
- postin=pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG]
|
||||
- postin = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG]
|
||||
if not postin:
|
||||
printError(pkg, 'init-script-without-chkconfig-postin', f)
|
||||
else:
|
||||
if not chkconfig_regex.search(postin):
|
||||
printError(pkg, 'postin-without-chkconfig', f)
|
||||
|
||||
- preun=pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG]
|
||||
if not preun:
|
||||
- printError(pkg, 'init-script-without-chkconfig-preun', f)
|
||||
+ printError(pkg, 'init-script-without-%stop_on_removal-preun', f)
|
||||
else:
|
||||
- if not chkconfig_regex.search(preun):
|
||||
- printError(pkg, 'preun-without-chkconfig', f)
|
||||
- printError(pkg, 'init-script-without-chkconfig-postin', fname)
|
||||
+ printError(pkg, 'init-script-without-%stop_on_removal-postin', fname)
|
||||
+ else:
|
||||
+ if not preun_regex.search(preun):
|
||||
+ printError(pkg, 'preun-without-%stop_on_removal-preun', f)
|
||||
+
|
||||
+ if not postun:
|
||||
+ printError(pkg, 'init-script-without-%insserv_cleanup-postun', f)
|
||||
+ else:
|
||||
else:
|
||||
- if not chkconfig_regex.search(postin):
|
||||
- printError(pkg, 'postin-without-chkconfig', fname)
|
||||
+ if not insserv_regex.search(postun):
|
||||
+ printError(pkg, 'postun-without-%insserv_cleanup', f)
|
||||
|
||||
status_found = 0
|
||||
reload_found = 0
|
||||
@@ -183,10 +194,18 @@
|
||||
preun = pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG]
|
||||
if not preun:
|
||||
@@ -193,10 +206,18 @@
|
||||
'postin-without-chkconfig',
|
||||
'''The package contains an init script but doesn't call chkconfig in its %post.''',
|
||||
|
||||
@ -72,7 +66,7 @@
|
||||
'preun-without-chkconfig',
|
||||
'''The package contains an init script but doesn't call chkconfig in its %preun.''',
|
||||
|
||||
@@ -241,6 +260,18 @@
|
||||
@@ -254,6 +275,18 @@
|
||||
'init-script-non-executable',
|
||||
'''The init script should have at least the execution bit set for root
|
||||
in order for it to run at boot time.''',
|
||||
|
@ -1,19 +1,19 @@
|
||||
--- BinariesCheck.py
|
||||
+++ BinariesCheck.py
|
||||
@@ -109,6 +109,7 @@
|
||||
numeric_dir_regex=re.compile('/usr(?:/share)/man/man./(.*)\.[0-9](?:\.gz|\.bz2)')
|
||||
versioned_dir_regex=re.compile('[^.][0-9]')
|
||||
usr_share=re.compile('^/usr/share/')
|
||||
+usr_arch_share=re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)')
|
||||
etc=re.compile('^/etc/')
|
||||
not_stripped=re.compile('not stripped')
|
||||
unstrippable=re.compile('\.o$|\.static$')
|
||||
@@ -181,7 +182,7 @@
|
||||
printError(pkg, 'arch-independent-package-contains-binary-or-object', i[0])
|
||||
@@ -165,6 +165,7 @@
|
||||
numeric_dir_regex = re.compile('/usr(?:/share)/man/man./(.*)\.[0-9](?:\.gz|\.bz2)')
|
||||
versioned_dir_regex = re.compile('[^.][0-9]')
|
||||
usr_share = re.compile('^/usr/share/')
|
||||
+usr_arch_share = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)')
|
||||
etc = re.compile('^/etc/')
|
||||
not_stripped = re.compile('not stripped')
|
||||
unstrippable = re.compile('\.o$|\.static$')
|
||||
@@ -239,7 +240,7 @@
|
||||
printError(pkg, 'arch-independent-package-contains-binary-or-object', fname)
|
||||
else:
|
||||
# in /usr/share ?
|
||||
- if usr_share.search(i[0]):
|
||||
+ if usr_share.search(i[0]) and not usr_arch_share.search(i[0]):
|
||||
printError(pkg, 'arch-dependent-file-in-usr-share', i[0])
|
||||
- if usr_share.search(fname):
|
||||
+ if usr_share.search(fname) and not usr_arch_share.search(i[0]):
|
||||
printError(
|
||||
pkg, 'arch-dependent-file-in-usr-share', fname)
|
||||
# in /etc ?
|
||||
if etc.search(i[0]):
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- TagsCheck.py
|
||||
+++ TagsCheck.py
|
||||
@@ -670,7 +670,7 @@
|
||||
@@ -669,7 +669,7 @@
|
||||
printWarning(pkg, 'no-url-tag')
|
||||
|
||||
obs_names = map(lambda x: x[0], pkg.obsoletes())
|
||||
- prov_names = map(lambda x: x[0], pkg.provides())
|
||||
+ prov_names = map(lambda x: x[0].split(':/')[0], pkg.provides())
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
- prov_names = [x[0] for x in pkg.provides()]
|
||||
+ prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
||||
|
||||
if pkg.name in obs_names:
|
||||
printError(pkg, 'obsolete-on-name')
|
||||
|
Loading…
Reference in New Issue
Block a user