diff --git a/Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch b/Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch new file mode 100644 index 0000000..8766264 --- /dev/null +++ b/Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch @@ -0,0 +1,188 @@ +From d2b7b8a40275c24b271b7d806774fa813a883241 Mon Sep 17 00:00:00 2001 +From: Michael Klishin +Date: Fri, 4 Feb 2022 18:59:19 +0300 +Subject: [PATCH 2/2] Elixir 1.13 OptionParser no longer supports :atom values + +so coerce e.g. node names in our own code. +--- + .../lib/rabbitmq/cli/core/command_modules.ex | 4 ++-- + .../lib/rabbitmq/cli/core/helpers.ex | 12 +++++++++++- + .../rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex | 16 +++++++++------- + .../rabbitmq/cli/ctl/commands/decode_command.ex | 7 ++++--- + .../rabbitmq/cli/ctl/commands/encode_command.ex | 7 ++++--- + 5 files changed, 30 insertions(+), 16 deletions(-) + +diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex +index 006119cc7a..7343a139cc 100644 +--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex ++++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex +@@ -5,7 +5,7 @@ + ## Copyright (c) 2007-2021 VMware, Inc. or its affiliates. All rights reserved. + + defmodule RabbitMQ.CLI.Core.CommandModules do +- alias RabbitMQ.CLI.Core.Config ++ alias RabbitMQ.CLI.Core.{Config, DataCoercion} + alias RabbitMQ.CLI.Plugins.Helpers, as: PluginsHelpers + alias RabbitMQ.CLI.CommandBehaviour + +@@ -37,7 +37,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do + + def script_scope(opts) do + scopes = Application.get_env(:rabbitmqctl, :scopes, []) +- scopes[Config.get_option(:script_name, opts)] || :none ++ scopes[DataCoercion.to_atom(Config.get_option(:script_name, opts))] || :none + end + + def load_commands_core(scope) do +diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex +index d9834f6cc5..4719af08d0 100644 +--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex ++++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex +@@ -5,7 +5,7 @@ + ## Copyright (c) 2007-2021 VMware, Inc. or its affiliates. All rights reserved. + + defmodule RabbitMQ.CLI.Core.Helpers do +- alias RabbitMQ.CLI.Core.{Config, NodeName} ++ alias RabbitMQ.CLI.Core.{Config, DataCoercion, NodeName} + require Record + + def get_rabbit_hostname(node_name_type \\ :shortnames) do +@@ -115,6 +115,16 @@ defmodule RabbitMQ.CLI.Core.Helpers do + ) + end + ++ def atomize_values(map, keys) do ++ Enum.reduce(map, %{}, ++ fn({k, v}, acc) -> ++ case Enum.member?(keys, k) do ++ false -> Map.put(acc, k, v) ++ true -> Map.put(acc, k, DataCoercion.to_atom(v)) ++ end ++ end) ++ end ++ + def apply_if_exported(mod, fun, args, default) do + Code.ensure_loaded(mod) + case function_exported?(mod, fun, length(args)) do +diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex +index bd1aa45815..d8e2c8e4b7 100644 +--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex ++++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex +@@ -6,11 +6,11 @@ + + defmodule RabbitMQ.CLI.Core.Parser do + alias RabbitMQ.CLI.{CommandBehaviour, FormatterBehaviour} +- alias RabbitMQ.CLI.Core.{CommandModules, Config} ++ alias RabbitMQ.CLI.Core.{CommandModules, Config, Helpers} + + def default_switches() do + [ +- node: :atom, ++ node: :string, + quiet: :boolean, + silent: :boolean, + dry_run: :boolean, +@@ -22,18 +22,20 @@ defmodule RabbitMQ.CLI.Core.Parser do + formatter: :string, + printer: :string, + file: :string, +- script_name: :atom, ++ script_name: :string, + rabbitmq_home: :string, + mnesia_dir: :string, + plugins_dir: :string, + enabled_plugins_file: :string, + aliases_file: :string, +- erlang_cookie: :atom, ++ erlang_cookie: :string, + help: :boolean, + print_stacktrace: :boolean + ] + end + ++ @atomized_options [:node, :script_name, :erlang_cookie] ++ + def default_aliases() do + [ + p: :vhost, +@@ -68,13 +70,13 @@ defmodule RabbitMQ.CLI.Core.Parser do + {[_alias_command_name | cmd_arguments], cmd_options, cmd_invalid} = + parse_alias(input, command_name, alias_module, alias_content, options) + +- {alias_module, command_name, cmd_arguments, cmd_options, cmd_invalid} ++ {alias_module, command_name, cmd_arguments, Helpers.atomize_values(cmd_options, @atomized_options), cmd_invalid} + + command_module when is_atom(command_module) -> + {[^command_name | cmd_arguments], cmd_options, cmd_invalid} = + parse_command_specific(input, command_module, options) + +- {command_module, command_name, cmd_arguments, cmd_options, cmd_invalid} ++ {command_module, command_name, cmd_arguments, Helpers.atomize_values(cmd_options, @atomized_options), cmd_invalid} + end + end + +@@ -208,7 +210,7 @@ defmodule RabbitMQ.CLI.Core.Parser do + ) + + norm_options = normalize_options(options, switches) |> Map.new() +- {args, norm_options, invalid} ++ {args, Helpers.atomize_values(norm_options, @atomized_options), invalid} + end + + defp build_switches(default, command, formatter) do +diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex +index 7c8da87d26..001d978c81 100644 +--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex ++++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex +@@ -14,11 +14,12 @@ defmodule RabbitMQ.CLI.Ctl.Commands.DecodeCommand do + + def switches() do + [ +- cipher: :atom, +- hash: :atom, ++ cipher: :string, ++ hash: :string, + iterations: :integer + ] + end ++ @atomized_keys [:cipher, :hash] + + def distribution(_), do: :none + +@@ -28,7 +29,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.DecodeCommand do + hash: :rabbit_pbe.default_hash(), + iterations: :rabbit_pbe.default_iterations() + }, opts) +- {args, with_defaults} ++ {args, Helpers.atomize_values(with_defaults, @atomized_keys)} + end + + def validate(args, _) when length(args) < 2 do +diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex +index d18f948fce..ae65beae5b 100644 +--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex ++++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex +@@ -12,11 +12,12 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EncodeCommand do + + def switches() do + [ +- cipher: :atom, +- hash: :atom, ++ cipher: :string, ++ hash: :string, + iterations: :integer + ] + end ++ @atomized_keys [:cipher, :hash] + + def distribution(_), do: :none + +@@ -26,7 +27,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EncodeCommand do + hash: :rabbit_pbe.default_hash(), + iterations: :rabbit_pbe.default_iterations() + }, opts) +- {args, with_defaults} ++ {args, Helpers.atomize_values(with_defaults, @atomized_keys)} + end + + def validate(args, _) when length(args) < 2 do diff --git a/Support-Elixir-1.13.patch b/Support-Elixir-1.13.patch new file mode 100644 index 0000000..a9b22b4 --- /dev/null +++ b/Support-Elixir-1.13.patch @@ -0,0 +1,77 @@ +From 59e211d97eb57150714af9973a3dfc0baae86a13 Mon Sep 17 00:00:00 2001 +From: Luke Bakken +Date: Thu, 20 Jan 2022 09:53:51 -0800 +Subject: [PATCH 1/2] Support Elixir 1.13 + +This is the build error prior to these changes: + +``` +* rabbit_common (/home/bakkenl/development/rabbitmq/rabbitmq-server/deps/rabbit_common) + could not find an app file at "_build/dev/lib/rabbit_common/ebin/rabbit_common.app". This may happen if the dependency was not yet compiled or the dependency indeed has no app file (then you can pass app: false as option) +** (Mix) Can't continue due to errors on dependencies +``` + +Telling `mix` to compile `rabbit_common` ensures that the following +links are created: + +``` +$ ll deps/rabbitmq_cli/_build/dev/lib/rabbit_common/ +total 8 +drwxr-xr-x 2 bakkenl bakkenl 4096 Jan 20 09:46 . +drwxr-xr-x 10 bakkenl bakkenl 4096 Jan 20 09:46 .. +lrwxrwxrwx 1 bakkenl bakkenl 33 Jan 20 09:46 ebin -> ../../../../../rabbit_common/ebin +lrwxrwxrwx 1 bakkenl bakkenl 36 Jan 20 09:46 include -> ../../../../../rabbit_common/include +``` +--- + deps/rabbitmq_cli/mix.exs | 6 +----- + deps/rabbitmq_ct_client_helpers/rabbitmq-components.mk | 2 +- + deps/rabbitmq_ct_helpers/rabbitmq-components.mk | 2 +- + rabbitmq-components.mk | 2 +- + 4 files changed, 4 insertions(+), 8 deletions(-) + +Index: rabbitmq-server-3.9.13/deps/rabbitmq_cli/mix.exs +=================================================================== +--- rabbitmq-server-3.9.13.orig/deps/rabbitmq_cli/mix.exs ++++ rabbitmq-server-3.9.13/deps/rabbitmq_cli/mix.exs +@@ -11,7 +11,7 @@ defmodule RabbitMQCtl.MixfileBase do + [ + app: :rabbitmqctl, + version: "3.8.0-dev", +- elixir: ">= 1.10.4 and < 1.13.0", ++ elixir: ">= 1.10.4 and < 1.14.0", + build_embedded: Mix.env == :prod, + start_permanent: Mix.env == :prod, + escript: [main_module: RabbitMQCtl, +@@ -149,19 +149,15 @@ defmodule RabbitMQCtl.MixfileBase do + end + end + +- # We disable compilation for rabbit_common and amqp_client +- # because Erlang.mk already built them. + [ + { + :rabbit_common, + path: Path.join(deps_dir, "rabbit_common"), +- compile: false, + override: true + }, + { + :amqp_client, + path: Path.join(deps_dir, "amqp_client"), +- compile: false, + override: true, + only: :test + }, +Index: rabbitmq-server-3.9.13/rabbitmq-components.mk +=================================================================== +--- rabbitmq-server-3.9.13.orig/rabbitmq-components.mk ++++ rabbitmq-server-3.9.13/rabbitmq-components.mk +@@ -118,7 +118,7 @@ dep_looking_glass = git https://github.c + dep_prometheus = git https://github.com/deadtrickster/prometheus.erl 06425c21a39c1564164f1cc3fe5bdfa8b23b1f78 + dep_ra = hex 2.0.3 + dep_ranch = hex 2.1.0 +-dep_recon = hex 2.5.1 ++dep_recon = hex 2.5.2 + dep_redbug = hex 2.0.7 + dep_observer_cli = hex 1.7.1 + dep_stdout_formatter = hex 0.2.4 diff --git a/rabbitmq-server-3.9.12.tar.xz b/rabbitmq-server-3.9.12.tar.xz deleted file mode 100644 index fec449b..0000000 --- a/rabbitmq-server-3.9.12.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ba251178bc260f120d82f3605a07389dcc8a49ee7e6477562685e39e84ff6c7 -size 4782504 diff --git a/rabbitmq-server-3.9.12.tar.xz.asc b/rabbitmq-server-3.9.12.tar.xz.asc deleted file mode 100644 index f604937..0000000 --- a/rabbitmq-server-3.9.12.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEECpryEV9Gh70pgDoga3OjbmAm38oFAmHWwB8ACgkQa3OjbmAm -38r+zxAAnVsFxSOxhN3OkgmG1C/rH7CCMY3ibH/SQJFd91jojUxslZWKyb55CObe -le5ASxlQKIujr0iSk/Ze4EyHqihgDYl0XYlRuBforbR++866hNTeHPBdwsYFxroa -2RSv29DPfn1IWhh03Ql9+XjhtTZpaupwsXeX563vbpinodY135Fx2AxfekZwnJXh -J8ZNmIkEaxR0P+FSaAzADWS2Ae21RSJNW20dYCPtMstrqLBUciSokpGCWn1+lts2 -h2hlpiD+cujOns6tOKoH34ldxFpG1HvPzg8gL7HtKOWgwLo4ifJJZnsAOpq5rbVs -Fi4Dc/0C/PVRO/zpMyyiImFsjoRMrtvMrMquEvxatK6rM9HjkstpelktGEUEJCSp -3b4XVf94LRNt9/VFvxpxQk/le496LMab0EO1PSSYtgp838X5yj0j2uWY9JIiXG55 -PBAoJte6HqIv7lDIBz7bp/yFt3mDB/IwNVJWY5RYz0ccs6xogDCh8dnQYcmDUJZJ -MrCXZYPOJbFI34M4f2dZZgSzs1ZsRQXBfRlIwL74yHOviV8lFaHt4MrL0tysWg8+ -3FUWu2SStzmeDz/vHKdJgImjEEpn4kjjY2rBjk5RBvifd9Tmx4mXFEwJA5aB6Szs -Q7wYzNqRG9ErUWzrFBSVrr0cB7gpeJZzu6t8opZOiQ241hcIZGI= -=rmIh ------END PGP SIGNATURE----- diff --git a/rabbitmq-server-3.9.13.tar.xz b/rabbitmq-server-3.9.13.tar.xz new file mode 100644 index 0000000..a55cca2 --- /dev/null +++ b/rabbitmq-server-3.9.13.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e7759ef89be085cabba4c4ac8ea5fa1109bf3a4480f65cbef1d1e51989f727a +size 4816788 diff --git a/rabbitmq-server-3.9.13.tar.xz.asc b/rabbitmq-server-3.9.13.tar.xz.asc new file mode 100644 index 0000000..4fbde76 --- /dev/null +++ b/rabbitmq-server-3.9.13.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEECpryEV9Gh70pgDoga3OjbmAm38oFAmHnQ8YACgkQa3OjbmAm +38qCuxAArjHGf+JqPuM02K7hzsH4dygDq06y1rb6rVfoSUJbBfUjGKwwbIXUeOeE +1DIwfg9tKKmcuUkt3ZZE/VuPwGqgxSVyskm/kKu4hiINRhDuYd6l8th8LzOQamvJ +gn2q7FNCdUinIhN8tVfc7j3ZUOZlZgjOzdzHpmcFG9Y5BgKt743AuP/j4JIY2/kw +3p9fD/yk1u6/0DbugL6vFhL/sXhZchHLRbnNMFB/MXKsbKsN7SXyZ+fTCE0VPqBT +6E1dh9HkOuSRy6hjiPrFQeO0aBwUtYF2fzfPtlvu1IUgtDG7uT7qA5nKRA8wUo2w +VoSKAbDNgEz/UwbUmY/enSedugdNJJNkWhfos73GI9d4RNOph5v6dyZLa4qlD86/ +jl6dqOJ+P5sqLRmAMcXRGbmhRa6iscJlgmCIcSz5OxgPrIkD/ftsIj/Ti9AVAZA+ +SmrZTb+l5gwv/VoRlhS6X0Q1Av80gzF84YzkEASa5K1YkkkPEjyTmCltKSM5ck5z +02p+HhTiKYH9juv8FmoEO2x477waePmjgUtt5dGDC2MI9kJWZ9CyVgbOMAVvlMpP +LJ2+elaLQdqQQO7B+7f8Tsf4ZtxnUi3S6BsQoC+WZa+dkpENgFVpteOb+VMByGi9 +njAMv+BHOIrfbA3b/1r5w3aj5W9Cu7QE9N34f4DoZeSk3CJXUwU= +=vjC2 +-----END PGP SIGNATURE----- diff --git a/rabbitmq-server.changes b/rabbitmq-server.changes index 15243bf..65fcc7c 100644 --- a/rabbitmq-server.changes +++ b/rabbitmq-server.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Wed Jan 19 09:51:06 UTC 2022 - Fusion Future + +- Update to 3.9.13 + * Core Server Bug Fixes and Enhancements + - Disk space monitor now correctly parses output on (at least + some) systems where non-ASCII characters are used in paths. + - Stream leader election is now deterministic when cluster is + undergoing a rolling upgrade. + - Queue and binding definition import can be delayed until a + moment when at least N nodes (e.g. three) have joined the + cluster. +- Allow building with Elixir 1.13.x + * Support-Elixir-1.13.patch + * Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch + ------------------------------------------------------------------- Thu Jan 6 14:54:59 UTC 2022 - Fusion Future diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 4dd47f7..b74ef85 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -39,7 +39,7 @@ %define _rabbitmq_group rabbitmq Name: rabbitmq-server -Version: 3.9.12 +Version: 3.9.13 Release: 0 Summary: A message broker supporting AMQP, STOMP and MQTT License: MPL-2.0 @@ -52,6 +52,9 @@ Source4: rabbitmq-env.conf Source6: rabbitmq-server.service Source7: https://raw.githubusercontent.com/rabbitmq/rabbitmq-packaging/v%{version}/RPMS/Fedora/rabbitmq-server.tmpfiles Source8: README.SUSE +# PATCH-FIX-UPSTREAM update-elixir-version.patch Allow building with elixir 1.13.x gh#rabbitmq/rabbitmq-server#4019 +Patch0: Support-Elixir-1.13.patch +Patch1: Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch BuildRequires: elixir # https://www.rabbitmq.com/which-erlang.html BuildRequires: erlang >= 23.2 @@ -126,7 +129,7 @@ BuildArch: noarch Optional dependency offering zsh completion for %{name}. %prep -%setup -q +%autosetup -p1 cp %{SOURCE8} . %build