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

Re: directory under /usr/bin -- Ok or not?

On Wed, Nov 02, 2011 at 01:31:06PM -0400, Yaroslav Halchenko wrote:
> Do we have any policy/recommendation forbidding/disadvising  having
> subdirectories under /usr/bin?

> Conventionally, for packages which ship bulk of command line tools with
> possible naming conflicts we seems to place them under /usr/lib/PACKAGE
> (often regardless them being arch-dep or not)

> I am packaging CMTK, where upstream agreed also to deliver a wrapper
> script (/usr/bin/cmtk) so there would be a single point of entry to run
> any needed command (in similar fashion to git), but also he made all
> cmdline tools become available from ... /usr/bin/CMTK

> I have checked FHS which only says:
> "The following directories, or symbolic links to directories, must be in /usr/bin..."

> so it seems to be ok to have subdirectories under /usr/bin (for /bin
> there is strict "must not"), and I failed to find something in
> debian policy forbidding or allowing taht.  So would it be ok?

No, it's not ok.  The per-package subdir should be created instead under
/usr/lib, and /usr/bin/cmtk can dispatch subcommands over there.

/usr/bin is on the path.  Subdirs of /usr/bin are not on the path and should
not have to be added.  Therefore there is no point in having subdirs of
/usr/bin, regardless of whether the FHS currently makes it explicit that
it's prohibited.

(It actually *is* a requirement from the FHS, because the FHS says that a
subdir in /usr/lib is the place where things must be placed; there's just no
backlink from the definition of /usr/bin that makes this clear without
reading the full FHS for context.)

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: