[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Relocatable packages ([OT] libtool .la files have absolute path's in them)



On Tue, Jan 29, 2002 at 08:10:15PM +0100, Gerhard Muntingh wrote:

> well I really don't like all the absolute paths in the .la files.  I think
> all installed files should be location independent.

This is a nice ideal, but quite unattainable at present.  Programs need to
simply and efficiently locate their auxiliary files.  This is workable for a
simple script or application, but not much more.

> RPM has locationindependant pkg's and Debian doesn't.  I find this a great
> disadvantage.  It would make transitions (like /usr/doc -> /usr/share/doc)
> and local mods much easier.  

Every deb is a "location independent" package:

dpkg -i --instdir=/usr/local/somewhere

Just don't expect nontrivial programs to work unless chrooted to
/usr/local/somewhere.

The limitations are exactly the same as "relocatable" RPMs; the only
difference is that (I believe) RPM has a way for the packager to say "this
package will still work if relocated".

http://www.rpm.org/max-rpm/ch-rpm-reloc.html

Especially the section "Relocatable Packages Must Contain Relocatable
Software" and following sections.  It gives examples of the kind of measures
that one must apply in order to make such an RPM.  Based on the example of a
configuration file that the program expects to find in /etc (though the
principles apply to all auxiliary files):

<quote>
 1. Set the prefix to /etc and package everything under /etc.

 2. Package everything somewhere other than /etc and leave out the config
    file entirely.
   
 3. Modify the program.
</quote>

It also suggests placing the config file under %prefix, then moving it into
/etc in a %post script.  This kind of unpleasantness is necessary to allow
relocated programs to find their auxiliary files.

Since it is useful in such limited circumstances, I do not feel that the
Debian package format is lacking in providing this relocatable flag, and I
would very much like to avoid this kind of behaviour with respect to
auxiliary files (which in many cases defeats the point of relocation
entirely).

-- 
 - mdz



Reply to: