Accepting request 228860 from home:vuntz:branches:network:messaging:amqp
Fixes to OCF file OBS-URL: https://build.opensuse.org/request/show/228860 OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=39
This commit is contained in:
parent
3deb4d4567
commit
bd8436610b
22
ocf-fixes.patch
Normal file
22
ocf-fixes.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Index: rabbitmq-server-2.8.7/rabbitmq-server.ocf
|
||||
===================================================================
|
||||
--- rabbitmq-server-2.8.7.orig/rabbitmq-server.ocf
|
||||
+++ rabbitmq-server-2.8.7/rabbitmq-server.ocf
|
||||
@@ -256,7 +256,7 @@ rabbitmqctl_action() {
|
||||
ocf_log debug "RabbitMQ server is running normally"
|
||||
return $OCF_SUCCESS
|
||||
;;
|
||||
- 2)
|
||||
+ 1|2)
|
||||
ocf_log debug "RabbitMQ server is not running"
|
||||
return $OCF_NOT_RUNNING
|
||||
;;
|
||||
@@ -299,7 +299,7 @@ rabbit_stop() {
|
||||
return $OCF_SUCCESS
|
||||
fi
|
||||
|
||||
- $RABBITMQ_CTL stop
|
||||
+ rabbitmqctl_action stop
|
||||
rc=$?
|
||||
|
||||
if [ "$rc" != 0 ]; then
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 2 21:03:09 UTC 2014 - vuntz@suse.com
|
||||
|
||||
- Add ocf-fixes.patch to fix issues in the OCF file:
|
||||
- use the wrapper function to call rabbitmqctl for stop, so that
|
||||
we interpret correctly the exit code.
|
||||
- accept 1 as valid exit code from "rabbitmqctl status", instead
|
||||
of totally breaking when we get it.
|
||||
- We use a patch as the OCF file comes from upstream, so it's
|
||||
better to keep the changes isolated.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 27 11:20:12 UTC 2014 - dmueller@suse.com
|
||||
|
||||
|
@ -41,6 +41,7 @@ Source6: rabbitmq-server.service
|
||||
Source7: rabbitmq-server.tmpfiles.d.conf
|
||||
Patch0: no-nmap.patch
|
||||
Patch1: no-remove-common.patch
|
||||
Patch10: ocf-fixes.patch
|
||||
BuildRequires: erlang
|
||||
BuildRequires: erlang-src
|
||||
BuildRequires: fdupes
|
||||
@ -102,6 +103,9 @@ This package includes the RabbitMQ AMQP language bindings for Erlang.
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
%define _rabbit_server_ocf `basename %{SOURCE4}`
|
||||
cp %{SOURCE4} %{_rabbit_server_ocf}
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
make all VERSION=%{version}
|
||||
@ -127,11 +131,9 @@ install -p -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}.service
|
||||
|
||||
# Install wrapper scripts
|
||||
%define _rabbit_wrapper %{_builddir}/`basename %{SOURCE2}`
|
||||
%define _rabbit_server_ocf %{_builddir}/`basename %{SOURCE4}`
|
||||
cp %{SOURCE2} %{_rabbit_wrapper}
|
||||
sed -i 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' %{_rabbit_wrapper}
|
||||
sed -i 's|/usr/lib/|%{_libdir}/|' %{_rabbit_wrapper}
|
||||
cp %{SOURCE4} %{_rabbit_server_ocf}
|
||||
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmqctl
|
||||
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-server
|
||||
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-plugins
|
||||
|
Loading…
Reference in New Issue
Block a user