Re: Why are RPM's distro specific?

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

 



On 01/19/2005 08:10:51 PM, Arthur Pemberton wrote:

The problem of different paths seems trivial. Why can't an RPM simply reference $CONF_FOLDER for example, and then let the machine on which the rpm is unpacked tell it that $CONF_FOLDER = '/etc' ?

It does work that way with the src.rpm - if you properly define things.

There is a %configure macro which expands to

./configure --bindir=%_bindir --datadir=%_datadir etc.

Then the distribution has predefined what %_bindir and %_datadir and % _sysconfdir expand to, etc.

So in the src.rpm you use the %configure macro, and when it builds on the target machine - it uses those definitions.

The %files section (where the packager lists what is in the rpm) - they would be

%_bindir/foobar
%_datadir/foobar

You have to do that at build time though in most cases because the binary itself often needs to know where certain things are, like the datadir and the configuration files and things like that.

So in most cases, once an rpm is built - the files need to go where the generated makefile said they would go, and that makes it distro specific.

While I suppose it would be possible to work around that by using wrapper scripts that call the actual binary and tell it where things go, since an rpm is likely to be linked against specific versions of shared libraries, doing that wouldn't really gain you anything.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux