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).

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.

Fabio

> 
> 
> --- 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
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to