Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (5) </ [1] 2 3 4 5 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Creating safe extensions, any ideas are welcome< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Aug. 15 2004,21:02 QUOTE

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.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
ke4nt1 Offline





Group: Members
Posts: 2329
Joined: Oct. 2003
Posted: Aug. 15 2004,23:29 QUOTE

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
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Aug. 16 2004,02:53 QUOTE

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.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
ke4nt1 Offline





Group: Members
Posts: 2329
Joined: Oct. 2003
Posted: Aug. 16 2004,05:30 QUOTE

Yep,
I think you've got it..

73
ke4nt
Back to top
Profile PM 
nucpc Offline





Group: Members
Posts: 89
Joined: Dec. 2003
Posted: Aug. 16 2004,19:58 QUOTE

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.
Back to top
Profile PM 
22 replies since Aug. 15 2004,21:02 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (5) </ [1] 2 3 4 5 >/
reply to topic new topic new poll
Quick Reply: Creating safe extensions

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code