r44690 - in /trunk/libnet-sftp-foreign-perl: Changes META.yml debian/README.source debian/changelog debian/control debian/copyright debian/rules debug.txt lib/Net/SFTP/Foreign.pm t/1_run.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Wed Sep 23 23:09:31 UTC 2009


Author: jawnsy-guest
Date: Wed Sep 23 23:09:26 2009
New Revision: 44690

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44690
Log:
* New upstream release
* Added myself to Uploaders and Copyright
* Standards-Version 3.8.3 (no changes)
* Use new short debhelper rules format
* Remove README.source; it's rather self-explanatory

Removed:
    trunk/libnet-sftp-foreign-perl/debian/README.source
Modified:
    trunk/libnet-sftp-foreign-perl/Changes
    trunk/libnet-sftp-foreign-perl/META.yml
    trunk/libnet-sftp-foreign-perl/debian/changelog
    trunk/libnet-sftp-foreign-perl/debian/control
    trunk/libnet-sftp-foreign-perl/debian/copyright
    trunk/libnet-sftp-foreign-perl/debian/rules
    trunk/libnet-sftp-foreign-perl/debug.txt
    trunk/libnet-sftp-foreign-perl/lib/Net/SFTP/Foreign.pm
    trunk/libnet-sftp-foreign-perl/t/1_run.t

Modified: trunk/libnet-sftp-foreign-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/Changes?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/Changes (original)
+++ trunk/libnet-sftp-foreign-perl/Changes Wed Sep 23 23:09:26 2009
@@ -1,4 +1,23 @@
 Revision history for Net::SFTP::Foreign
+
+1.55  Sep 9, 2009
+        - re-release as stable
+
+1.54_03  Sep 4, 2009
+	- add debugging to _rel2abs
+
+1.54_02  Aug 19, 2009
+	- add extra sanity check to setcwd method. It seems that some
+          servers do not report an error when realpath is called on an
+          inexistent file (bug report by Ben Szulc)
+	- password authentication broken in AIX
+        - some documentation corrections
+        - more tests added
+
+1.54_01  Jul 22, 2009
+        - yet another "Password not requested as expected" bug solved,
+          $pty->close_slave was being called too soon (bug report by
+          Tim Rayner)
 
 1.53  Jul 6, 2009
         - re-released as stable

Modified: trunk/libnet-sftp-foreign-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/META.yml?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/META.yml (original)
+++ trunk/libnet-sftp-foreign-perl/META.yml Wed Sep 23 23:09:26 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Net-SFTP-Foreign
-version:             1.53
+version:             1.55
 abstract:            Secure File Transfer Protocol client
 license:             ~
 author:              

Modified: trunk/libnet-sftp-foreign-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/debian/changelog?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/debian/changelog (original)
+++ trunk/libnet-sftp-foreign-perl/debian/changelog Wed Sep 23 23:09:26 2009
@@ -1,3 +1,13 @@
+libnet-sftp-foreign-perl (1.55+dfsg-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Added myself to Uploaders and Copyright
+  * Standards-Version 3.8.3 (no changes)
+  * Use new short debhelper rules format
+  * Remove README.source; it's rather self-explanatory
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Wed, 23 Sep 2009 15:08:01 -0400
+
 libnet-sftp-foreign-perl (1.53+dfsg-1) unstable; urgency=low
 
   [ Nathan Handler ]

Modified: trunk/libnet-sftp-foreign-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/debian/control?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/debian/control (original)
+++ trunk/libnet-sftp-foreign-perl/debian/control Wed Sep 23 23:09:26 2009
@@ -6,8 +6,8 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Alejandro Garrido Mota <garridomota at gmail.com>,
  gregor herrmann <gregoa at debian.org>, Antonio Radici <antonio at dyne.org>,
- Ryan Niebur <ryanryan52 at gmail.com>
-Standards-Version: 3.8.2
+ Ryan Niebur <ryanryan52 at gmail.com>, Jonathan Yu <jawnsy at cpan.org>
+Standards-Version: 3.8.3
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libnet-sftp-foreign-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/
 Homepage: http://search.cpan.org/dist/Net-SFTP-Foreign/
@@ -16,11 +16,10 @@
 Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}, openssh-client | ssh-client
 Description: Net::SFTP::Foreign -- Secure File Transfer Protocol client
- Net::SFTP::Foreign is a Perl client for the SFTP. It provides a subset
- of the commands listed in the SSH File Transfer Protocol IETF draft,
- which can be found at
- http://www.openssh.org/txt/draft-ietf-secsh-filexfer-02.txt
+ Net::SFTP::Foreign is a Perl client for the SFTP. It provides a subset of the
+ commands listed in the SSH File Transfer Protocol IETF draft, which can be
+ found at <URL:http://www.openssh.org/txt/draft-ietf-secsh-filexfer-02.txt>
  .
- Net::SFTP::Foreign uses any compatible ssh command installed on
- your system (for instance, OpenSSH ssh) to establish the secure
- connection to the remote server.
+ Net::SFTP::Foreign uses any compatible ssh command installed on your system
+ (for instance, OpenSSH ssh) to establish the secure connection to the remote
+ server.

Modified: trunk/libnet-sftp-foreign-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/debian/copyright?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/debian/copyright (original)
+++ trunk/libnet-sftp-foreign-perl/debian/copyright Wed Sep 23 23:09:26 2009
@@ -1,25 +1,27 @@
 Format-Specification:
     http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Salvador Fandiño (sfandino at yahoo.com)
+Upstream-Maintainer: Salvador Fandiño <sfandino at yahoo.com>
 Upstream-Source: http://search.cpan.org/dist/Net-SFTP-Foreign/
 Upstream-Name: Net-SFTP-Foreign
 X-Comment: The non-free RFCs have been removed from the upstream tarball for the +dfsg
  version.
 
 Files: *
-Copyright:
- Copyright (c) 2005-2009 Salvador Fandiño (sfandino at yahoo.com).
- Copyright (c) 2001 Benjamin Trott
- Copyright (c) 2003 David Rolsky.
+Copyright: 2005-2009, Salvador Fandiño <sfandino at yahoo.com>
+ 2001, Benjamin Trott <cpan at stupidfool.org>
+ 2003, David Rolsky <autarch at urth.org>
  .
  The _glob_to_regex method based on code (c) 2002 Richard Clamp.
 License-Alias: Perl
 License: GPL-1+ | Artistic
 
 Files: debian/*
-Copyright:
- 2008,      Alejandro Garrido Mota <garridomota at gmail.com>
- 2008-2009, various members of the Debian Perl Group, cf. debian/changelog
+Copyright: 2009, Jonathan Yu <jawnsy at cpan.org>
+ 2009, Ryan Niebur <ryanryan52 at gmail.com>
+ 2009, Antonio Radici <antonio at dyne.org>
+ 2008-2009, gregor herrmann <gregoa at debian.org>
+ 2008, Roberto C. Sanchez <roberto at connexer.com>
+ 2008, Alejandro Garrido Mota <garridomota at gmail.com>
 License: GPL-1+ | Artistic
 
 License: GPL-1+

Modified: trunk/libnet-sftp-foreign-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/debian/rules?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/debian/rules (original)
+++ trunk/libnet-sftp-foreign-perl/debian/rules Wed Sep 23 23:09:26 2009
@@ -1,26 +1,4 @@
 #!/usr/bin/make -f
 
-get-orig-source:
-	uscan --verbose --force-download
-
-build: build-stamp
-build-stamp:
-	dh build
-	touch $@
-
-clean:
+%:
 	dh $@
-
-install: install-stamp
-install-stamp: build-stamp
-	dh install
-	touch $@
-
-binary-arch:
-
-binary-indep: install
-	dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build get-orig-source

Modified: trunk/libnet-sftp-foreign-perl/debug.txt
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/debug.txt?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/debug.txt (original)
+++ trunk/libnet-sftp-foreign-perl/debug.txt Wed Sep 23 23:09:26 2009
@@ -10,4 +10,4 @@
  512 -
 1024 - hexdump of sysreads
 2048 - hexdump of syswrites
-
+4096 - _rel2abs

Modified: trunk/libnet-sftp-foreign-perl/lib/Net/SFTP/Foreign.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/lib/Net/SFTP/Foreign.pm?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/lib/Net/SFTP/Foreign.pm (original)
+++ trunk/libnet-sftp-foreign-perl/lib/Net/SFTP/Foreign.pm Wed Sep 23 23:09:26 2009
@@ -1,6 +1,6 @@
 package Net::SFTP::Foreign;
 
-our $VERSION = '1.53';
+our $VERSION = '1.55';
 
 use strict;
 use warnings;
@@ -441,7 +441,7 @@
 		    exit -1;
 		}
 		_ipc_open2_bug_workaround $this_pid;
-		$pty->close_slave();
+		# $pty->close_slave();
 	    }
 	    else {
 		$expect = Expect->new;
@@ -476,6 +476,7 @@
                 $sftp->_conn_failed("$name interchange did not complete", $expect->error);
                 return $sftp;
             }
+	    $expect->close_slave();
         }
         else {
             _debug "ssh cmd: @open2_cmd\n" if ($debug and $debug & 1);
@@ -636,12 +637,14 @@
 
 sub _rel2abs {
     my ($sftp, $path) = @_;
+    my $old = $path;
     my $cwd = $sftp->{cwd};
     if (defined $cwd and $path !~ m|^/|) {
         # carp "sftp->rel2abs($path) => $sftp->{cwd}/$path\n";
 	$path =~ s|^(?:\./+)+||;
-	return ($cwd =~ m|/$| ? "$cwd$path" : "$cwd/$path");
-    }
+	$path = ($cwd =~ m|/$| ? "$cwd$path" : "$cwd/$path");
+    }
+    $debug and $debug & 4096 and _debug("_rel2abs: '$old' --> '$path'");
     return $path
 }
 
@@ -740,7 +743,6 @@
     my ($sftp, $eid, $error, $errstr) = @_;
     if (my $msg = $sftp->_get_msg_and_check(SSH2_FXP_STATUS, $eid,
 					    $error, $errstr)) {
-	
 	my $status = $sftp->_set_status($msg->get_int32, $msg->get_str);
 	return 1 if $status == SSH2_FX_OK;
 
@@ -750,19 +752,27 @@
 }
 
 sub setcwd {
-
-    @_ == 2 or croak 'Usage: $sftp->setcwd($path)';
+    @_ <= 2 or croak 'Usage: $sftp->setcwd($path)';
     ${^TAINT} and &_catch_tainted_args;
 
     my ($sftp, $cwd) = @_;
     if (defined $cwd) {
         $cwd = $sftp->realpath($cwd);
         return undef unless defined $cwd;
-        $sftp->{cwd} = $cwd;
+	my $a = $sftp->stat($cwd)
+	    or return undef;
+	if (S_ISDIR($a->perm)) {
+	    return $sftp->{cwd} = $cwd;
+	}
+	else {
+	    $sftp->_set_error(SFTP_ERR_REMOTE_BAD_OBJECT,
+			      "Remote object '$cwd' is not a directory");
+	    return undef;
+	}
     }
     else {
         delete $sftp->{cwd};
-        return $sftp->cwd;
+        return $sftp->cwd if defined wantarray;
     }
 }
 
@@ -1496,8 +1506,8 @@
         $sftp->status != SSH2_FX_OP_UNSUPPORTED and return undef;
     }
 
-    # we are optimistic and try to rename it whitout testing if a file
-    # of the same name already exists
+    # we are optimistic here and try to rename it without testing if a
+    # file of the same name already exists first
     $sftp->_rename($old, $new) and return 1;
 
     if ($overwrite and $sftp->status == SSH2_FX_FAILURE) {
@@ -4615,7 +4625,7 @@
 
 B<A>: Use the C<S_IS*> functions from L<Fcntl>. For instance:
 
-  use Fcntl qw(IS_DIR);
+  use Fcntl qw(S_ISDIR);
   my $ls = $sftp->ls or die $sftp->error;
   for my $entry (@$ls) {
     if (S_ISDIR($entry->{a}->perm)) {

Modified: trunk/libnet-sftp-foreign-perl/t/1_run.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-sftp-foreign-perl/t/1_run.t?rev=44690&op=diff
==============================================================================
--- trunk/libnet-sftp-foreign-perl/t/1_run.t (original)
+++ trunk/libnet-sftp-foreign-perl/t/1_run.t Wed Sep 23 23:09:26 2009
@@ -21,7 +21,7 @@
 plan skip_all => "sftp-server not found"
     unless defined $sscmd;
 
-plan tests => 717;
+plan tests => 722;
 
 use_ok('Net::SFTP::Foreign');
 use Net::SFTP::Foreign::Constants qw(:flags);
@@ -49,6 +49,12 @@
 ok (defined $rcwd, "realpath");
 
 my @data = <DATA>;
+
+ok ($sftp->setcwd("."), "setcwd");
+ok (!$sftp->setcwd("miauu"), "setcwd to non existant dir");
+ok ($sftp->stat("t/1_run.t"), "check that the file exists");
+ok (!$sftp->setcwd("t/1_run.t"), "setcwd to file");
+ok ($sftp->setcwd(), "setcwd reset");
 
 for my $setcwd (0, 1) {
     my $orcwd = $rcwd;




More information about the Pkg-perl-cvs-commits mailing list