From fe3f5960fc31dbbe613470936990603e46debb01 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 21 Aug 2019 13:48:20 -0700 Subject: [PATCH] New release 0.3.1 --- .gitignore | 1 + ...ow-EXTERNAL-as-well-as-AMQPLAIN-auth.patch | 70 ------------------- perl-Mojo-RabbitMQ-Client.spec | 20 ++---- sources | 2 +- 4 files changed, 9 insertions(+), 84 deletions(-) delete mode 100644 0001-Allow-EXTERNAL-as-well-as-AMQPLAIN-auth.patch diff --git a/.gitignore b/.gitignore index 23bd482..01f4c75 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /Mojo-RabbitMQ-Client-0.2.3.tar.gz /Mojo-RabbitMQ-Client-without-amqp0.8-spec-0.2.3.tar.gz /Mojo-RabbitMQ-Client-without-amqp0.8-spec-0.2.4.tar.gz +/Mojo-RabbitMQ-Client-0.3.1.tar.gz diff --git a/0001-Allow-EXTERNAL-as-well-as-AMQPLAIN-auth.patch b/0001-Allow-EXTERNAL-as-well-as-AMQPLAIN-auth.patch deleted file mode 100644 index 939a9f6..0000000 --- a/0001-Allow-EXTERNAL-as-well-as-AMQPLAIN-auth.patch +++ /dev/null @@ -1,70 +0,0 @@ -From db3e849c09c58f563ef99030bdb264fadaa48bed Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 1 Aug 2019 17:55:05 -0700 -Subject: [PATCH] Allow EXTERNAL as well as AMQPLAIN auth - -I'm trying to publish messages from openQA (which uses this -client library) to fedora-messaging (which is a RabbitMQ broker -using EXTERNAL auth), so I kinda need this. The intent here is -that by default we'll try and use either of AMQPLAIN or EXTERNAL -if the server advertises one or both, preferring AMQPLAIN; the -auth_mechanism query param can be used to specify only one or -the other. - -Signed-off-by: Adam Williamson ---- - lib/Mojo/RabbitMQ/Client.pm | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -diff --git a/lib/Mojo/RabbitMQ/Client.pm b/lib/Mojo/RabbitMQ/Client.pm -index 03d61b1..574868f 100644 ---- a/lib/Mojo/RabbitMQ/Client.pm -+++ b/lib/Mojo/RabbitMQ/Client.pm -@@ -385,9 +385,21 @@ sub _connected { - 'Connection::Start' => sub { - my $frame = shift; - -- my @mechanisms = split /\s/, $frame->method_frame->mechanisms; -- return $self->emit(error => 'AMQPLAIN is not found in mechanisms') -- if none { $_ eq 'AMQPLAIN' } @mechanisms; -+ my @server_mechanisms = split /\s/, $frame->method_frame->mechanisms; -+ my $param_mechanism = $self->param('auth_mechanism') // ''; -+ my @client_mechanisms = ('AMQPLAIN', 'EXTERNAL'); -+ @client_mechanisms = ($param_mechanism) if ($param_mechanism); -+ warn "-- Server mechanisms: @server_mechanisms\n" if DEBUG; -+ warn "-- Client mechanisms: @client_mechanisms\n" if DEBUG; -+ my $mechanism; -+ for my $cand (@client_mechanisms) { -+ if (grep { $_ eq $cand } @server_mechanisms) { -+ $mechanism = $cand; -+ last; -+ } -+ } -+ return $self->emit(error => 'No authentication mechanism could be negotiated') -+ unless $mechanism; - - my @locales = split /\s/, $frame->method_frame->locales; - return $self->emit(error => 'en_US is not found in locales') -@@ -404,7 +416,7 @@ sub _connected { - information => 'https://github.com/inway/mojo-rabbitmq-client', - version => __PACKAGE__->VERSION, - }, -- mechanism => 'AMQPLAIN', -+ mechanism => $mechanism, - response => {LOGIN => $self->user, PASSWORD => $self->pass}, - locale => 'en_US', - ), -@@ -913,7 +925,9 @@ authority file has been provided, or 0x00 otherwise. - - =head2 auth_mechanism - --Currently only AMQPLAIN is supported, B. -+Sets the AMQP authentication mechanism. Defaults to AMQPLAIN. AMQPLAIN and -+EXTERNAL are supported; EXTERNAL will only work if L does not need -+to do anything beyond passing along a username and password if specified. - - =head2 heartbeat - --- -2.22.0 - diff --git a/perl-Mojo-RabbitMQ-Client.spec b/perl-Mojo-RabbitMQ-Client.spec index 49781f0..54d8542 100644 --- a/perl-Mojo-RabbitMQ-Client.spec +++ b/perl-Mojo-RabbitMQ-Client.spec @@ -1,21 +1,11 @@ Name: perl-Mojo-RabbitMQ-Client -Version: 0.2.4 +Version: 0.3.1 Release: 1%{?dist} Summary: Mojo::IOLoop based RabbitMQ client License: Artistic 2.0 and BSD URL: https://metacpan.org/release/Mojo-RabbitMQ-Client -# Fedora ships a source tarball that does not contain the share/fixed_amqp0-8.xml file. -# This file is non-free since it forbids modification. -# Original source is https://cpan.metacpan.org/authors/id/S/SE/SEBAPOD/Mojo-RabbitMQ-Client-%%{version}.tar.gz -# To recreate modified source, just unpack, delete the file, and repack: -# tar xvf Mojo-RabbitMQ-Client-%%{version}.tar.gz -# rm -f Mojo-RabbitMQ-Client-%%{version}/share/fixed_amqp0-8.xml -# tar cvf Mojo-RabbitMQ-Client-without-amqp0.8-spec-%%{version}.tar.gz Mojo-RabbitMQ-Client-%%{version}/ -Source0: Mojo-RabbitMQ-Client-without-amqp0.8-spec-%{version}.tar.gz -# Allow EXTERNAL auth (needed for publishing to fedora-messaging) -# https://github.com/inway/mojo-rabbitmq-client/pull/35 -Patch0: 0001-Allow-EXTERNAL-as-well-as-AMQPLAIN-auth.patch +Source0: https://cpan.metacpan.org/authors/id/S/SE/SEBAPOD/Mojo-RabbitMQ-Client-%{version}.tar.gz BuildArch: noarch # build requirements @@ -62,7 +52,6 @@ Mojo::IOLoop. %prep %setup -q -n Mojo-RabbitMQ-Client-%{version} -%patch0 -p1 rm -rf inc %build @@ -84,6 +73,11 @@ TEST_RMQ='' MOJO_RABBITMQ_DEBUG="" MOJO_CONNECT_TIMEOUT="" ./Build test %{_mandir}/man3/Mojo* %changelog +* Wed Aug 21 2019 Adam Williamson - 0.3.1-1 +- New release 0.3.1 +- Drop merged patch +- Drop tarball modification now non-free file is removed upstream + * Tue Aug 20 2019 Adam Williamson - 0.2.4-1 - New release 0.2.4 (fixes annoying log warning spam) diff --git a/sources b/sources index 38d4207..cbcec50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Mojo-RabbitMQ-Client-without-amqp0.8-spec-0.2.4.tar.gz) = 3250d66a88ee8ea8c9d76f1d11f51349f1d45f3b7c9e400fb638bd0b13919c10e6a76c74ee468da712c420aee1613c17d6a7f848ace1cb199c75f180747b4658 +SHA512 (Mojo-RabbitMQ-Client-0.3.1.tar.gz) = 9bea70432c5903c9f40b4a8eb0a198ec729abd14544dacd9df2de3cfd98a420fb512310a7d21d904dfdf405ba97ae259715cebb71e729af79f05bff35e9c480c