/usr/local policy
Hello,
I would like to propose that the Debian policy document be amended with
respect to handling of /usr/local. The relevant sections are 3.1.1 which
says that Debian ought to comply with FHS, and section 3.1.2 which says
that packages may create directories under /usr/local.
On the face of it, these two sections are contradictory. Section 4.6
of the FHS describes the /usr/local hierarchy. Briefly, the OS install
may create the following empty stubs
/usr/local/{bin,games,include,lib,sbin,share,src}
and nothing else. The subdirectories mentioned in Debian Policy section
3.1.2 are not permissible.
On the other hand, policy section 3.1.1 is oddly worded, so maybe I am
misreading it. It says:
3.1.1 Linux File system Structure
The location of all installed files and directories must comply
with the Linux File system Hierarchy Standard (FHS). The latest
version of this document can be found [...]
Hmm. This says that the *location* of directories must comply with FHS.
Why doesn't this read simply "The Debian file system must fully comply
with FHS"? Is it intended that Debian follow the FHS only in *location*
but not in *intent* or *use* of directories? For instance, FHS allows the
directory location /usr/lib. Can I ignore the *intent* of /usr/lib, and
put a user-executable binary in it? Or am I reading too much into this
bit of policy?
Well, let's assume that I'm reading too much into this, and that the
Policy writers really intended that Debian be fully FHS compliant.
In that case, the policy document could be amended by striking 3.1.2
completely, and changing the first sentence of 3.1.1 from:
The location of all installed files and directories must comply
with the Linux File system Hierarchy Standard (FHS).
to
Debian packages must comply with the Linux File system Hierarchy
Standard (FHS).
---
The impetus for this came from a recent thread on -devel in which a broken
package managed to remove /usr/local (which was a symbolic link), breaking
his system completely:
http://www.debian.org/Lists-Archives/debian-devel-0002/msg00383.html
Of course, this is not a new problem. I didn't do an exhaustive search,
but here's a similar message from September 1998:
http://www.debian.org/Lists-Archives/debian-policy-9809/msg00306.html
I did a small bit of searching on -policy to see if I could discover the
rationale for having the packages create empty directories under
/usr/local. I didn't manage to find any message explaining this. All I
could find was the single sentence in policy section 3.1.2:
However, the package should create empty directories below
/usr/local so that the system administrator knows where to place
site-specific files.
I think this is a weak reason, and argue against it in a recent post on
-devel:
http://www.debian.org/Lists-Archives/debian-devel-0002/msg01276.html
Hoping this message doesn't get lost in the release madness,
-Steve
Reply to: