[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r637 - in trunk: checks debian testset testset/scripts/debian



Author: rra
Date: 2006-04-27 07:06:42 +0200 (Thu, 27 Apr 2006)
New Revision: 637

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/debian/changelog
   trunk/testset/scripts/debian/rules
   trunk/testset/tags.scripts
Log:
* checks/files{.desc,}:
  + [RA] Warn about scripts installed on the user's PATH with names that
    include language extensions (.sh, .pl, .py), per Policy 10.4.


Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2006-04-27 04:49:57 UTC (rev 636)
+++ trunk/checks/files	2006-04-27 05:06:42 UTC (rev 637)
@@ -493,6 +493,11 @@
 	    tag "svn-commit-file-in-package", "$file";
 	}
 
+	# ---------------- executables with language extensions
+	if ($file =~ m,^(usr/)?(s?bin|games)/[^/]+\.(pl|sh|py)$,) {
+	    tag "script-with-language-extension", "$file";
+	}
+
 	# ---------------- general: setuid/setgid files!
 	if ($perm =~ m/s/) {
 	    my ($setuid, $setgid) = ("","");

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2006-04-27 04:49:57 UTC (rev 636)
+++ trunk/checks/files.desc	2006-04-27 05:06:42 UTC (rev 637)
@@ -545,3 +545,13 @@
  for the local use of webmasters.  Web servers should include /cgi-lib/ as
  a standard ScriptAlias pointing to that directory.
 Ref: policy 11.5
+
+Tag: script-with-language-extension
+Type: warning
+Info: When scripts are installed into a directory in the system PATH, the
+ script name should not include an extension such as <tt>.sh</tt> or
+ <tt>.pl</tt> that denotes the scripting language currently used to
+ implement it.  The implementation language may change; if it does,
+ leaving the name the same would be confusing and changing it would be
+ disruptive.
+Ref: policy 10.4

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-04-27 04:49:57 UTC (rev 636)
+++ trunk/debian/changelog	2006-04-27 05:06:42 UTC (rev 637)
@@ -6,10 +6,12 @@
     + [RA] Policy now mandates FHS 2.3.  Update tag descriptions.
     + [RA] Warn about files installed in /usr/lib/cgi-bin.  Policy now
       states they should be installed in /usr/lib/cgi-lib.
+    + [RA] Warn about scripts installed on the user's PATH with names that
+      include language extensions (.sh, .pl, .py), per Policy 10.4.
   * checks/scripts.desc:
-    + [RA] Using invoke-rc.d is now required by Policy 3.7.0.0.
+    + [RA] Using invoke-rc.d is now required by Policy.
 
- -- Russ Allbery <rra@debian.org>  Wed, 26 Apr 2006 21:44:08 -0700
+ -- Russ Allbery <rra@debian.org>  Wed, 26 Apr 2006 22:06:13 -0700
 
 lintian (1.23.18) unstable; urgency=low
 

Modified: trunk/testset/scripts/debian/rules
===================================================================
--- trunk/testset/scripts/debian/rules	2006-04-27 04:49:57 UTC (rev 636)
+++ trunk/testset/scripts/debian/rules	2006-04-27 05:06:42 UTC (rev 637)
@@ -41,6 +41,9 @@
 	echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script
 	chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script
 
+	echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh
+	chmod 755 $(tmp)/usr/bin/test.sh
+
 # Should produce complaints about a missing debhelper dependency, but not a
 # missing Python dependency.
 	dh_python

Modified: trunk/testset/tags.scripts
===================================================================
--- trunk/testset/tags.scripts	2006-04-27 04:49:57 UTC (rev 636)
+++ trunk/testset/tags.scripts	2006-04-27 05:06:42 UTC (rev 637)
@@ -22,8 +22,10 @@
 W: scripts: binary-without-manpage rubyfoo
 W: scripts: binary-without-manpage suidperlfoo
 W: scripts: binary-without-manpage suidperlfoo2
+W: scripts: binary-without-manpage test.sh
 W: scripts: binary-without-manpage tkfoo
 W: scripts: file-in-usr-lib-cgi-bin usr/lib/cgi-bin/cgi-script
 W: scripts: package-installs-python-pyc usr/lib/python2.3/site-packages/test.pyc
+W: scripts: script-with-language-extension usr/bin/test.sh
 W: scripts: setuid-binary usr/bin/suidperlfoo 4755 root/root
 W: scripts: setuid-binary usr/bin/suidperlfoo2 4755 root/root



Reply to: