r30481 - in /trunk/libnet-scp-expect-perl: ._CHANGES ._Expect.pm CHANGES Expect.pm META.yml Makefile.PL SIGNATURE debian/changelog debian/control debian/copyright debian/rules
rmayorga at users.alioth.debian.org
rmayorga at users.alioth.debian.org
Fri Feb 6 01:24:06 UTC 2009
Author: rmayorga
Date: Fri Feb 6 01:24:03 2009
New Revision: 30481
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30481
Log:
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
* New upstream release
* debian/control
+ add libnet-ipv6addr-perl to B-D-I and Depends fields
+ update my email address
* debian/copyright
+ update proposal format
+ separate debian/* copyright stanzas based on debian/changelog
+ update upstream copyright years
* debian/rules: remove usr/share/perl5/Net/SCP/._Expect.pm
from the final .deb package
Added:
trunk/libnet-scp-expect-perl/._CHANGES
- copied unchanged from r30480, branches/upstream/libnet-scp-expect-perl/current/._CHANGES
trunk/libnet-scp-expect-perl/._Expect.pm
- copied unchanged from r30480, branches/upstream/libnet-scp-expect-perl/current/._Expect.pm
Modified:
trunk/libnet-scp-expect-perl/CHANGES
trunk/libnet-scp-expect-perl/Expect.pm
trunk/libnet-scp-expect-perl/META.yml
trunk/libnet-scp-expect-perl/Makefile.PL
trunk/libnet-scp-expect-perl/SIGNATURE
trunk/libnet-scp-expect-perl/debian/changelog
trunk/libnet-scp-expect-perl/debian/control
trunk/libnet-scp-expect-perl/debian/copyright
trunk/libnet-scp-expect-perl/debian/rules
Modified: trunk/libnet-scp-expect-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/CHANGES?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/CHANGES (original)
+++ trunk/libnet-scp-expect-perl/CHANGES Fri Feb 6 01:24:03 2009
@@ -1,6 +1,11 @@
Revision history for Perl extension Net-SCP-Expect
-0.14
+0.15 Monday February 2 23:01:03 2009
+- Support IPv6 host addresses in long and short scp forms.
+- Add support for -C, -4 and -6 options (compress, force IPv4 and force
+IPv6, respectively).
+
+0.14 Saturday August 9 20:48:00 2008
- 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).
Modified: trunk/libnet-scp-expect-perl/Expect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/Expect.pm?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/Expect.pm (original)
+++ trunk/libnet-scp-expect-perl/Expect.pm Fri Feb 6 01:24:03 2009
@@ -11,10 +11,11 @@
use File::Basename;
use Carp;
use Cwd;
+use Net::IPv6Addr;
BEGIN{
use vars qw/$VERSION/;
- $VERSION = '0.14';
+ $VERSION = '0.15';
}
# Options added as needed
@@ -43,6 +44,9 @@
_subsystem => $arg{subsystem} || undef,
_scp_path => $arg{scp_path} || undef,
_auto_quote => $arg{auto_quote} || 1,
+ _compress => $arg{compress} || 0,
+ _force_ipv4 => $arg{force_ipv4} || 0,
+ _force_ipv6 => $arg{force_ipv6} || 0,
};
bless($self,$class);
@@ -92,6 +96,10 @@
sub host{
my($self,$host) = @_;
croak("No host supplied to 'host()' method") unless $host;
+
+ # If host is an IPv6 address, strip any enclosing brackets if used
+ $host = substr($host, 1, length($host)-2) if $host && $host =~ /^\[/ && $host =~ /\]$/;
+
$self->_set('host',$host);
}
@@ -129,6 +137,9 @@
my $subsystem = $self->_get('subsystem');
my $scp_path = $self->_get('scp_path');
my $auto_quote = $self->_get('auto_quote');
+ my $compress = $self->_get('compress');
+ my $force_ipv4 = $self->_get('force_ipv4');
+ my $force_ipv6 = $self->_get('force_ipv6');
##################################################################
# If the second argument is not provided, the remote file will be
@@ -140,15 +151,15 @@
my($host,$dest);
- # Parse the to/from string. If the $from contains a ':', assume it is the remote host
+ # Parse the to/from string. If the $from contains a ':', assume it is a Remote to Local transfer
if($from =~ /:/){
($login,$host,$dest) = $self->_parse_scp_string($from);
- $from = "$login\@$host:";
+ $from = $login . '@' . $self->_format_host_string($host) . ':';
$from .= "$dest" if $dest;
}
- else{
+ else{ # Local to Remote transfer
($login,$host,$dest) = $self->_parse_scp_string($to);
- $to = "$login\@$host:";
+ $to = $login . '@' . $self->_format_host_string($host) . ':';
$to .= "$dest" if $dest;
}
@@ -172,6 +183,9 @@
$flags .= "-s $qt$subsystem$qt " if $subsystem;
$flags .= "-o $qt$option$qt " if $option;
$flags .= "-i $qt$identity_file$qt " if $identity_file;
+ $flags .= "-C " if $compress;
+ $flags .= "-4 " if $force_ipv4;
+ $flags .= "-6 " if $force_ipv6;
my $scp = Expect->new;
#if($verbose){ $scp->raw_pty(1) }
@@ -307,7 +321,15 @@
}
my $temp = join('', at parts);
- ($host,$dest) = split(/:/,$temp,2);
+ @parts = split(/:/,$temp);
+ if (@parts) {
+ if (@parts > 1) {
+ $host = join('', at parts[0,1..scalar(@parts)-2]);
+ $dest = $parts[-1];
+ } else {
+ $host = $parts[0];
+ }
+ }
# scp('file','file') syntax, where local to remote is assumed
unless($dest){
@@ -316,7 +338,24 @@
}
$host ||= $self->_get("host");
+
+ # If host is an IPv6 address, strip any enclosing brackets if used
+ $host = substr($host, 1, length($host)-2) if $host && $host =~ /^\[/ && $host =~ /\]$/;
+
return ($user,$host,$dest);
+}
+
+sub _format_host_string{
+ my ($self,$host) = @_;
+
+ # If host is an IPv6 address, verify it is correctly formatted for scp
+ if ($host) {
+ $host = substr($host, 1, length($host)-2) if $host =~ /^\[/ && $host =~ /\]$/;
+ local $@;
+ $host = "[$host]" if eval { Net::IPv6Addr::ipv6_parse($host) };
+ }
+
+ return $host;
}
1;
__END__
@@ -342,6 +381,12 @@
my $scpe = Net::SCP::Expect->new(user=>'user',password=>'xxxx');
$scpe->scp('host:/some/dir/filename','newfilename');
+
+B<Example 4 - uses login method, longhand scp, IPv6 compatible:>
+
+ my $scpe = Net::SCP::Expect->new;
+ $scpe->login('user name', 'password');
+ $scpe->scp('file','[ipv6-host]:/some/dir'); # <-- Important: scp() with explicit IPv6 host in to or from address must use square brackets
See the B<scp()> method for more information on valid syntax.
@@ -412,19 +457,29 @@
=head3 Local to Remote
-B<scp(>I<source, user at host:destination>B<);>
+B<scp(>I<source, user at host:destination>B<);>
+
+B<scp(>I<source, user@[ipv6-host]:destination>B<);> # Same as previous, with IPv6 host
B<scp(>I<source, host:destination>B<);> # User already defined
+B<scp(>I<source, [ipv6-host]:destination>B<);> # Same as previous, with IPv6 host
+
B<scp(>I<source, :destination>B<);> # User and host already defined
B<scp(>I<source, destination>B<);> # Same as previous
+B<scp(>I<source>B<);> # Same as previous; destination will use base name of source
+
=head3 Remote to Local
B<scp(>I<user at host:source, destination>B<);>
+B<scp(>I<user@[ipv6-host]:source, destination>B<);> # Same as previous, with IPv6 host
+
B<scp(>I<host:source, destination>B<);>
+
+B<scp(>I<[ipv6-host]:source, destination>B<);> # Same as previous, with IPv6 host
B<scp(>I<:source, destination>B<);>
@@ -445,8 +500,16 @@
B<cipher> - Selects the cipher to use for encrypting the data transfer.
+B<compress> - Compression enable. Passes the -C flag to ssh(1) to enable compression.
+
+B<force_ipv4> - Forces scp to use IPv4 addresses only.
+
+B<force_ipv6> - Forces scp to use IPv6 addresses only.
+
B<host> - Specify the host name. This is now useful for both local-to-remote
-and remote-to-local transfers.
+and remote-to-local transfers. For IPv6 addresses, either regular or square-bracket
+encapsulated host are allowed (since command-line scp normally expects IPv6
+addresses to be encapsulated in square brackets).
B<identity_file> - Specify the identify file to use.
Modified: trunk/libnet-scp-expect-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/META.yml?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/META.yml (original)
+++ trunk/libnet-scp-expect-perl/META.yml Fri Feb 6 01:24:03 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Net-SCP-Expect
-version: 0.14
+version: 0.15
abstract: Wrapper for scp that allows passwords via Expect.
license: ~
author:
@@ -9,6 +9,7 @@
distribution_type: module
requires:
Expect: 1.14
+ Net::IPv6Addr: 0.2
Term::ReadPassword: 0.01
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
Modified: trunk/libnet-scp-expect-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/Makefile.PL?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/Makefile.PL (original)
+++ trunk/libnet-scp-expect-perl/Makefile.PL Fri Feb 6 01:24:03 2009
@@ -4,7 +4,7 @@
WriteMakefile(
'NAME' => 'Net::SCP::Expect',
'VERSION_FROM' => 'Expect.pm', # finds $VERSION
- 'PREREQ_PM' => {'Expect' => '1.14','Term::ReadPassword' => '0.01'},
+ 'PREREQ_PM' => {'Expect' => '1.14','Term::ReadPassword' => '0.01','Net::IPv6Addr' => '0.2'},
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'Expect.pm', # retrieve abstract from module
AUTHOR => 'Eric Rybski <rybskej at yahoo.com>') : ()),
Modified: trunk/libnet-scp-expect-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/SIGNATURE?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/SIGNATURE (original)
+++ trunk/libnet-scp-expect-perl/SIGNATURE Fri Feb 6 01:24:03 2009
@@ -14,11 +14,11 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 60aa4d3b6a8cac84d11f3b18e870ae55e6acad5d CHANGES
-SHA1 6a756fc640e895f5e685002a7a83a565f53a0c0b Expect.pm
+SHA1 edb0e6e94e03545429479e814f4cdcf30b7fb84d CHANGES
+SHA1 1e953fd6700f7e724499b8d729ee4788bdb59346 Expect.pm
SHA1 3215f56b06635a4d9204389c4e2f7f2e1fea221d MANIFEST
-SHA1 897c997b727983033805d63dfb7c9bdb02caee6f META.yml
-SHA1 c80c11b8e2dbc549e3deffedc51a5a3b682e7620 Makefile.PL
+SHA1 40940d17f7e6ae9df90681c5e96fb5489bea6e28 META.yml
+SHA1 47bc2fcee1ecef23f723b9b0e38423d55d1f3593 Makefile.PL
SHA1 692dacfe15584c7b086fd49b8271505f48620f65 README
SHA1 f45399354c8baa415a0326a96ffb55ba8f9d373d itest/README
SHA1 4cffbf6d2a698e0c6a3ab5ecec8885b862f5e201 itest/itest.pl
@@ -29,7 +29,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
-iEYEARECAAYFAkieOsoACgkQQwn7DcpJEO4CKgCg06lR8qtJGGusn+ZnKFnnFXS+
-g+oAoJ80Y3GYYeLsfOb1ecYsby68mKT4
-=eTSb
+iEYEARECAAYFAkmHxE0ACgkQQwn7DcpJEO56zgCgw+axeIXIUgtkS1Xigu+C44BO
+vPYAn3j/LML++PtPtxLMR4omy7GWHxEr
+=nNtG
-----END PGP SIGNATURE-----
Modified: trunk/libnet-scp-expect-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/debian/changelog?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/debian/changelog (original)
+++ trunk/libnet-scp-expect-perl/debian/changelog Fri Feb 6 01:24:03 2009
@@ -1,3 +1,23 @@
+libnet-scp-expect-perl (0.15-1) unstable; urgency=low
+
+ [ gregor herrmann ]
+ * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
+ (source stanza).
+
+ [ Rene Mayorga ]
+ * New upstream release
+ * debian/control
+ + add libnet-ipv6addr-perl to B-D-I and Depends fields
+ + update my email address
+ * debian/copyright
+ + update proposal format
+ + separate debian/* copyright stanzas based on debian/changelog
+ + update upstream copyright years
+ * debian/rules: remove usr/share/perl5/Net/SCP/._Expect.pm
+ from the final .deb package
+
+ -- Rene Mayorga <rmayorga at debian.org> Thu, 05 Feb 2009 19:02:37 -0600
+
libnet-scp-expect-perl (0.14-2) UNRELEASED; urgency=low
[ gregor herrmann ]
Modified: trunk/libnet-scp-expect-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/debian/control?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/debian/control (original)
+++ trunk/libnet-scp-expect-perl/debian/control Fri Feb 6 01:24:03 2009
@@ -7,7 +7,7 @@
Rene Mayorga <rmayorga at debian.org>
Build-Depends: debhelper (>= 7)
Build-Depends-Indep: perl (>= 5.6.0-16), libterm-readpassword-perl,
- libexpect-perl
+ libexpect-perl, libnet-ipv6addr-perl
Standards-Version: 3.8.0
Homepage: http://search.cpan.org/dist/Net-SCP-Expect/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libnet-scp-expect-perl/
@@ -15,7 +15,8 @@
Package: libnet-scp-expect-perl
Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libterm-readpassword-perl, libexpect-perl
+Depends: ${perl:Depends}, ${misc:Depends}, libterm-readpassword-perl,
+ libexpect-perl, libnet-ipv6addr-perl
Description: Wrapper for scp to send passwords via Expect
Net::SCP::Expect allows you to transfer files via scp, but instead of having
to use shared keys or to input a password interactively, it allows you to
Modified: trunk/libnet-scp-expect-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/debian/copyright?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/debian/copyright (original)
+++ trunk/libnet-scp-expect-perl/debian/copyright Fri Feb 6 01:24:03 2009
@@ -1,35 +1,30 @@
-This package was debianized by Jay Bonci <jay at bonci.com> on
-Sat, 28 Jun 2003 22:45:39 -0400, and is Maintainet by the Debian Perl Group
-(pkg-perl)
+Format-Specification:
+ http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: Eric Rybski <rybskej at yahoo.com>
+Upstream-Source: http://search.cpan.org/dist/Net-SCP-Expect/
+Upstream-Name: Net-SCP-Expect
-It was downloaded from: http://search.cpan.org/dist/Net-SCP-Expect
+Files: *
+Copyright: © 2003-2004 Daniel J. Berger <djberg96 at yahoo.com>
+ © 2005-2008 Eric Rybski <rybskej at yahoo.com>
+License-Alias: Perl
+License: Artistic | GPL-1+
-Upstream Author: Daniel Berger <djberg96 at yahoo.com>
- Eric Rybski <rybskej at yahoo.com>
+Files: debian/*
+Copyright: © 2003-2004 Jay Bonci <jay at bonci.com>
+ © 2008 gregor herrmann <gregoa at debian.org>
+License: Artistic | GPL-1+
-Files: *
-Copyright: © 2003-2004 Daniel J. Berger <djberg96 at yahoo.com>
- © 2005-2007 Eric Rybski <rybskej at yahoo.com>
-License: GPL-1+ | Artistic
- These modules are free software. They may be used, redistributed
- and/or modified under the same terms as Perl itself.
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'
-Files: debian/*
-Copyright: © 2003-2004 Jay Bonci <jay at bonci.com>
- © 2008 Debian Perl Group
- <pkg-perl-maintainers at lists.alioth.debian.org>
-License: GPL-1+ | Artistic
-
-The Perl license is:
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- a) the GNU General Public License as published by the Free Software
- Foundation; either version 1, or (at your option) any later
- version, or
-
- b) the "Artistic License" which comes with Perl.
-
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in `/usr/share/common-licenses/GPL' and the Artistic
-Licence in `/usr/share/common-licenses/Artistic'.
+License: GPL-1+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'
Modified: trunk/libnet-scp-expect-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-scp-expect-perl/debian/rules?rev=30481&op=diff
==============================================================================
--- trunk/libnet-scp-expect-perl/debian/rules (original)
+++ trunk/libnet-scp-expect-perl/debian/rules Fri Feb 6 01:24:03 2009
@@ -5,12 +5,14 @@
dh build
touch $@
-clean:
+clean:
dh $@
+
install: install-stamp
install-stamp: build-stamp
dh install
+ rm -f -v debian/libnet-scp-expect-perl/usr/share/perl5/Net/SCP/._Expect.pm
touch $@
binary-arch:
More information about the Pkg-perl-cvs-commits
mailing list