r24098 - in /branches/upstream/libnet-scp-expect-perl/current: CHANGES Expect.pm MANIFEST META.yml README SIGNATURE itest/itest.pl itest/large_file.test itest/medium_file.test itest/small_file.test itest/small_file2.test itest/small_file3.test

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Mon Aug 11 06:15:38 UTC 2008


Author: rmayorga-guest
Date: Mon Aug 11 06:15:35 2008
New Revision: 24098

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=24098
Log:
[svn-upgrade] Integrating new upstream version, libnet-scp-expect-perl (0.14)

Removed:
    branches/upstream/libnet-scp-expect-perl/current/itest/large_file.test
    branches/upstream/libnet-scp-expect-perl/current/itest/medium_file.test
    branches/upstream/libnet-scp-expect-perl/current/itest/small_file.test
    branches/upstream/libnet-scp-expect-perl/current/itest/small_file2.test
    branches/upstream/libnet-scp-expect-perl/current/itest/small_file3.test
Modified:
    branches/upstream/libnet-scp-expect-perl/current/CHANGES
    branches/upstream/libnet-scp-expect-perl/current/Expect.pm
    branches/upstream/libnet-scp-expect-perl/current/MANIFEST
    branches/upstream/libnet-scp-expect-perl/current/META.yml
    branches/upstream/libnet-scp-expect-perl/current/README
    branches/upstream/libnet-scp-expect-perl/current/SIGNATURE
    branches/upstream/libnet-scp-expect-perl/current/itest/itest.pl

Modified: branches/upstream/libnet-scp-expect-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/CHANGES?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/CHANGES (original)
+++ branches/upstream/libnet-scp-expect-perl/current/CHANGES Mon Aug 11 06:15:35 2008
@@ -1,4 +1,8 @@
 Revision history for Perl extension Net-SCP-Expect
+
+0.14  
+- Fixed RT#38081 (password not required if identity_file specified).
+- Fixed RT#36705 (itest.pl dynamically generates test files during runtime to reduce distribution size).
 
 0.13  Wednesday June 11 05:07:34 2008
 - Corrected issue with no exception thrown on failed scp execution after

Modified: branches/upstream/libnet-scp-expect-perl/current/Expect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/Expect.pm?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/Expect.pm (original)
+++ branches/upstream/libnet-scp-expect-perl/current/Expect.pm Mon Aug 11 06:15:35 2008
@@ -14,7 +14,7 @@
 
 BEGIN{
    use vars qw/$VERSION/;
-   $VERSION = '0.13';
+   $VERSION = '0.14';
 }
 
 # Options added as needed
@@ -76,7 +76,7 @@
    my($self,$user,$password) = @_;
    
    croak("No user supplied to 'login()' method") unless defined $user;
-   croak("No password supplied to 'password()' method") unless defined $password;
+   croak("No password supplied to 'login()' method") if @_ > 2 && !defined $password;
 
    $self->_set('user',$user);
    $self->_set('password',$password);
@@ -84,9 +84,9 @@
 
 sub password{
    my($self,$password) = @_;
-   croak("No password supplied to 'password()' method") unless $password;
+   croak("No password supplied to 'password()' method");
    
-   $self->_set('password',$password);
+   $self->_set('password',$password) unless $password;
 }
 
 sub host{
@@ -153,7 +153,7 @@
    }
 
    croak("No login. Can't scp") unless $login;
-   croak("No password. Can't scp") unless $password;
+   croak("No password or identity file. Can't scp") unless $password || $identity_file;
    croak("No host specified. Can't scp") unless $host;
 
    # Define argument auto-quote
@@ -202,22 +202,24 @@
       }
    }
 
-   unless($scp->expect($timeout,-re=>'[Pp]assword.*?:|[Pp]assphrase.*?:')){
-      my $err = $scp->before() || $scp->match();
-      if($err){
+   if ($password) {
+      unless($scp->expect($timeout,-re=>'[Pp]assword.*?:|[Pp]assphrase.*?:')){
+         my $err = $scp->before() || $scp->match();
+         if($err){
+            if($handler){ $handler->($err); return; }
+            else { croak("Problem performing scp: $err"); }
+         }
+         $err = "scp timed out while trying to connect to $host";
          if($handler){ $handler->($err); return; }
-         else { croak("Problem performing scp: $err"); }
+         else{ croak($err) };
       }
-      $err = "scp timed out while trying to connect to $host";
-      if($handler){ $handler->($err); return; }
-      else{ croak($err) };
-   }
-
-   if($verbose){ print $scp->before() }
-
-   $password .= $terminator if $terminator;
-
-   $scp->send($password);
+
+      if($verbose){ print $scp->before() }
+
+      $password .= $terminator if $terminator;
+
+      $scp->send($password);
+   }
 
    ################################################################
    # Check to see if we sent the correct password, or if we got
@@ -390,11 +392,12 @@
 If the login and password are not passed as options to the constructor, they
 must be passed with this method (or set individually - see 'user' and 'password'
 methods).  If they were already set, this method will overwrite them with the new
-values.
+values.  Password will not be changed if only one argument is passed (user).
 
 =head2 B<password(>I<password>B<)>
 
-Sets the password for the current user
+Sets the password for the current user, or the passphrase for the identify file if
+identity_file option is specified in the constructor
 
 =head2 B<user(>I<user>B<)>
 
@@ -454,7 +457,10 @@
 B<option> - Specify options from the config file.  This is the equivalent
 of -o.
 
-B<password> - The password for the given login.
+B<password> - The password for the given login.  If not specified, then
+identity_file must be specified or an error will occur on login.  If both
+identity_file and password are specified, the password will be treated as the
+passphrase for the identity file.
 
 B<port> - Use the specified port.
 
@@ -501,12 +507,12 @@
 
 The -q option (disable progress meter) is automatically passed to scp.
 
-The -B option may NOT be set.  If you don't want to send passwords, I
-recommend using I<Net::SCP> instead.
-
-In the event that Dave Rolsky releases a version of I<Net::SSH::Perl> that
-supports scp, I recommend using that instead.  Why?  First, it will be
-a more secure way to perform scp.  Second, this module is not fast,
+The -B option may NOT be set.  If you don't plan to send passwords or use
+identity files (with passphrases), consider using I<Net::SCP> instead.
+
+In the event a new version of I<Net::SSH::Perl> is released that
+supports scp, I recommend using that instead.  Why?  First, it should be
+a more secure way to perform scp.  Second, this module is not the fastest,
 even with error checking turned off.  Both reasons have to do with TTY
 interaction.
 
@@ -540,7 +546,7 @@
 
 =head1 COPYRIGHT
 
-2005-2007 Eric Rybski <rybskej at yahoo.com>,
+2005-2008 Eric Rybski <rybskej at yahoo.com>,
 2003-2004 Daniel J. Berger.
 
 =head1 CURRENT AUTHOR AND MAINTAINER

Modified: branches/upstream/libnet-scp-expect-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/MANIFEST?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-scp-expect-perl/current/MANIFEST Mon Aug 11 06:15:35 2008
@@ -11,8 +11,3 @@
 t/string_parse.t
 itest/README
 itest/itest.pl
-itest/large_file.test
-itest/medium_file.test
-itest/small_file.test
-itest/small_file2.test
-itest/small_file3.test

Modified: branches/upstream/libnet-scp-expect-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/META.yml?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/META.yml (original)
+++ branches/upstream/libnet-scp-expect-perl/current/META.yml Mon Aug 11 06:15:35 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Net-SCP-Expect
-version:             0.13
+version:             0.14
 abstract:            Wrapper for scp that allows passwords via Expect.
 license:             ~
 author:              

Modified: branches/upstream/libnet-scp-expect-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/README?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/README (original)
+++ branches/upstream/libnet-scp-expect-perl/current/README Mon Aug 11 06:15:35 2008
@@ -64,7 +64,8 @@
     overwrite them with the new values.
 
   password(*password*)
-    Sets the password for the current user
+    Sets the password for the current user, or the passphrase for the
+    identify file if identity_file option is specified in the constructor
 
   user(*user*)
     Sets the user for the current object
@@ -121,7 +122,10 @@
     option - Specify options from the config file. This is the equivalent of
     -o.
 
-    password - The password for the given login.
+    password - The password for the given login. If not specified, then
+    identity_file must be specified or an error will occur on login. If both
+    identity_file and password are specified, the password will be treated
+    as the passphrase for the identity file.
 
     port - Use the specified port.
 
@@ -169,13 +173,13 @@
 NOTES
     The -q option (disable progress meter) is automatically passed to scp.
 
-    The -B option may NOT be set. If you don't want to send passwords, I
-    recommend using *Net::SCP* instead.
-
-    In the event that Dave Rolsky releases a version of *Net::SSH::Perl*
-    that supports scp, I recommend using that instead. Why? First, it will
-    be a more secure way to perform scp. Second, this module is not fast,
-    even with error checking turned off. Both reasons have to do with TTY
+    The -B option may NOT be set. If you don't plan to send passwords or use
+    identity files (with passphrases), consider using *Net::SCP* instead.
+
+    In the event a new version of *Net::SSH::Perl* is released that supports
+    scp, I recommend using that instead. Why? First, it should be a more
+    secure way to perform scp. Second, this module is not the fastest, even
+    with error checking turned off. Both reasons have to do with TTY
     interaction.
 
     Also, please see the Net::SFTP module from Dave Rolsky. If this suits
@@ -205,7 +209,7 @@
     Net::SCP::Expect is licensed under the same terms as Perl itself.
 
 COPYRIGHT
-    2005-2007 Eric Rybski <rybskej at yahoo.com>, 2003-2004 Daniel J. Berger.
+    2005-2008 Eric Rybski <rybskej at yahoo.com>, 2003-2004 Daniel J. Berger.
 
 CURRENT AUTHOR AND MAINTAINER
     Eric Rybski <rybskej at yahoo.com>. Please send all module inquries to me.

Modified: branches/upstream/libnet-scp-expect-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/SIGNATURE?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/SIGNATURE (original)
+++ branches/upstream/libnet-scp-expect-perl/current/SIGNATURE Mon Aug 11 06:15:35 2008
@@ -14,19 +14,14 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 d658ac2b75471816b5ee4a98bacf3c4cf0b9cd34 CHANGES
-SHA1 ccbe643107cc6f7efe0de8d9c842d7c8ff5ec4a4 Expect.pm
-SHA1 8204b60b11c8c8d5dc52acb69f028bcb87a61e55 MANIFEST
-SHA1 932fe19a883d27e31c6448efefd7f424eec5423f META.yml
+SHA1 60aa4d3b6a8cac84d11f3b18e870ae55e6acad5d CHANGES
+SHA1 6a756fc640e895f5e685002a7a83a565f53a0c0b Expect.pm
+SHA1 3215f56b06635a4d9204389c4e2f7f2e1fea221d MANIFEST
+SHA1 897c997b727983033805d63dfb7c9bdb02caee6f META.yml
 SHA1 c80c11b8e2dbc549e3deffedc51a5a3b682e7620 Makefile.PL
-SHA1 9587204874f99cf54a64dc3a27f3feeb5f7c9961 README
+SHA1 692dacfe15584c7b086fd49b8271505f48620f65 README
 SHA1 f45399354c8baa415a0326a96ffb55ba8f9d373d itest/README
-SHA1 5bd412641e16ca53c0b3bc26cc605cf733c7583f itest/itest.pl
-SHA1 b406d2f6219fd2a06ee1735e3d115803aff891fd itest/large_file.test
-SHA1 6e1f28ab6c9db1c2cc4ef8a24032283550681947 itest/medium_file.test
-SHA1 93c4513b18e1d13c0fa3c7f9ed8bb289337092fb itest/small_file.test
-SHA1 93c4513b18e1d13c0fa3c7f9ed8bb289337092fb itest/small_file2.test
-SHA1 93c4513b18e1d13c0fa3c7f9ed8bb289337092fb itest/small_file3.test
+SHA1 4cffbf6d2a698e0c6a3ab5ecec8885b862f5e201 itest/itest.pl
 SHA1 b122277eecc762cc97f9bdf07a50d7a5bed2c2cf t/attributes.t
 SHA1 bb08d81fb36c76b010d274b3f1f34e8da5dd5fc9 t/glob.t
 SHA1 fc5734f9c393dcc9f12c87df4bf9362e88a800ad t/signature.t
@@ -34,7 +29,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.8 (Darwin)
 
-iEYEARECAAYFAkhPoB8ACgkQQwn7DcpJEO5hKQCgySrWSrZKxoj+ZCJ++QZIOqM5
-3oEAnjK2BNWyhjnx8SGGewYuvdf8/NWL
-=HEjC
+iEYEARECAAYFAkieOsoACgkQQwn7DcpJEO4CKgCg06lR8qtJGGusn+ZnKFnnFXS+
+g+oAoJ80Y3GYYeLsfOb1ecYsby68mKT4
+=eTSb
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libnet-scp-expect-perl/current/itest/itest.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-scp-expect-perl/current/itest/itest.pl?rev=24098&op=diff
==============================================================================
--- branches/upstream/libnet-scp-expect-perl/current/itest/itest.pl (original)
+++ branches/upstream/libnet-scp-expect-perl/current/itest/itest.pl Mon Aug 11 06:15:35 2008
@@ -21,12 +21,47 @@
 
 my $small_file  = "small_file.test";
 my $rsmall_file  = "small_file.remote";
+my $small_file2  = "small_file2.test";
+my $small_file3  = "small_file3.test";
 
 my $medium_file = "medium_file.test";
 my $rmedium_file = "medium_file.remote";
 
 my $large_file  = "large_file.test";
 my $rlarge_file  = "large_file.remote";
+
+##################################################
+# Generate test files if they don't already exist
+##################################################
+
+my $file_contents = <<FILE;
+This is the small file
+For use in testing Net::SCP::Expect only
+Delete at your convenience
+FILE
+foreach ($small_file, $small_file2, $small_file3) {
+    unless (-f $_) {
+        open(FILE, ">$_") or die "Couldn't create file [$_]: $!";
+        print FILE $file_contents for 1..56; #~5KB
+        close FILE;
+    }
+}
+
+unless (-f $medium_file) {
+    open(FILE, ">$medium_file") or die "Couldn't create file [$medium_file]: $!";
+    print FILE $file_contents for 1..13564; #~1MB
+    close FILE;
+}
+    
+unless (-f $large_file) {
+    open(FILE, ">$large_file") or die "Couldn't create file [$large_file]: $!";
+    print FILE $file_contents for 1..461176; #~40MB
+    close FILE;
+}
+
+######################
+# Interactive section
+######################
 
 print "\nHost to copy test files to/from: ";
 my $host = <STDIN>;




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