Didn't look right, more like this:

%{!?_initddir: %{expand: %%define _initddir %{_sysconfdir}/rc.d/init.d}}



On Jun 9, 2010, at 9:26 PM, Vadym Chepkov wrote:

> Ah,
> 
> I was compiling on RHEL5 and it's still _initrddir there
> How about a simple conditional?
> 
> %{!?_initdir}: %{_sysconfdir}/rc.d/init.d}
> 
> Vadym
> 
> 
> 
> On Jun 9, 2010, at 9:07 PM, Steven Dake wrote:
> 
>> Vadym,
>> 
>> Thanks for the patch.
>> 
>> Keep in mind the default spec file is only a guide.  We expect each distro 
>> will tailor it to their own policies.
>> 
>> Please note:
>> https://bugzilla.redhat.com/show_bug.cgi?id=455279
>> 
>> It appears from the above bugzilla the initddir is the proper macro to use.
>> 
>> configure in build - yup will merge that part
>> 
>> chkconfig change is correct
>> 
>> I'll merge those two parts of the patch - then we can discuss what people 
>> prefer regarding the macro.
>> 
>> Regards
>> -steve
>> 
>> On 06/09/2010 04:50 PM, 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:
>>> 
>>> 
>>> --- corosync.spec.in        (revision 2942)
>>> +++ corosync.spec.in        (working copy)
>>> @@ -32,6 +32,7 @@
>>> %prep
>>> %setup -q -n %{name}-%{version}
>>> 
>>> +%build
>>> %if %{buildtrunk}
>>> ./autogen.sh
>>> %endif
>>> @@ -43,9 +44,8 @@
>>> %{configure} \
>>>     --enable-nss \
>>>     --enable-rdma \
>>> -   --with-initddir=%{_initddir}
>>> +   --with-initddir=%{_initrddir}
>>> 
>>> -%build
>>> make %{_smp_mflags}
>>> 
>>> %install
>>> @@ -67,7 +67,9 @@
>>> APIs and libraries, default configuration files, and an init script.
>>> 
>>> %post
>>> -/sbin/chkconfig --add corosync || :
>>> +if [ $1 -eq 1 ]; then
>>> +   /sbin/chkconfig --add corosync || :
>>> +fi
>>> 
>>> %preun
>>> if [ $1 -eq 0 ]; then
>>> @@ -90,7 +92,7 @@
>>> %dir %{_sysconfdir}/corosync/service.d
>>> %dir %{_sysconfdir}/corosync/uidgid.d
>>> %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
>>> -%{_initddir}/corosync
>>> +%{_initrddir}/corosync
>>> %dir %{_libexecdir}/lcrso
>>> %{_libexecdir}/lcrso/coroparse.lcrso
>>> %{_libexecdir}/lcrso/objdb.lcrso
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Openais mailing list
>>> Openais@lists.linux-foundation.org
>>> https://lists.linux-foundation.org/mailman/listinfo/openais
>> 
> 

_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to