Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Redis for openSUSE:Factory checked in at 2023-01-31 16:10:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Redis (Old) and /work/SRC/openSUSE:Factory/.perl-Redis.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Redis" Tue Jan 31 16:10:24 2023 rev:15 rq:1062265 version:2.000 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Redis/perl-Redis.changes 2022-01-21 01:26:05.306312314 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Redis.new.32243/perl-Redis.changes 2023-01-31 16:16:59.752463437 +0100 @@ -1,0 +2,14 @@ +Sat Jan 14 03:07:58 UTC 2023 - Tina Müller <[email protected]> + +- updated to 2.000 + see /usr/share/doc/packages/perl-Redis/Changes + + 2.000 2023-01-13 22:55:51+01:00 Europe/Paris + + * #166: add ssl, username and password args to redis sentinel (Merwan Ouddane) + * #163: Add support for username/password AUTH (Joel Chornik) + * #162: Retry socket connect if errno is EINTR (Michael Schout) + * #158: Better fix of redis version in test (Michal Josef Å paÄek) + * #156: Fix of test for multiple arguments in info command (Michal Josef Å paÄek) + +------------------------------------------------------------------- Old: ---- Redis-1.999.tar.gz New: ---- Redis-2.000.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Redis.spec ++++++ --- /var/tmp/diff_new_pack.XwWpVu/_old 2023-01-31 16:17:00.108465499 +0100 +++ /var/tmp/diff_new_pack.XwWpVu/_new 2023-01-31 16:17:00.112465523 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Redis # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,10 +18,10 @@ %define cpan_name Redis Name: perl-Redis -Version: 1.999 +Version: 2.000 Release: 0 -Summary: Perl binding for Redis database License: Artistic-2.0 +Summary: Perl binding for Redis database URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DA/DAMS/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml ++++++ Redis-1.999.tar.gz -> Redis-2.000.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/Changes new/Redis-2.000/Changes --- old/Redis-1.999/Changes 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/Changes 2023-01-13 22:55:56.000000000 +0100 @@ -1,5 +1,13 @@ Revision history for Redis +2.000 2023-01-13 22:55:51+01:00 Europe/Paris + + * #166: add ssl, username and password args to redis sentinel (Merwan Ouddane) + * #163: Add support for username/password AUTH (Joel Chornik) + * #162: Retry socket connect if errno is EINTR (Michael Schout) + * #158: Better fix of redis version in test (Michal Josef Å paÄek) + * #156: Fix of test for multiple arguments in info command (Michal Josef Å paÄek) + 1.999 2022-01-14 21:42:33+01:00 Europe/Paris * enable ssl support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/META.json new/Redis-2.000/META.json --- old/Redis-1.999/META.json 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/META.json 2023-01-13 22:55:56.000000000 +0100 @@ -65,7 +65,7 @@ "web" : "https://github.com/PerlRedis/perl-redis" } }, - "version" : "1.999", + "version" : "2.000", "x_generated_by_perl" : "v5.32.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.27", "x_spdx_expression" : "Artistic-2.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/META.yml new/Redis-2.000/META.yml --- old/Redis-1.999/META.yml 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/META.yml 2023-01-13 22:55:56.000000000 +0100 @@ -35,7 +35,7 @@ bugtracker: https://github.com/PerlRedis/perl-redis/issues homepage: https://github.com/PerlRedis/perl-redis repository: https://github.com/PerlRedis/perl-redis.git -version: '1.999' +version: '2.000' x_generated_by_perl: v5.32.1 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: Artistic-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/Makefile.PL new/Redis-2.000/Makefile.PL --- old/Redis-1.999/Makefile.PL 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/Makefile.PL 2023-01-13 22:55:56.000000000 +0100 @@ -110,7 +110,7 @@ "Test::SharedFork" => 0, "Test::TCP" => "1.19" }, - "VERSION" => "1.999", + "VERSION" => "2.000", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/README new/Redis-2.000/README --- old/Redis-1.999/README 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/README 2023-01-13 22:55:56.000000000 +0100 @@ -1,5 +1,5 @@ This archive contains the distribution Redis, -version 1.999: +version 2.000: Perl binding for Redis database diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/README.pod new/Redis-2.000/README.pod --- old/Redis-1.999/README.pod 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/README.pod 2023-01-13 22:55:56.000000000 +0100 @@ -6,8 +6,9 @@ Redis - Perl binding for Redis database +=head1 VERSION -=for html <a href="https://travis-ci.org/PerlRedis/perl-redis"><img src="https://travis-ci.org/PerlRedis/perl-redis.svg?branch=master"></a> +version 1.999 =head1 SYNOPSIS @@ -30,6 +31,15 @@ ## Use UNIX domain socket my $redis = Redis->new(sock => '/path/to/socket'); + ## Connect to Redis over a secure SSL/TLS channel. See + ## IO::Socket::SSL documentation for more information + ## about SSL_verify_mode parameter. + my $redis = Redis->new( + server => 'redis.tls.example.com:8080', + ssl => 1, + SSL_verify_mode => SSL_VERIFY_PEER, + ); + ## Enable auto-reconnect ## Try to reconnect every 1s up to 60 seconds until success ## Die if you can't after that @@ -180,6 +190,7 @@ my $r = Redis->new( server => '192.168.0.1:6379', debug => 0 ); my $r = Redis->new( server => '192.168.0.1:6379', encoding => undef ); + my $r = Redis->new( server => '192.168.0.1:6379', ssl => 1, SSL_verify_mode => SSL_VERIFY_PEER ); my $r = Redis->new( sock => '/path/to/sock' ); my $r = Redis->new( reconnect => 60, every => 5000 ); my $r = Redis->new( password => 'boo' ); @@ -351,6 +362,18 @@ CLIENT SETNAME >> support is not available (Redis servers 2.6.9 and above only), the name parameter is ignored. +=head3 C<< ssl >> + +You can connect to Redis over SSL/TLS by setting this flag if the target Redis +server or cluster has been setup to support SSL/TLS. This requires IO::Socket::SSL +to be installed on the client. It's off by default. + +=head3 C<< SSL_verify_mode >> + +This parameter will be applied when C<< ssl >> flag is set. It sets the verification +mode for the peer certificate. It's compatible with the parameter with the same name +in IO::Socket::SSL. + =head3 C<< debug >> The C<< debug >> parameter enables debug information to STDERR, including all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/lib/Redis/Hash.pm new/Redis-2.000/lib/Redis/Hash.pm --- old/Redis-1.999/lib/Redis/Hash.pm 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/lib/Redis/Hash.pm 2023-01-13 22:55:56.000000000 +0100 @@ -8,7 +8,7 @@ # The Artistic License 2.0 (GPL Compatible) # package Redis::Hash; -$Redis::Hash::VERSION = '1.999'; +$Redis::Hash::VERSION = '2.000'; # ABSTRACT: tie Perl hashes to Redis hashes # VERSION # AUTHORITY @@ -86,7 +86,7 @@ =head1 VERSION -version 1.999 +version 2.000 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/lib/Redis/List.pm new/Redis-2.000/lib/Redis/List.pm --- old/Redis-1.999/lib/Redis/List.pm 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/lib/Redis/List.pm 2023-01-13 22:55:56.000000000 +0100 @@ -8,7 +8,7 @@ # The Artistic License 2.0 (GPL Compatible) # package Redis::List; -$Redis::List::VERSION = '1.999'; +$Redis::List::VERSION = '2.000'; # ABSTRACT: tie Perl arrays to Redis lists # VERSION # AUTHORITY @@ -106,7 +106,7 @@ =head1 VERSION -version 1.999 +version 2.000 =head1 SYNOPSYS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/lib/Redis/Sentinel.pm new/Redis-2.000/lib/Redis/Sentinel.pm --- old/Redis-1.999/lib/Redis/Sentinel.pm 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/lib/Redis/Sentinel.pm 2023-01-13 22:55:56.000000000 +0100 @@ -8,7 +8,7 @@ # The Artistic License 2.0 (GPL Compatible) # package Redis::Sentinel; -$Redis::Sentinel::VERSION = '1.999'; +$Redis::Sentinel::VERSION = '2.000'; # ABSTRACT: Redis Sentinel interface use warnings; @@ -54,7 +54,7 @@ =head1 VERSION -version 1.999 +version 2.000 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/lib/Redis.pm new/Redis-2.000/lib/Redis.pm --- old/Redis-1.999/lib/Redis.pm 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/lib/Redis.pm 2023-01-13 22:55:56.000000000 +0100 @@ -8,7 +8,7 @@ # The Artistic License 2.0 (GPL Compatible) # package Redis; -$Redis::VERSION = '1.999'; +$Redis::VERSION = '2.000'; # ABSTRACT: Perl binding for Redis database # VERSION # AUTHORITY @@ -79,9 +79,9 @@ defined $args{$_} and $self->{$_} = $args{$_} for - qw(password on_connect name no_auto_connect_on_new cnx_timeout - write_timeout read_timeout sentinels_cnx_timeout sentinels_write_timeout - sentinels_read_timeout no_sentinels_list_update); + qw(username password on_connect name no_auto_connect_on_new cnx_timeout + write_timeout read_timeout sentinels_ssl sentinels_username sentinels_password + sentinels_cnx_timeout sentinels_write_timeout sentinels_read_timeout no_sentinels_list_update); $self->{reconnect} = $args{reconnect} || 0; $self->{conservative_reconnect} = $args{conservative_reconnect} || 0; @@ -114,13 +114,17 @@ foreach my $sentinel_address (@{$self->{sentinels}}) { my $sentinel = eval { Redis::Sentinel->new( - server => $sentinel_address, + server => $sentinel_address, + username => $self->{sentinels_username}, + password => $self->{sentinels_password}, cnx_timeout => ( defined $self->{sentinels_cnx_timeout} - ? $self->{sentinels_cnx_timeout} : 0.1), + ? $self->{sentinels_cnx_timeout} : 0.1 ), read_timeout => ( defined $self->{sentinels_read_timeout} - ? $self->{sentinels_read_timeout} : 1 ), + ? $self->{sentinels_read_timeout} : 1 ), write_timeout => ( defined $self->{sentinels_write_timeout} - ? $self->{sentinels_write_timeout} : 1 ), + ? $self->{sentinels_write_timeout} : 1 ), + ssl => ( defined $self->{sentinels_ssl} + ? $self->{sentinels_ssl} : 0 ), ) } or next; my $server_address = $sentinel->get_service_address($self->{service}); @@ -159,7 +163,13 @@ ); if (exists $args{ssl} and $args{ssl}) { - croak("Redis client does not support SSL with Redis Sentinel yet"); + if ( ! SSL_AVAILABLE ) { + croak("IO::Socket::SSL is required for connecting to Redis using SSL"); + } + + $self->{ssl} = 1; + $socket_class = 'IO::Socket::SSL'; + $socket_args{SSL_verify_mode} = $args{SSL_verify_mode} // 1; } else { $self->{ssl} = 0; @@ -670,12 +680,24 @@ sub __build_sock { my ($self) = @_; - $self->{sock} = $self->{builder}->($self) - || croak("Could not connect to Redis server at $self->{server}: $!"); + do { + $self->{sock} = $self->{builder}->($self); + } while (!$self->{sock} && $! == Errno::EINTR); + + unless ($self->{sock}) { + croak("Could not connect to Redis server at $self->{server}: $!"); + } $self->{__buf} = ''; - if (defined $self->{password}) { + if (defined $self->{username} && defined $self->{password}) { + try { $self->auth($self->{username}, $self->{password}) } + catch { + my $error = $_; + $self->{reconnect} = 0; + croak('Redis server authentication error: ' . $error); + }; + } elsif (defined $self->{password}) { try { $self->auth($self->{password}) } catch { my $error = $_; @@ -986,7 +1008,7 @@ =head1 VERSION -version 1.999 +version 2.000 =head1 SYNOPSIS @@ -2255,6 +2277,10 @@ Authenticate to the server (see L<https://redis.io/commands/auth>) + $r->auth(username, password) + +Authenticate to the server using Redis 6.0+ ACL System (see L<https://redis.io/commands/auth>) + =head2 echo $r->echo(message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Redis-1.999/t/04-pipeline.t new/Redis-2.000/t/04-pipeline.t --- old/Redis-1.999/t/04-pipeline.t 2022-01-14 21:42:37.000000000 +0100 +++ new/Redis-2.000/t/04-pipeline.t 2023-01-13 22:55:56.000000000 +0100 @@ -63,10 +63,16 @@ pipeline_ok 'info in pipelined mode', ( [info => [], code(sub { ref $_[0] eq 'HASH' && keys %{ $_[0] } })], - [ info => [qw<oops oops>], - undef, - re(qr{^ERR (?:syntax error|wrong number of arguments for 'info' command)$}) - ], + $r->info->{redis_version} ge '7.0.0' ? ( + [ info => [qw<oops oops>], + {}, + ], + ) : ( + [ info => [qw<oops oops>], + undef, + re(qr{^ERR (?:syntax error|wrong number of arguments for 'info' command)$}) + ], + ) ); pipeline_ok 'pipeline with multi-bulk reply',
