[PC-BSD Testing] Small thought about PBIs... Request for comments :)

A.Yerenkow yerenkow at uct.ua
Tue Jul 21 14:10:06 PDT 2009


On 22.07.2009 0:03, A.Yerenkow wrote:
> On 21.07.2009 23:50, Kris Moore wrote:
>    
>> On Tue, 21 Jul 2009, A.Yerenkow wrote:
>>
>>
>>      
>>> On 21.07.2009 23:37, Kris Moore wrote:
>>>
>>>        
>>>> This is a good idea, that I've also given some thought, but here's the problem that needs
>>>> to be overcome first. Our PBIs are each compiled with a different LOCALBASE, which changes
>>>> pretty much constantly.
>>>>
>>>> I.E:
>>>>
>>>> /Programs/FireFox3.0.1
>>>> /Programs/FireFox3.5.0
>>>>
>>>> This LOCALBASE change effects all the packages / binaries / libraries that are compiled. If we did
>>>> use a saved package, then the libraries would be set to /Programs/FireFox3.0.1 as their LOCALBASE,
>>>> but the real LOCALBASE should be /Programs/FireFox3.5.0 now. The only way I've found to fix this is
>>>> by re-compiling the packages, which is what it does now.
>>>>
>>>>
>>>>
>>>>          
>>> The package can be modified before installation;
>>> unpack; change in file +CONTENTS
>>> line
>>> @cwd /Programs/FireFox3.0.1
>>>    to
>>> @cwd /Programs/FireFox3.5.0
>>> pack;
>>> pkg_add then;
>>>
>>> Do we have any other stoppers?
>>>
>>>        
>> Thats not the issue at all :)
>>
>> The issue is that when you compile a binary / library with a custom LOCALBASE, that PATH gets
>> embedded into the resulting file. For example, do a strings of these files:
>>
>> # strings /PCBSD/local/kde4/bin/kalarm | grep PCBSD
>> # strings /PCBSD/local/lib/qt4/libQtDBus.so | grep PCBSD
>>
>> You'll see that /usr/PCBSD/local/lib and others are compiled directly in.
>> This can't simply be changed with a sed / awk script that I'm aware of.
>>
>>
>>      
> Yep, I get it after I sent email.
>
> Only solution I see is:
> have
>
> /Programs/FireFox3.5.0
>
> and link to it, like this:
> /localbase
>
> This dir is symlink to
>
> /Programs/FireFox3.5.0
>
> , all installation goes there, this dir is same for all PBIs, and
> doesn't exist in real PCBSD, with installed PBI;
> all libs got not from in-compiled path, but insted using LD_LIBRARY_PATH
>
> not sure how about fonts, etc; but for libs should be fine...
>
> Maybe later some other idea appear :)
>    
http://web.archive.org/web/20060719201954/http://www.visi.com/~barr/ldpath.html

If you must ship binaries that use shared libraries and want to allow 
your clients to install the program outside a 'standard' location, do 
one of the following:
   Ship your binaries as .o files, and as part of the install process 
relink them with the correct installation library path.
   Ship executables with a very long "dummy" run-time library path, and 
as part of the install process use a binary editor to substitute the 
correct install library path in the executable.

Kris, maybe some of this methods can be used?

>> --
>> Kris Moore
>> PC-BSD Software
>> _______________________________________________
>> Testing mailing list
>> Testing at lists.pcbsd.org
>> http://lists.pcbsd.org/mailman/listinfo/testing
>>
>>      
>
>    


-- 
Best Regards
Alexander Yerenkow,
Generalissimo of UCT



More information about the Testing mailing list