rpms/rpmlint/devel rpmlint-disttag.patch, NONE, 1.1 rpmlint-execs.patch, NONE, 1.1 rpmlint-initvars.patch, NONE, 1.1 rpmlint.spec, 1.14, 1.15

Ville Skytta (scop) fedora-extras-commits at redhat.com
Mon Jul 11 18:22:33 UTC 2005


Author: scop

Update of /cvs/extras/rpms/rpmlint/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8832/devel

Modified Files:
	rpmlint.spec 
Added Files:
	rpmlint-disttag.patch rpmlint-execs.patch 
	rpmlint-initvars.patch 
Log Message:
* Thu Jul  7 2005 Ville Skyttä <ville.skytta at iki.fi> - 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.


rpmlint-disttag.patch:

--- NEW FILE rpmlint-disttag.patch ---
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()

rpmlint-execs.patch:

--- NEW FILE rpmlint-execs.patch ---
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)

rpmlint-initvars.patch:

--- NEW FILE rpmlint-initvars.patch ---
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)


Index: rpmlint.spec
===================================================================
RCS file: /cvs/extras/rpms/rpmlint/devel/rpmlint.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- rpmlint.spec	20 Jun 2005 18:03:06 -0000	1.14
+++ rpmlint.spec	11 Jul 2005 18:22:30 -0000	1.15
@@ -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 @@
 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 @@
 %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 @@
 
 
 %changelog
+* Thu Jul  7 2005 Ville Skyttä <ville.skytta at iki.fi> - 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ä <ville.skytta at iki.fi> - 0.70-3
 - 0.70, use sed instead of perl during build.
 - Default configuration improvements: allow Development/Debug group (for




More information about the scm-commits mailing list