diff -Nru libnet-ssh2-perl-0.49/Changes libnet-ssh2-perl-0.53/Changes --- libnet-ssh2-perl-0.49/Changes 2013-07-22 20:11:36.000000000 +0000 +++ libnet-ssh2-perl-0.53/Changes 2013-09-01 06:05:28.000000000 +0000 @@ -1,5 +1,21 @@ Revision history for Perl extension Net::SSH2. +0.53 2013-09-01 06:05:17 + - add support for ldargs, and LIBSSH2_LIB, LIBSSH2_INCLUDE, + LIBSSH2_LDARGS env vars while building (RT#88265) + +0.52 2013-08-14 02:43:11 + - detect scp not being installed on the remote and return undef from + scp_put (krimdomu: Jan) (GitHub PR: #17) + +0.51 2013-08-03 21:17:47 + - turn off -std=c89 -pedantic-errors for all builds except authors not + on mingw or solaris + +0.50 2013-07-29 10:25:13 + - remove #warning, not standard C89, throws an error on non-threaded + builds due to -pedantic-errors (RT#87398) + 0.49 2013-07-22 20:11:25 - compile on gcc with '-DPERL_GCC_PEDANTIC -std=c89 -pedantic-errors -Wno-long-long' to enforce maximum compatibility with C89 (RT#87069) diff -Nru libnet-ssh2-perl-0.49/META.yml libnet-ssh2-perl-0.53/META.yml --- libnet-ssh2-perl-0.49/META.yml 2013-07-22 20:12:56.000000000 +0000 +++ libnet-ssh2-perl-0.53/META.yml 2013-09-01 06:06:57.000000000 +0000 @@ -24,4 +24,4 @@ resources: license: http://dev.perl.org/licenses/ repository: git://github.com/rkitover/net-ssh2.git -version: 0.49 +version: 0.53 diff -Nru libnet-ssh2-perl-0.49/MYMETA.json libnet-ssh2-perl-0.53/MYMETA.json --- libnet-ssh2-perl-0.49/MYMETA.json 2013-07-22 20:12:56.000000000 +0000 +++ libnet-ssh2-perl-0.53/MYMETA.json 2013-09-01 06:06:57.000000000 +0000 @@ -4,7 +4,7 @@ "David B. Robins, " ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.131560", + "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.131560", "license" : [ "perl_5" ], @@ -37,5 +37,5 @@ } }, "release_status" : "stable", - "version" : "0.49" + "version" : "0.53" } diff -Nru libnet-ssh2-perl-0.49/MYMETA.yml libnet-ssh2-perl-0.53/MYMETA.yml --- libnet-ssh2-perl-0.49/MYMETA.yml 2013-07-22 20:12:56.000000000 +0000 +++ libnet-ssh2-perl-0.53/MYMETA.yml 2013-09-01 06:06:57.000000000 +0000 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.131560' +generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.131560' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -19,4 +19,4 @@ - inc requires: perl: 5.006 -version: 0.49 +version: 0.53 diff -Nru libnet-ssh2-perl-0.49/Makefile.PL libnet-ssh2-perl-0.53/Makefile.PL --- libnet-ssh2-perl-0.49/Makefile.PL 2013-07-22 19:47:49.000000000 +0000 +++ libnet-ssh2-perl-0.53/Makefile.PL 2013-09-01 05:55:02.000000000 +0000 @@ -4,16 +4,17 @@ use Module::Install::CheckLib (); # override library and include directories here if desired -my $lib = ''; -my $inc = ''; -my $extra_libs = '-lz'; +my $lib = $ENV{LIBSSH2_LIB} || ''; +my $inc = $ENV{LIBSSH2_INCLUDE} || ''; +my $extra_libs = '-lz' . ($ENV{LIBSSH2_LDARGS} ? (' ' . $ENV{LIBSSH2_LDARGS}) : ''); +my $ldargs; # from command line my $use_gcrypt = 0; my @args = @ARGV; my @pass_through_args; while (my $arg = shift @args) { - if (my ($param, $val) = $arg =~ /^(inc|lib)=(.*)\z/) { - my $var = $param eq 'inc' ? \$inc : \$lib; + if (my ($param, $val) = $arg =~ /^(inc|lib|ldargs)=(.*)\z/) { + my $var = $param eq 'inc' ? \$inc : ($param eq 'lib' ? \$lib : \$ldargs); $$var = $val; next; } @@ -43,6 +44,8 @@ } } +$extra_libs = "$extra_libs $ldargs" if $ldargs; + my $defines = ''; $defines .= '-DLIBSSH2_WIN32 ' if $win32; $defines .= '-DUSE_GCRYPT ' if $use_gcrypt; @@ -84,16 +87,21 @@ print <<'EOF'; The libssh2 library is required by this module. If you don't have it, you can -download it from http://www.libssh2.org; you may also need OpenSSL, which can be -obtained from http://www.openssl.org, or libgcrypt, which can be obtained from -http://www.gnupg.org. +download it from http://www.libssh2.org; you may also need OpenSSL, which can +be obtained from http://www.openssl.org , or libgcrypt, which can be obtained +from http://www.gnupg.org . Debian: sudo aptitude install libssh2-1-dev OpenSUSE: sudo zypper in libssh2-1 libssh2-devel -You can pass your libssh2 lib and include dirs on the command line. E.g.: +You can pass your libssh2 lib and include dirs (and extra link args) on the +command line. E.g.: + + perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \ + ldargs="-lz" - perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include +These can also be set through the LIBSSH2_LIB/LIBSSH2_INCLUDE/LIBSSH2_LDARGS +environment variables. To build with libgcrypt instead of OpenSSL, pass 'gcrypt' as a parameter to Makefile.PL, e.g.: @@ -129,7 +137,8 @@ makemaker_args @define, - ($Config{cc} =~ /gcc/i ? ( + # this is known to NOT work on mingw and solaris, and we only turn it on for devs + ($Module::Install::AUTHOR && $^O ne 'MSWin32' && $^O ne 'solaris' && $Config{cc} =~ /gcc/i ? ( CCFLAGS => '-DPERL_GCC_PEDANTIC -std=c89 -pedantic-errors -Wno-long-long' ) : ()) ; diff -Nru libnet-ssh2-perl-0.49/SSH2.xs libnet-ssh2-perl-0.53/SSH2.xs --- libnet-ssh2-perl-0.49/SSH2.xs 2013-07-22 19:43:04.000000000 +0000 +++ libnet-ssh2-perl-0.53/SSH2.xs 2013-07-29 10:01:27.000000000 +0000 @@ -31,8 +31,9 @@ #endif #else -/* XXX: is #warning portable across C compilers? */ -#warning "Building a non-threadsafe Net::SSH2" +/* is #warning portable across C compilers? */ +/* NO, an error with -pedantic */ +/* #warning "Building a non-threadsafe Net::SSH2" */ #endif #ifndef MULTIPLICITY diff -Nru libnet-ssh2-perl-0.49/debian/changelog libnet-ssh2-perl-0.53/debian/changelog --- libnet-ssh2-perl-0.49/debian/changelog 2013-07-24 19:30:38.000000000 +0000 +++ libnet-ssh2-perl-0.53/debian/changelog 2013-09-08 21:12:26.000000000 +0000 @@ -1,3 +1,27 @@ +libnet-ssh2-perl (0.53-1) unstable; urgency=low + + * Imported Upstream version 0.53 + + -- Salvatore Bonaccorso Sun, 08 Sep 2013 23:07:09 +0200 + +libnet-ssh2-perl (0.52-1) unstable; urgency=low + + * Imported Upstream version 0.52 + + -- Salvatore Bonaccorso Thu, 15 Aug 2013 20:36:06 +0200 + +libnet-ssh2-perl (0.51-1) unstable; urgency=low + + * Imported Upstream version 0.51 + + -- Salvatore Bonaccorso Sun, 04 Aug 2013 17:47:46 +0200 + +libnet-ssh2-perl (0.50-1) unstable; urgency=low + + * Imported Upstream version 0.50 + + -- Salvatore Bonaccorso Mon, 29 Jul 2013 19:09:55 +0200 + libnet-ssh2-perl (0.49-1) unstable; urgency=low * Imported Upstream version 0.49 diff -Nru libnet-ssh2-perl-0.49/debian/copyright libnet-ssh2-perl-0.53/debian/copyright --- libnet-ssh2-perl-0.49/debian/copyright 2013-07-24 19:30:38.000000000 +0000 +++ libnet-ssh2-perl-0.53/debian/copyright 2013-09-08 21:12:26.000000000 +0000 @@ -44,4 +44,3 @@ . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. - diff -Nru libnet-ssh2-perl-0.49/lib/Net/SSH2.pm libnet-ssh2-perl-0.53/lib/Net/SSH2.pm --- libnet-ssh2-perl-0.49/lib/Net/SSH2.pm 2013-07-22 20:08:19.000000000 +0000 +++ libnet-ssh2-perl-0.53/lib/Net/SSH2.pm 2013-09-01 06:04:32.000000000 +0000 @@ -208,7 +208,7 @@ our @EXPORT_OK = @{$EXPORT_TAGS{all}}; -our $VERSION = '0.49'; +our $VERSION = '0.53'; # methods @@ -423,9 +423,7 @@ # send/receive SCP acknowledgement $chan->write("\0"); - my $eof; - $chan->read($eof, 1); - return 1; + return $chan->read((my $eof), 1) || undef; } my %Event;