SHA256
1
0
forked from pool/rpmlint

Accepting request 70781 from devel:openSUSE:Factory:rpmlint

- update legacy filter in shlib policy checker

- new version 1.2
  * Check outdated or misspelled FSF addresses in text files.

OBS-URL: https://build.opensuse.org/request/show/70781
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=115
This commit is contained in:
Sascha Peilicke 2011-05-20 13:12:20 +00:00 committed by Git OBS Bridge
commit 0327a46094
38 changed files with 181 additions and 326 deletions

View File

@ -20,88 +20,37 @@ import Pkg
_policy_legacy_exceptions = ( _policy_legacy_exceptions = (
"libacl1", "libacl1",
"libaio1", "libaio1",
"libakode_mpeg_decoder",
"libalut0", "libalut0",
"libamso-rdmav2",
"libapr-1-0", "libapr-1-0",
"libapr_dbd_mysql",
"libapr_dbd_pgsql",
"libapr_dbd_sqlite3",
"libaprutil-1-0", "libaprutil-1-0",
"libapt-pkg-libc6_6-6-2",
"libart_lgpl_2-2",
"libartskde1", "libartskde1",
"libatm1",
"libattr1", "libattr1",
"libauthldap0",
"libauthmysql0",
"libauthpgsql0",
"libauthpipe0",
"libauthuserdb0",
"libcairo2",
"libcairomm-1_0-1",
"libcap1",
"libcasakwallet1",
"libc-client2006c1_suse",
"libccrtp1-1_5-0",
"libcdaudio1", "libcdaudio1",
"libcdk4", "libcdk4",
"libcheck0", "libcheck0",
"libchewing3", "libchewing3",
"libchm0", "libchm0",
"libclalsadrv1",
"libclthreads2",
"libclucene0", "libclucene0",
"libclxclient3",
"libcole2",
"libcppunit-1_10-2",
"libdar4", "libdar4",
"libdbh-4_5-4", "libdbh-4_5-4",
"libdb_java-4_3",
"libdbus-glib-1-2",
"libdbus-qt-1-1", "libdbus-qt-1-1",
"libdc0",
"libdm0", "libdm0",
"libdns_sd1", "libdns_sd1",
"libdrm2",
"libdts0",
"libdvdcss2",
"libdvdnav4",
"libebml0",
"libefence0", "libefence0",
"libEMF1", "libEMF1",
"libevent-1_3b1",
"libevolutionglue", "libevolutionglue",
"libexif12",
"libexif9",
"libexif-gtk4",
"libexiv2-0",
"libf2c0", "libf2c0",
"libffi4", "libffi4",
"libflaim5_2", "libflaim5_2",
"libFnlib0",
"libfontenc1", "libfontenc1",
"libfreebob0",
"libfreeradius-client2", "libfreeradius-client2",
"libfreetype6",
"libftgl0",
"libg2banking2",
"libg2c0",
"libgadu3",
"libgalago3",
"libgalago-gtk1",
"libganglia1",
"libgcc_s1", "libgcc_s1",
"libgcc_s4", # only for hppa "libgcc_s4", # only for hppa
"libgconfmm-2_6-1", "libgconfmm-2_6-1",
"libgdome0", "libgfortran3",
"libghttp1",
"libgif4", "libgif4",
"libgimpprint1", "libgimpprint1",
"libgfortran1", # gcc41
"libglade-2_0-0",
"libgladesharpglue-2", "libgladesharpglue-2",
"libgle3",
"libglibsharpglue-2", "libglibsharpglue-2",
"libgltt0", "libgltt0",
"libglut3", "libglut3",
@ -109,9 +58,7 @@ _policy_legacy_exceptions = (
"libgmcop1", "libgmcop1",
"libgnet-2_0-0", "libgnet-2_0-0",
"libgnomecanvasmm-2_6-1", "libgnomecanvasmm-2_6-1",
"libgnomecanvaspixbuf1",
"libgnomecups-1_0-1", "libgnomecups-1_0-1",
"libgnome-keyring0",
"libgnomemm-2_6-1", "libgnomemm-2_6-1",
"libgnomeprintui-2-2-0", "libgnomeprintui-2-2-0",
"libgnomesharpglue-2", "libgnomesharpglue-2",
@ -119,185 +66,61 @@ _policy_legacy_exceptions = (
"libgomp1", "libgomp1",
"libgsfglue", "libgsfglue",
"libgsf-gnome-1-114", "libgsf-gnome-1-114",
"libgssapi2",
"libgtkgl4",
"libgtkhtml-2-0",
"libgtksourceview-1_0-0", "libgtksourceview-1_0-0",
"libgtkspell0", "libgtkspell0",
"libgtkxmhtml1",
"libhandle1",
"libhangul0", "libhangul0",
"libHermes1",
"libibcm1",
"libibverbs1",
"libICE6", "libICE6",
"libid3-3_8-3", "libid3-3_8-3",
"libid3tag0", "libid3tag0",
"libieee1284-3",
"libIDL-2-0",
"libidmef0",
"libidn11", "libidn11",
"libiec61883-0", "libiec61883-0",
"libieee1284-3",
"libilbc0", "libilbc0",
"libind_helper0", "libind_helper0",
"libiniparser0",
"libInternalSymbols1",
"libipathverbs-rdmav2",
"libiterm1", "libiterm1",
"libjackasyn0", "libjackasyn0",
"libjasper1",
"libJNIChangeHat1",
"libjpeg62",
"libkakasi2", "libkakasi2",
"libkbanking1",
"libkcddb5",
"libkcompactdisc1",
"libkdegames5",
"libkexiv2-1",
"libkeyutils1", "libkeyutils1",
"libksba8", "libksba8",
"libkscan1",
"libktoblzcheck1",
"libkxmleditorpart1",
"liblash2",
"libldapcpp0",
"liblite0",
"liblo0", "liblo0",
"libloudmouth-1-0",
"libltdl3",
"liblua5_1",
"liblzo2-2",
"libmad0",
"libmal0", "libmal0",
"libmatroska0",
"libmcrypt4", "libmcrypt4",
"libmdbodbc0", "libmdbodbc0",
"libmeanwhile1", "libmeanwhile1",
"libmemcache0",
"libmhash2", "libmhash2",
"libmikmod2", "libmikmod2",
"libmng1", "libmng1",
"libmono-profiler-heap-buddy0",
"libmp3lame0",
"libmpcdec3",
"libmpeg-0_3_0", # kdemultimedia3-mad
"libmsrpc0",
"libmthca-rdmav2",
"libnasl2",
"libneon24",
"libnet0",
"libnet6-1_3-0", "libnet6-1_3-0",
"libnfsidmap0",
"libnl1", "libnl1",
"libnm_glib0",
"libnm-novellvpn-properties0",
"libnm-openvpn-properties0",
"libnm-vpnc-properties0",
"libnscd1", "libnscd1",
"libnvtvsimple0", "libobjc3",
"libobby-0_4-0",
"libobjc1",
"libobjc2",
"libodbcinstQ1", "libodbcinstQ1",
"liboggz1",
"liboil-0_3-0", "liboil-0_3-0",
"libol-0_3_18",
"liboop4", "liboop4",
"libopal2_2",
"libopenal0", "libopenal0",
"libopencdk8",
"libopenobex1",
"libopenobex-glib1",
"libotf0",
"libparagui-1_0-0",
"libpathan3",
"libpcap0",
"libpcd2",
"libpgeasy3", "libpgeasy3",
"libpoppler1",
"libpopt0",
"libportaudio2", "libportaudio2",
"libpowersave11",
"libpq++4",
"libpri1_0",
"libPropList0",
"libpt1_10",
"libpth20",
"libpythonize0",
"libqainternal0",
"libqainternalperl0",
"libqca1",
"libqnotify0", "libqnotify0",
"libqscintilla6",
"libQt3Support4", "libQt3Support4",
"libqtc1", "libqtc1",
"libQtDBus4",
"libqtsharp0", "libqtsharp0",
"libQtSql4", "libQtSql4",
"libquadmath0",
"librdf0", "librdf0",
"librekall_driver_xbase245",
"librekall_driver_sqlite3-245",
"librekall_driver_pgsql245",
"librekall_driver_mysql245",
"librdmacm1",
"librlog1",
"librpcsecgss3",
"librsync1", "librsync1",
"libsamplerate0", "libsamplerate0",
"libsax7",
"libSDL-1_2-0",
"libSDL_gfx0",
"libSDL_image-1_2-0",
"libSDLmm-0_1-8",
"libSDL_net-1_2-0",
"libSDL_Pango1",
"libSDL_ttf-2_0-0",
"libsecprog0", "libsecprog0",
"libserdisp1",
"libsexy2", "libsexy2",
"libsigc-1_2-5", "libsigc-1_2-5",
"libsigc-2_0-0",
"libSM6", "libSM6",
"libsmbclient0",
"libsmbios1",
"libsmbiosxml1",
"libsmbsharemodes0",
"libsmi2",
"libsndfile1", "libsndfile1",
"libsoup-2_2-8",
"libspandsp0",
"libspeex1",
"libstartup-notification-1-0",
"libstdc++5",
"libstdc++6", "libstdc++6",
"libstroke0", "libstroke0",
"libstunnel",
"libsvg1",
"libsvg-cairo1",
"libswfdec-0_4-2",
"libsynaptics0",
"libsysfs2",
"libtclsqlite3-0",
"libtelepathy2",
"libthai0", "libthai0",
"libthinkfinger0",
"libtidy-0_99-0",
"libtomoe-gtk0",
"libtonezone1_0",
"libtre4",
"libutempter0", "libutempter0",
"libvirt0",
"libvisual-0_4-0", "libvisual-0_4-0",
"libvolume_id0",
"libvtesharpglue-2",
"libwnck-1-18",
"libwnn1",
"libwv2-1",
"libwx_gtk2u_gl-2_8-0",
"libx86-1",
"libXau6", "libXau6",
"libxclass0_9_2", "libxclass0_9_2",
"libxcrypt1",
"libXdmcp6", "libXdmcp6",
"libXext6", "libXext6",
"libxfce4util4", "libxfce4util4",
@ -306,22 +129,14 @@ _policy_legacy_exceptions = (
"libxflaim3_2", "libxflaim3_2",
"libXiterm1", "libXiterm1",
"libxkbfile1", "libxkbfile1",
"libxklavier11",
"libxml1",
"libxml2-2", "libxml2-2",
"libxml++-2_6-2",
"libXp6", "libXp6",
"libXprintUtil1", "libXprintUtil1",
"libxquery-1_2",
"libXrender1", "libXrender1",
"libXt6", "libXt6",
"libXv1", "libXv1",
"libxvidcore4",
"liby2storage2",
"liby2util3",
"libz1", "libz1",
"libzio0", "libzio0"
"libzrtpcpp-0_9-0",
) )
_essential_dependencies = ( _essential_dependencies = (
@ -565,7 +380,8 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck):
if len(libs) == 1: if len(libs) == 1:
soname = libs.copy().pop() soname = libs.copy().pop()
libname = libname_from_soname (soname) libname = libname_from_soname (soname)
if libname.startswith('lib') and pkg.name != libname: if libname.startswith('lib') and pkg.name != libname and \
pkg.name != libname + "-mini":
if libname in _policy_legacy_exceptions: if libname in _policy_legacy_exceptions:
printWarning(pkg, 'shlib-legacy-policy-name-error', libname) printWarning(pkg, 'shlib-legacy-policy-name-error', libname)
else: else:

View File

@ -2,7 +2,7 @@ Index: Pkg.py
=================================================================== ===================================================================
--- Pkg.py.orig --- Pkg.py.orig
+++ Pkg.py +++ Pkg.py
@@ -429,6 +429,10 @@ class Pkg: @@ -425,6 +425,10 @@ class Pkg:
self._missingok_files = None self._missingok_files = None
self._files = None self._files = None
self._requires = None self._requires = None
@ -13,7 +13,7 @@ Index: Pkg.py
self._req_names = -1 self._req_names = -1
if header: if header:
@@ -666,6 +670,22 @@ class Pkg: @@ -672,6 +676,22 @@ class Pkg:
self._gatherDepInfo() self._gatherDepInfo()
return self._requires return self._requires
@ -36,7 +36,7 @@ Index: Pkg.py
def prereq(self): def prereq(self):
"""Get package PreReqs as list of """Get package PreReqs as list of
(name, flags, (epoch, version, release)) tuples.""" (name, flags, (epoch, version, release)) tuples."""
@@ -702,7 +722,7 @@ class Pkg: @@ -708,7 +728,7 @@ class Pkg:
# internal function to gather dependency info used by the above ones # internal function to gather dependency info used by the above ones
def _gather_aux(self, header, list, nametag, flagstag, versiontag, def _gather_aux(self, header, list, nametag, flagstag, versiontag,
@ -45,7 +45,7 @@ Index: Pkg.py
names = header[nametag] names = header[nametag]
flags = header[flagstag] flags = header[flagstag]
versions = header[versiontag] versions = header[versiontag]
@@ -713,7 +733,11 @@ class Pkg: @@ -719,7 +739,11 @@ class Pkg:
if prereq is not None and flags[loop] & PREREQ_FLAG: if prereq is not None and flags[loop] & PREREQ_FLAG:
prereq.append((names[loop], flags[loop] & (~PREREQ_FLAG), prereq.append((names[loop], flags[loop] & (~PREREQ_FLAG),
evr)) evr))
@ -58,7 +58,7 @@ Index: Pkg.py
list.append((names[loop], flags[loop], evr)) list.append((names[loop], flags[loop], evr))
def _gatherDepInfo(self): def _gatherDepInfo(self):
@@ -723,6 +747,10 @@ class Pkg: @@ -729,6 +753,10 @@ class Pkg:
self._provides = [] self._provides = []
self._conflicts = [] self._conflicts = []
self._obsoletes = [] self._obsoletes = []
@ -69,7 +69,7 @@ Index: Pkg.py
self._gather_aux(self.header, self._requires, self._gather_aux(self.header, self._requires,
rpm.RPMTAG_REQUIRENAME, rpm.RPMTAG_REQUIRENAME,
@@ -742,6 +770,32 @@ class Pkg: @@ -748,6 +776,32 @@ class Pkg:
rpm.RPMTAG_OBSOLETEFLAGS, rpm.RPMTAG_OBSOLETEFLAGS,
rpm.RPMTAG_OBSOLETEVERSION) rpm.RPMTAG_OBSOLETEVERSION)

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -1679,7 +1679,10 @@ executed.''', @@ -1700,7 +1700,10 @@ executed.''',
executed.''', executed.''',
'wrong-script-interpreter', 'wrong-script-interpreter',

View File

@ -2,7 +2,7 @@ Index: SpecCheck.py
=================================================================== ===================================================================
--- SpecCheck.py.orig --- SpecCheck.py.orig
+++ SpecCheck.py +++ SpecCheck.py
@@ -619,7 +619,7 @@ versions you can ignore this warning.''' @@ -620,7 +620,7 @@ versions you can ignore this warning.'''
'hardcoded-path-in-buildroot-tag', 'hardcoded-path-in-buildroot-tag',
'''A path is hardcoded in your Buildroot tag. It should be replaced '''A path is hardcoded in your Buildroot tag. It should be replaced

View File

@ -1,10 +1,10 @@
# Confusing message. The problem is not that the file does not end # Confusing message. The problem is not that the file does not end
# with ".spec", but that there is a mismatch of specname and pkg name. # with ".spec", but that there is a mismatch of specname and pkg name.
Index: rpmlint-1.1/SpecCheck.py Index: rpmlint-1.2/SpecCheck.py
=================================================================== ===================================================================
--- rpmlint-1.1.orig/SpecCheck.py --- rpmlint-1.2.orig/SpecCheck.py
+++ rpmlint-1.1/SpecCheck.py +++ rpmlint-1.2/SpecCheck.py
@@ -593,8 +593,8 @@ addDetails( @@ -594,8 +594,8 @@ addDetails(
SPEC file to build a valid RPM package.''', SPEC file to build a valid RPM package.''',
'invalid-spec-name', 'invalid-spec-name',

View File

@ -2,7 +2,7 @@ Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -702,6 +702,9 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -704,6 +704,9 @@ class TagsCheck(AbstractCheck.AbstractCh
if not description: if not description:
printError(pkg, 'no-description-tag') printError(pkg, 'no-description-tag')
else: else:
@ -12,7 +12,7 @@ Index: TagsCheck.py
if not pkg[rpm.RPMTAG_HEADERI18NTABLE]: if not pkg[rpm.RPMTAG_HEADERI18NTABLE]:
self._unexpanded_macros(pkg, '%description', description) self._unexpanded_macros(pkg, '%description', description)
else: else:
@@ -983,6 +986,10 @@ Name tag.''', @@ -985,6 +988,10 @@ Name tag.''',
'''The major number of the library isn't included in the package's name. '''The major number of the library isn't included in the package's name.
''', ''',

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -842,6 +842,10 @@ class FilesCheck(AbstractCheck.AbstractC @@ -846,6 +846,10 @@ class FilesCheck(AbstractCheck.AbstractC
# Check if the package is a development package # Check if the package is a development package
devel_pkg = devel_regex.search(pkg.name) devel_pkg = devel_regex.search(pkg.name)

View File

@ -10,7 +10,7 @@ Index: FilesCheck.py
# room for improvement with catching more -R, but also for false positives... # room for improvement with catching more -R, but also for false positives...
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b') buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$') sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
@@ -1188,7 +1189,7 @@ class FilesCheck(AbstractCheck.AbstractC @@ -1202,7 +1203,7 @@ class FilesCheck(AbstractCheck.AbstractC
includefile_regex.search(f) or \ includefile_regex.search(f) or \
develfile_regex.search(f) or \ develfile_regex.search(f) or \
logrotate_regex.search(f) logrotate_regex.search(f)
@ -19,7 +19,7 @@ Index: FilesCheck.py
printWarning(pkg, 'spurious-executable-perm', f) printWarning(pkg, 'spurious-executable-perm', f)
elif f.startswith('/etc/') and f not in config_files and \ elif f.startswith('/etc/') and f not in config_files and \
f not in ghost_files: f not in ghost_files:
@@ -1553,7 +1554,10 @@ included in your package.''', @@ -1574,7 +1575,10 @@ included in your package.''',
'spurious-executable-perm', 'spurious-executable-perm',
'''The file is installed with executable permissions, but was identified as one '''The file is installed with executable permissions, but was identified as one
that probably should not be executable. Verify if the executable bits are that probably should not be executable. Verify if the executable bits are

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -1206,7 +1206,7 @@ class FilesCheck(AbstractCheck.AbstractC @@ -1220,7 +1220,7 @@ class FilesCheck(AbstractCheck.AbstractC
if nonexec_file and not docdir_examples_regex.search(f): if nonexec_file and not docdir_examples_regex.search(f):
printWarning(pkg, 'spurious-executable-perm', f) printWarning(pkg, 'spurious-executable-perm', f)
elif f.startswith('/etc/') and f not in config_files and \ elif f.startswith('/etc/') and f not in config_files and \

View File

@ -10,7 +10,7 @@ Index: TagsCheck.py
use_epoch = Config.getOption('UseEpoch', False) use_epoch = Config.getOption('UseEpoch', False)
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
max_line_len = Config.getOption('MaxLineLength', 79) max_line_len = Config.getOption('MaxLineLength', 79)
@@ -601,6 +602,9 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -603,6 +604,9 @@ class TagsCheck(AbstractCheck.AbstractCh
if d[0].startswith('/usr/local/'): if d[0].startswith('/usr/local/'):
printError(pkg, 'invalid-dependency', d[0]) printError(pkg, 'invalid-dependency', d[0])
@ -20,7 +20,7 @@ Index: TagsCheck.py
if not devel_depend and not is_devel and not is_source and \ if not devel_depend and not is_devel and not is_source and \
FilesCheck.devel_regex.search(d[0]): FilesCheck.devel_regex.search(d[0]):
printError(pkg, 'devel-dependency', d[0]) printError(pkg, 'devel-dependency', d[0])
@@ -1085,6 +1089,12 @@ explicit Requires: tags.''', @@ -1087,6 +1091,12 @@ explicit Requires: tags.''',
'''This package provides 2 times the same capacity. It should only provide it '''This package provides 2 times the same capacity. It should only provide it
once.''', once.''',

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -859,7 +859,7 @@ class FilesCheck(AbstractCheck.AbstractC @@ -863,7 +863,7 @@ class FilesCheck(AbstractCheck.AbstractC
debuginfo_srcs = False debuginfo_srcs = False
debuginfo_debugs = False debuginfo_debugs = False

View File

@ -1,6 +1,8 @@
--- BinariesCheck.py Index: BinariesCheck.py
===================================================================
--- BinariesCheck.py.orig
+++ BinariesCheck.py +++ BinariesCheck.py
@@ -223,6 +223,7 @@ @@ -232,6 +232,7 @@ class BinariesCheck(AbstractCheck.Abstra
binary = False binary = False
binary_in_usr_lib = False binary_in_usr_lib = False
has_usr_lib_file = False has_usr_lib_file = False
@ -8,7 +10,7 @@
multi_pkg = False multi_pkg = False
res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '') res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '')
@@ -239,6 +240,10 @@ @@ -248,6 +249,10 @@ class BinariesCheck(AbstractCheck.Abstra
# only-non-binary-in-usr-lib false positives # only-non-binary-in-usr-lib false positives
binary_in_usr_lib = True binary_in_usr_lib = True
@ -19,7 +21,7 @@
is_elf = 'ELF' in pkgfile.magic is_elf = 'ELF' in pkgfile.magic
is_ar = 'current ar archive' in pkgfile.magic is_ar = 'current ar archive' in pkgfile.magic
is_ocaml_native = 'Objective caml native' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic
@@ -433,9 +438,12 @@ @@ -442,9 +447,12 @@ class BinariesCheck(AbstractCheck.Abstra
if version and version != -1 and version not in pkg.name: if version and version != -1 and version not in pkg.name:
printError(pkg, 'incoherent-version-in-name', version) printError(pkg, 'incoherent-version-in-name', version)
@ -33,7 +35,7 @@
if has_usr_lib_file and not binary_in_usr_lib: if has_usr_lib_file and not binary_in_usr_lib:
printWarning(pkg, 'only-non-binary-in-usr-lib') printWarning(pkg, 'only-non-binary-in-usr-lib')
@@ -459,6 +467,11 @@ @@ -468,6 +476,11 @@ FHS and the FSSTND forbid this.''',
# 'non-sparc32-binary', # 'non-sparc32-binary',
# '', # '',

View File

@ -11,7 +11,7 @@ Index: InitScriptCheck.py
chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+') chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE) subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE)
@@ -64,6 +64,9 @@ class InitScriptCheck(AbstractCheck.Abst @@ -63,6 +63,9 @@ class InitScriptCheck(AbstractCheck.Abst
not fname.startswith('/etc/rc.d/init.d/'): not fname.startswith('/etc/rc.d/init.d/'):
continue continue

View File

@ -1,8 +1,14 @@
commit 29e43a3e1676aa452f730a741d00ef4ac7baec96
Author: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Tue May 17 12:56:38 2011 +0200
remove-expand-macros.diff
Index: TagsCheck.py Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -433,13 +433,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a @@ -433,15 +433,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a
# we assume that no rpm packages existed before rpm itself existed... # we assume that no rpm packages existed before rpm itself existed...
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d")) oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
@ -12,11 +18,13 @@ Index: TagsCheck.py
- epath = rpm.expandMacro(path) - epath = rpm.expandMacro(path)
- if epath != path: - if epath != path:
- private_so_paths.add(epath) - private_so_paths.add(epath)
- private_so_paths.add(re.sub(r'/lib64(?=/|$)', '/lib', epath))
- private_so_paths.add(re.sub(r'/lib(?=/|$)', '/lib64', epath))
- -
_enchant_checkers = {} _enchant_checkers = {}
def spell_check(pkg, str, fmt, lang, ignored): def spell_check(pkg, str, fmt, lang, ignored):
@@ -852,30 +845,12 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -854,30 +845,12 @@ class TagsCheck(AbstractCheck.AbstractCh
(apply(Pkg.formatRequire, obs), (apply(Pkg.formatRequire, obs),
apply(Pkg.formatRequire, prov))) apply(Pkg.formatRequire, prov)))

View File

@ -2,7 +2,7 @@ Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -712,6 +712,8 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -714,6 +714,8 @@ class TagsCheck(AbstractCheck.AbstractCh
self._unexpanded_macros(pkg, 'Group', group) self._unexpanded_macros(pkg, 'Group', group)
if not group: if not group:
printError(pkg, 'no-group-tag') printError(pkg, 'no-group-tag')
@ -11,7 +11,7 @@ Index: TagsCheck.py
elif VALID_GROUPS and group not in VALID_GROUPS: elif VALID_GROUPS and group not in VALID_GROUPS:
printWarning(pkg, 'non-standard-group', group) printWarning(pkg, 'non-standard-group', group)
@@ -1022,6 +1024,10 @@ won't fool the specfile parser, and rebu @@ -1024,6 +1026,10 @@ won't fool the specfile parser, and rebu
'''There is no Group tag in your package. You have to specify a valid group '''There is no Group tag in your package. You have to specify a valid group
in your spec file using the Group tag.''', in your spec file using the Group tag.''',

View File

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

3
rpmlint-1.2.tar.xz Normal file
View File

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

View File

@ -1,28 +0,0 @@
From c7aa88a93128892705322c564e849ca2a6a74b5b Mon Sep 17 00:00:00 2001
From: scop <scop@9bc8b190-ac0f-0410-8968-dc7d1f502856>
Date: Thu, 10 Mar 2011 17:29:42 +0000
Subject: [PATCH] Don't overwrite already existing details (Ludwig Nussel).
This allows the distro config to provide alternative descriptions and
distro specific explanations without having to patch checks.
git-svn-id: http://rpmlint.zarb.org/svn/trunk@1845 9bc8b190-ac0f-0410-8968-dc7d1f502856
---
Filter.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Index: rpmlint-1.1/Filter.py
===================================================================
--- rpmlint-1.1.orig/Filter.py
+++ rpmlint-1.1/Filter.py
@@ -115,7 +115,8 @@ _details = {}
def addDetails(*details):
for idx in range(len(details)/2):
- _details[details[idx*2]] = details[idx*2+1]
+ if not details[idx*2] in _details:
+ _details[details[idx*2]] = details[idx*2+1]
def badnessScore():
global _badness_score

View File

@ -9,11 +9,11 @@ git-svn-id: http://rpmlint.zarb.org/svn/trunk@1865 9bc8b190-ac0f-0410-8968-dc7d1
config | 4 ++++ config | 4 ++++
2 files changed, 14 insertions(+), 0 deletions(-) 2 files changed, 14 insertions(+), 0 deletions(-)
Index: rpmlint-1.1/BinariesCheck.py Index: rpmlint-1.2/BinariesCheck.py
=================================================================== ===================================================================
--- rpmlint-1.1.orig/BinariesCheck.py --- rpmlint-1.2.orig/BinariesCheck.py
+++ rpmlint-1.1/BinariesCheck.py +++ rpmlint-1.2/BinariesCheck.py
@@ -189,6 +189,8 @@ so_regex = re.compile('/lib(64)?/[^/]+\. @@ -198,6 +198,8 @@ so_regex = re.compile('/lib(64)?/[^/]+\.
validso_regex = re.compile('(\.so\.\d+(\.\d+)*|\d\.so)$') validso_regex = re.compile('(\.so\.\d+(\.\d+)*|\d\.so)$')
sparc_regex = re.compile('SPARC32PLUS|SPARC V9|UltraSPARC') sparc_regex = re.compile('SPARC32PLUS|SPARC V9|UltraSPARC')
system_lib_paths = Config.getOption('SystemLibPaths', DEFAULT_SYSTEM_LIB_PATHS) system_lib_paths = Config.getOption('SystemLibPaths', DEFAULT_SYSTEM_LIB_PATHS)
@ -22,7 +22,7 @@ Index: rpmlint-1.1/BinariesCheck.py
usr_lib_regex = re.compile('^/usr/lib(64)?/') usr_lib_regex = re.compile('^/usr/lib(64)?/')
bin_regex = re.compile('^(/usr(/X11R6)?)?/s?bin/') bin_regex = re.compile('^(/usr(/X11R6)?)?/s?bin/')
soversion_regex = re.compile('.*?([0-9][.0-9]*)\\.so|.*\\.so\\.([0-9][.0-9]*).*') soversion_regex = re.compile('.*?([0-9][.0-9]*)\\.so|.*\\.so\\.([0-9][.0-9]*).*')
@@ -377,6 +379,11 @@ class BinariesCheck(AbstractCheck.Abstra @@ -386,6 +388,11 @@ class BinariesCheck(AbstractCheck.Abstra
if not is_exec and not is_shobj: if not is_exec and not is_shobj:
continue continue
@ -34,7 +34,7 @@ Index: rpmlint-1.1/BinariesCheck.py
if is_exec: if is_exec:
if bin_regex.search(fname): if bin_regex.search(fname):
@@ -385,6 +392,10 @@ class BinariesCheck(AbstractCheck.Abstra @@ -394,6 +401,10 @@ class BinariesCheck(AbstractCheck.Abstra
if ocaml_mixed_regex.search(bin_info.tail): if ocaml_mixed_regex.search(bin_info.tail):
printWarning(pkg, 'ocaml-mixed-executable', fname) printWarning(pkg, 'ocaml-mixed-executable', fname)
@ -45,7 +45,7 @@ Index: rpmlint-1.1/BinariesCheck.py
if bin_info.readelf_error: if bin_info.readelf_error:
continue continue
@@ -603,6 +614,10 @@ http://bugs.debian.org/cgi-bin/bugreport @@ -612,6 +623,10 @@ http://bugs.debian.org/cgi-bin/bugreport
project settings. So there's normally no need to manually strip binaries. project settings. So there's normally no need to manually strip binaries.
Left over unstripped binaries could therefore indicate a bug in the automatic Left over unstripped binaries could therefore indicate a bug in the automatic
stripping process.''', stripping process.''',
@ -56,10 +56,10 @@ Index: rpmlint-1.1/BinariesCheck.py
) )
# BinariesCheck.py ends here # BinariesCheck.py ends here
Index: rpmlint-1.1/config Index: rpmlint-1.2/config
=================================================================== ===================================================================
--- rpmlint-1.1.orig/config --- rpmlint-1.2.orig/config
+++ rpmlint-1.1/config +++ rpmlint-1.2/config
@@ -130,6 +130,10 @@ from Config import * @@ -130,6 +130,10 @@ from Config import *
# Type: tuple of strings, default: see DEFAULT_SYSTEM_LIB_PATHS in BinariesCheck # Type: tuple of strings, default: see DEFAULT_SYSTEM_LIB_PATHS in BinariesCheck
#setOption("SystemLibPaths", ('/lib', '/lib64', '/usr/lib', '/usr/lib64')) #setOption("SystemLibPaths", ('/lib', '/lib64', '/usr/lib', '/usr/lib64'))

View File

@ -2,7 +2,7 @@ Index: Pkg.py
=================================================================== ===================================================================
--- Pkg.py.orig --- Pkg.py.orig
+++ Pkg.py +++ Pkg.py
@@ -496,7 +496,7 @@ class Pkg: @@ -492,7 +492,7 @@ class Pkg:
dir = self.dirname) dir = self.dirname)
# TODO: better shell escaping or sequence based command invocation # TODO: better shell escaping or sequence based command invocation
command_str = \ command_str = \

View File

@ -8,11 +8,11 @@ git-svn-id: http://rpmlint.zarb.org/svn/trunk@1862 9bc8b190-ac0f-0410-8968-dc7d1
Filter.py | 2 +- Filter.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-) 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Filter.py b/Filter.py Index: rpmlint-1.2/Filter.py
index 5f076cd..6549131 100644 ===================================================================
--- a/Filter.py --- rpmlint-1.2.orig/Filter.py
+++ b/Filter.py +++ rpmlint-1.2/Filter.py
@@ -49,7 +49,7 @@ def _print(msgtype, pkg, reason, details): @@ -44,7 +44,7 @@ def _print(msgtype, pkg, reason, details
badness = Config.badness(reason) badness = Config.badness(reason)
# anything with badness is an error # anything with badness is an error
if badness: if badness:
@ -21,6 +21,3 @@ index 5f076cd..6549131 100644
# errors without badness become warnings # errors without badness become warnings
elif msgtype == 'E': elif msgtype == 'E':
msgtype = 'W' msgtype = 'W'
--
1.7.3.4

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri May 20 10:04:36 CEST 2011 - dmueller@suse.de
- update legacy filter in shlib policy checker
-------------------------------------------------------------------
Thu May 19 14:16:42 UTC 2011 - lnussel@suse.de
- new version 1.2
* Check outdated or misspelled FSF addresses in text files.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 17 09:41:43 UTC 2011 - lnussel@suse.de Tue May 17 09:41:43 UTC 2011 - lnussel@suse.de

View File

@ -20,11 +20,11 @@
#!BuildIgnore: rpmlint-mini #!BuildIgnore: rpmlint-mini
Name: rpmlint Name: rpmlint
BuildRequires: rpm-python BuildRequires: rpm-python xz
Summary: Rpm correctness checker Summary: Rpm correctness checker
Version: 1.1 Version: 1.2
Release: 37 Release: 0
Source0: %{name}-%{version}.tar.bz2 Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.xz
Source1: config Source1: config
Source1001: config.in Source1001: config.in
Source2: DesktopTranslationCheck.py Source2: DesktopTranslationCheck.py
@ -124,7 +124,6 @@ Patch84: extend-suse-conffiles-check.diff
Patch85: suse-changelog.patch Patch85: suse-changelog.patch
Patch86: suse-rclink-check.diff Patch86: suse-rclink-check.diff
# accepted upstream # accepted upstream
Patch87: rpmlint-add-details.diff
Patch88: suse-speccheck-utf8.diff Patch88: suse-speccheck-utf8.diff
# accepted upstream # accepted upstream
Patch89: rpmlint-pie.diff Patch89: rpmlint-pie.diff
@ -207,7 +206,7 @@ Authors:
%patch84 %patch84
%patch85 %patch85
%patch86 %patch86
%patch87 -p1 #patch87 -p1
%patch88 %patch88
%patch89 -p1 %patch89 -p1
%patch90 -p1 %patch90 -p1

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -1238,7 +1238,7 @@ class FilesCheck(AbstractCheck.AbstractC @@ -1252,7 +1252,7 @@ class FilesCheck(AbstractCheck.AbstractC
elif interpreter or mode & 0111 != 0 or \ elif interpreter or mode & 0111 != 0 or \
script_regex.search(f): script_regex.search(f):
if interpreter: if interpreter:

View File

@ -2,7 +2,7 @@ Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -815,6 +815,7 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -817,6 +817,7 @@ class TagsCheck(AbstractCheck.AbstractCh
obs_names = [x[0] for x in pkg.obsoletes()] obs_names = [x[0] for x in pkg.obsoletes()]
prov_names = [x[0].split(':/')[0] for x in pkg.provides()] prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
@ -10,7 +10,7 @@ Index: TagsCheck.py
for o in (x for x in obs_names if x not in prov_names): for o in (x for x in obs_names if x not in prov_names):
printWarning(pkg, 'obsolete-not-provided', o) printWarning(pkg, 'obsolete-not-provided', o)
@@ -826,6 +827,8 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -828,6 +829,8 @@ class TagsCheck(AbstractCheck.AbstractCh
# https://bugzilla.redhat.com/460872 # https://bugzilla.redhat.com/460872
useless_provides = [] useless_provides = []
for p in prov_names: for p in prov_names:
@ -19,7 +19,7 @@ Index: TagsCheck.py
if prov_names.count(p) != 1 and p not in useless_provides: if prov_names.count(p) != 1 and p not in useless_provides:
useless_provides.append(p) useless_provides.append(p)
for p in useless_provides: for p in useless_provides:
@@ -966,6 +969,10 @@ the Release tag.''', @@ -968,6 +971,10 @@ the Release tag.''',
'''There is no Name tag in your package. You have to specify a name using the '''There is no Name tag in your package. You have to specify a name using the
Name tag.''', Name tag.''',

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -1261,7 +1261,8 @@ class FilesCheck(AbstractCheck.AbstractC @@ -1275,7 +1275,8 @@ class FilesCheck(AbstractCheck.AbstractC
f.endswith('.la')): f.endswith('.la')):
printError(pkg, 'script-without-shebang', f) printError(pkg, 'script-without-shebang', f)

View File

@ -1,4 +1,6 @@
--- BinariesCheck.py Index: BinariesCheck.py
===================================================================
--- BinariesCheck.py.orig
+++ BinariesCheck.py +++ BinariesCheck.py
@@ -10,13 +10,15 @@ @@ -10,13 +10,15 @@
@ -17,7 +19,7 @@
DEFAULT_SYSTEM_LIB_PATHS = ( DEFAULT_SYSTEM_LIB_PATHS = (
@@ -37,6 +39,9 @@ @@ -37,6 +39,9 @@ class BinaryInfo:
unused_regex = re.compile('^\s+(\S+)') unused_regex = re.compile('^\s+(\S+)')
exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)') exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)')
fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)') fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)')
@ -27,7 +29,7 @@
def __init__(self, pkg, path, file, is_ar, is_shlib): def __init__(self, pkg, path, file, is_ar, is_shlib):
self.readelf_error = False self.readelf_error = False
@@ -50,7 +55,10 @@ @@ -50,7 +55,10 @@ class BinaryInfo:
self.stack = False self.stack = False
self.exec_stack = False self.exec_stack = False
self.exit_calls = [] self.exit_calls = []
@ -38,7 +40,7 @@
self.tail = '' self.tail = ''
is_debug = path.endswith('.debug') is_debug = path.endswith('.debug')
@@ -93,6 +101,11 @@ @@ -93,6 +101,11 @@ class BinaryInfo:
self.exec_stack = True self.exec_stack = True
continue continue
@ -50,7 +52,7 @@
if is_shlib: if is_shlib:
r = BinaryInfo.exit_call_regex.search(l) r = BinaryInfo.exit_call_regex.search(l)
if r: if r:
@@ -103,6 +116,14 @@ @@ -103,6 +116,14 @@ class BinaryInfo:
fork_called = True fork_called = True
continue continue
@ -65,7 +67,7 @@
if self.non_pic: if self.non_pic:
self.non_pic = 'TEXTREL' in res[1] self.non_pic = 'TEXTREL' in res[1]
@@ -263,13 +284,26 @@ @@ -272,13 +293,26 @@ class BinariesCheck(AbstractCheck.Abstra
continue continue
# stripped ? # stripped ?
@ -93,7 +95,7 @@
if is_shlib: if is_shlib:
has_lib = True has_lib = True
@@ -319,6 +353,10 @@ @@ -328,6 +362,10 @@ class BinariesCheck(AbstractCheck.Abstra
for ec in bin_info.exit_calls: for ec in bin_info.exit_calls:
printWarning(pkg, 'shared-lib-calls-exit', fname, ec) printWarning(pkg, 'shared-lib-calls-exit', fname, ec)
@ -104,7 +106,7 @@
# rpath ? # rpath ?
if bin_info.rpath: if bin_info.rpath:
for p in bin_info.rpath: for p in bin_info.rpath:
@@ -504,6 +542,14 @@ @@ -513,6 +551,14 @@ with the intended shared libraries only.
'ldd-failed', 'ldd-failed',
'''Executing ldd on this file failed, all checks could not be run.''', '''Executing ldd on this file failed, all checks could not be run.''',
@ -119,7 +121,7 @@
'executable-stack', 'executable-stack',
'''The binary declares the stack as executable. Executable stack is usually an '''The binary declares the stack as executable. Executable stack is usually an
error as it is only needed if the code contains GCC trampolines or similar error as it is only needed if the code contains GCC trampolines or similar
@@ -516,6 +562,10 @@ @@ -525,6 +571,10 @@ don\'t define a proper .note.GNU-stack s
make the stack executable. Usual suspects include use of a non-GNU linker or make the stack executable. Usual suspects include use of a non-GNU linker or
an old GNU linker version.''', an old GNU linker version.''',
@ -130,7 +132,7 @@
'shared-lib-calls-exit', 'shared-lib-calls-exit',
'''This library package calls exit() or _exit(), probably in a non-fork() '''This library package calls exit() or _exit(), probably in a non-fork()
context. Doing so from a library is strongly discouraged - when a library context. Doing so from a library is strongly discouraged - when a library
@@ -533,6 +583,12 @@ @@ -542,6 +592,12 @@ form, make sure that rpmbuild does not s
that use prelink, make sure that prelink does not strip it either, usually by 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 placing a blacklist file in /etc/prelink.conf.d. For more information, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''', http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',

View File

@ -2,7 +2,7 @@ Index: FilesCheck.py
=================================================================== ===================================================================
--- FilesCheck.py.orig --- FilesCheck.py.orig
+++ FilesCheck.py +++ FilesCheck.py
@@ -944,6 +944,16 @@ class FilesCheck(AbstractCheck.AbstractC @@ -952,6 +952,16 @@ class FilesCheck(AbstractCheck.AbstractC
if res.group(1) != pkg.name: if res.group(1) != pkg.name:
printError(pkg, 'incoherent-logrotate-file', f) printError(pkg, 'incoherent-logrotate-file', f)
@ -19,7 +19,7 @@ Index: FilesCheck.py
if link != '': if link != '':
ext = compr_regex.search(link) ext = compr_regex.search(link)
if ext: if ext:
@@ -1739,6 +1749,24 @@ consequences), or other compiler flags w @@ -1760,6 +1770,24 @@ consequences), or other compiler flags w
extraction not working as expected. Verify that the binaries are not extraction not working as expected. Verify that the binaries are not
unexpectedly stripped and that the intended compiler flags are used.''', unexpectedly stripped and that the intended compiler flags are used.''',

View File

@ -8,11 +8,11 @@ git-svn-id: http://rpmlint.zarb.org/svn/trunk@1863 9bc8b190-ac0f-0410-8968-dc7d1
FilesCheck.py | 16 ++++++++++++++++ FilesCheck.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-) 1 files changed, 16 insertions(+), 0 deletions(-)
Index: rpmlint-1.1/FilesCheck.py Index: rpmlint-1.2/FilesCheck.py
=================================================================== ===================================================================
--- rpmlint-1.1.orig/FilesCheck.py --- rpmlint-1.2.orig/FilesCheck.py
+++ rpmlint-1.1/FilesCheck.py +++ rpmlint-1.2/FilesCheck.py
@@ -911,6 +911,12 @@ class FilesCheck(AbstractCheck.AbstractC @@ -915,6 +915,12 @@ class FilesCheck(AbstractCheck.AbstractC
printError(pkg, 'dir-or-file-in-usr-local', f) printError(pkg, 'dir-or-file-in-usr-local', f)
elif f.startswith('/var/local/'): elif f.startswith('/var/local/'):
printError(pkg, 'dir-or-file-in-var-local', f) printError(pkg, 'dir-or-file-in-var-local', f)
@ -25,7 +25,7 @@ Index: rpmlint-1.1/FilesCheck.py
elif sub_bin_regex.search(f): elif sub_bin_regex.search(f):
printError(pkg, 'subdir-in-bin', f) printError(pkg, 'subdir-in-bin', f)
elif f.startswith('/home/'): elif f.startswith('/home/'):
@@ -1478,6 +1484,16 @@ for packages to install files in this di @@ -1491,6 +1497,16 @@ for packages to install files in this di
'''A file in the package is located in /var/local. It's not permitted '''A file in the package is located in /var/local. It's not permitted
for packages to install files in this directory.''', for packages to install files in this directory.''',

View File

@ -1,15 +1,34 @@
--- Config.py Index: Config.py
===================================================================
--- Config.py.orig
+++ Config.py +++ Config.py
@@ -115,6 +115,8 @@ @@ -116,12 +116,23 @@ def getOption(name, default = ""):
# List of filters
_filters = [] _filters = []
_filters_re = None _filters_re = None
+_filters_non_except = []
+_filters_non_except_re = None
+
+_filters_except = [] +_filters_except = []
+_filters_except_re = None +_filters_except_re = None
+
def addFilter(s): def addFilter(s):
global _filters global _filters
@@ -137,8 +139,14 @@ global _filters_re
+ global _filters_except
- _filters.append(s)
- _filters_re = None
+ if len(_filters_except):
+ _filters.append(s)
+ _filters_re = None
+ else:
+ _filters_non_except.append(s)
+ _filters_non_except_re = None
def removeFilter(s):
global _filters
@@ -137,8 +148,14 @@ def removeFilter(s):
_scoring = {} _scoring = {}
def setBadness(s, score): def setBadness(s, score):
@ -24,16 +43,36 @@
def badness(s): def badness(s):
return _scoring.get(s, 0) return _scoring.get(s, 0)
@@ -146,6 +154,8 @@ @@ -146,11 +163,24 @@ _non_named_group_re = re.compile('[^\\](
def isFiltered(s): def isFiltered(s):
global _filters global _filters
global _filters_re global _filters_re
+ global _filters_except + global _filters_except
+ global _filters_except_re + global _filters_except_re
+ global _filters_non_except
+ global _filters_non_except_re
if _filters_re == None: - if _filters_re == None:
# no filter - # no filter
@@ -162,7 +172,21 @@ - if len(_filters) == 0:
- return False
+ if _filters_non_except_re == None and len(_filters_non_except):
+ _filters_non_except_re = '(?:' + _filters_non_except[0] + ')'
+
+ for idx in range(1, len(_filters_non_except)):
+ # to prevent named group overflow that happen when there is too
+ # many () in a single regexp: AssertionError: sorry, but this
+ # version only supports 100 named groups
+ if '(' in _filters_non_except[idx]:
+ _non_named_group_re.subn('(:?', _filters_non_except[idx])
+ _filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
+ _filters_non_except_re = re.compile(_filters_non_except_re)
+
+ if _filters_re == None and len(_filters):
_filters_re = '(?:' + _filters[0] + ')'
for idx in range(1, len(_filters)):
@@ -162,9 +192,27 @@ def isFiltered(s):
_filters_re = _filters_re + '|(?:' + _filters[idx] +')' _filters_re = _filters_re + '|(?:' + _filters[idx] +')'
_filters_re = re.compile(_filters_re) _filters_re = re.compile(_filters_re)
@ -50,8 +89,15 @@
+ _filters_except_re = re.compile(_filters_except_re) + _filters_except_re = re.compile(_filters_except_re)
+ +
if not no_exception: if not no_exception:
- if _filters_re.search(s):
+
+ if _filters_non_except_re and _filters_non_except_re.search(s):
return True
+ if _filters_except_re and _filters_except_re.search(s): + if _filters_except_re and _filters_except_re.search(s):
+ return False + return False
if _filters_re.search(s): + if _filters_re and _filters_re.search(s):
return True + return True
+
return False return False
# Config.py ends here

View File

@ -13,7 +13,7 @@ Index: SpecCheck.py
if current_section == 'changelog': if current_section == 'changelog':
for match in AbstractCheck.macro_regex.findall(line): for match in AbstractCheck.macro_regex.findall(line):
res = re.match('%+', match) res = re.match('%+', match)
@@ -715,6 +719,14 @@ may break short circuit builds.''', @@ -716,6 +720,14 @@ may break short circuit builds.''',
'''Make check or other automated regression test should be run in %check, as '''Make check or other automated regression test should be run in %check, as
they can be disabled with a rpm macro for short circuiting purposes.''', they can be disabled with a rpm macro for short circuiting purposes.''',

View File

@ -10,7 +10,7 @@ Index: TagsCheck.py
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s') license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE) invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
# () are here for grouping purpose in the regexp # () are here for grouping purpose in the regexp
@@ -627,10 +628,12 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -629,10 +630,12 @@ class TagsCheck(AbstractCheck.AbstractCh
base = is_devel.group(1) base = is_devel.group(1)
dep = None dep = None
has_so = False has_so = False
@ -24,7 +24,7 @@ Index: TagsCheck.py
if has_so: if has_so:
base_or_libs = base + '/' + base + '-libs/lib' + base base_or_libs = base + '/' + base + '-libs/lib' + base
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)") # try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
@@ -667,6 +670,15 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -669,6 +672,15 @@ class TagsCheck(AbstractCheck.AbstractCh
if prov not in (x[0] for x in pkg.provides()): if prov not in (x[0] for x in pkg.provides()):
printWarning(pkg, 'no-provides', prov) printWarning(pkg, 'no-provides', prov)
@ -40,7 +40,7 @@ Index: TagsCheck.py
# List of words to ignore in spell check # List of words to ignore in spell check
ignored_words = set() ignored_words = set()
for pf in pkg.files(): for pf in pkg.files():
@@ -1104,6 +1116,11 @@ instead or require a file in bin or /etc @@ -1106,6 +1118,11 @@ instead or require a file in bin or /etc
'no-url-tag', 'no-url-tag',
'''The URL tag is missing. Please add a http or ftp link to the project location.''', '''The URL tag is missing. Please add a http or ftp link to the project location.''',

View File

@ -2,7 +2,7 @@ Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -635,10 +635,10 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -637,10 +637,10 @@ class TagsCheck(AbstractCheck.AbstractCh
if pkg_config_regex.match(fname) and fname.endswith('.pc'): if pkg_config_regex.match(fname) and fname.endswith('.pc'):
has_pc = True has_pc = True
if has_so: if has_so:

View File

@ -1,6 +1,8 @@
--- SpecCheck.py Index: SpecCheck.py
===================================================================
--- SpecCheck.py.orig
+++ SpecCheck.py +++ SpecCheck.py
@@ -597,8 +597,8 @@ @@ -598,8 +598,8 @@ SPEC file to build a valid RPM package.'
("Name:" tag). Either rename your package or the specfile.''', ("Name:" tag). Either rename your package or the specfile.''',
'non-utf8-spec-file', 'non-utf8-spec-file',

View File

@ -2,7 +2,7 @@ Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -776,7 +776,7 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -778,7 +778,7 @@ class TagsCheck(AbstractCheck.AbstractCh
if not valid_license: if not valid_license:
self._unexpanded_macros(pkg, 'License', rpm_license) self._unexpanded_macros(pkg, 'License', rpm_license)
@ -11,7 +11,7 @@ Index: TagsCheck.py
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()): if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
url = pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())] url = pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())]
self._unexpanded_macros(pkg, tag, url, is_url = True) self._unexpanded_macros(pkg, tag, url, is_url = True)
@@ -1092,7 +1092,7 @@ once.''', @@ -1094,7 +1094,7 @@ once.''',
'''This rpm requires a specific release of another package.''', '''This rpm requires a specific release of another package.''',
'no-url-tag', 'no-url-tag',

View File

@ -23,9 +23,9 @@ Index: SpecCheck.py
res = prereq_regex.search(line) res = prereq_regex.search(line)
if res: if res:
printError(pkg, 'prereq-use', res.group(2)) printError(pkg, 'prereq-use', res.group(2))
@@ -756,6 +763,15 @@ set which may result in security issues @@ -758,6 +765,15 @@ in the resulting binary package dependin
depending on the system where the package is built. Add default attributes version (typically < 4.4). Add default attributes using %defattr before it in
using %defattr before it in the %files section, or use per line %attr's.''', the %files section, or use per entry %attr's.''',
+'obsolete-suse-version-check', +'obsolete-suse-version-check',
+'''The specfile contains a comparison of %suse_version against a suse release +'''The specfile contains a comparison of %suse_version against a suse release

View File

@ -2,7 +2,7 @@ Index: BinariesCheck.py
=================================================================== ===================================================================
--- BinariesCheck.py.orig --- BinariesCheck.py.orig
+++ BinariesCheck.py +++ BinariesCheck.py
@@ -197,6 +197,7 @@ usr_lib_exception_regex = re.compile(Con @@ -206,6 +206,7 @@ usr_lib_exception_regex = re.compile(Con
srcname_regex = re.compile('(.*?)-[0-9]') srcname_regex = re.compile('(.*?)-[0-9]')
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)') invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$') ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
@ -10,7 +10,7 @@ Index: BinariesCheck.py
def dir_base(path): def dir_base(path):
res = path_regex.search(path) res = path_regex.search(path)
@@ -269,7 +270,7 @@ class BinariesCheck(AbstractCheck.Abstra @@ -278,7 +279,7 @@ class BinariesCheck(AbstractCheck.Abstra
# arch dependent packages only from here on # arch dependent packages only from here on
# in /usr/share ? # in /usr/share ?

View File

@ -2,7 +2,7 @@ Index: TagsCheck.py
=================================================================== ===================================================================
--- TagsCheck.py.orig --- TagsCheck.py.orig
+++ TagsCheck.py +++ TagsCheck.py
@@ -809,7 +809,7 @@ class TagsCheck(AbstractCheck.AbstractCh @@ -811,7 +811,7 @@ class TagsCheck(AbstractCheck.AbstractCh
printWarning(pkg, 'no-url-tag') printWarning(pkg, 'no-url-tag')
obs_names = [x[0] for x in pkg.obsoletes()] obs_names = [x[0] for x in pkg.obsoletes()]