lintian: r1262 - in trunk: checks debian testset testset/filenames/debian
Author: rra
Date: 2008-03-12 09:24:21 +0100 (Wed, 12 Mar 2008)
New Revision: 1262
Modified:
trunk/checks/files
trunk/checks/files.desc
trunk/debian/changelog
trunk/testset/filenames/debian/rules
trunk/testset/tags.filenames
Log:
+ [RA] Issue errors for installing files under /var/www. This isn't
in FHS, may not be the document root, and may break local files if
it is the document root. Thanks, Joerg Jaspert. (Closes: #470403)
Modified: trunk/checks/files
===================================================================
--- trunk/checks/files 2008-03-12 07:56:07 UTC (rev 1261)
+++ trunk/checks/files 2008-03-12 08:24:21 UTC (rev 1262)
@@ -458,6 +458,13 @@
elsif ($type ne 'udeb' and $file =~ m,^var/lib/games/.,) {
tag "non-standard-dir-in-var", "$file";
}
+ # ---------------- /var/www
+ # Packages are allowed to create /var/www since it's historically been the
+ # default document root, but they shouldn't be installing stuff under that
+ # directory.
+ elsif ($file =~ m,^var/www/\S+,) {
+ tag "dir-or-file-in-var-www", $file;
+ }
# ---------------- /opt
elsif ($file =~ m,^opt/.,) {
tag "dir-or-file-in-opt", "$file";
Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc 2008-03-12 07:56:07 UTC (rev 1261)
+++ trunk/checks/files.desc 2008-03-12 08:24:21 UTC (rev 1262)
@@ -377,6 +377,25 @@
Type: error
Info: Documentation files should be owned by <tt>root/root</tt>.
+Tag: dir-or-file-in-var-www
+Type: error
+Ref: fhs 5
+Info: Debian packages should not install files under <tt>/var/www</tt>.
+ This is not one of the <tt>/var</tt> directories in the File Hierarchy
+ Standard and is under the control of the local administrator. Packages
+ should not assume that it is the document root for a web server; it is
+ very common for users to change the default document root and packages
+ should not assume that users will keep any particular setting.
+ .
+ Packages that want to make files available via an installed web server
+ should instead put instructions for the local administrator in a
+ README.Debian file and ideally include configuration fragments for common
+ web servers such as Apache.
+ .
+ As an exception, packages are permitted to create the <tt>/var/www</tt>
+ directory due to its past history as the default document root, but
+ should at most copy over a default file in postinst for a new install.
+
Tag: dir-or-file-in-tmp
Type: error
Info: Packages should not install into <tt>/tmp</tt> or <tt>/var/tmp</tt>.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-03-12 07:56:07 UTC (rev 1261)
+++ trunk/debian/changelog 2008-03-12 08:24:21 UTC (rev 1262)
@@ -21,6 +21,9 @@
the archive. Thanks, Y Giridhar Appaji Nag. (Closes: #469603)
+ [RA] Check for numeric owners or groups outside of the reserved
static ranges. Patch from Håkon Stordahl. (Closes: #469924)
+ + [RA] Issue errors for installing files under /var/www. This isn't
+ in FHS, may not be the document root, and may break local files if
+ it is the document root. Thanks, Joerg Jaspert. (Closes: #470403)
* checks/scripts:
+ [RA] Attempt to quash some Perl warnings.
+ [RA] *.py files in /usr/{lib,share}, /etc/init.d/skeleton, and *.ex
Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules 2008-03-12 07:56:07 UTC (rev 1261)
+++ trunk/testset/filenames/debian/rules 2008-03-12 08:24:21 UTC (rev 1262)
@@ -136,6 +136,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/var/www
+ echo foo > debian/tmp/var/www/foo
+
install -d debian/tmp/srv/foo
touch debian/tmp/srv/foo/bar
Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames 2008-03-12 07:56:07 UTC (rev 1261)
+++ trunk/testset/tags.filenames 2008-03-12 08:24:21 UTC (rev 1262)
@@ -4,6 +4,7 @@
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: dir-or-file-in-var-www var/www/foo
E: filenames: file-in-etc-not-marked-as-conffile /etc/gconf/schemas/test.schema
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
Reply to: