[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



  Ok, ok, ok, I think I may have got it. Some of your comments helped get me on the proper track of distro-oriented thinking where different systems are picking and choosing a different subset of available packages, but those packages have predefined locations where they have to put things. It has rightly been pointed out to me by others here that what is really needed is for libraries to be placed where they are needed according to the a posteriori knowledge of the selection of programs in /{s,}bin on the local system.

  So, I realized, how about a package (I propose the name fhslib) that effectively does something like this:
1) Check ldd /{s,}bin/* for dependencies in /usr, and put copies of of the those libraries in /lib.
2) Keep track (somewhere in /var) of what fhslib has put in /lib.
3) When other packages are installed or removed, fhslib gets triggered to update.
  Then we continue on as currently, with library package maintainers doing their best to be reasonable in where they think a library generally properly belongs, so that on any given system fhslib will hopefully only duplicate a small handful of libraries to pick up the slack.
  On my box fhslib would result in a reasonable redundancy of 4M:
$ ldd /{s,}bin/* | /bin/grep usr | cut -f2 -d">" | cut -f1 -d"(" | sort -u | xargs du -Lhc ; sudo du -sh /lib ; du -sh /usr/lib
1.7M    /usr/lib/libcrypto.so.0.9.8
148K    /usr/lib/libdbus-glib-1.so.2
60K    /usr/lib/libdiscover.so.2
168K    /usr/lib/libexpat.so.1
220K    /usr/lib/libfuse.so.2
288K    /usr/lib/libgobject-2.0.so.0
20K    /usr/lib/libgthread-2.0.so.0
68K    /usr/lib/libhal.so.1
44K    /usr/lib/libhal-storage.so.1
28K    /usr/lib/libnfnetlink.so.0
328K    /usr/lib/libnl.so.1
352K    /usr/lib/libntfs-3g.so.75
160K    /usr/lib/libntfs.so.10
44K    /usr/lib/libpcsclite.so.1
348K    /usr/lib/libssl.so.0.9.8
96K    /usr/lib/libz.so.1
4.0M    total

370M    /lib
2.1G    /usr/lib

Not being a package developer (yet!?), I am naive as to how much work it would take to put fhslib together. Unless someone else really wants to jump on it, I'd be willing to take this as an opportunity to learn a little Debian package management and give back to the community that has given me so much ("free beer").

-Zach

PS I think I would like fhslib to have a priority of "important" so that someone who installs even a basic Debian system can expect FHS compliancy. Indeed, in some sense it may be the most "minimal" systems where it is most important.

Reply to: