[rabbitmq-server] Ver. 2.6.1

Peter Lemenkov peter at fedoraproject.org
Tue Nov 8 09:17:47 UTC 2011


commit f44ad9232cd39fa7aa0091ca4c94d453e72871a0
Author: Peter Lemenkov <lemenkov at gmail.com>
Date:   Tue Nov 8 13:17:38 2011 +0400

    Ver. 2.6.1
    
    Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>

 .gitignore               |    1 +
 rabbitmq-script-wrapper  |   51 +++++-----------
 rabbitmq-server.init     |   95 ++++++++++++++++++------------
 rabbitmq-server.ocf      |  145 +++++++++++++++++++++++++---------------------
 rabbitmq-server.spec     |   19 +++++-
 rabbitmq-server.tmpfiles |    1 +
 sources                  |    2 +-
 7 files changed, 171 insertions(+), 143 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b2b6c43..bbfd013 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ rabbitmq-server-1.8.0.tar.gz
 /rabbitmq-server-2.1.1.tar.gz
 /rabbitmq-server-2.2.0.tar.gz
 /rabbitmq-server-2.6.0.tar.gz
+/rabbitmq-server-2.6.1.tar.gz
diff --git a/rabbitmq-script-wrapper b/rabbitmq-script-wrapper
index e8d5d6f..5bb3269 100644
--- a/rabbitmq-script-wrapper
+++ b/rabbitmq-script-wrapper
@@ -1,33 +1,18 @@
 #!/bin/sh
-##   The contents of this file are subject to the Mozilla Public License
-##   Version 1.1 (the "License"); you may not use this file except in
-##   compliance with the License. You may obtain a copy of the License at
-##   http://www.mozilla.org/MPL/
+##  The contents of this file are subject to the Mozilla Public License
+##  Version 1.1 (the "License"); you may not use this file except in
+##  compliance with the License. You may obtain a copy of the License
+##  at http://www.mozilla.org/MPL/
 ##
-##   Software distributed under the License is distributed on an "AS IS"
-##   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-##   License for the specific language governing rights and limitations
-##   under the License.
+##  Software distributed under the License is distributed on an "AS IS"
+##  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+##  the License for the specific language governing rights and
+##  limitations under the License.
 ##
-##   The Original Code is RabbitMQ.
+##  The Original Code is RabbitMQ.
 ##
-##   The Initial Developers of the Original Code are LShift Ltd,
-##   Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
-##
-##   Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
-##   Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
-##   are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
-##   Technologies LLC, and Rabbit Technologies Ltd.
-##
-##   Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
-##   Ltd. Portions created by Cohesive Financial Technologies LLC are
-##   Copyright (C) 2007-2010 Cohesive Financial Technologies
-##   LLC. Portions created by Rabbit Technologies Ltd are Copyright
-##   (C) 2007-2010 Rabbit Technologies Ltd.
-##
-##   All Rights Reserved.
-##
-##   Contributor(s): ______________________________________.
+##  The Initial Developer of the Original Code is VMware, Inc.
+##  Copyright (c) 2007-2011 VMware, Inc.  All rights reserved.
 ##
 
 # Escape spaces and quotes, because shell is revolting.
@@ -49,13 +34,9 @@ if [ `id -u` = 0 ] ; then
 elif [ `id -u` = `id -u rabbitmq` ] ; then
     /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
 else
-    /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
-    VAL=$?
-    if [ $VAL -gt 0 ] ; then
-        echo
-        echo "Only root or rabbitmq should run ${SCRIPT}"
-        echo
-    fi
-    exit $VAL
+    /usr/lib/rabbitmq/bin/${SCRIPT}
+    echo
+    echo "Only root or rabbitmq should run ${SCRIPT}"
+    echo
+    exit 1
 fi
-
diff --git a/rabbitmq-server.init b/rabbitmq-server.init
index 35fcd15..065e2a4 100644
--- a/rabbitmq-server.init
+++ b/rabbitmq-server.init
@@ -10,97 +10,111 @@
 # Provides:          rabbitmq-server
 # Required-Start:    $remote_fs $network
 # Required-Stop:     $remote_fs $network
-# Default-Start:
-# Default-Stop:
 # Description:       RabbitMQ broker
 # Short-Description: Enable AMQP service provided by RabbitMQ broker
 ### END INIT INFO
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DAEMON=/usr/sbin/rabbitmq-multi
 NAME=rabbitmq-server
+DAEMON=/usr/sbin/${NAME}
+CONTROL=/usr/sbin/rabbitmqctl
 DESC=rabbitmq-server
 USER=rabbitmq
-NODE_COUNT=1
 ROTATE_SUFFIX=
 INIT_LOG_DIR=/var/log/rabbitmq
+PID_FILE=/var/run/rabbitmq/pid
 
-DEFAULTS_FILE=/etc/sysconfig/rabbitmq
 LOCK_FILE=/var/lock/subsys/$NAME
 
 test -x $DAEMON || exit 0
-
-# Include rabbitmq defaults if available
-if [ -f "$DEFAULTS_FILE" ] ; then
-	. $DEFAULTS_FILE
-fi
+test -x $CONTROL || exit 0
 
 RETVAL=0
 set -e
 
 start_rabbitmq () {
-    set +e
-    $DAEMON start_all ${NODE_COUNT} > ${INIT_LOG_DIR}/startup_log 2> ${INIT_LOG_DIR}/startup_err
-    case "$?" in
-      0)
-        echo SUCCESS
-        [ -n "$LOCK_FILE" ] && touch $LOCK_FILE
+    status_rabbitmq quiet
+    if [ $RETVAL = 0 ] ; then
+        echo RabbitMQ is currently running
+    else
         RETVAL=0
-        ;;
-      1)
-        echo TIMEOUT - check ${INIT_LOG_DIR}/startup_\{log,err\}
-        RETVAL=1
-        ;;
-      *)
-        echo FAILED - check ${INIT_LOG_DIR}/startup_log, _err
-        RETVAL=1
-        ;;
-    esac
-    set -e
+        set +e
+        setsid sh -c "RABBITMQ_PID_FILE=$PID_FILE $DAEMON > \
+            ${INIT_LOG_DIR}/startup_log 2> ${INIT_LOG_DIR}/startup_err" &
+        $CONTROL wait $PID_FILE >/dev/null 2>&1
+        RETVAL=$?
+        set -e
+        case "$RETVAL" in
+            0)
+                echo SUCCESS
+                if [ -n "$LOCK_FILE" ] ; then
+                    touch $LOCK_FILE
+                fi
+                ;;
+            *)
+                rm -f $PID_FILE
+                echo FAILED - check ${INIT_LOG_DIR}/startup_\{log, _err\}
+                RETVAL=1
+                ;;
+        esac
+    fi
 }
 
 stop_rabbitmq () {
-    set +e
     status_rabbitmq quiet
     if [ $RETVAL = 0 ] ; then
-        $DAEMON stop_all > ${INIT_LOG_DIR}/shutdown_log 2> ${INIT_LOG_DIR}/shutdown_err
+        set +e
+        $CONTROL stop > ${INIT_LOG_DIR}/shutdown_log 2> ${INIT_LOG_DIR}/shutdown_err
         RETVAL=$?
+        set -e
         if [ $RETVAL = 0 ] ; then
-            [ -n "$LOCK_FILE" ] && rm -rf $LOCK_FILE
+            rm -f $PID_FILE
+            if [ -n "$LOCK_FILE" ] ; then
+                rm -f $LOCK_FILE
+            fi
         else
             echo FAILED - check ${INIT_LOG_DIR}/shutdown_log, _err
         fi
     else
-        echo No nodes running 
+        echo RabbitMQ is not running
         RETVAL=0
     fi
-    set -e
 }
 
 status_rabbitmq() {
     set +e
     if [ "$1" != "quiet" ] ; then
-        $DAEMON status 2>&1
+        $CONTROL status 2>&1
     else
-        $DAEMON status > /dev/null 2>&1
+        $CONTROL status > /dev/null 2>&1
     fi
     if [ $? != 0 ] ; then
-        RETVAL=1
+        RETVAL=3
     fi
     set -e
 }
 
 rotate_logs_rabbitmq() {
     set +e
-    $DAEMON rotate_logs ${ROTATE_SUFFIX}
+    $CONTROL rotate_logs ${ROTATE_SUFFIX}
     if [ $? != 0 ] ; then
         RETVAL=1
     fi
     set -e
 }
 
