[CMake] Buggy CPack generator behaviour?

Eric Noulard eric.noulard at gmail.com
Fri Jul 29 10:06:48 EDT 2011


2011/7/29 Hendrik Sattler <post at hendrik-sattler.de>:
>>
>> rpm -qpi your.rpm
>>
>> you'll see a line like:
>>
>> "Relocations : (not relocatable)"
>> or
>> "Relocations : /usr"
>>
>> When an rpm is relocatable you can do
>>
>> rpm -i  --prefix=/your/relocation/prefix your.rpm
>>
>> if the rpm is not relocatable you can't.
>
> That makes it hard to install stuff that MUST be in specific directories
> like e.g. udev rules or files that the software expects in /etc (_nobody_
> uses /usr/etc). Any package that installs files there are not relocatable?

No you can perfectly install in absolute dir. like /etc without trouble AND
obtain a relocatable RPM.

For this CPackRPM **generates** %config directive in the RPM spec file
precisely because usually when installing file using absolute path this is
for config files.
In fact this is the "RPM" way to do it.

So you CAN obtain relocatable RPM with absolutely installed path
BUT
You cannot get this kind of package if you do set CPACK_SET_DESTDIR to ON
you have to let CPackRPM do his homework alone.

I may add more control on the way CPack RPM chose to flag "%config" file
but I think....

> That makes this feature pretty useless...

It's already useful as is  :-]


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list