LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   General Question - Non-Standard Directories (https://www.linuxquestions.org/questions/linux-from-scratch-13/general-question-non-standard-directories-425457/)

shevegen 03-16-2006 01:41 PM

General Question - Non-Standard Directories
 
Hi

Gobolinux uses stuff like /Programs/NameOfApplication/VersionNumber
instead of
/usr, /usr/local/
and so on.

It symlinks these files into /System/Links... somewhere there.

For several reasons, it is keeping /usr and so on as real links.
They said if they wouldnt do so, things would break.

My question is - which things would really break, and what are
the most important applications that would break (i.e. takes a
lot of time to fix) if you use a LFS system that uses ANY other
way to keep applications.

Thats my question #1.

Now to question number #2, it is a bit similar too

Lets consider a theoretical, chaotic system.
We are using a script that totally automates installation. It looks
at a rule set to know what it shall install, in which
order and so on. However since it is also a bit chaotic, it
wants to make chaos. Thus it will use the --prefix= notation
and totally use arbitrary directory names.

For example, it would install aterm under
/pkg/abcd10101
it would install glibc under
/Fantastic/Advura/kol
it would install zsh under
/98058095128901528152/zsh/98278912

And so on.
You see, this is ugly. But I want to know if it is feasible.
I want to know which other options exist.
A more "self aware" system... well if anyone wants to say something,
please do so :)

unSpawn 03-18-2006 07:19 AM

My question is - which things would really break, and what are the most important applications that would break (i.e. takes a lot of time to fix) if you use a LFS system that uses ANY other way to keep applications.
IMHO that's not an LFS-specific problem, but a general GNU/Linux issue. To help vendors, maintainers and others from installing apps all over the place there are guiding standards. "In the early days" there was the LFSSTND which is superceded by the FHS (please use a searchengine if interested).


The worst cases are applications with a built-in, hardcoded search path. If they don't find dependencies where they look they'll break instantly. All Linux ELF executables expect the shared library linker to be /lib/ld-linux.so. So Glibc should always reside in /lib (AFAIK, because /usr/lib is "trusted" as well?), and anyone who has experienced problems upgrading Glibc knows this will break everything that expects /lib/ld-linux.so (though usually easily fixable). Some libraries can be moved to other directories, but that involves either removing and adding search paths in /etc/ld.so.conf or preloading LD_LIBRARY_PATH or using /etc/ld.so.preload. Of course you could compile static, but that's a b*tch wrt managing a system, especially when vulnerabilities are fixed you'll have to pull in all the dependencies all over again. For applications that can't find other applications it usually means appending to the (search) $PATH.


Lets consider a theoretical, chaotic system. (..) Thus it will use the --prefix= notation and totally use arbitrary directory names.
For example, it would install aterm under /pkg/abcd10101

For this to "work" and be managed centrally, in /etc/profile.d/ create a resource for currently used shells and append the path to the binary directory. If any dependant libraries are installed outside the path (ldconfig -p) drop an include file in /etc/ld.so.conf.d/. Now you'll have to update all your WM GUI resource files to find the pixmaps, resource templates etc, etc there. Good luck.


it would install glibc under /Fantastic/Advura/kol
Well, since flexibility and versatility are the main strenghts of Linux this should trigger you to experiment with Linux until it breaks. So I'll just say you'll *have* to try that one out yourself. If you want to make the experience unforgettable make sure to destroy any have a bootable rescue CD's, floppies or LiveCD's you have.


it would install zsh under /98058095128901528152/zsh/98278912
And so on. You see, this is ugly. But I want to know if it is feasible.

Feasible yes, practical no.


I want to know which other options exist.
Adhere to either LFSSTND or FHS or be prepared to spend your days mending your system instead of using it.


A more "self aware" system...
Hmm. In your case I'd practice system backup & restores and use a searchengine to look for terms like "self-healing system" :-]


All times are GMT -5. The time now is 09:18 AM.