+restart_running_rabbitmq () {
+    status_rabbitmq quiet
+    if [ $RETVAL = 0 ] ; then
+        restart_rabbitmq
+    else
+        echo RabbitMQ is not runnning
+        RETVAL=0
+    fi
+}
+
 restart_rabbitmq() {
-    stop_rabbitmq	    
+    stop_rabbitmq
     start_rabbitmq
 }
 
@@ -122,11 +136,16 @@ case "$1" in
         echo -n "Rotating log files for $DESC: "
         rotate_logs_rabbitmq
         ;;
-    force-reload|reload|restart|condrestart|try-restart)
+    force-reload|reload|restart)
         echo -n "Restarting $DESC: "
         restart_rabbitmq
         echo "$NAME."
         ;;
+    try-restart)
+        echo -n "Restarting $DESC: "
+        restart_running_rabbitmq
+        echo "$NAME."
+        ;;
     *)
         echo "Usage: $0 {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}" >&2
         RETVAL=1
diff --git a/rabbitmq-server.ocf b/rabbitmq-server.ocf
index b969535..e6776ef 100755
--- a/rabbitmq-server.ocf
+++ b/rabbitmq-server.ocf
@@ -1,41 +1,26 @@
 #!/bin/sh
+##  The contents of this file are subject to the Mozilla Public License
+##  Version 1.1 (the "License"); you may not use this file except in
+##  compliance with the License. You may obtain a copy of the License
+##  at http://www.mozilla.org/MPL/
 ##
-##   OCF Resource Agent compliant rabbitmq-server resource script.
-##
-
-##   The contents of this file are subject to the Mozilla Public License
-##   Version 1.1 (the "License"); you may not use this file except in
-##   compliance with the License. You may obtain a copy of the License at
-##   http://www.mozilla.org/MPL/
-##
-##   Software distributed under the License is distributed on an "AS IS"
-##   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-##   License for the specific language governing rights and limitations
-##   under the License.
-##
-##   The Original Code is RabbitMQ.
+##  Software distributed under the License is distributed on an "AS IS"
+##  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+##  the License for the specific language governing rights and
+##  limitations under the License.
 ##
-##   The Initial Developers of the Original Code are LShift Ltd,
-##   Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
+##  The Original Code is RabbitMQ.
 ##
-##   Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
-##   Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
-##   are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
-##   Technologies LLC, and Rabbit Technologies Ltd.
+##  The Initial Developer of the Original Code is VMware, Inc.
+##  Copyright (c) 2007-2011 VMware, Inc.  All rights reserved.
 ##
-##   Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
-##   Ltd. Portions created by Cohesive Financial Technologies LLC are
-##   Copyright (C) 2007-2010 Cohesive Financial Technologies
-##   LLC. Portions created by Rabbit Technologies Ltd are Copyright
-##   (C) 2007-2010 Rabbit Technologies Ltd.
-##
-##   All Rights Reserved.
+
 ##
-##   Contributor(s): ______________________________________.
+##   OCF Resource Agent compliant rabbitmq-server resource script.
 ##
 
 ## OCF instance parameters
-##   OCF_RESKEY_multi
+##   OCF_RESKEY_server
 ##   OCF_RESKEY_ctl
 ##   OCF_RESKEY_nodename
 ##   OCF_RESKEY_ip
@@ -44,6 +29,7 @@
 ##   OCF_RESKEY_log_base
 ##   OCF_RESKEY_mnesia_base
 ##   OCF_RESKEY_server_start_args
+##   OCF_RESKEY_pid_file
 
 #######################################################################
 # Initialization:
@@ -53,14 +39,16 @@
 
 #######################################################################
 
-OCF_RESKEY_multi_default="/usr/sbin/rabbitmq-multi"
+OCF_RESKEY_server_default="/usr/sbin/rabbitmq-server"
 OCF_RESKEY_ctl_default="/usr/sbin/rabbitmqctl"
 OCF_RESKEY_nodename_default="rabbit at localhost"
 OCF_RESKEY_log_base_default="/var/log/rabbitmq"
-: ${OCF_RESKEY_multi=${OCF_RESKEY_multi_default}}
+OCF_RESKEY_pid_file_default="/var/run/rabbitmq/pid"
+: ${OCF_RESKEY_server=${OCF_RESKEY_server_default}}
 : ${OCF_RESKEY_ctl=${OCF_RESKEY_ctl_default}}
 : ${OCF_RESKEY_nodename=${OCF_RESKEY_nodename_default}}
 : ${OCF_RESKEY_log_base=${OCF_RESKEY_log_base_default}}
+: ${OCF_RESKEY_pid_file=${OCF_RESKEY_pid_file_default}}
 
 meta_data() {
     cat <<END
@@ -76,12 +64,12 @@ Resource agent for RabbitMQ-server
 <shortdesc lang="en">Resource agent for RabbitMQ-server</shortdesc>
 
 <parameters>
-<parameter name="multi" unique="0" required="0">
+<parameter name="server" unique="0" required="0">
 <longdesc lang="en">
-The path to the rabbitmq-multi script
+The path to the rabbitmq-server script
 </longdesc>
-<shortdesc lang="en">Path to rabbitmq-multi</shortdesc>
-<content type="string" default="${OCF_RESKEY_multi_default}" />
+<shortdesc lang="en">Path to rabbitmq-server</shortdesc>
+<content type="string" default="${OCF_RESKEY_server_default}" />
 </parameter>
 
 <parameter name="ctl" unique="0" required="0">
@@ -118,9 +106,9 @@ The IP Port for rabbitmq-server to listen on
 
 <parameter name="config_file" unique="0" required="0">
 <longdesc lang="en">
-Location of the config file
+Location of the config file (without the .config suffix)
 </longdesc>
-<shortdesc lang="en">Config file path</shortdesc>
+<shortdesc lang="en">Config file path (without the .config suffix)</shortdesc>
 <content type="string" default="" />
 </parameter>
 
@@ -148,6 +136,14 @@ Additional arguments provided to the server on startup
 <content type="string" default="" />
 </parameter>
 
+<parameter name="pid_file" unique="0" required="0">
+<longdesc lang="en">
+Location of the file in which the pid will be stored
+</longdesc>
+<shortdesc lang="en">Pid file path</shortdesc>
+<content type="string" default="${OCF_RESKEY_pid_file_default}" />
+</parameter>
+
 </parameters>
 
 <actions>
@@ -170,7 +166,7 @@ Expects to have a fully populated OCF RA-compliant environment set.
 END
 }
 
-RABBITMQ_MULTI=$OCF_RESKEY_multi
+RABBITMQ_SERVER=$OCF_RESKEY_server
 RABBITMQ_CTL=$OCF_RESKEY_ctl
 RABBITMQ_NODENAME=$OCF_RESKEY_nodename
 RABBITMQ_NODE_IP_ADDRESS=$OCF_RESKEY_ip
@@ -179,9 +175,25 @@ RABBITMQ_CONFIG_FILE=$OCF_RESKEY_config_file
 RABBITMQ_LOG_BASE=$OCF_RESKEY_log_base
 RABBITMQ_MNESIA_BASE=$OCF_RESKEY_mnesia_base
 RABBITMQ_SERVER_START_ARGS=$OCF_RESKEY_server_start_args
+RABBITMQ_PID_FILE=$OCF_RESKEY_pid_file
 [ ! -z $RABBITMQ_NODENAME ] && NODENAME_ARG="-n $RABBITMQ_NODENAME"
 [ ! -z $RABBITMQ_NODENAME ]            && export RABBITMQ_NODENAME
 
