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

Bug#652011: general: Repeated pattern of FHS violation: Dependencies of /sbin and /bin, belong in /lib



  After some time, I've recently gotten back to tackling the FHS dynamic library dependency issue for separate root and usr partitions.

  Testing release 0.1.3 of my FHS-utils package is available at git://everythingwiki.sytes.net/fhs-utils. It currently consists of three commands:

fhscheck - check system for FHS compliance [that's an overstatement, but it checks a couple things, anyway]
fhslibcomply - make essential libraries accessible in root partition
undofhslibcomply - safely undo changes made by fhslibcomply

  For anyone interested, I hope you will find the documentation in the man pages, README, and code itself to be decent enough to be worth giving the package a moment of consideration. Although I personally think it is pretty well done, neither dynamic-linking related issues nor Perl programming have previously been areas of specialization for me (i.e. I'm still learning), so forgive me for any dumb stuff in there.

  fhslibcomply accomplishes the goal that I wished to achieve. Basically, it finds executables in /{s,}bin which have dynamic linked dependencies in /usr, copies the needed /usr libraries to somewhere in /lib*, and documents the process so it can be reverted later, or whatever. With the help of fhslibcomply, the command:

find /*bin -type f -exec ldd '{}' \; |& grep /usr/ | wc -l

will now return 0 on my various Squeeze and Sid machines, rather than than the positive (16,22,24) values I would see without it. Thus I can now boot in to my encrypted root partition without seeing the errors I used to see involving libraries that live in the later-to-be-mounted /usr.

  I'm happy with how the package works for me personally from the command line. What something like FHS-utils could mean for helping a distro like Debian maintain general FHS compliance on user systems is yet another question entirely. Possibilities include:
1) The fhscheck tool could simply be used by package maintainers to help guide decisions about where to install their libraries (/usr/lib vs. /lib).
2) At the much more intrusive end of the spectrum, some variant of the present fhslibcomply could be triggered every time new packages are installed or removed to see if the overall set of dependencies between / and /usr has changed, and (at least on systems with separate mounts) make any necessary copies, say, from the one to the other, so that the root partition always has all of the libraries it needs (as defined by /sbin and /bin).
3) Etc.

  I am as yet not a DM myself, and maintaining a package that mucks around with essential system components would obviously be jumping quite into the deep end of things. If there are any DD's out there who find this subject interesting and would like to work with me on it, I will be delighted to hear from you.

-Zach


Reply to: