r31650 - in /branches/upstream/libnet-amazon-s3-tools-perl/current: Changes MANIFEST META.yml Makefile.PL README s3acl s3get s3ls s3mkbucket s3put s3rm s3rmbucket

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Sat Mar 7 18:13:41 UTC 2009


Author: ryan52-guest
Date: Sat Mar  7 18:13:37 2009
New Revision: 31650

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31650
Log:
[svn-upgrade] Integrating new upstream version, libnet-amazon-s3-tools-perl (0.08)

Added:
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3rm   (with props)
Removed:
    branches/upstream/libnet-amazon-s3-tools-perl/current/META.yml
Modified:
    branches/upstream/libnet-amazon-s3-tools-perl/current/Changes
    branches/upstream/libnet-amazon-s3-tools-perl/current/MANIFEST
    branches/upstream/libnet-amazon-s3-tools-perl/current/Makefile.PL
    branches/upstream/libnet-amazon-s3-tools-perl/current/README
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3acl
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3get
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3ls
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3mkbucket
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3put
    branches/upstream/libnet-amazon-s3-tools-perl/current/s3rmbucket

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/Changes?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/Changes (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/Changes Sat Mar  7 18:13:37 2009
@@ -12,3 +12,7 @@
 
 0.07  Mon Apr 28 14:28:14 PDT 2008
 	- remove dependecy on XML::Simple
+
+0.08  Wed Feb 25 21:37:17 EST 2009
+        - add s3rm
+	- convert to bzr and move to Launchpad

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/MANIFEST?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/MANIFEST Sat Mar  7 18:13:37 2009
@@ -13,4 +13,4 @@
 s3mkbucket
 s3put
 s3rmbucket
-META.yml                                 Module meta-data (added by MakeMaker)
+s3rm

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/Makefile.PL?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/Makefile.PL (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/Makefile.PL Sat Mar  7 18:13:37 2009
@@ -17,6 +17,7 @@
     },
     'EXE_FILES' => [ 's3acl', 's3ls',
 		     's3get', 's3put',
+		     's3rm', 
 		     's3mkbucket', 's3rmbucket' ],
     ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
       (ABSTRACT       => 'Command line tools for Amazon AWS S3',

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/README?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/README (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/README Sat Mar  7 18:13:37 2009
@@ -34,7 +34,7 @@
 
 COPYRIGHT AND LICENSE
 
-Copyright (C) 2007,2008 by Mark Atwood
+Copyright (C) 2007,2008,2009 by Mark Atwood
 
     Many thanks to Wotan LLC <http://wotanllc.com>,
     for supporting the development of these S3 tools.

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/s3acl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3acl?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3acl (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3acl Sat Mar  7 18:13:37 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
 
 # Copyright (C) 2007,2008 by Mark Atwood <mark at fallenpegasus.com>.
 #

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/s3get
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3get?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3get (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3get Sat Mar  7 18:13:37 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
 
 # Copyright (C) 2007 by Mark Atwood <mark at fallenpegasus.com>.
 #

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/s3ls
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3ls?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3ls (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3ls Sat Mar  7 18:13:37 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
 
 # Copyright (C) 2007 by Mark Atwood <mark at fallenpegasus.com>.
 # 

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/s3mkbucket
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3mkbucket?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3mkbucket (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3mkbucket Sat Mar  7 18:13:37 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
 
 # Copyright (C) 2007 by Mark Atwood <mark at fallenpegasus.com>.
 # 

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/s3put
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3put?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3put (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3put Sat Mar  7 18:13:37 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
 
 # Copyright (C) 2007 by Mark Atwood <mark at fallenpegasus.com>.
 # 

Added: branches/upstream/libnet-amazon-s3-tools-perl/current/s3rm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3rm?rev=31650&op=file
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3rm (added)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3rm Sat Mar  7 18:13:37 2009
@@ -1,0 +1,222 @@
+#!/usr/local/bin/perl
+
+# Copyright (C) 2009 by Mark Atwood <mark at fallenpegasus.com>.
+# 
+# This module is not an official Amazon product or service.  Information
+# used to create this module was obtained only from publicly available
+# information, mainly from the published Amazon documentation.
+#
+# This module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation, either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# and the GNU Lesser General Public License along with this program.
+# If not, see <http://www.gnu.org/licenses/>.
+
+use warnings;
+use strict;
+use Getopt::Long;
+use Pod::Usage;
+use Net::Amazon::S3;
+use Net::Amazon::S3::Bucket;
+use Getopt::ArgvFile qw/argvFile/;
+use File::HomeDir;
+
+use vars qw/$OWNER_ID $OWNER_DISPLAYNAME/;
+
+my $aws_access_key_id = $ENV{AWS_ACCESS_KEY_ID};
+my $aws_secret_access_key = $ENV{AWS_ACCESS_KEY_SECRET};
+my $opt_verbose =0;
+my $opt_help =0;
+my $opt_man =0;
+my $opt_secure =0;
+
+# get the options from the users ~/.s3-tools file, if it exists
+my $users_config = File::HomeDir->my_home() . '/.s3-tools';
+if (-e $users_config) {
+    unshift @ARGV, '@' . $users_config;
+}
+argvFile();
+
+GetOptions('help|?' => \$opt_help, 'man' => \$opt_man,
+	   'verbose+' => \$opt_verbose,
+	   'access-key=s' => \$aws_access_key_id,
+	   'secret-key=s' => \$aws_secret_access_key,
+	   'secure' => \$opt_secure
+	   )
+    or pod2usage(2);
+pod2usage(1) if $opt_help;
+pod2usage(-exitstatus => 0, -verbose => 2) if $opt_man;
+ 
+my $s3p = { aws_access_key_id => $aws_access_key_id,
+	    aws_secret_access_key => $aws_secret_access_key };
+$s3p->{secure} = $opt_secure
+    if ($opt_secure);
+my $s3 = Net::Amazon::S3->new($s3p);
+($s3) or die("$0: fail Net::Amazon::S3: $!, stopped");
+
+my $bkts = make_bucketlist();
+foreach my $b (@{$bkts}) {
+    next unless $b->{itemkey};
+    if ($b->{bucketobject}->delete_key($b->{itemkey})) {
+	print STDERR "$0: deleted item " . $b->{bucketname} . "/" . $b->{itemkey} . "\n"
+	    if $opt_verbose;
+    } else {
+	print STDERR "$0: cannot delete item " . $b->{bucketname} . "/" . $b->{itemkey} . " :"
+	    . $s3->err . ": " . $s3->errstr . "\n";
+    }
+}
+
+# TODO, refactor this out and put it in the module
+sub make_bucketlist
+{
+    my @B;
+    my ($bn, $ik, $b);
+    foreach my $arg (@ARGV) {
+	$b = undef;
+	$b->{arg} = $arg;
+	($bn, $ik) = split('/', $arg, 2);
+	$b->{bucketname} = $bn;
+	$b->{itemkey} = $ik
+	    if ($ik);
+	$b->{bucketobject} = $s3->bucket($bn);
+	push @B, $b;
+    }
+    return \@B;
+}
+
+
+__END__
+
+=head1 NAME
+
+s3rm - Delete Amazon AWS S3 items
+
+=head1 SYNOPSIS
+
+s3rm [options] [bucket/item ...]
+
+ Options:
+   --access-key    AWS Access Key ID
+   --secret-key    AWS Secret Access Key
+ Environment:
+   AWS_ACCESS_KEY_ID
+   AWS_ACCESS_KEY_SECRET
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<--help>
+
+Print a brief help message and exits.
+
+=item B<--man>
+
+Prints the manual page and exits.
+
+=item B<--verbose>
+
+Print a message for each created bucket.
+
+=item B<--access-key> and B<--secret-key>
+
+Specify the "AWS Access Key Identifiers" for the AWS account.
+B<--access-key> is the "Access Key ID", and B<--secret-key> is
+the "Secret Access Key".  These are effectively the "username" and
+"password" to the AWS account, and should be kept confidential.
+
+The access keys MUST be specified, either via these command line
+parameters, or via the B<AWS_ACCESS_KEY_ID> and
+B<AWS_ACCESS_KEY_SECRET> environment variables.
+
+Specifying them on the command line overrides the environment
+variables.
+
+=item B<--secure>
+
+Uses SSL/TLS HTTPS to communicate with the AWS service, instead of
+HTTP.
+
+=back
+
+=head1 ENVIRONMENT VARIABLES
+
+=over 8
+
+=item B<AWS_ACCESS_KEY_ID> and B<AWS_ACCESS_KEY_SECRET>
+
+Specify the "AWS Access Key Identifiers" for the AWS account.
+B<AWS_ACCESS_KEY_ID> contains the "Access Key ID", and
+B<AWS_ACCESS_KEY_SECRET> contains the "Secret Access Key".  These are
+effectively the "username" and "password" to the AWS service, and
+should be kept confidential.
+
+The access keys MUST be specified, either via these environment
+variables, or via the B<--access-key> and B<--secret-key> command line
+parameters.
+
+If the command line parameters are set, they override these
+environment variables.
+
+=back
+
+=head1 CONFIGURATION FILE
+
+The configuration options will be read from the file C<~/.s3-tools> if it
+exists.  The format is the same as the command line options with one option
+per line.  For example, the file could contain:
+
+    --access-key <AWS access key>
+    --secret-key <AWS secret key>
+    --secure
+
+This example configuration file would specify the AWS access keys and that a
+secure connection using HTTPS should be used for all communications.
+
+=head1 DESCRIPTION
+
+Delete items in the Amazon Simple Storage Service (S3).
+
+=head1 BUGS
+
+Report bugs to Mark Atwood L<mark at fallenpegasus.com>.
+
+Occasionally the S3 service will randomly fail for no externally
+apparent reason.  When that happens, this tool should retry, with a
+delay and a backoff.
+
+Access to the S3 service can be authenticated with a X.509
+certificate, instead of via the "AWS Access Key Identifiers".  This
+tool should support that.
+
+It might be useful to be able to specify the "AWS Access Key
+Identifiers" in the user's C<~/.netrc> file.  This tool should support
+that.
+
+Some errors and warnings are very "Perl-ish", and can be confusing.
+
+=head1 AUTHOR
+
+Written by Mark Atwood L<mark at fallenpegasus.com>.
+
+Many thanks to Wotan LLC L<http://wotanllc.com>, for supporting the
+development of these S3 tools.
+
+Many thanks to the Amazon AWS engineers for developing S3.
+
+=head1 SEE ALSO
+
+These tools use the L<Net::Amazon:S3> Perl module.
+
+The Amazon Simple Storage Service (S3) is documented at
+L<http://aws.amazon.com/s3>.
+
+=cut

Propchange: branches/upstream/libnet-amazon-s3-tools-perl/current/s3rm
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/upstream/libnet-amazon-s3-tools-perl/current/s3rmbucket
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-amazon-s3-tools-perl/current/s3rmbucket?rev=31650&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-s3-tools-perl/current/s3rmbucket (original)
+++ branches/upstream/libnet-amazon-s3-tools-perl/current/s3rmbucket Sat Mar  7 18:13:37 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
 
 # Copyright (C) 2007 by Mark Atwood <mark at fallenpegasus.com>.
 # 




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