diff --git a/rabbitmq-probe-ephemeral-port.patch b/rabbitmq-probe-ephemeral-port.patch deleted file mode 100644 index 0561360..0000000 --- a/rabbitmq-probe-ephemeral-port.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rabbitmq-server-3.4.0/src/rabbit_networking.erl.orig 2014-10-22 09:19:54.863016691 -0400 -+++ rabbitmq-server-3.4.0/src/rabbit_networking.erl 2014-10-22 09:20:52.006197328 -0400 -@@ -39,7 +39,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-Use-ephemeral-port-for-probing.patch b/rabbitmq-server-0001-Use-ephemeral-port-for-probing.patch new file mode 100644 index 0000000..0a210b2 --- /dev/null +++ b/rabbitmq-server-0001-Use-ephemeral-port-for-probing.patch @@ -0,0 +1,18 @@ +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 f95f8c5..61e3a3a 100644 +--- a/src/rabbit_networking.erl ++++ b/src/rabbit_networking.erl +@@ -39,7 +39,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-0002-Recognize-help-as-a-valid-sub-command.patch b/rabbitmq-server-0002-Recognize-help-as-a-valid-sub-command.patch new file mode 100644 index 0000000..6ac97bd --- /dev/null +++ b/rabbitmq-server-0002-Recognize-help-as-a-valid-sub-command.patch @@ -0,0 +1,68 @@ +From: Peter Lemenkov +Date: Fri, 23 Oct 2015 16:05:41 +0300 +Subject: [PATCH] Recognize help as a valid sub-command + +Some people believe that rabbitmqctl and rabbitmq-plugins should provide +a valid help subcommand (instead of throwing an error). So here it is. + +Signed-off-by: Peter Lemenkov + +diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl +index fe0563b..68d468f 100644 +--- a/src/rabbit_control_main.erl ++++ b/src/rabbit_control_main.erl +@@ -86,7 +86,8 @@ + close_connection, + {trace_on, [?VHOST_DEF]}, + {trace_off, [?VHOST_DEF]}, +- set_vm_memory_high_watermark ++ set_vm_memory_high_watermark, ++ help + ]). + + -define(GLOBAL_QUERIES, +@@ -108,7 +109,7 @@ + [stop, stop_app, start_app, wait, reset, force_reset, rotate_logs, + join_cluster, change_cluster_node_type, update_cluster_nodes, + forget_cluster_node, rename_cluster_node, cluster_status, status, +- environment, eval, force_boot]). ++ environment, eval, force_boot, help]). + + -define(COMMANDS_WITH_TIMEOUT, + [list_user_permissions, list_policies, list_queues, list_exchanges, +@@ -483,6 +484,9 @@ action(eval, Node, [Expr], _Opts, _Inform) -> + {error_string, format_parse_error(E)} + end; + ++action(help, _Node, _Args, _Opts, _Inform) -> ++ io:format("~s", [rabbit_ctl_usage:usage()]); ++ + action(Command, Node, Args, Opts, Inform) -> + %% For backward compatibility, run commands accepting a timeout with + %% the default timeout. +diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl +index a4d5490..4aeed48 100644 +--- a/src/rabbit_plugins_main.erl ++++ b/src/rabbit_plugins_main.erl +@@ -27,7 +27,8 @@ + {enable, [?OFFLINE_DEF, ?ONLINE_DEF]}, + {disable, [?OFFLINE_DEF, ?ONLINE_DEF]}, + {set, [?OFFLINE_DEF, ?ONLINE_DEF]}, +- {sync, []}]). ++ {sync, []}, ++ {help, []}]). + + %%---------------------------------------------------------------------------- + +@@ -147,7 +148,10 @@ action(disable, Node, ToDisable0, Opts, State = #cli{all = All, + action_change(Opts, Node, Implicit, NewImplicit, State); + + action(sync, Node, [], _Opts, State) -> +- sync(Node, true, State). ++ sync(Node, true, State); ++ ++action(help, _Node, _Args, _Opts, _State) -> ++ io:format("~s", [rabbit_plugins_usage:usage()]). + + %%---------------------------------------------------------------------------- + diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 28d3e5a..90d73a9 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -3,7 +3,7 @@ Name: rabbitmq-server Version: 3.5.6 -Release: 3%{?dist} +Release: 4%{?dist} License: MPLv1.1 Group: Development/Libraries Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz @@ -53,7 +53,9 @@ Requires(preun):initscripts # https://bugzilla.redhat.com/show_bug.cgi?id=998682 # https://bugzilla.redhat.com/show_bug.cgi?id=1032595#c8 -Patch0: rabbitmq-probe-ephemeral-port.patch +Patch1: rabbitmq-server-0001-Use-ephemeral-port-for-probing.patch +# Backported from upstream - https://github.com/rabbitmq/rabbitmq-server/pull/383 +Patch2: rabbitmq-server-0002-Recognize-help-as-a-valid-sub-command.patch %description RabbitMQ is an implementation of AMQP, the emerging standard for high @@ -72,7 +74,8 @@ scalable implementation of an AMQP broker. %prep %setup -q -%patch0 -p1 +%patch1 -p1 -b .ephemeral +%patch2 -p1 -b .help_subcommand %build cp %{S:2} %{_rabbit_wrapper} @@ -208,6 +211,9 @@ fi rm -rf %{buildroot} %changelog +* Fri Oct 23 2015 Peter Lemenkov - 3.5.6-4 +- Added help subcommand for the scripts + * Fri Oct 9 2015 Peter Lemenkov - 3.5.6-3 - Install sample config-file (rhbz#1160810)