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

lintian: r711 - in trunk: checks debian testset testset/filenames/debian



Author: rra
Date: 2006-08-19 00:46:52 +0200 (Sat, 19 Aug 2006)
New Revision: 711

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/debian/changelog
   trunk/testset/filenames/debian/rules
   trunk/testset/tags.filenames
Log:
* checks/files{.desc,}:
  + [RA] Provide a better explanation of why Debian packages shouldn't
    ship files in /srv.  (Closes: #379176)

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2006-08-18 22:19:42 UTC (rev 710)
+++ trunk/checks/files	2006-08-18 22:46:52 UTC (rev 711)
@@ -403,12 +403,17 @@
 	    tag "subdir-in-bin", "$file";
 	}
     }
+    # ---------------- /srv
+    elsif ($file =~ m,^srv/.,) {
+	tag "dir-or-file-in-srv", "$file";
+    }
     # ---------------- FHS directory?
     elsif ($file =~ m,^[^/]+/$, and $file ne './' and
-	   $file !~ m,^(bin|boot|dev|etc|home|lib(64|32)?|mnt|opt|root|sbin|tmp|usr|var)/,) { # Make an exception for the base-files package here, because it
-	# installs a slew of top-level directories for setting up the
-	# base system.  (Specifically, /cdrom, /floppy, /initrd, and /proc
-	# are not mentioned in the FHS).
+	   $file !~ m,^(bin|boot|dev|etc|home|lib(64|32)?|mnt|opt|root|sbin|srv|tmp|usr|var)/,) {
+	# Make an exception for the base-files package here and other similar
+	# packages because they install a slew of top-level directories for
+	# setting up the base system.  (Specifically, /cdrom, /floppy,
+	# /initrd, and /proc are not mentioned in the FHS).
 	tag "non-standard-toplevel-dir", "$file"
 	    unless $pkg eq 'base-files' 
 	    or $pkg eq 'hurd' 

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2006-08-18 22:19:42 UTC (rev 710)
+++ trunk/checks/files.desc	2006-08-18 22:46:52 UTC (rev 711)
@@ -360,6 +360,21 @@
 Info: Debian packages should not install into <tt>/opt</tt>, because it
  is reserved for add-on software.
 
+Tag: dir-or-file-in-srv
+Type: error
+Ref: fhs 3
+Info: Debian packages should not install into <tt>/srv</tt>.  The
+ specification of <tt>/srv</tt> states that its structure is at the
+ discretion of the local administrator and no package should rely on any
+ particular structure.  Debian packages that install files directly into
+ <tt>/srv</tt> can't adjust for local policy about its structure and in
+ essence force a particular structure.
+ .
+ If a package wishes to put its data in <tt>/srv</tt>, it must do this in
+ a way that allows the local administrator to specify and preserve their
+ chosen directory structure (such as through post-install configuration,
+ setup scripts, debconf prompting, etc.).
+
 Tag: third-party-package-in-python-dir
 Type: warning
 Info: According to <a href="http://www.python.org/doc/essays/packages.html";>

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-18 22:19:42 UTC (rev 710)
+++ trunk/debian/changelog	2006-08-18 22:46:52 UTC (rev 711)
@@ -20,6 +20,9 @@
     + [RA] ~ is now permitted in version numbers.  (Closes: #381965)
     + [RA] Catch and check dependencies correctly for debconf-updatepo run
       from the clean target.  Thanks, James Westby.  (Closes: #380399)
+  * checks/files{.desc,}:
+    + [RA] Provide a better explanation of why Debian packages shouldn't
+      ship files in /srv.  (Closes: #379176)
   * checks/manpages{.desc,}:
     + [RA] Warn about manpage short descriptions of the form "manual page
       for program" (usually generated by help2man).

Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules	2006-08-18 22:19:42 UTC (rev 710)
+++ trunk/testset/filenames/debian/rules	2006-08-18 22:46:52 UTC (rev 711)
@@ -95,6 +95,9 @@
 	gzip -9 debian/tmp/usr/share/doc/filenames/Changes
 	ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz
 
+	install -d debian/tmp/srv/foo
+	touch debian/tmp/srv/foo/bar
+
 	ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz
 	ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok
 	ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong

Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames	2006-08-18 22:19:42 UTC (rev 710)
+++ trunk/testset/tags.filenames	2006-08-18 22:46:52 UTC (rev 711)
@@ -1,5 +1,7 @@
 E: filenames: bad-menu-file-name usr/lib/menu/menu
 E: filenames: bad-menu-file-name usr/share/menu/menu
+E: filenames: dir-or-file-in-srv srv/foo/
+E: filenames: dir-or-file-in-srv srv/foo/bar
 E: filenames: file-in-usr-something-x11-without-pre-depends usr/include/X11/
 E: filenames: lengthy-symlink usr/lib/filenames/symlink4wrong ../filenames/symlink2
 E: filenames: lengthy-symlink usr/share/doc/filenames/version.txt.gz ../filenames/doc/version6.txt.gz
@@ -53,6 +55,7 @@
 W: filenames: file-in-unusual-dir files/Maelstrom Sound
 W: filenames: file-in-unusual-dir files/Maelstrom Sound.mine
 W: filenames: file-in-unusual-dir files/svn-commit.tmp
+W: filenames: file-in-unusual-dir srv/foo/bar
 W: filenames: menu-file-in-usr-lib usr/lib/menu/menu
 W: filenames: no-priority-field
 W: filenames: no-section-field



Reply to: