Accepting request 184593 from home:lisaseraph:branches:network:ha-clustering:Factory
submit patch to fix corosync start failed issue OBS-URL: https://build.opensuse.org/request/show/184593 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=32
This commit is contained in:
parent
e2a4aef80d
commit
d3b44f80bd
20
corosync-init-lockfile-path-error.patch
Normal file
20
corosync-init-lockfile-path-error.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Index: corosync-2.3.1/init/corosync.in
|
||||
===================================================================
|
||||
--- corosync-2.3.1.orig/init/corosync.in
|
||||
+++ corosync-2.3.1/init/corosync.in
|
||||
@@ -29,6 +29,7 @@ PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBI
|
||||
success()
|
||||
{
|
||||
echo -ne "[ OK ]\r"
|
||||
+ rtrn=0
|
||||
}
|
||||
|
||||
failure()
|
||||
@@ -106,6 +107,7 @@ start()
|
||||
# they also assume that init scripts will create
|
||||
# required subdirectories for proper operations
|
||||
mkdir -p @LOCALSTATEDIR@/run
|
||||
+ mkdir -p @LOCALSTATEDIR@/lock/subsys
|
||||
|
||||
if status $prog > /dev/null 2>&1; then
|
||||
success
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 25 02:17:50 UTC 2013 - xli@suse.com
|
||||
|
||||
- Fix corosync start failed issue
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 23 09:44:07 UTC 2013 - xli@suse.com
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
%bcond_with monitoring
|
||||
%bcond_with snmp
|
||||
%bcond_with rdma
|
||||
%bcond_with systemd
|
||||
%define with_systemd 1
|
||||
%bcond_with upstart
|
||||
%bcond_with xmlconf
|
||||
%bcond_with runautogen
|
||||
@ -47,12 +47,7 @@ Release: 0
|
||||
Url: http://www.corosync.org
|
||||
Source0: http://build.clusterlabs.org/%{name}/releases/%{name}-%{version}.tar.gz
|
||||
Source2: baselibs.conf
|
||||
#Patch1: corosync-confexample-timestamp.patch
|
||||
#Patch2: corosync-revert-cs2429.patch
|
||||
#Patch4: corosync.conf.example.patch
|
||||
#Patch5: corosync-cpg-procdown.patch
|
||||
#Patch6: corosync_reduce_RR_priority.patch
|
||||
#Patch7: fix-nodeid-conflicting.patch
|
||||
Patch1: corosync-init-lockfile-path-error.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# Runtime bits
|
||||
Requires: libcorosync4 = %{version}-%{release}
|
||||
@ -79,25 +74,23 @@ BuildRequires: librdmacm-devel
|
||||
%if %{with snmp}
|
||||
BuildRequires: net-snmp-devel
|
||||
%endif
|
||||
#%if %{with systemd}
|
||||
#%if %{with dbus}
|
||||
BuildRequires: dbus-1-devel
|
||||
#%endif
|
||||
%if %{with_systemd}
|
||||
#BuildRequires: systemd-devel
|
||||
BuildRequires: systemd
|
||||
#Requires(post): systemd
|
||||
#Requires(preun): systemd
|
||||
#Requires(postun): systemd
|
||||
#%endif
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
%endif
|
||||
%if %{with xmlconf}
|
||||
Requires: libxslt
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
#%patch1 -p1
|
||||
#%patch2 -p1
|
||||
#%patch4 -p1
|
||||
#%patch5 -p1
|
||||
#%patch6 -p1
|
||||
#%patch7 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%if 0%{?buildtrunk} == 1
|
||||
@ -126,6 +119,9 @@ export rdmacm_LIBS=-lrdmacm \
|
||||
%if %{with rdma}
|
||||
--enable-rdma \
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
--enable-systemd \
|
||||
%endif
|
||||
%if %{with upstart}
|
||||
--enable-upstart \
|
||||
%endif
|
||||
@ -134,13 +130,19 @@ export rdmacm_LIBS=-lrdmacm \
|
||||
%endif
|
||||
--with-initddir=%{_initrddir} \
|
||||
--with-systemddir=%{_unitdir} \
|
||||
--with-upstartdir=%{_sysconfdir}/init \
|
||||
--enable-systemd
|
||||
--with-upstartdir=%{_sysconfdir}/init
|
||||
# --enable-dbus \
|
||||
#--enable-systemd
|
||||
|
||||
make %{_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%if %{with dbus}
|
||||
mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
|
||||
install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||
%endif
|
||||
# removed to discourage use of init.d/corosync (openais should be
|
||||
# used instead)
|
||||
#%if 0%{?suse_version}
|
||||
@ -176,35 +178,35 @@ default APIs and libraries, default configuration files, and an init
|
||||
script.
|
||||
|
||||
%pre
|
||||
#%if %{with systemd} && 0%{?systemd_post:1}
|
||||
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||
%service_add_pre corosync.service corosync-notifyd.service
|
||||
%endif
|
||||
|
||||
%post
|
||||
#%if %{with systemd} && 0%{?systemd_post:1}
|
||||
#%systemd_post corosync.service corosync-notifyd.service
|
||||
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||
%service_add_post corosync.service corosync-notifyd.service
|
||||
#%else
|
||||
#if [ $1 -eq 1 ]; then
|
||||
# /sbin/chkconfig --add corosync || :
|
||||
#fi
|
||||
#%endif
|
||||
%else
|
||||
if [ $1 -eq 1 ]; then
|
||||
/sbin/chkconfig --add corosync || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun
|
||||
#%if %{with systemd} && 0%{?systemd_preun:1}
|
||||
%if %{with_systemd} && 0%{?systemd_preun:1}
|
||||
#%systemd_preun corosync.service corosync-notifyd.service
|
||||
%service_del_preun corosync.service corosync-notifyd.service
|
||||
#%else
|
||||
#if [ $1 -eq 0 ]; then
|
||||
# /sbin/service corosync stop &>/dev/null || :
|
||||
# /sbin/chkconfig --del corosync || :
|
||||
#fi
|
||||
#%endif
|
||||
%else
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service corosync stop &>/dev/null || :
|
||||
/sbin/chkconfig --del corosync || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun
|
||||
#%if %{with systemd} && 0%{?systemd_postun:1}
|
||||
%if %{with_systemd} && 0%{?systemd_postun:1}
|
||||
#%systemd_postun corosync.service corosync-notifyd.service
|
||||
%service_del_postun corosync.service corosync-notifyd.service
|
||||
#%endif
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
@ -231,19 +233,22 @@ script.
|
||||
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
|
||||
%config(noreplace) /usr/lib/tmpfiles.d/corosync-notifyd
|
||||
%if %{with dbus}
|
||||
%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
|
||||
%endif
|
||||
#%if %{with systemd}
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/corosync.service
|
||||
%{_unitdir}/corosync-notifyd.service
|
||||
%dir %{_datadir}/corosync
|
||||
%{_datadir}/corosync/corosync
|
||||
%{_datadir}/corosync/corosync-notifyd
|
||||
#%else
|
||||
#%{_initrddir}/corosync
|
||||
#%{_initrddir}/corosync-notifyd
|
||||
#%endif
|
||||
%else
|
||||
%{_initrddir}/corosync
|
||||
%{_initrddir}/corosync-notifyd
|
||||
%endif
|
||||
%if %{with upstart}
|
||||
%{_sysconfdir}/init/corosync.conf
|
||||
%{_sysconfdir}/init/corosync-notifyd.conf
|
||||
|
Loading…
Reference in New Issue
Block a user