+ensure_pid_dir () {
+    PID_DIR=`dirname ${RABBITMQ_PID_FILE}`
+    if [ ! -d ${PID_DIR} ] ; then
+        mkdir -p ${PID_DIR}
+        chown -R rabbitmq:rabbitmq ${PID_DIR}
+        chmod 755 ${PID_DIR}
+    fi
+    return $OCF_SUCCESS
+}
+
+remove_pid () {
+    rm -f ${RABBITMQ_PID_FILE}
+    rmdir `dirname ${RABBITMQ_PID_FILE}` || :
+}
+
 export_vars() {
     [ ! -z $RABBITMQ_NODE_IP_ADDRESS ]     && export RABBITMQ_NODE_IP_ADDRESS
     [ ! -z $RABBITMQ_NODE_PORT ]           && export RABBITMQ_NODE_PORT
@@ -189,11 +201,12 @@ export_vars() {
     [ ! -z $RABBITMQ_LOG_BASE ]            && export RABBITMQ_LOG_BASE
     [ ! -z $RABBITMQ_MNESIA_BASE ]         && export RABBITMQ_MNESIA_BASE
     [ ! -z $RABBITMQ_SERVER_START_ARGS ]   && export RABBITMQ_SERVER_START_ARGS
+    [ ! -z $RABBITMQ_PID_FILE ]            && ensure_pid_dir && export RABBITMQ_PID_FILE
 }
 
 rabbit_validate_partial() {
-    if [ ! -x $RABBITMQ_MULTI ]; then
-        ocf_log err "rabbitmq-server multi $RABBITMQ_MULTI does not exist or is not executable";
+    if [ ! -x $RABBITMQ_SERVER ]; then
+        ocf_log err "rabbitmq-server server $RABBITMQ_SERVER does not exist or is not executable";
         exit $OCF_ERR_INSTALLED;
     fi
 
@@ -204,8 +217,8 @@ rabbit_validate_partial() {
 }
 
 rabbit_validate_full() {
-    if [ ! -z $RABBITMQ_CONFIG_FILE ] && [ ! -e $RABBITMQ_CONFIG_FILE ]; then
-        ocf_log err "rabbitmq-server config_file $RABBITMQ_CONFIG_FILE does not exist or is not a file";
+    if [ ! -z $RABBITMQ_CONFIG_FILE ] && [ ! -e "${RABBITMQ_CONFIG_FILE}.config" ]; then
+        ocf_log err "rabbitmq-server config_file ${RABBITMQ_CONFIG_FILE}.config does not exist or is not a file";
         exit $OCF_ERR_INSTALLED;
     fi
 
@@ -225,8 +238,18 @@ rabbit_validate_full() {
 }
 
 rabbit_status() {
+    rabbitmqctl_action "status"
+}
+
+rabbit_wait() {
+    rabbitmqctl_action "wait" $1
+}
+
+rabbitmqctl_action() {
     local rc
-    $RABBITMQ_CTL $NODENAME_ARG status > /dev/null 2> /dev/null
+    local action
+    action=$@
+    $RABBITMQ_CTL $NODENAME_ARG $action > /dev/null 2> /dev/null
     rc=$?
     case "$rc" in
         0)
@@ -238,7 +261,7 @@ rabbit_status() {
             return $OCF_NOT_RUNNING
             ;;
         *)
-            ocf_log err "Unexpected return from rabbitmqctl $NODENAME_ARG status: $rc"
+            ocf_log err "Unexpected return from rabbitmqctl $NODENAME_ARG $action: $rc"
             exit $OCF_ERR_GENERIC
     esac
 }
@@ -253,28 +276,17 @@ rabbit_start() {
 
     export_vars
 
-    $RABBITMQ_MULTI start_all 1 > ${RABBITMQ_LOG_BASE}/startup_log 2> ${RABBITMQ_LOG_BASE}/startup_err &
-    rc=$?
-
-    if [ "$rc" != 0 ]; then
-        ocf_log err "rabbitmq-server start command failed: $RABBITMQ_MULTI start_all 1, $rc"
-        return $rc
-    fi
+    setsid sh -c "$RABBITMQ_SERVER > ${RABBITMQ_LOG_BASE}/startup_log 2> ${RABBITMQ_LOG_BASE}/startup_err" &
 
-    # Spin waiting for the server to come up.
+    # Wait for the server to come up.
     # Let the CRM/LRM time us out if required
-    start_wait=1
-    while [ $start_wait = 1 ]; do
-        rabbit_status
-        rc=$?
-        if [ "$rc" = $OCF_SUCCESS ]; then
-            start_wait=0
-        elif [ "$rc" != $OCF_NOT_RUNNING ]; then
-            ocf_log info "rabbitmq-server start failed: $rc"
-            exit $OCF_ERR_GENERIC
-        fi
-        sleep 1
-    done
+    rabbit_wait $RABBITMQ_PID_FILE
+    rc=$?
+    if [ "$rc" != $OCF_SUCCESS ]; then
+        remove_pid
+        ocf_log info "rabbitmq-server start failed: $rc"
+        exit $OCF_ERR_GENERIC
+    fi
 
     return $OCF_SUCCESS
 }
@@ -287,11 +299,11 @@ rabbit_stop() {
         return $OCF_SUCCESS
     fi
 
-    $RABBITMQ_MULTI stop_all &
+    $RABBITMQ_CTL stop
     rc=$?
 
     if [ "$rc" != 0 ]; then
-        ocf_log err "rabbitmq-server stop command failed: $RABBITMQ_MULTI stop_all, $rc"
+        ocf_log err "rabbitmq-server stop command failed: $RABBITMQ_CTL stop, $rc"
         return $rc
     fi
 
@@ -302,6 +314,7 @@ rabbit_stop() {
         rabbit_status
         rc=$?
         if [ "$rc" = $OCF_NOT_RUNNING ]; then
+            remove_pid
             stop_wait=0
             break
         elif [ "$rc" != $OCF_SUCCESS ]; then
diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec
index aa745ca..905b856 100644
--- a/rabbitmq-server.spec
+++ b/rabbitmq-server.spec
@@ -1,7 +1,7 @@
 %define debug_package %{nil}
 
 Name: rabbitmq-server
-Version: 2.6.0
+Version: 2.6.1
 Release: 1%{?dist}
 License: MPLv1.1
 Group: Development/Libraries
@@ -10,6 +10,7 @@ Source1: rabbitmq-server.init
 Source2: rabbitmq-script-wrapper
 Source3: rabbitmq-server.logrotate
 Source4: rabbitmq-server.ocf
+Source5: rabbitmq-server.tmpfiles
 URL: http://www.rabbitmq.com/
 BuildArch: noarch
 BuildRequires: erlang >= R12B-3, python-simplejson, xmlto, libxslt, python
@@ -56,7 +57,6 @@ mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
 install -p -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/rabbitmq-server
 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-multi
 install -p -D -m 0755 %{_rabbit_server_ocf} %{buildroot}%{_exec_prefix}/lib/ocf/resource.d/rabbitmq/rabbitmq-server
 
 install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
@@ -73,6 +73,11 @@ echo '%defattr(-,root,root, -)' >> %{_builddir}/%{name}.files
         ! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \
         | sed -e 's/^\.//' >> %{_builddir}/%{name}.files)
 
+install -d %{buildroot}%{_localstatedir}/run/rabbitmq
+%if 0%{?fedora} > 14
+install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
+%endif
+
 %pre
 
 if [ $1 -gt 1 ]; then
@@ -116,15 +121,23 @@ done
 %attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq
 %dir %{_sysconfdir}/rabbitmq
 %{_rabbit_erllibdir}
-%{_rabbit_libdir}
+%{_rabbit_libdir}/bin
 %{_initrddir}/rabbitmq-server
 %config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server
+%if 0%{?fedora} > 14
+%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
+%endif
+%dir %attr(755, rabbitmq, rabbitmq) %{_localstatedir}/run/rabbitmq
 %doc LICENSE LICENSE-MPL-RabbitMQ
 
 %clean
 rm -rf %{buildroot}
 
 %changelog
+* Tue Nov 08 2011 Peter Lemenkov <lemenkov at gmail.com> - 2.6.1-1
+- New Upstream Release - 2.6.1
+- Fixed rhbz #738067 (service cannot start - rabbitmq-multi missing)
+
 * Mon Sep 12 2011 Peter Lemenkov <lemenkov at gmail.com> - 2.6.0-1
 - New Upstream Release - 2.6.0
 
diff --git a/rabbitmq-server.tmpfiles b/rabbitmq-server.tmpfiles
new file mode 100644
index 0000000..c268182
--- /dev/null
+++ b/rabbitmq-server.tmpfiles
@@ -0,0 +1 @@
+D /var/run/rabbitmq 0755 rabbitmq rabbitmq -
diff --git a/sources b/sources
index 806cdf7..d2547a5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e4d9b6792b556f0c145cf02f1430f0b3  rabbitmq-server-2.6.0.tar.gz
+c8b86f2e2a86502932b54e9ced2eb63c  rabbitmq-server-2.6.1.tar.gz


More information about the scm-commits mailing list