DSL Ideas and Suggestions :: EUREKA!!!!



I was just puttering around.

I got the idea of making my personal DSL system look more like Windows - you know, just to see if it could be done.

First, let me mention that there are very few - and not well-written - windows-alike file managers around (X-Plorer looks promising, but is, as yet, unavailable)

Anyway, I came across FileGarden, which is a pretty good-looking filemanager, and I decided to try it out.

Well, it installs itself entirely in opt, along with some libs.  Part of the installation instructions was to add a line to /etc/ld.so.conf

After further investigation, I discovered that you could store libraries ANYWHERE on your linux system, as long as that path was in that file.

So, the solution?  In the next version of DSL, have mountci add /opt/$APPNAME/lib to /etc/ld.so.conf and run ldconfig!  With that, you don't even need to link the libs into the filesystem (the more one can limit this, the better)!  

*pant* *pant*  Sorry, I'm getting too old for raving like a lunatic.

*implements it in the squashfs.dsl I'm working on*

That's a way-old-time cheat for us "older " linux guys..

Problem is that ldconfig also sometimes screws with lib symlinks.
Causing "unknown" issues with packages later on.

And who wants your path to be running thru a dozen extra
directories, possibly finding the WRONG copy of libGL.so.1,
or libXft.so.2 , which links to an even older version of libXft.so,
that corresponds to your package?
A search from an application will simply stop at the first copy it finds,
whether that copy corresponds to that app or not..   Uh Oh..
( assuming your placing a copy of each needed lib in every installed-to-opt
 application, and then simply setting the ld.so.conf path to include that dir. )

I suggest you test your theory with many different installed extensions first..
One or two installed extensions may fly, but once you begin to mix
gtk+ and gtk2, or different versions of perl, python, etc, then things get hairy.

And I don't really want 10 copies of libXYZ in my ramspace anyway.

Most of the contributed extensions were built by other users and individuals.
They are not "integrated" to work with eachother, but remain as separate
as possible, thus the .uci and .tar.gz extension methods.

The same thing you are describing can be done with a simple shell wrapper,
adding to the path for ONLY THAT SHELL the app runs in.  
When you exit the app, and the shell closes, the temporary path disappears,
leaving your default path pristine and untouched..

There's no need to make a global filesystem change to the path statement.

For an example,
look at my qcad.tar.gz extension, which makes a nice .uci as well..
Look in the /opt/start_qcad file.
You'll see the exported path statements for linking to libs within the extension,
as well as exporting paths for python, WITHOUT using mkwritable on the
filesystem or symlinking any files.
Once you exit, your back to the pristine DSL build.

Keep trying, and don't be hesitant to ask us questions.
cbagger01, roberts, john, SU, mikshaw, many others, and myself
are very familiar with DSL filesystems and the "layout of the land" .
and all of us are eager to help guide you thru your personal builds...

We'll be happy to show you the ropes, and teach/share what we can.

73
ke4nt

Hm... I see your point...
But, in a pinch, I think a script would work for some of the hairier programs to build (php is one of these)

IE:  back up ld.so.conf, modify it to have the extra lib line, run ldconfig, run the program, undo the change, run ldconfig...

Wow... that's a lot of work, especially for something like php which will be run for each page load under monkey - and held on-line continually under apache, it wouldn't work at all.

dern it.

Oh, and I take back what I said about poorly written windows-alike filemanagers.  Xfe is pretty sleek for its size.

Xfe, eh?

So, I can expect to receive an xfe.tar.gz extension from you in the near future?
I haven't seen any contributions posted under your name so far..
Xfe would be an excellent addition to the repository..

Send it with a .info and .md5.txt file to either..
ke4nt [at] damnsmalllinux [dot] org  -  
or
extensions [at] damnsmalllinux [dot] org

73
ke4nt

nucpc had suggested a while ago to use /opt/lib/ as a catch-all lib directory for tar.gz extensions.  In this case only one additional directory is added to the ld search.  I thought it was a good idea, but still has the possibility of problems with multiple versions of a single lib.

That said, it's still the best thing I've tried for working with extra libs, and I use this method in my own DSL setup.  Along with a /home/dsl/bin directory added to my $PATH it removes the need for wrapper scripts.
So far I haven't run into any problems, but then I generally use only a small handful of extensions....and they are mostly recompiled against the same libs.

Next Page...
original here.