Are packages allowed to ship files in /srv?
See Bug#379176 against lintian for more discussion of this.
Are Debian packages allowed to ship files in /srv? (Not just create a
structure in /srv in postinst of an initial install, or point default
configuration files at /srv, but actually ship files in subdirectories of
/srv?) The relevant rationale in the FHS is:
This main purpose of specifying this is so that users may find the
location of the data files for particular service, and so that
services which require a single tree for readonly data, writable data
and scripts (such as cgi scripts) can be reasonably placed. Data that
is only of interest to a specific user should go in that users' home
directory.
The methodology used to name subdirectories of /srv is unspecified as
there is currently no consensus on how this should be done. One method
for structuring data under /srv is by protocol, eg. ftp, rsync, www,
and cvs. On large systems it can be useful to structure /srv by
administrative context, such as /srv/physics/www, /srv/compsci/cvs,
etc. This setup will differ from host to host. Therefore, no program
should rely on a specific subdirectory structure of /srv existing or
data necessarily being stored in /srv. However /srv should always
exist on FHS compliant systems and should be used as the default
location for such data.
Distributions must take care not to remove locally placed files in
these directories without administrator permission. [20]
[20] This is particularly important as these areas will often contain both
files initially installed by the distributor, and those added by the
administrator.
One side of the argument is that /srv is specified in the FHS and footnote
[20] implicitly gives permission for the distribution to install files in
it, so lintian shouldn't complain and should be happy with files installed
in /srv by the package. It is, after all, the FHS-mandated location for
certain types of data.
The other side (disclosure: this is my personal opinion) is that the
second-to-last sentence of the second paragraph argues strongly against
shipping files in /srv as part of the package. By doing so, the package
is imposing structure on /srv; if the local administrator wants a
different structure, it's difficult for them to maintain that change.
Each time the package is upgraded, the files would be reinstalled in the
package-forced location. I think that it would be fine to point
configuration files to /srv by default and tell people to put things
there, or to install a default structure via postinst after the first
installation, but not to put files in /srv directly in the package.
Note that the current lintian message needs to be updated either way; I'm
not saying that the exact text of the current lintian error is correct.
The question is whether this is still an error (with a different
description) or whether it's not an error.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: