commit:     f49883323267b30ec167257002be8324a5c524cf
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 17:05:10 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 17 20:55:16 2023 +0000
URL:        https://gitweb.gentoo.org/proj/policy-guide.git/commit/?id=f4988332

filesystem: Disallow subdirs in /bin and its friends (PG 0201)

The FHS says that directories /bin, /sbin and their counterparts in
/usr don't contain any subdirectories:
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s04.html#requirements2
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s16.html#requirements8
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s04.html#requirements9a
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s10.html#requirements10a

Packages that need specific subdirs for binaries should install them
in /usr/lib or /usr/libexec.

Bug: https://bugs.gentoo.org/912354
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 filesystem.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/filesystem.rst b/filesystem.rst
index 52e20a3..f3b8cdf 100644
--- a/filesystem.rst
+++ b/filesystem.rst
@@ -27,6 +27,8 @@ directories:
    - /usr
    - /var
 
+There must be no subdirectories in /bin and /sbin.
+
 Furthermore, only the following subdirectories of /usr are permitted:
 
 .. hlist::
@@ -41,6 +43,8 @@ Furthermore, only the following subdirectories of /usr are 
permitted:
    - /usr/src
    - /usr/<triplet>
 
+There must be no subdirectories in /usr/bin and /usr/sbin.
+
 Furthermore, within /usr/share/doc hierarchy only a subdirectory named
 after full package name and version with revision (PF) is permitted.
 

Reply via email to