Thanks Jan, Tollef, Mats, and Russ for the helpful comments. What I have
gathered and deduced is the following:

1) A given package can make at most one directory in /usr/lib, but then
can do whatever it wants as far as the subdirectory tree therein.

2) All essential libraries should live either directly in /lib{,32,64},
or in any subdirectories thereof that are *explicitly specified* in
/etc/ld.so.conf.

3) Discussion on this list, and also a related discussion I participated
in with several Debian developers at the beginning of this year, reveals
that there is a major camp within the Linux community that would wish to
abandon the whole root vs. usr distinction and simplify the directory
structure, while there also remains a major camp that thinks that there
are still significant use cases for the distinction and is by no means
ready to agree to collapse it at least on a universal scale.

4) There are tools in at least some, if not most/all, distros for at
least some limited checking of whether individual packages in that
distro do anything to violate FHS. However, there are not any well known
tools for checking how the system as a whole is doing with respect to
FHS, in particular (in the distro context) for checking the relationship
*between* various packages. For example, a package could provide an
executable which it considers essential and put it in /bin, while
relying on a shared library package that didn't realize that an
essential guy would be depending on it and hence put the library in
/usr/lib.
  I got into this earlier this year when looking at bootlog errors on my
Debian laptop. I have an encrypted root partition (for /etc sake) and an
unencrypted /usr partition (for application speed sake). I was getting
boot errors precisely because of the situation described above: an /sbin
command needed stuff in /usr/lib that hadn't been mounted yet. Now, I
realize that someone could argue: "By the time you've successfully
gotten in to an encrypted partition, then mounting an unencrypted
partition should be child's play. Your booter was just jumping the gun
by not doing things in the right order." Maybe. But I'm the kind of guy
that says as long as there *is* a root vs. usr distinction, I want it
set up right!
  So, recently I've written a Perl package whose primary functionality,
at least for now, is to check binaries in root for any dependencies in
/usr, and then, if desired, to "fix" the problem by, say, copying them
from somewhere in /usr/lib* to somewhere in /lib*, while taking notes of
its actions so that the operations can later be "undone". I should be
ready within a couple days to release a testing version, and will let
this list know in case anyone else is willing to try it.

-Zach

_______________________________________________
fhs-discuss mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/fhs-discuss

Reply via email to