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

lintian: r840 - in trunk: checks debian testset testset/filenames/debian testset/manpages/debian



Author: rra
Date: 2007-04-11 04:25:06 +0200 (Wed, 11 Apr 2007)
New Revision: 840

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/checks/manpages
   trunk/debian/changelog
   trunk/testset/filenames/debian/rules
   trunk/testset/manpages/debian/rules
   trunk/testset/tags.binary
   trunk/testset/tags.debug
   trunk/testset/tags.diffs
   trunk/testset/tags.filenames
   trunk/testset/tags.manpages
   trunk/testset/tags.scripts
Log:
* checks/files{.desc,}:
  + [RA] Diagnose creation of subdirectories of /usr/bin other than mh
    and the legacy X11 directory.  (Closes: #417912)
  + [RA] Display the full path for binary-without-manpage tags to make
    it easier to track down problems.
  + [RA] Ignore binaries in subdirectories of the normal binary
    directories (other than /usr/bin/X11 and /usr/bin/mh).  These should
    be caught by other checks and the man page warnings would likely be
    confusing noise.

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/checks/files	2007-04-11 02:25:06 UTC (rev 840)
@@ -334,19 +334,25 @@
 		tag "file-directly-in-usr-share", "$file";
 	    }
 	}
+        # ---------------- /usr/bin
+	elsif ($file =~ m,^usr/bin/,) {
+	    if ($perm =~ m/^d/ and $file =~ m,^usr/bin/., and $file !~ m,^usr/bin/(X11|mh)/,) {
+		tag "subdir-in-usr-bin", "$file";
+	    }
+	}
 	# ---------------- /usr subdirs
-	elsif ($type ne 'udeb' and $file =~ m,^usr/[^/]+/$, ) { # FSSTND dirs
+	elsif ($type ne 'udeb' and $file =~ m,^usr/[^/]+/$,) { # FSSTND dirs
 	    if ( $file =~ m,^usr/(dict|doc|etc|info|man|adm|preserve)/,) {
 		tag "FSSTND-dir-in-usr", "$file";
 	    }
 	    # FHS dirs
-	    elsif ( $file !~ m,^usr/(X11R6|X386|
-				     bin|games|include|
-				     lib|lib32|lib64|
-				     local|sbin|share|
-				     src|spool|tmp)/,x ) {
+	    elsif ($file !~ m,^usr/(X11R6|X386|
+				    bin|games|include|
+				    lib|lib32|lib64|
+				    local|sbin|share|
+				    src|spool|tmp)/,x) {
 		tag "non-standard-dir-in-usr", "$file";
-	    } elsif ( $file =~ m,^usr/share/doc, ) {
+	    } elsif ($file =~ m,^usr/share/doc,) {
 		tag "uses-FHS-doc-dir", "$file";
 	    }
 
@@ -401,8 +407,8 @@
     elsif ($file =~ m,^mnt/.,) {
 	tag "dir-or-file-in-mnt", "$file";
     }
-    # ---------------- /bin, /usr/bin
-    elsif ($file =~ m,^bin/, or $file =~ m,^usr/bin/,) {
+    # ---------------- /bin
+    elsif ($file =~ m,^bin/,) {
 	if ($perm =~ m/^d/ and $file =~ m,^bin/.,) {
 	    tag "subdir-in-bin", "$file";
 	}

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/checks/files.desc	2007-04-11 02:25:06 UTC (rev 840)
@@ -435,6 +435,11 @@
 Info: The Filesystem Hierarchy Standard forbids the installation of new
  directories in <tt>/bin</tt>.
 
+Tag: subdir-in-usr-bin
+Type: error
+Info: The Filesystem Hierarchy Standard forbids the installation of new
+ directories in <tt>/usr/bin</tt> other than <tt>/usr/bin/mh</tt>.
+
 Tag: non-standard-dir-in-usr
 Type: warning
 Info: The FHS says "No large software packages should use a direct

Modified: trunk/checks/manpages
===================================================================
--- trunk/checks/manpages	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/checks/manpages	2007-04-11 02:25:06 UTC (rev 840)
@@ -69,35 +69,26 @@
 
     my ($fname,$path,$suffix) = fileparse($file);
 
-    # binary that wants a manual page?
+    # Binary that wants a manual page?
+    #
+    # It's tempting to check the section of the man page depending on the
+    # location of the binary, but there are too many mismatches between
+    # bin/sbin and 1/8 that it's not clear it's the right thing to do.
     if (($perm =~ m,^[\-l],o) and
-    	(($path =~ m,^bin/,o) or
-	 ($path =~ m,^sbin/,o) or
-	 ($path =~ m,^usr/bin/,o) or
-	 ($path =~ m,^usr/sbin/,o) or
-	 ($path =~ m,^usr/games/,o) or
-	 ($path =~ m,^usr/X11R6/bin/,o) )) {
+    	(($path =~ m,^bin/$,o) or
+	 ($path =~ m,^sbin/$,o) or
+	 ($path =~ m,^usr/bin/$,o) or
+	 ($path =~ m,^usr/bin/X11/$,o) or
+	 ($path =~ m,^usr/bin/mh/$,o) or
+	 ($path =~ m,^usr/sbin/$,o) or
+	 ($path =~ m,^usr/games/$,o) or
+	 ($path =~ m,^usr/X11R6/bin/$,o) )) {
 
 	my $bin = $fname;
 	
 	$binary{$bin} = $file;
 	$link{$bin} = $link if $link;
 
-#	for ($path) {
-#	    m,^(usr/(X11R6/)?)?bin/,o && do {
-#		$sect_by_binary{$bin} = 1;
-#		last;
-#	    };
-#	    m,^usr/games/,o && do {
-#		$sect_by_binary{$bin} = 6;
-#		last;
-#	    };
-#	    m,^(usr/)?sbin/,o && do {
-#		$sect_by_binary{$bin} = 8;
-#		last;
-#	    };
-#	}
-	
     	next;
     }
 
@@ -145,18 +136,15 @@
 	if ($section_num != $section) {
 	    tag "manpage-in-wrong-directory", "$file";
 	}
-#	push @{$sect_by_manpage{$bin}}, $section_num; # array needed for cases like man(1), man(7)
     } else {
 	tag "manpage-has-wrong-extension", "$file";
     }
-    
+
     # special check for manual pages for X11 games
     if ($path =~ m,^usr/X11R6/man/man6/,o) {
 	tag "x11-games-should-be-in-usr-games", "$file";
     }
 
-    #  reformatted to here
-
     # check symbolic links to other manual pages
     if ($perm =~ m,^l,o) {
 	if ($link =~ m,(^|/)undocumented,o) {
@@ -358,14 +346,10 @@
 	}
 
 	if (not grep { $_->{lang} eq "" } @{$manpage{$f}}) {
-	    tag "binary-without-english-manpage", "$f";
+	    tag "binary-without-english-manpage", "$binary{$f}";
 	}
-
-#	unless (grep { $_ == $sect_by_binary{$f} } @{$sect_by_manpage{$f}}) {
-#	    tag "no-manpage-in-correct-directory", "$binary{$f} (@{$sect_by_manpage{$f}})";
-#	}
     } else {
-	tag "binary-without-manpage", "$f";
+	tag "binary-without-manpage", "$binary{$f}";
     }
 }
 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/debian/changelog	2007-04-11 02:25:06 UTC (rev 840)
@@ -42,9 +42,18 @@
       Aoki for the suggestion.  (Closes: #405840)
     + [RA] Recognize the +bX convention for binary NMUs.  Warn about use
       of the old three-part version numbers.
+  * checks/files{.desc,}:
+    + [RA] Diagnose creation of subdirectories of /usr/bin other than mh
+      and the legacy X11 directory.  (Closes: #417912)
   * checks/manpages:
     + [RA] When checking for hyphen used as a minus sign, avoid false
       positives on \s-1 (small font) and \*(-- (pod2man long dash).
+    + [RA] Display the full path for binary-without-manpage tags to make
+      it easier to track down problems.
+    + [RA] Ignore binaries in subdirectories of the normal binary
+      directories (other than /usr/bin/X11 and /usr/bin/mh).  These should
+      be caught by other checks and the man page warnings would likely be
+      confusing noise.
   * checks/menu-format{.desc,}:
     + [RA] If a menu icon isn't an absolute path, only look for it in
       /usr/share/pixmaps, not in the old X11R6 paths.  Update the long tag

Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/filenames/debian/rules	2007-04-11 02:25:06 UTC (rev 840)
@@ -98,6 +98,13 @@
 	install -d debian/tmp/usr/include/X11
 	touch debian/tmp/usr/include/X11/foo.h
 
+	install -d debian/tmp/usr/bin/mh
+	touch debian/tmp/usr/bin/mh/read
+	chmod 755 debian/tmp/usr/bin/mh/read
+	install -d debian/tmp/usr/bin/bin
+	touch debian/tmp/usr/bin/bin/bad
+	chmod 755 debian/tmp/usr/bin/bin/bad
+
 	install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes
 	gzip -9 debian/tmp/usr/share/doc/filenames/Changes
 	ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz

Modified: trunk/testset/manpages/debian/rules
===================================================================
--- trunk/testset/manpages/debian/rules	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/manpages/debian/rules	2007-04-11 02:25:06 UTC (rev 840)
@@ -10,7 +10,8 @@
 	install -d $(tmp)/usr/share/man/man1 $(tmp)/usr/share/man/man3 \
                   $(tmp)/usr/share/man/man6 $(tmp)/usr/X11R6/man/man6 \
                   $(tmp)/usr/bin $(tmp)/usr/sbin $(tmp)/usr/X11R6/bin \
-				  $(tmp)/usr/share/man/de/man1 $(tmp)/usr/X11R6/man/man1/
+		  $(tmp)/usr/share/man/de/man1 $(tmp)/usr/X11R6/man/man1/ \
+		  $(tmp)/usr/bin/bin
 	touch $(tmp)/usr/bin/usr-bin-binary-alt
 	chmod 755 $(tmp)/usr/bin/usr-bin-binary-alt
 	touch $(tmp)/usr/sbin/usr-sbin-binary
@@ -18,6 +19,8 @@
 	touch $(tmp)/usr/X11R6/bin/rstartd
 	touch $(tmp)/usr/bin/binary-without-english-manpage
 	chmod 755 $(tmp)/usr/bin/binary-without-english-manpage
+	touch $(tmp)/usr/bin/bin/bad
+	chmod 755 $(tmp)/usr/bin/bin/bad
 
 	gzip -c9 <test.1p >$(tmp)/usr/share/man/man1/test.1p.gz
 	gzip -c9 <test.1p.de >$(tmp)/usr/share/man/man1/test-latin1-chars.1p.gz

Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/tags.binary	2007-04-11 02:25:06 UTC (rev 840)
@@ -37,11 +37,11 @@
 W: binary source: native-package-with-dash-version
 W: binary source: not-binnmuable-all-depends-any binary-data -> binary
 W: binary source: not-binnmuable-any-depends-all binary -> binary-data
-W: binary: binary-without-manpage hello
-W: binary: binary-without-manpage hello-static
-W: binary: binary-without-manpage hello.static
-W: binary: binary-without-manpage iminusrbin
-W: binary: binary-without-manpage static-hello
+W: binary: binary-without-manpage usr/bin/hello
+W: binary: binary-without-manpage usr/bin/hello-static
+W: binary: binary-without-manpage usr/bin/hello.static
+W: binary: binary-without-manpage usr/bin/iminusrbin
+W: binary: binary-without-manpage usr/bin/static-hello
 W: binary: changelog-file-not-compressed changelog
 W: binary: doc-base-file-unknown-format binary:14 esp
 W: binary: executable-not-elf-or-script ./usr/bin/iminusrbin

Modified: trunk/testset/tags.debug
===================================================================
--- trunk/testset/tags.debug	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/tags.debug	2007-04-11 02:25:06 UTC (rev 840)
@@ -8,6 +8,6 @@
 I: debug source: non-standard-architecture ppc64
 W: debug source: changelog-should-not-mention-nmu
 W: debug source: out-of-date-standards-version 3.7.0 (current is 3.7.2)
-W: hello: binary-without-manpage hello
-W: hello: binary-without-manpage hello.dbg
+W: hello: binary-without-manpage usr/bin/hello
+W: hello: binary-without-manpage usr/bin/hello.dbg
 W: libhello0-dbg: shared-lib-without-dependency-information ./usr/lib/libhello.so.dbg

Modified: trunk/testset/tags.diffs
===================================================================
--- trunk/testset/tags.diffs	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/tags.diffs	2007-04-11 02:25:06 UTC (rev 840)
@@ -15,7 +15,7 @@
 W: diffs source: configure-generated-file-in-source subdir-good/config.status
 W: diffs source: diff-contains-substvars debian/substvars
 W: diffs source: out-of-date-standards-version 3.5.9 (current is 3.7.2)
-W: diffs: binary-without-manpage diffs
+W: diffs: binary-without-manpage usr/bin/diffs
 W: diffs: possible-missing-colon-in-closes l11:Closes 456712
 W: diffs: possible-missing-colon-in-closes l12:Closes Bug# 123893
 W: diffs: possible-missing-colon-in-closes l13:Closes #1239124

Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/tags.filenames	2007-04-11 02:25:06 UTC (rev 840)
@@ -15,6 +15,7 @@
 E: filenames: package-installs-packlist usr/lib/perl5/foo/.packlist
 E: filenames: postinst-does-not-call-updatemenus usr/share/menu/menu
 E: filenames: postrm-does-not-call-updatemenus usr/share/menu/menu
+E: filenames: subdir-in-usr-bin usr/bin/bin/
 E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink5wrong ../menu/../somethingelse
 E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink6wrong ./file4
 E: filenames: symlink-contains-spurious-segments usr/lib/filenames/symlink7wrong ../menu/./something
@@ -40,9 +41,12 @@
 W: filenames source: svn-commit-file-in-source files/svn-commit.tmp
 W: filenames: arch-inventory-file-in-package files/.arch-inventory
 W: filenames: bad-permissions-for-ali-file usr/lib/ada/adalib/test.ali
-W: filenames: binary-without-manpage testxbin
-W: filenames: binary-without-manpage testxbin2
+W: filenames: binary-without-manpage usr/X11R6/bin/testxbin2
+W: filenames: binary-without-manpage usr/bin/X11/testxbin
+W: filenames: binary-without-manpage usr/bin/mh/read
 W: filenames: cvsignore-file-in-package files/.cvsignore
+W: filenames: executable-not-elf-or-script ./usr/bin/bin/bad
+W: filenames: executable-not-elf-or-script ./usr/bin/mh/read
 W: filenames: extra-license-file usr/share/pixmaps/COPYING
 W: filenames: extra-license-file usr/share/pixmaps/license.foo
 W: filenames: extra-license-file usr/share/pixmaps/license.txt

Modified: trunk/testset/tags.manpages
===================================================================
--- trunk/testset/tags.manpages	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/tags.manpages	2007-04-11 02:25:06 UTC (rev 840)
@@ -27,6 +27,7 @@
 E: manpages: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/
 E: manpages: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/rstartd
 E: manpages: stray-directory-in-manpage-directory usr/share/man/man1/not-a-man-page.1.gz/
+E: manpages: subdir-in-usr-bin usr/bin/bin/
 E: manpages: x11-games-should-be-in-usr-games usr/X11R6/man/man6/X11R6-binary.man
 I: manpages: no-md5sums-control-file
 W: manpages source: ancient-standards-version 3.2.1 (current is 3.7.2)
@@ -34,7 +35,8 @@
 W: manpages source: changelog-should-mention-nmu
 W: manpages source: source-nmu-has-incorrect-version-number 4-0.0.1
 W: manpages: binary-nmu-uses-old-version-style 4-0.0.1
-W: manpages: binary-without-english-manpage binary-without-english-manpage
+W: manpages: binary-without-english-manpage usr/bin/binary-without-english-manpage
+W: manpages: executable-not-elf-or-script ./usr/bin/bin/bad
 W: manpages: executable-not-elf-or-script ./usr/bin/binary-without-english-manpage
 W: manpages: executable-not-elf-or-script ./usr/bin/usr-bin-binary-alt
 W: manpages: executable-not-elf-or-script ./usr/sbin/usr-sbin-binary

Modified: trunk/testset/tags.scripts
===================================================================
--- trunk/testset/tags.scripts	2007-04-08 20:43:00 UTC (rev 839)
+++ trunk/testset/tags.scripts	2007-04-11 02:25:06 UTC (rev 840)
@@ -23,20 +23,20 @@
 W: scripts source: package-uses-deprecated-debhelper-compat-version 1
 W: scripts source: source-nmu-has-incorrect-version-number 6
 W: scripts source: uses-dh-python-with-no-pycompat
-W: scripts: binary-without-manpage lefty-foo
-W: scripts: binary-without-manpage make-foo
-W: scripts: binary-without-manpage perl-bizarre-1
-W: scripts: binary-without-manpage perl-bizarre-2
-W: scripts: binary-without-manpage perl-bizarre-3
-W: scripts: binary-without-manpage perlfoo
-W: scripts: binary-without-manpage py2foo
-W: scripts: binary-without-manpage pyfoo
-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: binary-without-manpage wishfoo
+W: scripts: binary-without-manpage usr/bin/lefty-foo
+W: scripts: binary-without-manpage usr/bin/make-foo
+W: scripts: binary-without-manpage usr/bin/perl-bizarre-1
+W: scripts: binary-without-manpage usr/bin/perl-bizarre-2
+W: scripts: binary-without-manpage usr/bin/perl-bizarre-3
+W: scripts: binary-without-manpage usr/bin/perlfoo
+W: scripts: binary-without-manpage usr/bin/py2foo
+W: scripts: binary-without-manpage usr/bin/pyfoo
+W: scripts: binary-without-manpage usr/bin/rubyfoo
+W: scripts: binary-without-manpage usr/bin/suidperlfoo
+W: scripts: binary-without-manpage usr/bin/suidperlfoo2
+W: scripts: binary-without-manpage usr/bin/test.sh
+W: scripts: binary-without-manpage usr/bin/tkfoo
+W: scripts: binary-without-manpage usr/bin/wishfoo
 W: scripts: executable-is-not-world-readable usr/bin/perl-bizarre-2 0750 != 0755
 W: scripts: executable-is-not-world-readable usr/bin/suidperlfoo2 4751
 W: scripts: executable-not-elf-or-script ./usr/bin/perl-bizarre-3



Reply to: