Hello community, here is the log from the commit of package perl-Net-SSH2 for openSUSE:Factory checked in at 2017-06-21 13:57:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Net-SSH2 (Old) and /work/SRC/openSUSE:Factory/.perl-Net-SSH2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Net-SSH2" Wed Jun 21 13:57:09 2017 rev:5 rq:504922 version:0.65 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Net-SSH2/perl-Net-SSH2.changes 2016-10-20 23:10:39.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Net-SSH2.new/perl-Net-SSH2.changes 2017-06-21 13:57:11.459375684 +0200 @@ -1,0 +2,6 @@ +Thu Jun 15 05:59:12 UTC 2017 - [email protected] + +- updated to 0.65 + see /usr/share/doc/packages/perl-Net-SSH2/Changes + +------------------------------------------------------------------- Old: ---- Net-SSH2-0.63.tar.gz New: ---- Net-SSH2-0.65.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Net-SSH2.spec ++++++ --- /var/tmp/diff_new_pack.wgT2MV/_old 2017-06-21 13:57:13.015156228 +0200 +++ /var/tmp/diff_new_pack.wgT2MV/_new 2017-06-21 13:57:13.015156228 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Net-SSH2 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,14 @@ Name: perl-Net-SSH2 -Version: 0.63 +Version: 0.65 Release: 0 %define cpan_name Net-SSH2 Summary: Support for the SSH 2 protocol via libssh2 License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Net-SSH2/ -Source0: http://www.cpan.org/authors/id/S/SA/SALVA/%{cpan_name}-%{version}.tar.gz +Source0: https://cpan.metacpan.org/authors/id/S/SA/SALVA/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl ++++++ Net-SSH2-0.63.tar.gz -> Net-SSH2-0.65.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/Changes new/Net-SSH2-0.65/Changes --- old/Net-SSH2-0.63/Changes 2016-10-13 09:35:31.000000000 +0200 +++ new/Net-SSH2-0.65/Changes 2017-06-14 10:51:36.000000000 +0200 @@ -1,6 +1,21 @@ Revision history for Perl extension Net::SSH2. -0.63 +0.65 2017-06-14 + - Improve Travis CI testing + - Fix perl 5.8 support + - Warn when check_hostkey is called in void context. + +0.64 2017-06-14 + - Accept debug flag on the constructor. + - Ensure the crypto libraries are positioned after libssh2 on + the link line (bug report and patch by Jacques Germishuys). + - Channel "pty" method now accepts mode modifiers passed as a + hash. + - In connect, warnif was clobbering $! (bug report and patch + by ikegami). + - t/Net-SSH2.t: add support for TEST_NET_SSH2_TRACE + +0.63 2016-10-13 - die_with_error errors pointed to that method instead of its caller. - Fix case in user message. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/META.yml new/Net-SSH2-0.65/META.yml --- old/Net-SSH2-0.63/META.yml 2016-10-13 09:43:07.000000000 +0200 +++ new/Net-SSH2-0.65/META.yml 2017-06-14 11:45:04.000000000 +0200 @@ -8,7 +8,7 @@ ExtUtils::MakeMaker: 6.59 distribution_type: module dynamic_config: 1 -generated_by: 'Module::Install version 1.16' +generated_by: 'Module::Install version 1.17' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -22,7 +22,7 @@ provides: Net::SSH2: file: lib/Net/SSH2.pm - version: '0.63' + version: '0.65' Net::SSH2::Channel: file: lib/Net/SSH2/Channel.pm Net::SSH2::Dir: @@ -42,4 +42,4 @@ resources: license: http://dev.perl.org/licenses/ repository: git://github.com/rkitover/net-ssh2.git -version: '0.63' +version: '0.65' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/Makefile.PL new/Net-SSH2-0.65/Makefile.PL --- old/Net-SSH2-0.63/Makefile.PL 2016-05-03 12:25:40.000000000 +0200 +++ new/Net-SSH2-0.65/Makefile.PL 2017-06-14 09:10:05.000000000 +0200 @@ -258,6 +258,8 @@ } } +makemaker_append_once LIBS => '-lssh2', '-lz'; + if ($crypto_backend eq 'gcrypt') { makemaker_append_once(LDDLFLAGS => '-lgcrypt'); } @@ -283,8 +285,6 @@ resources repository => 'git://github.com/rkitover/net-ssh2.git'; -makemaker_append_once LIBS => '-lssh2', '-lz'; - my $gen = "util/gen_constants.pl"; if (-f $gen) { system $^X, $gen diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/README new/Net-SSH2-0.65/README --- old/Net-SSH2-0.63/README 2016-05-03 12:25:40.000000000 +0200 +++ new/Net-SSH2-0.65/README 2017-04-18 15:45:36.000000000 +0200 @@ -92,7 +92,7 @@ Copyright (C) 2010-2016 by Rafael Kitover ([email protected]). -Copyright (C) 2011-2016 by Salvador Fandino ([email protected]). +Copyright (C) 2011-2017 by Salvador Fandino ([email protected]). All rights reserved. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/SSH2.xs new/Net-SSH2-0.65/SSH2.xs --- old/Net-SSH2-0.63/SSH2.xs 2016-06-07 14:17:40.000000000 +0200 +++ new/Net-SSH2-0.65/SSH2.xs 2017-04-19 12:09:41.000000000 +0200 @@ -1756,8 +1756,8 @@ #if LIBSSH2_VERSION_MAJOR >= 1 SSH2_NERROR -net_ch_pty(SSH2_CHANNEL* ch, SV* terminal, SV* modes = NULL, \ - int width = 0, int height = 0) +net_ch__pty(SSH2_CHANNEL* ch, SV* terminal, SV* modes = NULL, \ + int width = 0, int height = 0) PREINIT: const char* pv_terminal, * pv_modes = NULL; STRLEN len_terminal, len_modes = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Devel/CheckLib.pm new/Net-SSH2-0.65/inc/Devel/CheckLib.pm --- old/Net-SSH2-0.63/inc/Devel/CheckLib.pm 2016-10-13 09:43:06.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Devel/CheckLib.pm 2017-06-14 11:45:04.000000000 +0200 @@ -6,7 +6,7 @@ use 5.00405; #postfix foreach use strict; use vars qw($VERSION @ISA @EXPORT); -$VERSION = '1.07'; +$VERSION = '1.10'; use Config qw(%Config); use Text::ParseWords 'quotewords'; @@ -355,7 +355,7 @@ push @missing, $header if $rv != 0 || ! -x $exefile; _cleanup_exe($exefile); unlink $cfile; - } + } # now do each library in turn with headers my($ch, $cfile) = File::Temp::tempfile( @@ -409,6 +409,8 @@ ); } warn "# @sys_cmd\n" if $args{debug}; + local $ENV{LD_RUN_PATH} = join(":", @libpaths).":".$ENV{LD_RUN_PATH} unless $^O eq 'MSWin32'; + local $ENV{PATH} = join(";", @libpaths).";".$ENV{PATH} if $^O eq 'MSWin32'; my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd); if ($rv != 0 || ! -x $exefile) { push @missing, $lib; @@ -472,7 +474,7 @@ push @Config_ldflags, $config_val if ( $config_val =~ /\S/ ); } my @ccflags = grep { length } quotewords('\s+', 1, $Config_ccflags||'', $user_ccflags||''); - my @ldflags = grep { length } quotewords('\s+', 1, @Config_ldflags, $user_ldflags||''); + my @ldflags = grep { length && $_ !~ m/^-Wl/ } quotewords('\s+', 1, @Config_ldflags, $user_ldflags||''); my @paths = split(/$Config{path_sep}/, $ENV{PATH}); my @cc = split(/\s+/, $Config{cc}); if (check_compiler ($cc[0], $debug)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/Base.pm new/Net-SSH2-0.65/inc/Module/Install/Base.pm --- old/Net-SSH2-0.63/inc/Module/Install/Base.pm 2016-10-13 09:43:06.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/Base.pm 2017-06-14 11:45:04.000000000 +0200 @@ -4,7 +4,7 @@ use strict 'vars'; use vars qw{$VERSION}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; } # Suspend handler for "redefined" warnings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/Can.pm new/Net-SSH2-0.65/inc/Module/Install/Can.pm --- old/Net-SSH2-0.63/inc/Module/Install/Can.pm 2016-10-13 09:43:07.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/Can.pm 2017-06-14 11:45:04.000000000 +0200 @@ -8,7 +8,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } @@ -121,6 +121,15 @@ # Can we locate a (the) C compiler sub can_cc { my $self = shift; + + if ($^O eq 'VMS') { + require ExtUtils::CBuilder; + my $builder = ExtUtils::CBuilder->new( + quiet => 1, + ); + return $builder->have_compiler; + } + my @chunks = split(/ /, $Config::Config{cc}) or return; # $Config{cc} may contain args; try to find out the program part @@ -151,4 +160,4 @@ __END__ -#line 236 +#line 245 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/CheckLib.pm new/Net-SSH2-0.65/inc/Module/Install/CheckLib.pm --- old/Net-SSH2-0.63/inc/Module/Install/CheckLib.pm 2016-10-13 09:43:06.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/CheckLib.pm 2017-06-14 11:45:04.000000000 +0200 @@ -7,13 +7,13 @@ use base qw(Module::Install::Base); use vars qw($VERSION); -$VERSION = '0.08'; +$VERSION = '0.12'; sub checklibs { my $self = shift; return unless scalar @_; my %parms = @_; - unless (_author_side(delete $parms{author_checks})) { + unless (_author_side(delete $parms{run_checks_as_author})) { require Devel::CheckLib; Devel::CheckLib::check_lib_or_exit( %parms ); return; @@ -24,7 +24,7 @@ my $self = shift; return unless scalar @_; my %parms = @_; - unless (_author_side(delete $parms{author_checks})) { + unless (_author_side(delete $parms{run_checks_as_author})) { require Devel::CheckLib; Devel::CheckLib::assert_lib( %parms ); return; @@ -32,7 +32,7 @@ } sub _author_side { - my $even_author_checks = shift; + my $run_checks_as_author = shift; if ($Module::Install::AUTHOR) { mkdir 'inc'; mkdir 'inc/Devel'; @@ -49,7 +49,7 @@ close(CHECKLIBPM); print "Copied Devel::CheckLib to inc/ directory\n"; - return !$even_author_checks; + return !$run_checks_as_author; } return 0; } @@ -58,4 +58,4 @@ __END__ -#line 124 +#line 132 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/Fetch.pm new/Net-SSH2-0.65/inc/Module/Install/Fetch.pm --- old/Net-SSH2-0.63/inc/Module/Install/Fetch.pm 2016-10-13 09:43:07.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/Fetch.pm 2017-06-14 11:45:04.000000000 +0200 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/Makefile.pm new/Net-SSH2-0.65/inc/Module/Install/Makefile.pm --- old/Net-SSH2-0.63/inc/Module/Install/Makefile.pm 2016-10-13 09:43:06.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/Makefile.pm 2017-06-14 11:45:04.000000000 +0200 @@ -8,7 +8,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/Metadata.pm new/Net-SSH2-0.65/inc/Module/Install/Metadata.pm --- old/Net-SSH2-0.63/inc/Module/Install/Metadata.pm 2016-10-13 09:43:06.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/Metadata.pm 2017-06-14 11:45:04.000000000 +0200 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/Win32.pm new/Net-SSH2-0.65/inc/Module/Install/Win32.pm --- old/Net-SSH2-0.63/inc/Module/Install/Win32.pm 2016-10-13 09:43:07.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/Win32.pm 2017-06-14 11:45:04.000000000 +0200 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install/WriteAll.pm new/Net-SSH2-0.65/inc/Module/Install/WriteAll.pm --- old/Net-SSH2-0.63/inc/Module/Install/WriteAll.pm 2016-10-13 09:43:07.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install/WriteAll.pm 2017-06-14 11:45:04.000000000 +0200 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.16'; + $VERSION = '1.17'; @ISA = qw{Module::Install::Base}; $ISCORE = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/inc/Module/Install.pm new/Net-SSH2-0.65/inc/Module/Install.pm --- old/Net-SSH2-0.63/inc/Module/Install.pm 2016-10-13 09:43:06.000000000 +0200 +++ new/Net-SSH2-0.65/inc/Module/Install.pm 2017-06-14 11:45:04.000000000 +0200 @@ -31,7 +31,7 @@ # This is not enforced yet, but will be some time in the next few # releases once we can make sure it won't clash with custom # Module::Install extensions. - $VERSION = '1.16'; + $VERSION = '1.17'; # Storage for the pseudo-singleton $MAIN = undef; @@ -244,6 +244,8 @@ } return $args{_self} if $args{_self}; + $base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS'; + $args{dispatch} ||= 'Admin'; $args{prefix} ||= 'inc'; $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author'); @@ -322,7 +324,7 @@ my ($self, $path) = @_; my @found; - File::Find::find( sub { + File::Find::find( {no_chdir => 1, wanted => sub { my $file = $File::Find::name; return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is; my $subpath = $1; @@ -336,7 +338,7 @@ # correctly. Otherwise, root through the file to locate the case-preserved # version of the package name. if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { - my $content = Module::Install::_read($subpath . '.pm'); + my $content = Module::Install::_read($File::Find::name); my $in_pod = 0; foreach ( split /\n/, $content ) { $in_pod = 1 if /^=\w/; @@ -351,7 +353,7 @@ } push @found, [ $file, $pkg ]; - }, $path ) if -d $path; + }}, $path ) if -d $path; @found; } @@ -373,8 +375,6 @@ return $call; } -# Done in evals to avoid confusing Perl::MinimumVersion -eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _read { local *FH; open( FH, '<', $_[0] ) or die "open($_[0]): $!"; @@ -383,16 +383,6 @@ close FH or die "close($_[0]): $!"; return $string; } -END_NEW -sub _read { - local *FH; - open( FH, "< $_[0]" ) or die "open($_[0]): $!"; - binmode FH; - my $string = do { local $/; <FH> }; - close FH or die "close($_[0]): $!"; - return $string; -} -END_OLD sub _readperl { my $string = Module::Install::_read($_[0]); @@ -413,8 +403,6 @@ return $string; } -# Done in evals to avoid confusing Perl::MinimumVersion -eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _write { local *FH; open( FH, '>', $_[0] ) or die "open($_[0]): $!"; @@ -424,17 +412,6 @@ } close FH or die "close($_[0]): $!"; } -END_NEW -sub _write { - local *FH; - open( FH, "> $_[0]" ) or die "open($_[0]): $!"; - binmode FH; - foreach ( 1 .. $#_ ) { - print FH $_[$_] or die "print($_[0]): $!"; - } - close FH or die "close($_[0]): $!"; -} -END_OLD # _version is for processing module versions (eg, 1.03_05) not # Perl versions (eg, 5.8.1). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/lib/Net/SSH2/Channel.pm new/Net-SSH2-0.65/lib/Net/SSH2/Channel.pm --- old/Net-SSH2-0.63/lib/Net/SSH2/Channel.pm 2016-05-23 09:00:09.000000000 +0200 +++ new/Net-SSH2-0.65/lib/Net/SSH2/Channel.pm 2017-06-14 10:26:55.000000000 +0200 @@ -177,6 +177,40 @@ return $number; } +my %pty_modes = (TTY_OP_END => 0, VINTR => 1, VQUIT => 2, VERASE => 3, VKILL => 4, VEOF => 5, + VEOL => 6, VEOL2 => 7, VSTART => 8, VSTOP => 9, VSUSP => 10, VDSUSP => 11, + VREPRINT => 12, VWERASE => 13, VLNEXT => 14, VFLUSH => 15, VSWTCH => 16, VSTATUS => 17, + VDISCARD => 18, IGNPAR => 30, PARMRK => 31, INPCK => 32, ISTRIP => 33, INLCR => 34, + IGNCR => 35, ICRNL => 36, IUCLC => 37, IXON => 38, IXANY => 39, IXOFF => 40, + IMAXBEL => 41, ISIG => 50, ICANON => 51, XCASE => 52, ECHO => 53, ECHOE => 54, + ECHOK => 55, ECHONL => 56, NOFLSH => 57, TOSTOP => 58, IEXTEN => 59, ECHOCTL => 60, + ECHOKE => 61, PENDIN => 62, OPOST => 70, OLCUC => 71, ONLCR => 72, OCRNL => 73, + ONOCR => 74, ONLRET => 75, CS7 => 90, CS8 => 91, PARENB => 92, PARODD => 93, + TTY_OP_ISPEED => 128, TTY_OP_OSPEED => 129); + +sub pty { + my $self = shift; + if (defined $_[1] and ref $_[1] eq 'HASH') { + my $term = shift; + my $modes = shift; + my $packed = ''; + while (my ($k, $v) = each %$modes) { + unless ($k =~ /^\d+$/) { + my $k1 = $pty_modes{uc $k}; + defined $k1 or croak "Invalid pty mode key '$k'"; + $k = $k1; + } + next if $k == 0; # ignore the TTY_OP_END marker + $k > 159 and croak "Invalid pty mode key '$k'"; + $packed .= pack CN => $k, $v; + } + $self->_pty($term, "$packed\x00", @_); + } + else { + $self->_pty(@_); + } +} + # tie interface sub PRINT { @@ -313,7 +347,14 @@ Request a terminal on a channel. C<terminal> is the type of emulation (e.g. vt102, ansi, -etc...). C<modes> are the terminal mode modifiers. +etc...). + +C<modes> are the terminal mode modifiers, for instance: + + $c->pty('vt100', { echo => 0, vintr => ord('k') }); + +The list of acceptable mode modifiers is available from the SSH Connection +Protocol RFC (L<RFC4254|https://tools.ietf.org/html/rfc4254#section-8>). If provided, C<width> and C<height> are the width and height in characters (defaults to 80x24); if negative their absolute values diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/lib/Net/SSH2.pm new/Net-SSH2-0.65/lib/Net/SSH2.pm --- old/Net-SSH2-0.63/lib/Net/SSH2.pm 2016-10-13 09:36:09.000000000 +0200 +++ new/Net-SSH2-0.65/lib/Net/SSH2.pm 2017-06-14 11:44:30.000000000 +0200 @@ -1,6 +1,6 @@ package Net::SSH2; -our $VERSION = '0.63'; +our $VERSION = '0.65'; use 5.006; use strict; @@ -34,7 +34,7 @@ my ($class, %opts) = @_; my $self = $class->_new; - for (qw(trace timeout)) { + for (qw(trace timeout debug)) { $self->$_($opts{$_}) if defined $opts{$_} } $self->flag(COMPRESS => $opts{compress}) @@ -147,9 +147,11 @@ error: unless (defined wantarray) { - $connect_void_warned++ or + unless ($connect_void_warned++) { + local $!; warnings::warnif($self, "Calling connect in void context is deprecated"); - croak "Net::SSH2: failed to connect to $_[0]:$_[1]: $!" + } + croak "Net::SSH2: failed to connect to ". join(':', grep defined, @_[0,1]) .": $!"; } return; } @@ -344,8 +346,13 @@ return $home; } +my $check_hostkey_void_ctx_warned; sub check_hostkey { my ($self, $policy, $path, $comment) = @_; + + defined wantarray or $check_hostkey_void_ctx_warned++ or + warnings::warnif($self, "Calling check_hostkey in void context is useless"); + my $cb; if (not defined $policy) { $policy = LIBSSH2_HOSTKEY_POLICY_STRICT(); @@ -788,6 +795,9 @@ Note that tracing requires a version of libssh2 compiled with debugging support. +=item debug + +Enable debugging. See L</debug>. =item compress @@ -1466,7 +1476,7 @@ Copyright (C) 2010 - 2016 by Rafael Kitover ([email protected]). -Copyright (C) 2011 - 2016 by Salvador FandiE<ntilde>o ([email protected]). +Copyright (C) 2011 - 2017 by Salvador FandiE<ntilde>o ([email protected]). All rights reserved. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-SSH2-0.63/t/Net-SSH2.t new/Net-SSH2-0.65/t/Net-SSH2.t --- old/Net-SSH2-0.63/t/Net-SSH2.t 2016-05-23 09:07:31.000000000 +0200 +++ new/Net-SSH2-0.65/t/Net-SSH2.t 2017-01-25 14:29:12.000000000 +0100 @@ -24,6 +24,7 @@ my $known_hosts = $ENV{TEST_NET_SSH2_KNOWN_HOSTS}; my $policy = $ENV{TEST_NET_SSH2_POLICY} || 'ask'; my $timeout = $ENV{TEST_NET_SSH2_TIMEOUT} || 30; +my $trace = $ENV{TEST_NET_SSH2_TRACE}; $known_hosts ||= File::Spec->devnull; GetOptions("host|h=s" => \$host, @@ -54,11 +55,18 @@ if ($ssh2->version)[1] < 0x010209; is($ssh2->timeout($timeout), $timeout, "set timeout to ${timeout}s"); } -#$ssh2->trace(-1); + +SKIP: { + skip 'trace dissabled', 1 unless $trace; + $ssh2->trace($trace); +} ok($ssh2->banner('SSH TEST'), 'set banner'); is(LIBSSH2_ERROR_SOCKET_NONE(), -1, 'LIBSSH2_* constants'); +is(LIBSSH2_ERROR_NONE(), 0, "LIBSSH2_ERROR_NONE is zero"); +is(Net::SSH2::LIBSSH2_ERROR_NONE(), 0, "LIBSSH2_ERROR_NONE is zero bis"); + # (4) version my $version = $ssh2->version(); my ($version2, $vernum, $banner) = $ssh2->version();
