Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912354 - Disallow subdirs in /bin and its friends (PG 0201)
Summary: Disallow subdirs in /bin and its friends (PG 0201)
Status: RESOLVED FIXED
Alias: None
Product: Quality Assurance
Classification: Unclassified
Component: Policies (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard: Y/N/A: 5/0/0
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-08-16 11:48 UTC by Ulrich Müller
Modified: 2023-08-18 07:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for policy guide (0001-filesystem-Disallow-subdirs-in-bin-and-its-friends-P.patch,1.63 KB, patch)
2023-08-16 11:49 UTC, Ulrich Müller
Details | Diff
metadata/install-qa-check.d: Check for subdirs in /bin and its friends (0001-metadata-install-qa-check.d-Check-for-subdirs-in-bin.patch,1.20 KB, patch)
2023-08-16 11:50 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2023-08-16 11:48:12 UTC
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.
Comment 1 Ulrich Müller gentoo-dev 2023-08-16 11:49:28 UTC
Created attachment 867981 [details, diff]
Patch for policy guide
Comment 2 Ulrich Müller gentoo-dev 2023-08-16 11:50:38 UTC
Created attachment 867982 [details, diff]
metadata/install-qa-check.d: Check for subdirs in /bin and its friends
Comment 3 Ulrich Müller gentoo-dev 2023-08-16 11:51:59 UTC
QA team, please vote on the update of the policy.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-08-16 12:07:11 UTC
(In reply to Ulrich Müller from comment #3)
> QA team, please vote on the update of the policy.

Yes.
Comment 5 Ulrich Müller gentoo-dev 2023-08-16 16:59:22 UTC
Yes.
Comment 6 Andreas Sturmlechner gentoo-dev 2023-08-17 08:08:04 UTC
Yes.
Comment 7 David Seifert gentoo-dev 2023-08-17 08:50:15 UTC
Yes.
Comment 8 Larry the Git Cow gentoo-dev 2023-08-17 20:56:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/policy-guide.git/commit/?id=f49883323267b30ec167257002be8324a5c524cf

commit f49883323267b30ec167257002be8324a5c524cf
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-16 17:05:10 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-17 20:55:16 +0000

    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@gentoo.org>

 filesystem.rst | 4 ++++
 1 file changed, 4 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2023-08-17 22:08:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c755c274a4bd82e5881c315e3cfad05cc371179

commit 2c755c274a4bd82e5881c315e3cfad05cc371179
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-16 17:07:09 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-17 21:49:37 +0000

    metadata/install-qa-check.d: Check for subdirs in /bin and its friends
    
    Bug: https://bugs.gentoo.org/912354
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 metadata/install-qa-check.d/08gentoo-paths | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-18 03:14:12 UTC
yes
Comment 11 Ulrich Müller gentoo-dev 2023-08-18 07:23:13 UTC
Accepted unanimously.