diff --git a/rpmlint-disttag.patch b/rpmlint-disttag.patch new file mode 100644 index 0000000..b114bf4 --- /dev/null +++ b/rpmlint-disttag.patch @@ -0,0 +1,25 @@ +Index: TagsCheck.py +=================================================================== +RCS file: /cooker/soft/rpmlint/TagsCheck.py,v +retrieving revision 1.84 +diff -u -r1.84 TagsCheck.py +--- TagsCheck.py 1 Jul 2005 02:59:46 -0000 1.84 ++++ TagsCheck.py 6 Jul 2005 14:19:23 -0000 +@@ -419,6 +419,7 @@ + packager_regex=re.compile(Config.getOption('Packager', DEFAULT_PACKAGER)) + basename_regex=re.compile('/?([^/]+)$') + changelog_version_regex=re.compile('[^>]([^ >]+)\s*$') ++fedora_disttag_regex=re.compile('\.(fc|rhe?l)\d+$') + release_ext=Config.getOption('ReleaseExtension', 'mdk') + extension_regex=release_ext and re.compile(release_ext + '$') + use_version_in_changelog=Config.getOption('UseVersionInChangelog', 1) +@@ -626,7 +627,8 @@ + expected=version + '-' + release + if epoch is not None: + expected=str(epoch) + ':' + expected +- if expected != ret.group(1): ++ if ret.group(1) not in (expected, fedora_disttag_regex.sub('', expected)): ++ + printWarning(pkg, 'incoherent-version-in-changelog', ret.group(1), expected) + + # provides=pkg.provides() diff --git a/rpmlint-execs.patch b/rpmlint-execs.patch new file mode 100644 index 0000000..bf980b3 --- /dev/null +++ b/rpmlint-execs.patch @@ -0,0 +1,28 @@ +Index: FilesCheck.py +=================================================================== +RCS file: /cooker/soft/rpmlint/FilesCheck.py,v +retrieving revision 1.87 +diff -u -r1.87 FilesCheck.py +--- FilesCheck.py 17 Jun 2005 09:48:34 -0000 1.87 ++++ FilesCheck.py 6 Jul 2005 14:19:21 -0000 +@@ -186,6 +186,7 @@ + shellbang_regex=re.compile('^#!\s*(\S*)') + interpreter_regex=re.compile('^/(usr/)?s?bin/[^/]+$') + script_regex=re.compile('^/((usr/)?s?bin|etc/(rc.d/init.d|profile.d|X11/xinit.d|cron.(hourly|daily|monthly|weekly)))/') ++libtool_archive_regex=re.compile('\.la$') + + for idx in range(0, len(dangling_exceptions)): + dangling_exceptions[idx][0]=re.compile(dangling_exceptions[idx][0]) +@@ -552,10 +553,10 @@ + if res: + if not interpreter_regex.search(res.group(1)): + printError(pkg, 'wrong-script-interpreter', f, '"' + res.group(1) + '"') +- else: ++ elif not (lib_path_regex.search(f) and libtool_archive_regex.search(f)): + printError(pkg, 'script-without-shellbang', f) + +- if mode & 0111 == 0: ++ if mode & 0111 == 0 and not doc_regex.search(f): + printError(pkg, 'non-executable-script', f, oct(perm)) + if line.endswith('\r\n'): + printError(pkg, 'wrong-script-end-of-line-encoding', f) diff --git a/rpmlint-initvars.patch b/rpmlint-initvars.patch new file mode 100644 index 0000000..95e316c --- /dev/null +++ b/rpmlint-initvars.patch @@ -0,0 +1,25 @@ +Index: InitScriptCheck.py +=================================================================== +RCS file: /cooker/soft/rpmlint/InitScriptCheck.py,v +retrieving revision 1.14 +diff -u -r1.14 InitScriptCheck.py +--- InitScriptCheck.py 15 Apr 2005 20:01:46 -0000 1.14 ++++ InitScriptCheck.py 6 Jul 2005 14:19:22 -0000 +@@ -17,7 +17,7 @@ + + rc_regex=re.compile('^/etc(/rc.d)?/init.d/') + chkconfig_content_regex=re.compile('# +chkconfig: +([-0-9]+) +[-0-9]+ +[-0-9]+', re.MULTILINE) +-subsys_regex=re.compile('/var/lock/subsys/([^/\n ]+)', re.MULTILINE) ++subsys_regex=re.compile('/var/lock/subsys/([^/"\'\n ]+)', re.MULTILINE) + chkconfig_regex=re.compile('^[^#]*(chkconfig|add-service|del-service)', re.MULTILINE) + status_regex=re.compile('^[^#]*status', re.MULTILINE) + reload_regex=re.compile('^[^#]*reload', re.MULTILINE) +@@ -86,7 +86,7 @@ + error=1 + if name[0] == '$': + value=Pkg.substitute_shell_vars(name, content) +- if value == basename: ++ if value == basename or value[0] == '$': + error=0 + if error: + printError(pkg, 'incoherent-subsys', f, name) diff --git a/rpmlint.spec b/rpmlint.spec index 7e93050..1f1baba 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,6 +1,6 @@ Name: rpmlint Version: 0.70 -Release: 3 +Release: 4%{?dist} Summary: Tool for checking common errors in RPM packages Group: Development/Tools @@ -10,6 +10,9 @@ Source0: http://people.mandriva.com/~flepied/projects/rpmlint/dist/%{name Source1: %{name}-fedora-config Patch0: %{name}-svcdefault.patch Patch1: %{name}-confmsg.patch +Patch2: %{name}-disttag.patch +Patch3: %{name}-initvars.patch +Patch4: %{name}-execs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -29,6 +32,9 @@ and source packages can be checked. %setup -q %patch0 %patch1 +%patch2 +%patch3 +%patch4 sed -i -e 's|/etc/httpd/webapps\.d|%{_sysconfdir}/httpd/conf.d|' \ FilesCheck.py I18NCheck.py for f in AUTHORS ChangeLog ; do @@ -80,6 +86,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jul 7 2005 Ville Skyttä - 0.70-4 +- Fix false "positives" from libtool archives confused as scripts, + non-executable scripts installed in docs, FE disttags, unsuccessfully + expanded shell variables and quotation in init scripts. + * Mon Jun 20 2005 Ville Skyttä - 0.70-3 - 0.70, use sed instead of perl during build. - Default configuration improvements: allow Development/Debug group (for