Package: duplicity
Version: 0.4.10-1
Severity: normal

Due to recent changes in the python-boto package, S3 backups using 
duplicity will fail on existing buckets that contain upper-case
characters in the name. The attached patch, (which has already been
merged upstream), resolves this issue while maintaining backward
compatibility with older boto releases.

I leave it to you to decide whether this warrants a new duplicity
upload before the release of 0.4.11, but thought it best to at least
document this in the BTS.

Thanks,


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (700, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages duplicity depends on:
ii  gnupg                         1.4.6-2.1  GNU privacy guard - a free PGP rep
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  librsync1                     0.9.7-1    Library which implements the rsync
ii  python                        2.4.4-6    An interactive high-level object-o
ii  python-central                0.6.1      register and build utility for Pyt
ii  python-gnupginterface         0.3.2-9    Python interface to GnuPG (GPG)
ii  python-pexpect                2.1-1      Python module for automating inter

duplicity recommends no packages.

-- no debconf information

-- 
Eric Evans
[EMAIL PROTECTED]
diff --git a/src/backends.py b/src/backends.py
index 69cf60f..cd290d2 100644
--- a/src/backends.py
+++ b/src/backends.py
@@ -700,6 +700,15 @@ class BotoBackend(Backend):
 			from boto.s3.connection import S3Connection
 			from boto.s3.key import Key
 			assert hasattr(S3Connection, 'lookup')
+
+			# Newer versions of boto default to using virtual hosting for
+			# buckets. This is bad because it will break backups stored in
+			# buckets that contain upper-case characters in the name.
+			try:
+				from boto.s3.connection import OrdinaryCallingFormat
+				calling_format = OrdinaryCallingFormat()
+			except ImportError:
+				calling_format = None
 		except ImportError:
 			log.FatalError("This backend requires boto library, version 0.9d or later, "
 						   "(http://code.google.com/p/boto/).")
@@ -717,6 +726,9 @@ class BotoBackend(Backend):
 			assert parsed_url.scheme == 's3'
 			self.conn = S3Connection(host=parsed_url.hostname)
 
+		if hasattr(self.conn, 'calling_format'):
+			self.conn.calling_format = calling_format
+
 		# This folds the null prefix and all null parts, which means that:
 		#  //MyBucket/ and //MyBucket are equivalent.
 		#  //MyBucket//My///My/Prefix/ and //MyBucket/My/Prefix are equivalent.

Attachment: signature.asc
Description: Digital signature

Reply via email to