[Openais] corosync.spec

Vadym Chepkov vchepkov at gmail.com
Wed Jun 9 21:18:47 PDT 2010


On Jun 9, 2010, at 11:56 PM, Fabio M. Di Nitto wrote:

> On 6/10/2010 1:50 AM, Vadym Chepkov wrote:
>> Hi,
>> 
>> There are several issues with corosync spec file.
>> 
>> - configure script should be called in %build, not in %prep section.
>> - the macro used for init.d is wrong
>> - chckonfig --add should be called only when rpm is installed, not during upgrade, because it will overwrite the custom set priorities
>> 
>> I attached the patch:
> 
> Not acknowledge.
> 
> The %prep vs %build is not a requirement in any rpm based distribution.
> configuring the tree is preparation of the tree and not build (but we
> can argue about this forever as it goes down to how you see at the whole
> build process).

If one would want to see what the source code is getting compiled he would execute:

rpmbuild -bp --nodeps corosync.spec

If you put configure in the prep section it would go through commotion of looking for build tools and fails when none of the build tools are installed and all that for no reason.

http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
suggests to run configuration script in the build section all Redhat rpms I saw behave this way
I still remember what R in rpm stands for.


> 
> The init macro you suggest is not portable to rhel5.
> 
> As we discussed via email, caging the call to chkconfig only solves part
> of the problem you reported and not all of it. The correct solution is
> to ship a specific init script for rhel5.

It still preserves custom priorities set by administrator.
If he wants to revert to default he would run

chkconfig corosync resetpriorities

but revert it to default when he didn't ask for it isn't right:

rpm -qf /etc/rc3.d/S20corosync 
file /etc/rc3.d/S20corosync is not owned by any package

This file does not belong to corosync.

Vadym



More information about the Openais mailing list