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

Bug#787816: Replace FHS 2.3 by FHS 3.0 in the Policy.



On Fri, 05 Jun 2015 at 20:43:10 +0900, Charles Plessy wrote:
> Le Thu, Jun 04, 2015 at 07:09:00PM -0700, Russ Allbery a écrit :
> > I have not looked at this at all, but this list should be aware that it
> > exists.
> 
> > The LSB workgroup is happy to announce the release of FHS 3.0.
> ... 
> > Release notes can be found here:
> > 
> > https://wiki.linuxfoundation.org/en/FHSReleaseNotes30

Unfortunately those release notes have vanished, but a copy can be found at:
https://web.archive.org/web/20160624022300/wiki.linuxfoundation.org/en/FHSReleaseNotes30

I've prepared patches for this, which are available here:
https://salsa.debian.org/smcv/policy/merge_requests/1/diffs

I've attached them here, except for the patch that replaces the bundled
copy of FHS v2.3 with a bundled copy of FHS v3.0, which is inconveniently
large. I think patch 0002 is the only normative one?

The only thing I found that would make Debian non-compliant is the
fact that the /usr/bin/mh/ directory used to be allowed, but is not
allowed any more. For the moment I think this should be documented as a
departure from FHS v3.0, and if anyone cares enough about removing that
exception, it should be discussed with the maintainers of nmh (which ships
/usr/bin/mh/) and mailutils-mh (which is technically non-Policy-compliant,
although does comply with the spirit of the policy) on a separate bug.

I got my copy of the FHS source code from
http://refspecs.linuxfoundation.org/FHS_3.0/ (which contains source and
compiled copies), not from
http://bzr.linuxfoundation.org/loggerhead/lsb/devel/fhs-spec/changes
(which I only found later), and I didn't include the bundled copy of
docbook-xsl or the outdated FHS in draft.sgml. I used a directory
instead of a tarball, for better transparency.

> By the way, I wonder if the debian-policy package is the best place for
> shipping a copy of the FHS.

Probably not, but let's not delay its adoption by another 3 years while
we paint that particular bike shed :-)

    smcv
>From 8867b0b88d311739fd360f1f6dc945406c39ed54 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Thu, 14 Jun 2018 11:43:04 +0100
Subject: [PATCH 2/3] Update to FHS v3.0

Notable changes that this causes:

* A GNU-style /usr/libexec is now allowed.

Notable non-changes:

* /usr/games, /usr/share/games and /usr/lib/games were optional in
  FHS 2.3, and are still optional. It is up to us whether we want
  to keep using those directories.

Drop our special exception for /run, and replace it with a requirement
that the pairs (/run, /var/run) and (/run/lock, /var/lock) are made
equivalent via symlinks or bind mounts. The FHS does not mandate this
(although I think it should) and some misguided distributions make
/run and /var/run non-equivalent, but they have always been equivalent
on Debian.

Drop our special exception for /sys, which is now standardized in the
FHS.

Add a special exception for /usr/bin/mh/ for now, restoring the FHS
2.3 situation (dropping this might be a good idea, but should be
disussed with the nmh and mailutils-mh maintainers if desired).

Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #787816
---
 policy/ch-opersys.rst | 29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/policy/ch-opersys.rst b/policy/ch-opersys.rst
index 7d85c00..b18e2c2 100644
--- a/policy/ch-opersys.rst
+++ b/policy/ch-opersys.rst
@@ -12,7 +12,7 @@ File System Structure
 ~~~~~~~~~~~~~~~~~~~~~
 
 The location of all files and directories must comply with the
-Filesystem Hierarchy Standard (FHS), version 2.3, with the exceptions
+Filesystem Hierarchy Standard (FHS), version 3.0, with the exceptions
 noted below, and except where doing so would violate other terms of
 Debian Policy. The following exceptions to the FHS apply:
 
@@ -76,25 +76,20 @@ Debian Policy. The following exceptions to the FHS apply:
     ``/etc``, or at least are symlinked there, is relaxed to a
     recommendation.
 
-8.  The additional directory ``/run`` in the root file system is
-    allowed. ``/run`` replaces ``/var/run``, and the subdirectory
-    ``/run/lock`` replaces ``/var/lock``, with the ``/var`` directories
-    replaced by symlinks for backwards compatibility. ``/run`` and
-    ``/run/lock`` must follow all of the requirements in the FHS for
-    ``/var/run`` and ``/var/lock``, respectively, such as file naming
-    conventions, file format requirements, or the requirement that files
-    be cleared during the boot process. Files and directories residing
-    in ``/run`` should be stored on a temporary file system.
+8.  The ``/var/run`` and ``/var/lock`` directories are required to be
+    made equivalent to ``/run`` and ``/run/lock`` respectively, for
+    example using symbolic links or bind-mounts.
 
-9.  The ``/sys`` directory in the root filesystem is additionally
-    allowed.  [#]_
+9.  The ``/var/www`` directory is additionally allowed.
 
-10. The ``/var/www`` directory is additionally allowed.
-
-11. The requirement for ``/usr/local/libqual`` to exist if ``/libqual``
+10. The requirement for ``/usr/local/libqual`` to exist if ``/libqual``
     or ``/usr/libqual`` exists (where ``libqual`` is a variant of
     ``lib`` such as ``lib32`` or ``lib64``) is removed.
 
+11. The requirement for there to be no subdirectories in ``/usr/bin``
+    is relaxed to allow the ``mh`` mail-handling suite to create
+    ``/usr/bin/mh/``, as was allowed in FHS version 2.3.
+
 12. On GNU/Hurd systems, the following additional directories are
     allowed in the root filesystem: ``/hurd`` and ``/servers``.  [#]_
 
@@ -1027,10 +1022,6 @@ Debian, so this section has been removed.
    This is necessary for architecture-dependent headers file to coexist
    in a ``multiarch`` setup.
 
-.. [#]
-   This directory is used as mount point to mount virtual filesystems to
-   get access to kernel information.
-
 .. [#]
    These directories are used to store translators and as a set of
    standard names for mount points, respectively.
-- 
2.17.1

>From 3949e228bda637a7570afdb53f153e751d7e7923 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Thu, 14 Jun 2018 11:43:25 +0100
Subject: [PATCH 3/3] Change upstream references for FHS to point to the Linux
 Foundation

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 policy/ch-opersys.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/policy/ch-opersys.rst b/policy/ch-opersys.rst
index b18e2c2..a0c240a 100644
--- a/policy/ch-opersys.rst
+++ b/policy/ch-opersys.rst
@@ -99,10 +99,11 @@ copy) <https://www.debian.org/doc/packaging-manuals/fhs/>`_ alongside
 this manual (or, if you have the debian-policy installed, you can try
 `FHS (local copy) <file:///usr/share/doc/debian-policy/fhs/>`_). The
 latest version, which may be a more recent version, may be found on `FHS
-(upstream) <http://www.pathname.com/fhs/>`_. Specific questions about
-following the standard may be asked on the ``debian-devel`` mailing
-list, or referred to the FHS mailing list (see the `FHS web
-site <http://www.pathname.com/fhs/>`_ for more information).
+(upstream) <http://refspecs.linuxfoundation.org/fhs.shtml>`_. Specific
+questions about following the standard may be asked on the
+``debian-devel`` mailing list, or referred to the FHS mailing list
+(see the `FHS web site <http://refspecs.linuxfoundation.org/fhs.shtml>`_
+for more information).
 
 .. _s9.1.2:
 
-- 
2.17.1


Reply to: