diff --git a/CheckFilelist.py b/CheckFilelist.py index 79d270b..f71cd92 100644 --- a/CheckFilelist.py +++ b/CheckFilelist.py @@ -80,7 +80,6 @@ _goodprefixes = ( '/var/adm/', '/var/nis/', '/emul/', - '/selinux/', ) # computed from goodprefixes. diff --git a/CheckPkgConfig.py b/CheckPkgConfig.py index 32a33f6..f953aac 100644 --- a/CheckPkgConfig.py +++ b/CheckPkgConfig.py @@ -33,7 +33,7 @@ class PkgConfigCheck(AbstractCheck.AbstractFilesCheck): def check_file(self, pkg, filename): - if pkg.isSource() or not stat.S_ISREG(pkg.files()[filename][0]): + if pkg.isSource() or not stat.S_ISREG(pkg.files()[filename].mode): return if pkg.grep(self.suspicious_dir, filename): diff --git a/CheckSUIDPermissions.py b/CheckSUIDPermissions.py index 3ad8b25..18caed5 100644 --- a/CheckSUIDPermissions.py +++ b/CheckSUIDPermissions.py @@ -11,7 +11,6 @@ import AbstractCheck import re import os import string -import pprint _permissions_d_whitelist = ( "lprng", diff --git a/add-weak-dependencies.diff b/add-weak-dependencies.diff index 8d11df6..8c77d9d 100644 --- a/add-weak-dependencies.diff +++ b/add-weak-dependencies.diff @@ -1,17 +1,19 @@ ---- Pkg.py +Index: Pkg.py +=================================================================== +--- Pkg.py.orig +++ Pkg.py -@@ -176,6 +176,10 @@ class Pkg: - self._missing_ok_files=None - self._files=None - self._requires=None -+ self._suggests=None -+ self._supplements=None -+ self._enhances=None -+ self._recommends=None - self._req_names=-1 +@@ -170,6 +170,10 @@ class Pkg: + self._missingok_files = None + self._files = None + self._requires = None ++ self._suggests = None ++ self._supplements = None ++ self._enhances = None ++ self._recommends = None + self._req_names = -1 if header: -@@ -414,6 +418,22 @@ class Pkg: +@@ -376,6 +380,22 @@ class Pkg: self._gatherDepInfo() return self._requires @@ -34,23 +36,19 @@ def prereq(self): self._gatherDepInfo() return self._prereq -@@ -453,7 +473,8 @@ class Pkg: +@@ -406,7 +426,8 @@ class Pkg: return self._provides # internal function to gather dependency info used by the above ones -- def _gather_aux(self, header, list, nametag, versiontag, flagstag, prereq=None): -+ def _gather_aux(self, header, list, nametag, versiontag, flagstag, -+ prereq=None,strong_only=False,weak_only=False): +- def _gather_aux(self, header, list, nametag, versiontag, flagstag, prereq = None): ++ def _gather_aux(self, header, list, nametag, versiontag, flagstag, ++ prereq = None, strong_only = False, weak_only = False): names = header[nametag] versions = header[versiontag] flags = header[flagstag] -@@ -462,10 +483,15 @@ class Pkg: - # workaroung buggy rpm python module that doesn't return a list - if type(flags) != types.ListType: - flags=[flags] -+ +@@ -415,7 +436,11 @@ class Pkg: for loop in range(len(versions)): - if prereq != None and flags[loop] & PREREQ_FLAG: + if prereq is not None and flags[loop] & PREREQ_FLAG: prereq.append((names[loop], versions[loop], flags[loop] & (~PREREQ_FLAG))) - else: + elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG: @@ -61,7 +59,7 @@ list.append((names[loop], versions[loop], flags[loop])) def _gatherDepInfo(self): -@@ -475,6 +501,10 @@ class Pkg: +@@ -425,6 +450,10 @@ class Pkg: self._provides = [] self._conflicts = [] self._obsoletes = [] @@ -72,7 +70,7 @@ self._gather_aux(self.header, self._requires, rpm.RPMTAG_REQUIRENAME, -@@ -493,6 +523,27 @@ class Pkg: +@@ -443,6 +472,27 @@ class Pkg: rpm.RPMTAG_OBSOLETENAME, rpm.RPMTAG_OBSOLETEVERSION, rpm.RPMTAG_OBSOLETEFLAGS) diff --git a/buildroot-in-scripts.diff b/buildroot-in-scripts.diff index de7f085..05bc96a 100644 --- a/buildroot-in-scripts.diff +++ b/buildroot-in-scripts.diff @@ -1,30 +1,21 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -186,7 +186,7 @@ - lib = 0 - if_depth = 0 - ifarch_depth = -1 -- current_section = 'package' -+ current_section = 'package' - buildroot_clean={'clean':0 , 'install':0} - buildroot_created={'clean':False , 'install':True} - depscript_override = 0 -@@ -196,8 +196,11 @@ - section = {} - buildrequires = set() +@@ -57,7 +57,10 @@ suse_version_regex = re.compile('%suse_v + section_regexs = dict( + ([x, re.compile('^%' + x + '(?:\s|$)')] + for x in ('build', 'changelog', 'check', 'clean', 'description', 'files', +- 'install', 'package', 'prep'))) ++ 'install', 'package', 'prep', ++ 'pre', 'post', 'postun', 'trigger', 'triggerin', ++ 'triggerprein', 'triggerun', 'triggerpostun', ++ 'pretrans', 'posttrans'))) + + # Only check for /lib, /usr/lib, /usr/X11R6/lib + # TODO: better handling of X libraries and modules. +@@ -262,7 +265,9 @@ class SpecCheck(AbstractCheck.AbstractCh -- for sec in ['description', 'prep', 'build', 'install', 'clean', -- 'files', 'changelog', 'package', 'check']: -+ for sec in ('description', 'prep', 'build', 'install', 'clean', -+ 'files', 'changelog', 'package', 'check', -+ 'pre', 'post', 'postun', 'trigger', 'triggerin', -+ 'triggerprein', 'triggerun', 'triggerpostun', -+ 'pretrans', 'posttrans'): - section[sec] = { - 'count': 0, - 're': re.compile('^%' + sec + '(?:\s|$)'), -@@ -223,7 +226,9 @@ - if section_marker: continue - if current_section in ('prep', 'build'): diff --git a/check-buildroot-during-install.diff b/check-buildroot-during-install.diff index defe0fb..6af64f2 100644 --- a/check-buildroot-during-install.diff +++ b/check-buildroot-during-install.diff @@ -1,18 +1,20 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -32,7 +32,7 @@ - prefix_regex = re.compile('^Prefix\s*:\s*([^\s]+)', re.IGNORECASE) +@@ -34,7 +34,7 @@ prefix_regex = re.compile('^Prefix\s*:\s packager_regex = re.compile('^Packager\s*:\s*([^\s]+)', re.IGNORECASE) - make_check_regexp = re.compile('(^|\s|%{?__)make}?\s+(check|test)') + noarch_regex = re.compile('^BuildArch(?:itectures)?\s*:\s*\\bnoarch\\b', re.IGNORECASE) + make_check_regex = re.compile('(^|\s|%{?__)make}?\s+(check|test)') -rm_regex = re.compile('(^|\s)((.*/)?rm|%{?__rm}?) ') +rm_rf_regex = re.compile('(^|\s)((.*/)?rm|%{?__rm}?) -[fF]?[rR][^/]*$') rpm_buildroot_regex = re.compile('(\\\*)\${?RPM_BUILD_ROOT}?|(%+){?buildroot}?') configure_start_regex = re.compile('\./configure') configure_libdir_spec_regex = re.compile('ln |\./configure[^#]*--libdir=([^\s]+)[^#]*') -@@ -119,6 +140,14 @@ - return 1 +@@ -145,6 +145,14 @@ def contains_buildroot(line): return 0 - + + +def contains_create_buildroot(line): + '''Check if the line is of the form mkdir %{buildroot}.''' + line = line.strip() @@ -22,20 +24,20 @@ + return False + class SpecCheck(AbstractCheck.AbstractCheck): - + def __init__(self): -@@ -160,6 +167,7 @@ +@@ -192,6 +200,7 @@ class SpecCheck(AbstractCheck.AbstractCh ifarch_depth = -1 - current_section = 'package' - buildroot_clean={'clean':0 , 'install':0} + current_section = 'package' + buildroot_clean = {'clean': 0, 'install' : 0} + buildroot_created={'clean':False , 'install':True} depscript_override = 0 depgen_disabled = 0 indent_spaces = 0 -@@ -200,8 +208,13 @@ +@@ -261,8 +270,13 @@ class SpecCheck(AbstractCheck.AbstractCh printWarning(pkg, 'make-check-outside-check-section', line[:-1]) - if current_section in buildroot_clean.keys(): + if current_section in buildroot_clean: - if contains_buildroot(line) and rm_regex.search(line): + if buildroot_created[current_section] and \ + contains_buildroot(line) and rm_rf_regex.search(line): @@ -47,7 +49,7 @@ if ifarch_regex.search(line): if_depth = if_depth + 1 -@@ -337,6 +350,9 @@ +@@ -441,6 +455,9 @@ class SpecCheck(AbstractCheck.AbstractCh if not buildroot_clean[sect]: printError(pkg, 'no-cleaning-of-buildroot', '%' + sect) @@ -57,7 +59,7 @@ if not buildroot: printError(pkg, 'no-buildroot-tag') -@@ -483,6 +499,12 @@ +@@ -598,6 +615,12 @@ unpacking the sources.''', '''You should clean $RPM_BUILD_ROOT in the %clean section and just after the beginning of %install section. Use "rm -Rf $RPM_BUILD_ROOT".''', diff --git a/config b/config index a49fe9e..cb11150 100644 --- a/config +++ b/config @@ -220,6 +220,12 @@ addFilter("nfs-client\.\S+: \w: suse-filelist-forbidden-backup-file /var/lib/nfs addFilter("perl\.\S+: \w: suse-filelist-forbidden-perl-dir ") addFilter("info\.\S+: \w: info-dir-file .*/usr/share/info/dir") +# these packages are used for CD creation and are not supposed to be +# installed. It's still a dirty hack to make an exception. The +# packages should either be built in a separate project with +# different config or file be put somewhere below /opt/suse/* +addFilter("(?:dosutils|skelcd|installation-images|yast2-slide-show|instlux|skelcd-.*|patterns-.*)\.\S+: \w: suse-filelist-forbidden-fhs23 /CD1") + # suboptimal library packaging addFilter(" non-devel-buildrequires graphviz") addFilter(" non-devel-buildrequires ImageMagick") diff --git a/fix-buildroot-test.diff b/fix-buildroot-test.diff index 48862b6..1c82d63 100644 --- a/fix-buildroot-test.diff +++ b/fix-buildroot-test.diff @@ -1,11 +1,13 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -28,7 +28,7 @@ - applied_patch_p_regex = re.compile("-P\s*([\d]*)") +@@ -29,7 +29,7 @@ applied_patch_regex = re.compile("^%patc + applied_patch_p_regex = re.compile("\s-P\s+(\d+)\\b") source_dir_regex = re.compile("^[^#]*(\$RPM_SOURCE_DIR|%{?_sourcedir}?)") obsolete_tags_regex = re.compile("^(Copyright|Serial)\s*:\s*([^\s]+)") -buildroot_regex = re.compile('Buildroot\s*:\s*([^\s]+)', re.IGNORECASE) +buildroot_regex = re.compile('^\s*Buildroot\s*:\s*([^\s]+)', re.IGNORECASE) prefix_regex = re.compile('^Prefix\s*:\s*([^\s]+)', re.IGNORECASE) packager_regex = re.compile('^Packager\s*:\s*([^\s]+)', re.IGNORECASE) - make_check_regexp = re.compile('(^|\s|%{?__)make}?\s+(check|test)') + noarch_regex = re.compile('^BuildArch(?:itectures)?\s*:\s*\\bnoarch\\b', re.IGNORECASE) diff --git a/ignore-non-readable-in-etc.diff b/ignore-non-readable-in-etc.diff index 803fd9f..1f2c951 100644 --- a/ignore-non-readable-in-etc.diff +++ b/ignore-non-readable-in-etc.diff @@ -1,8 +1,10 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -948,7 +948,8 @@ - printWarning(pkg, 'non-executable-in-bin', f, oct(perm)) - if not devel_pkg and (includefile_regex.search(f) or buildconfigfile_regex.search(f)) and not is_doc: +@@ -980,7 +980,8 @@ class FilesCheck(AbstractCheck.AbstractC + (includefile_regex.search(f) or \ + develfile_regex.search(f) or is_buildconfig): printWarning(pkg, 'devel-file-in-non-devel-package', f) - if mode & 0444 != 0444 and perm & 07000 == 0 and f[0:len('/var/log')] != '/var/log': + if mode & 0444 != 0444 and perm & 07000 == 0 and \ diff --git a/no-badness-return.diff b/no-badness-return.diff index 9d5f319..f40ce3c 100644 --- a/no-badness-return.diff +++ b/no-badness-return.diff @@ -1,8 +1,8 @@ Index: Filter.py =================================================================== ---- Filter.py (Revision 1434) -+++ Filter.py (Arbeitskopie) -@@ -96,10 +96,6 @@ def _diag_compare(x,y): +--- Filter.py.orig ++++ Filter.py +@@ -101,10 +101,6 @@ def _diag_compare(x, y): def printAllReasons(): @@ -12,41 +12,40 @@ Index: Filter.py - global _badness_score, _diagnostic _diagnostic.sort(_diag_compare) - last_reason='' -@@ -114,8 +110,6 @@ def printAllReasons(): + last_reason = '' +@@ -119,8 +115,6 @@ def printAllReasons(): if Config.info and len(last_reason): printDescriptions(last_reason) _diagnostic = list() - return _badness_score > threshold - - _details={} + _details = {} Index: rpmlint.py =================================================================== ---- rpmlint.py (Revision 1434) -+++ rpmlint.py (Arbeitskopie) -@@ -155,9 +155,7 @@ def main(): - sys.stderr.write('Interrupted, exiting while scanning all packages\n') +--- rpmlint.py.orig ++++ rpmlint.py +@@ -170,15 +170,19 @@ def main(): + sys.stderr.write('(none): E: interrupted, exiting while scanning all packages\n') sys.exit(2) - if printAllReasons(): -- sys.stderr.write('rpmlint: E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold())) +- sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold())) - sys.exit(66) + printAllReasons() finally: - pkg and pkg.cleanup() -@@ -165,6 +163,12 @@ def main(): + print "%d packages and %d specfiles checked; %d errors, %d warnings." \ % (packages_checked, specfiles_checked, printed_messages["E"], printed_messages["W"]) + if (badnessThreshold() >= 0): + if badnessScore() >= badnessThreshold(): -+ sys.stderr.write('rpmlint: E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold())) ++ sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold())) + sys.exit(66) + sys.exit(0) + if printed_messages["E"] > 0: sys.exit(64) - elif printed_messages["W"] > 0: + sys.exit(0) diff --git a/no-doc-for-lib.diff b/no-doc-for-lib.diff index 98639cc..77ab3d5 100644 --- a/no-doc-for-lib.diff +++ b/no-doc-for-lib.diff @@ -1,11 +1,13 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -292,7 +292,7 @@ - log_file=0 - logrotate_file=0 +@@ -772,7 +772,7 @@ class FilesCheck(AbstractCheck.AbstractC + log_file = 0 + logrotate_file = 0 - if not doc_files: + if not lib_package and not doc_files: printWarning(pkg, 'no-documentation') - if len(files.keys()) and meta_package_re.search(pkg.name): + if files: diff --git a/rpmgroup-checks.diff b/rpmgroup-checks.diff index 12d6ad9..5bce7fd 100644 --- a/rpmgroup-checks.diff +++ b/rpmgroup-checks.diff @@ -1,11 +1,13 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -586,6 +586,8 @@ class TagsCheck(AbstractCheck.AbstractCheck): +@@ -601,6 +601,8 @@ class TagsCheck(AbstractCheck.AbstractCh else: if VALID_GROUPS and group not in VALID_GROUPS: printWarning(pkg, 'non-standard-group', group) + if pkg.name.find('-devel') != -1 and not group.startswith('Development/'): + printWarning(pkg, 'devel-package-with-non-devel-group', group) - buildhost=pkg[rpm.RPMTAG_BUILDHOST] + buildhost = pkg[rpm.RPMTAG_BUILDHOST] if not buildhost: diff --git a/rpmlint.changes b/rpmlint.changes index dc8c45f..f1dd0f5 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Wed Aug 26 09:28:14 UTC 2009 - lnussel@suse.de + +- disable bogus patch to InitScriptCheck.py. Causes failures and + needs to be reworked +- fix and add weak dependencies patch again to make some suse checks + work + +------------------------------------------------------------------- +Wed Aug 26 09:08:13 UTC 2009 - lnussel@suse.de + +- fix CheckPkgConfig.py to work with rpmlint 0.87 + +------------------------------------------------------------------- +Wed Aug 26 07:08:03 UTC 2009 - lnussel@suse.de + +- refresh some patches to remove fuzz +- BuildIgnore rpmlint-mini as it is currently broken + +------------------------------------------------------------------- +Mon Aug 24 11:56:55 UTC 2009 - lnussel@suse.de + +- don't import pprint in CheckSUIDPermissions.py +- remove /selinux again. No package except 'filesystem' is supposed + to include that. +- add filter for FHS violation of skelcd type packages +- fix some more suse patches + ------------------------------------------------------------------- Mon Aug 10 08:07:25 CEST 2009 - thomas@novell.com diff --git a/rpmlint.spec b/rpmlint.spec index fa54161..9b7499f 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -17,12 +17,13 @@ # norootforbuild +#!BuildIgnore: rpmlint-mini Name: rpmlint BuildRequires: rpm-python Summary: Rpm correctness checker Version: 0.87 -Release: 1 +Release: 2 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -72,11 +73,13 @@ Patch20: xdg-paths-update.diff Patch21: fix-buildroot-test.diff Patch22: better-wrong-script.diff Patch23: buildroot-doc.diff +# bogus, fails with aaa_base. disabled Patch24: sysv5-init-checks.diff Patch26: ignore-non-readable-in-etc.diff Patch27: detailed-desktop-file-check.diff Patch29: rpmgroup-checks.diff Patch30: devel-provide-is-devel-package.diff +# what's the reason behind that one? Patch31: only-reg-files-are-scripts.diff Patch33: check-buildroot-during-install.diff Patch34: verify-buildrequires.diff @@ -86,17 +89,18 @@ Patch39: libtool-wrapper-check.diff Patch41: perl-versioned-rpath-deps.diff Patch42: check-cron-dependency.diff Patch46: locale-support.diff +# not is also in CheckFilelist.py Patch47: noarch-lib64.diff Patch49: stricter-tags-check.diff Patch50: suse-no-run-ldconfig.diff Patch51: description-check.diff +# this is the wrong place here Patch52: suppress-for-perl-python.diff Patch54: locale-update.diff Patch57: suse-mono-deps-checks.diff Patch58: add-weak-dependencies.diff Patch60: selfconflicts-provide.diff Patch62: no-badness-return.diff -Patch63: suse-factory-config.diff Patch65: suse-shlib-devel-dependency.diff Patch66: suse-no-python-base.diff Patch67: suse-required-lsb-tags.diff @@ -120,7 +124,7 @@ Authors: %prep %setup -q -n rpmlint-%{version} -%patch +%patch0 %patch2 %patch3 %patch4 @@ -141,39 +145,40 @@ Authors: %patch21 %patch22 %patch23 -%patch24 +# bogus, fails with aaa_base. disabled +#patch24 %patch26 %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 cp -p %{SOURCE1} . cp -p %{SOURCE2} . cp -p %{SOURCE3} . diff --git a/suse-bzip-bigger-than-100k.diff b/suse-bzip-bigger-than-100k.diff index e792901..83914f8 100644 --- a/suse-bzip-bigger-than-100k.diff +++ b/suse-bzip-bigger-than-100k.diff @@ -1,6 +1,8 @@ ---- SourceCheck.py +Index: SourceCheck.py +=================================================================== +--- SourceCheck.py.orig +++ SourceCheck.py -@@ -17,7 +17,7 @@ +@@ -17,7 +17,7 @@ import Config DEFAULT_VALID_SRC_PERMS = (0644, 0755) @@ -9,16 +11,16 @@ use_bzip2 = Config.getOption('UseBzip2', 1) valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS) -@@ -40,7 +40,7 @@ +@@ -40,7 +40,7 @@ class SourceCheck(AbstractCheck.Abstract printError(pkg, 'multiple-specfiles', spec_file, fname) else: spec_file = fname - elif source_regex.search(fname): -+ elif source_regex.search(fname) and files[f][4] > 120*1024: ++ elif source_regex.search(fname) and pkgfile.size > 120*1024: if use_bzip2: if not fname.endswith('.bz2'): printWarning(pkg, 'source-or-patch-not-bzipped', fname) -@@ -61,7 +61,9 @@ +@@ -61,7 +61,9 @@ all your RPM information.''', 'source-or-patch-not-bzipped', '''A source archive or file in your package is not bzipped (doesn't diff --git a/suse-checks.diff b/suse-checks.diff index e087515..b89e404 100644 --- a/suse-checks.diff +++ b/suse-checks.diff @@ -1,10 +1,12 @@ ---- Config.py +Index: Config.py +=================================================================== +--- Config.py.orig +++ Config.py -@@ -20,7 +20,6 @@ +@@ -20,7 +20,6 @@ DEFAULT_CHECKS = ("DistributionCheck", "FilesCheck", "DocFilesCheck", "FHSCheck", - "SignatureCheck", "I18NCheck", - "MenuCheck", "PostCheck", + "InitScriptCheck", diff --git a/suse-debuginfo.diff b/suse-debuginfo.diff index 3b59b14..6b34191 100644 --- a/suse-debuginfo.diff +++ b/suse-debuginfo.diff @@ -1,7 +1,9 @@ ---- BinariesCheck.py +Index: BinariesCheck.py +=================================================================== +--- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -36,6 +36,8 @@ - debug_file_regex=re.compile('\.debug$') +@@ -39,6 +39,8 @@ class BinaryInfo: + debug_file_regex = re.compile('\.debug$') exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)') fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)') + debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+') @@ -9,7 +11,7 @@ def __init__(self, pkg, path, file, is_ar, is_shlib): self.readelf_error = 0 -@@ -50,6 +52,8 @@ +@@ -53,6 +55,8 @@ class BinaryInfo: self.exec_stack = 0 self.exit_calls = [] fork_called = 0 @@ -17,8 +19,8 @@ + self.symtab=0 self.tail = '' - is_debug=BinaryInfo.debug_file_regex.search(path) -@@ -102,6 +106,14 @@ + is_debug = BinaryInfo.debug_file_regex.search(path) +@@ -105,6 +109,14 @@ class BinaryInfo: fork_called = 1 continue @@ -31,11 +33,11 @@ + continue + if self.non_pic: - self.non_pic=BinaryInfo.non_pic_regex.search(res[1]) + self.non_pic = BinaryInfo.non_pic_regex.search(res[1]) -@@ -249,6 +261,17 @@ - # inspect binary file - bin_info=BinaryInfo(pkg, pkg.dirName()+i[0], i[0], is_ar, is_shlib) +@@ -260,6 +272,17 @@ class BinariesCheck(AbstractCheck.Abstra + bin_info = BinaryInfo( + pkg, pkgfile.path, fname, is_ar, is_shlib) + # stripped static library + if is_ar: @@ -50,8 +52,8 @@ + # so name in library if is_shlib: - has_lib.append(i[0]) -@@ -475,6 +498,14 @@ + has_lib = True +@@ -488,6 +511,14 @@ with the intended shared libraries only. 'ldd-failed', '''Executing ldd on this file failed, all checks could not be run.''', diff --git a/suse-factory-config.diff b/suse-factory-config.diff deleted file mode 100644 index 6b5d147..0000000 --- a/suse-factory-config.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- rpmlint.py -+++ rpmlint.py -@@ -225,7 +225,7 @@ conf_file='~/.rpmlintrc' - info_error=0 - - # load global config files --for f in ('/usr/share/rpmlint/config','/etc/rpmlint/config'): -+for f in ('/usr/share/rpmlint/config','/etc/rpmlint/config','/etc/rpmlint/factory.config'): - try: - execfile(f) - except IOError: diff --git a/suse-filesystem.diff b/suse-filesystem.diff index 418c2fe..6021fb3 100644 --- a/suse-filesystem.diff +++ b/suse-filesystem.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -26,65 +26,114 @@ +@@ -27,65 +27,114 @@ STANDARD_DIRS = ( '/', '/bin', '/boot', @@ -142,7 +144,7 @@ '/usr/local/lib', '/usr/local/lib64', '/usr/local/man', -@@ -100,24 +149,415 @@ +@@ -101,24 +150,415 @@ STANDARD_DIRS = ( '/usr/local/man/mann', '/usr/local/sbin', '/usr/local/share', @@ -569,7 +571,7 @@ '/usr/share/man', '/usr/share/man/man1', '/usr/share/man/man2', -@@ -129,28 +569,60 @@ +@@ -130,28 +570,60 @@ STANDARD_DIRS = ( '/usr/share/man/man8', '/usr/share/man/man9', '/usr/share/man/mann', @@ -635,4 +637,4 @@ + '/var/tmp/vi.recover', ) - DEFAULT_GAMES_GROUPS='Games' + DEFAULT_GAMES_GROUPS = 'Games' diff --git a/suse-no-run-ldconfig.diff b/suse-no-run-ldconfig.diff index cb441f6..26788dd 100644 --- a/suse-no-run-ldconfig.diff +++ b/suse-no-run-ldconfig.diff @@ -1,8 +1,10 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -359,6 +359,10 @@ class SpecCheck(AbstractCheck.AbstractCheck): - if scriptlet_requires_regex.search(line) and current_section == 'package': - printError(pkg, 'broken-syntax-in-scriptlet-requires', string.strip(line)) +@@ -387,6 +387,10 @@ class SpecCheck(AbstractCheck.AbstractCh + for obs in unversioned(deptokens(res.group(1))): + printWarning(pkg, 'unversioned-explicit-obsoletes', obs) + if current_section in ('post', 'postun'): + if line.find('%run_ldconfig') != -1: @@ -11,7 +13,7 @@ if current_section == 'changelog': res = macro_regex.search(line) if res and len(res.group(1)) % 2: -@@ -572,6 +576,14 @@ will break short circuiting.''', +@@ -602,6 +606,14 @@ will break short circuiting.''', '''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.''', diff --git a/version-control-internal-file.diff b/version-control-internal-file.diff index 873f141..8f86904 100644 --- a/version-control-internal-file.diff +++ b/version-control-internal-file.diff @@ -1,14 +1,14 @@ also detect RCS files -Index: rpmlint-0.84/FilesCheck.py +Index: FilesCheck.py =================================================================== ---- rpmlint-0.84.orig/FilesCheck.py -+++ rpmlint-0.84/FilesCheck.py -@@ -655,7 +655,7 @@ ldconfig_regex=re.compile('^[^#]*ldconfi - depmod_regex=re.compile('^[^#]*depmod', re.MULTILINE) - install_info_regex=re.compile('^[^#]*install-info', re.MULTILINE) - perl_temp_file=re.compile('.*perl.*/(\.packlist|perllocal\.pod)$') --scm_regex=re.compile('/CVS/[^/]+$|/\.(cvs|git|hg)ignore$|/\.hgtags$|/\.(git|hg|svn)/|/(\.arch-ids|{arch})/') -+scm_regex=re.compile('/(CVS|RCS)(/[^/]+)?$|/\.(cvs|git|hg)ignore$|/\.hgtags$|/\.(git|hg|svn)/|/(\.arch-ids|{arch})/|,v$') - htaccess_regex=re.compile('\.htaccess$') - games_path_regex=re.compile('^/usr(/lib(64)?)?/games/') - games_group_regex=re.compile(Config.getOption('RpmGamesGroups', DEFAULT_GAMES_GROUPS)) +--- FilesCheck.py.orig ++++ FilesCheck.py +@@ -662,7 +662,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon + depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE) + install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE) + perl_temp_file_regex = re.compile('.*perl.*/(\.packlist|perllocal\.pod)$') +-scm_regex = re.compile('/CVS/[^/]+$|/\.(bzr|cvs|git|hg)ignore$|/\.hgtags$|/\.(bzr|git|hg|svn)/|/(\.arch-ids|{arch})/') ++scm_regex=re.compile('/(CVS|RCS)(/[^/]+)?$|/\.(bzr|cvs|git|hg)ignore$|/\.hgtags$|/\.(bzr|git|hg|svn)/|/(\.arch-ids|{arch})/|,v$') + games_path_regex = re.compile('^/usr(/lib(64)?)?/games/') + games_group_regex = re.compile(Config.getOption('RpmGamesGroups', DEFAULT_GAMES_GROUPS)) + dangling_exceptions = Config.getOption('DanglingSymlinkExceptions', DEFAULT_DANGLING_EXCEPTIONS)