diff --git a/.gitignore b/.gitignore index 46cd1d6..8eb3d41 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ rabbitmq-server-1.8.0.tar.gz /rabbitmq-server-3.5.6.tar.gz /rabbitmq-server-3.5.7.tar.gz /rabbitmq-server-3.6.1.tar.xz +/rabbitmq-server-3.6.2.tar.xz diff --git a/rabbitmq-common-0001-Use-ephemeral-port-for-probing.patch b/rabbitmq-common-0001-Use-ephemeral-port-for-probing.patch deleted file mode 100644 index 9ca7bfd..0000000 --- a/rabbitmq-common-0001-Use-ephemeral-port-for-probing.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: John Eckersberg -Date: Fri, 24 Jan 2014 10:47:03 -0500 -Subject: [PATCH] Use ephemeral port for probing - - -diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl -index 47309cc..9a64435 100644 ---- a/src/rabbit_networking.erl -+++ b/src/rabbit_networking.erl -@@ -50,7 +50,7 @@ - -include("rabbit.hrl"). - -include_lib("kernel/include/inet.hrl"). - ---define(FIRST_TEST_BIND_PORT, 10000). -+-define(FIRST_TEST_BIND_PORT, 32768). - - %% POODLE - -define(BAD_SSL_PROTOCOL_VERSIONS, [sslv3]). diff --git a/rabbitmq-server-0001-Make-slaves-wait-timeout-configurable-instead-of-har.patch b/rabbitmq-server-0001-Make-slaves-wait-timeout-configurable-instead-of-har.patch deleted file mode 100644 index 78e5d48..0000000 --- a/rabbitmq-server-0001-Make-slaves-wait-timeout-configurable-instead-of-har.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Peter Lemenkov -Date: Tue, 2 Feb 2016 17:19:19 +0300 -Subject: [PATCH] Make slaves wait timeout configurable instead of hardcoded - 15000 - -This slightly improves rabbitmq/rabbitmq-server#584 - -Signed-off-by: Peter Lemenkov - -diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl -index 057a4fa..e7afe88 100644 ---- a/src/rabbit_mirror_queue_master.erl -+++ b/src/rabbit_mirror_queue_master.erl -@@ -43,7 +43,8 @@ - backing_queue_state, - seen_status, - confirmed, -- known_senders -+ known_senders, -+ wait_timeout - }). - - -ifdef(use_specs). -@@ -130,7 +131,15 @@ init_with_existing_bq(Q = #amqqueue{name = QName}, BQ, BQS) -> - backing_queue_state = BQS, - seen_status = dict:new(), - confirmed = [], -- known_senders = sets:new() }. -+ known_senders = sets:new(), -+ wait_timeout = get_slave_wait_timeout() }. -+ -+get_slave_wait_timeout() -> -+ case application:get_env(rabbit, slave_wait_timeout) of -+ {ok, T} -> T; -+ undefined -> 15000 -+ end. -+ - - stop_mirroring(State = #state { coordinator = CPid, - backing_queue = BQ, -@@ -203,7 +212,7 @@ delete_and_terminate(Reason, State = #state { backing_queue = BQ, - stop_all_slaves(Reason, State), - State#state{backing_queue_state = BQ:delete_and_terminate(Reason, BQS)}. - --stop_all_slaves(Reason, #state{name = QName, gm = GM}) -> -+stop_all_slaves(Reason, #state{name = QName, gm = GM, wait_timeout = WT}) -> - {ok, #amqqueue{slave_pids = SPids}} = rabbit_amqqueue:lookup(QName), - PidsMRefs = [{Pid, erlang:monitor(process, Pid)} || Pid <- [GM | SPids]], - ok = gm:broadcast(GM, {delete_and_terminate, Reason}), -@@ -215,7 +224,7 @@ stop_all_slaves(Reason, #state{name = QName, gm = GM}) -> - [receive - {'DOWN', MRef, process, _Pid, _Info} -> - ok -- after 15000 -> -+ after WT -> - rabbit_mirror_queue_misc:log_warning( - QName, "Missing 'DOWN' message from ~p in node ~p~n", - [Pid, node(Pid)]), diff --git a/rabbitmq-server.ocf b/rabbitmq-server.ocf deleted file mode 100755 index 804e654..0000000 --- a/rabbitmq-server.ocf +++ /dev/null @@ -1,371 +0,0 @@ -#!/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/ -## -## 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 Initial Developer of the Original Code is GoPivotal, Inc. -## Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved. -## - -## -## OCF Resource Agent compliant rabbitmq-server resource script. -## - -## OCF instance parameters -## OCF_RESKEY_server -## OCF_RESKEY_ctl -## OCF_RESKEY_nodename -## OCF_RESKEY_ip -## OCF_RESKEY_port -## OCF_RESKEY_config_file -## OCF_RESKEY_log_base -## OCF_RESKEY_mnesia_base -## OCF_RESKEY_server_start_args -## OCF_RESKEY_pid_file - -####################################################################### -# Initialization: - -: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat} -. ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs - -####################################################################### - -OCF_RESKEY_server_default="/usr/sbin/rabbitmq-server" -OCF_RESKEY_ctl_default="/usr/sbin/rabbitmqctl" -OCF_RESKEY_nodename_default="rabbit@localhost" -OCF_RESKEY_log_base_default="/var/log/rabbitmq" -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 < - - -1.0 - - -Resource agent for RabbitMQ-server - - -Resource agent for RabbitMQ-server - - - - -The path to the rabbitmq-server script - -Path to rabbitmq-server - - - - - -The path to the rabbitmqctl script - -Path to rabbitmqctl - - - - - -The node name for rabbitmq-server - -Node name - - - - - -The IP address for rabbitmq-server to listen on - -IP Address - - - - - -The IP Port for rabbitmq-server to listen on - -IP Port - - - - - -Location of the config file (without the .config suffix) - -Config file path (without the .config suffix) - - - - - -Location of the directory under which logs will be created - -Log base path - - - - - -Location of the directory under which mnesia will store data - -Mnesia base path - - - - - -Additional arguments provided to the server on startup - -Server start arguments - - - - - -Location of the file in which the pid will be stored - -Pid file path - - - - - - - - - - - - - - -END -} - -rabbit_usage() { - cat < /dev/null 2> /dev/null - rc=$? - case "$rc" in - 0) - ocf_log debug "RabbitMQ server is running normally" - return $OCF_SUCCESS - ;; - 2) - ocf_log debug "RabbitMQ server is not running" - return $OCF_NOT_RUNNING - ;; - *) - ocf_log err "Unexpected return from rabbitmqctl $NODENAME_ARG $action: $rc" - exit $OCF_ERR_GENERIC - esac -} - -rabbit_start() { - local rc - - if rabbit_status; then - ocf_log info "Resource already running." - return $OCF_SUCCESS - fi - - export_vars - - setsid sh -c "$RABBITMQ_SERVER > ${RABBITMQ_LOG_BASE}/startup_log 2> ${RABBITMQ_LOG_BASE}/startup_err" & - - # Wait for the server to come up. - # Let the CRM/LRM time us out if required - 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 -} - -rabbit_stop() { - local rc - - if ! rabbit_status; then - ocf_log info "Resource not running." - return $OCF_SUCCESS - fi - - $RABBITMQ_CTL stop ${RABBITMQ_PID_FILE} - rc=$? - - if [ "$rc" != 0 ]; then - ocf_log err "rabbitmq-server stop command failed: $RABBITMQ_CTL stop, $rc" - return $rc - fi - - # Spin waiting for the server to shut down. - # Let the CRM/LRM time us out if required - stop_wait=1 - while [ $stop_wait = 1 ]; do - rabbit_status - rc=$? - if [ "$rc" = $OCF_NOT_RUNNING ]; then - remove_pid - stop_wait=0 - break - elif [ "$rc" != $OCF_SUCCESS ]; then - ocf_log info "rabbitmq-server stop failed: $rc" - exit $OCF_ERR_GENERIC - fi - sleep 1 - done - - return $OCF_SUCCESS -} - -rabbit_monitor() { - rabbit_status - return $? -} - -case $__OCF_ACTION in - meta-data) - meta_data - exit $OCF_SUCCESS - ;; - usage|help) - rabbit_usage - exit $OCF_SUCCESS - ;; -esac - -if ocf_is_probe; then - rabbit_validate_partial -else - rabbit_validate_full -fi - -case $__OCF_ACTION in - start) - rabbit_start - ;; - stop) - rabbit_stop - ;; - status|monitor) - rabbit_monitor - ;; - validate-all) - exit $OCF_SUCCESS - ;; - *) - rabbit_usage - exit $OCF_ERR_UNIMPLEMENTED - ;; -esac - -exit $? diff --git a/rabbitmq-server.service b/rabbitmq-server.service deleted file mode 100644 index 3c13e2e..0000000 --- a/rabbitmq-server.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=RabbitMQ broker -Wants=network.target epmd@0.0.0.0.socket -After=network.target epmd@0.0.0.0.socket - -[Service] -Type=notify -User=rabbitmq -Group=rabbitmq -NotifyAccess=all -WorkingDirectory=/var/lib/rabbitmq -ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server -ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop - -[Install] -WantedBy=multi-user.target diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index f9556b1..c4b2f97 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -4,8 +4,8 @@ Name: rabbitmq-server -Version: 3.6.1 -Release: 2%{?dist} +Version: 3.6.2 +Release: 1%{?dist} License: MPLv1.1 Group: Development/Libraries Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.xz @@ -15,10 +15,7 @@ Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{v Source2: rabbitmq-script-wrapper # curl -O https://raw.githubusercontent.com/lemenkov/rabbitmq-server/cdfc661/packaging/RPMS/Fedora/rabbitmq-server.logrotate Source3: rabbitmq-server.logrotate -# curl -O https://raw.githubusercontent.com/rabbitmq/rabbitmq-server/231e90c/scripts/rabbitmq-server.ocf -Source4: rabbitmq-server.ocf Source5: rabbitmq-server.tmpfiles -Source6: rabbitmq-server.service URL: http://www.rabbitmq.com/ BuildArch: noarch BuildRequires: erlang >= %{erlang_minver}, python-simplejson, xmlto, libxslt, python, zip @@ -44,13 +41,6 @@ Requires(pre): systemd Requires(post): systemd Requires(preun): systemd -# https://bugzilla.redhat.com/show_bug.cgi?id=998682 -# https://bugzilla.redhat.com/show_bug.cgi?id=1032595#c8 -Patch1: rabbitmq-common-0001-Use-ephemeral-port-for-probing.patch - -# https://bugzilla.redhat.com/1303745 -Patch2: rabbitmq-server-0001-Make-slaves-wait-timeout-configurable-instead-of-har.patch - %description RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging. The RabbitMQ server is a robust and @@ -59,11 +49,6 @@ scalable implementation of an AMQP broker. %prep %setup -q -cd deps/rabbit_common -%patch1 -p1 -b .ephemeral -cd - -%patch2 -p1 -b .slave_wait_timeout_configurable - %build #USE_SPECS="true" USE_PROPER_QC="false" make %{?_smp_mflags} @@ -85,7 +70,7 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq #Copy all necessary lib files etc. -install -p -D -m 0644 %{S:6} %{buildroot}%{_unitdir}/%{name}.service +install -p -D -m 0644 docs/rabbitmq-server.service.example %{buildroot}%{_unitdir}/%{name}.service install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmqctl install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-server install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-plugins @@ -96,7 +81,7 @@ for app in rabbitmq-defaults rabbitmq-env rabbitmq-plugins rabbitmq-server rabbi ln -s %{_rabbit_libdir}/lib/rabbitmq_server-%{version}/sbin/${app} %{buildroot}%{_rabbit_libdir}/bin/${app} done -install -p -D -m 0755 %{S:4} %{buildroot}%{_exec_prefix}/lib/ocf/resource.d/rabbitmq/rabbitmq-server +install -p -D -m 0755 scripts/rabbitmq-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 diff --git a/sources b/sources index 942b132..bbc28a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b07bffb67ad777bcde77b337e49113b rabbitmq-server-3.6.1.tar.xz +999d209301d1b5b5e1b279ab13a040da rabbitmq-server-3.6.2.tar.xz