myDSL Extensions (deprecated) :: Creating safe extensions
I've been trying to do the best I can at creating extensions which will cause as little trouble as possible. From what I understand, the safest way to accomplish this is to try to install everything into /opt and $HOME. This not only helps people with less RAM, but also prevents possible overwriting of files already installed on the system. If a user has installed a certain lib which is required by a certain application, it could be harmful to reinstall that lib with a different version. In some situations I've tried to install a link to an existing lib, and so far it seems to work....but this is not ideal...i'd like to be able to add these libs or symlinks to /opt instead of */lib.
I keep running into applications which require libs not included in DSL, and usually I trash the extension if I can't work around it...so what i'm hoping to do is get a better idea of how applications call for these libs, and try to find a way to incorporate them into the extension while leaving the system untouched. I understand that wrappers can be used to point the application to certain libs, but is this specific to the application?
For example, today I'm attempting to make an extension for Audacity...the sources for most of the recommended libs are included, so I assumed that they'd be installed along with the application...particularly when some of the configure options are "--with-libsndfile=local". However, after installing the program into /opt/audacity/, I discovered that the libs were installed into the system lib dirs instead of /opt/audacity/lib/.
I started thinking that perhaps copying the libs into /opt/audacity/lib/ would work if i made a wrapper including the line "sudo ldconfig /opt/audacity/lib"...but this seems kinda sloppy to do each time you run the program, and I'm not even sure it would work.
Does anyone have some suggestions on other ways to include libs into extensions, or how to make wrappers to point the application to specific lib directories?
thanks.
Search the forums for ways to export your paths..
roberts has some examples of this technique posted.
Begin by placing your startup commands in a script, to be used as a shell wrapper...
Add the commands "export PATH=/opt/audacity/lib, $PATH" etc...
Don't quote this , as I'm roughly doing this from memory...
Many other users here are much more gifted in wrappers than I ...
Sometimes, even this doesn't work, depending on how the program was written..
Some of the other extensions I have moved to /opt had command-line options
to point to a dir for file support, like "--config-dir /opt/filename/path/ " ...
And some just can't be done... without altering the sources of builds...
They simply ARE going to look in xyz directory, no matter what, regardless of path...
73
ke4nt
ok...so it is as i assumed....different ways for different applications.
I've got a fairly good understanding of how variables work, but I didn't know that $PATH had anything to do with libs.
One thing I found annoying with the current project is that audacity seems to have no command line options. However, I see now that it does have an environmental variable $AUDACITY_PATH, which may be what I'm looking for =o)
Thanks, as always, for the input.
Yep,
I think you've got it..
73
ke4nt
Hi Mikshaw,
You could try suggesting that a future version of DSL could
include a directory, /lib, in /opt (so /opt/lib) that is cited in /etc/ld.conf.so....
..... as you might guess, being me and a live user and having scant regard for
what others consider sacrosanct I use a tiny little .tar.gz to do exactly that
(i.e. creates the directory and overwrites ld.conf.so). Its read in before
the .dsl's and if I want any library then it can just go in /opt/lib from the
start........sweet as.....but not exactly inkeeping with the title of your post,
perhaps....
All the best.
Next Page...
original here.