Hello community, here is the log from the commit of package duplicity for openSUSE:Factory checked in at 2017-04-17 10:21:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/duplicity (Old) and /work/SRC/openSUSE:Factory/.duplicity.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "duplicity" Mon Apr 17 10:21:10 2017 rev:34 rq:484349 version:0.7.12 Changes: -------- --- /work/SRC/openSUSE:Factory/duplicity/duplicity.changes 2017-01-11 11:53:47.838877957 +0100 +++ /work/SRC/openSUSE:Factory/.duplicity.new/duplicity.changes 2017-04-17 10:21:11.833669412 +0200 @@ -1,0 +2,17 @@ +Sat Mar 25 13:49:26 UTC 2017 - w...@rosenauer.org + +- update to 0.7.12 + * Fixed bug #1655268 "--gpg-binary option not working" + If gpg binary is specified rebuild gpg profile using new binary location + * Fixed bug #1658283 "Duplicity 0.7.11 broken with GnuPG 2.0" + - Made gpg version check more robust than just major version + - Now use --pinentry-mode=loopback on gpg 2.1 and greater + - Removed check for non-Linux systems, a false problem + * Fixed bug #1657916 + B2 provider cannot handle two backups in the same bucket + * Fixed bug #1603704 + Crash with UnicodeEncodeError + * Fixed bug #1367675 - IMAP Backend does not work with Yahoo server + * Fixed bug #1668750 - Don't mask backend errors + +------------------------------------------------------------------- Old: ---- duplicity-0.7.11.tar.gz New: ---- duplicity-0.7.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ duplicity.spec ++++++ --- /var/tmp/diff_new_pack.imFhnE/_old 2017-04-17 10:21:12.849525543 +0200 +++ /var/tmp/diff_new_pack.imFhnE/_new 2017-04-17 10:21:12.849525543 +0200 @@ -19,7 +19,7 @@ %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: duplicity -Version: 0.7.11 +Version: 0.7.12 Release: 0 Summary: Encrypted bandwidth-efficient backup using the rsync algorithm License: GPL-3.0+ ++++++ duplicity-0.7.11.tar.gz -> duplicity-0.7.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/CHANGELOG new/duplicity-0.7.12/CHANGELOG --- old/duplicity-0.7.11/CHANGELOG 2016-12-31 16:49:59.000000000 +0100 +++ new/duplicity-0.7.12/CHANGELOG 2017-03-21 21:01:18.000000000 +0100 @@ -1,3 +1,37 @@ +New in v0.7.12 (2017/03/21) +--------------------------- +* Fixed bug #1623342 with patch supplied by Daniel Jakots + - Failing test on OpenBSD because tar/gtar not found +* Fixed bug #1654220 with patch supplied by Kenneth Newwood + - Duplicity fails on MacOS because GPG version parsing fails +* Fixed bug #1655268 "--gpg-binary option not working" + - If gpg binary is specified rebuild gpg profile using new binary location +* Fixed bug #1658283 "Duplicity 0.7.11 broken with GnuPG 2.0" + - Made gpg version check more robust than just major version + - Now use --pinentry-mode=loopback on gpg 2.1 and greater + - Removed check for non-Linux systems, a false problem +* Merged in lp:~matthew-t-bentley/duplicity/duplicity + - Sets a user agent. Backblaze asked for this in case there are errors that originate + from the Duplicity B2 backend + - Only retrieves a new upload URL when the current one expires, to bring it in line + with their best practices for integrations: https://www.backblaze.com/b2/docs/integration_checklist.html +* Add detail about import exceptions in onedrivebackend.py +* Fixed bug #1657916 with patch supplied by Daniel Harvey + - B2 provider cannot handle two backups in the same bucket +* Fixed bug #1603704 with patch supplied by Maciej Bliziński + - Crash with UnicodeEncodeError +* Some fixes to gpg.py to handle gpg1 & gpg2 & gpg2.1 commandline issues + - --gpg-agent is optional on gpg1, but on gpg2 it is used automatically + - --pinentry-mode is not a valid opt until gpg2.1, so condition on that +* Fixed bug #1367675 - IMAP Backend does not work with Yahoo server + - added the split() as needed in 'nums=list[0].strip().split(" ")' + - the other fixes mentioned in the bug report comments were already done +* Fixed bug #1671852 - Code regression caused by revision 1108 + - change util.uexc() back to bare uexc() +* Fixed bug #1668750 - Don't mask backend errors + - added exception prints to module import errors + + New in v0.7.11 (2016/12/31) --------------------------- * Fixed bugs #815510 and #1615480 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/Changelog.GNU new/duplicity-0.7.12/Changelog.GNU --- old/duplicity-0.7.11/Changelog.GNU 2016-12-31 16:49:59.000000000 +0100 +++ new/duplicity-0.7.12/Changelog.GNU 2017-03-21 21:02:29.000000000 +0100 @@ -1,3 +1,67 @@ +2017-03-21 Kenneth Loafman <kenn...@loafman.com> + + * Prep for 0.7.12 + +2017-03-13 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1668750 - Don't mask backend errors + - added exception prints to module import errors + +2017-03-11 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1671852 - Code regression caused by revision 1108 + - change util.uexc() back to bare uexc() + +2017-02-21 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1367675 - IMAP Backend does not work with Yahoo server + - added the split() as needed in 'nums=list[0].strip().split(" ")' + - the other fixes mentioned in the bug report comments were already done + +2017-02-11 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1603704 with patch supplied by Maciej Bliziński + - Crash with UnicodeEncodeError + * Some fixes to gpg.py to handle gpg1 & gpg2 & gpg2.1 commandline issues + - --gpg-agent is optional on gpg1, but on gpg2 it is used automatically + - --pinentry-mode is not a valid opt until gpg2.1, so condition on that + +2017-02-08 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1657916 with patch supplied by Daniel Harvey + - B2 provider cannot handle two backups in the same bucket + +2017-02-07 Kenneth Loafman <kenn...@loafman.com> + + * Add detail about import exceptions in onedrivebackend.py + +2017-01-24 Kenneth Loafman <kenn...@loafman.com> + + * Merged in lp:~matthew-t-bentley/duplicity/duplicity + - Sets a user agent. Backblaze asked for this in case there are errors that originate + from the Duplicity B2 backend + - Only retrieves a new upload URL when the current one expires, to bring it in line + with their best practices for integrations: https://www.backblaze.com/b2/docs/integration_checklist.html + +2017-01-21 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1658283 "Duplicity 0.7.11 broken with GnuPG 2.0" + - Made gpg version check more robust than just major version + - Now use --pinentry-mode=loopback on gpg 2.1 and greater + - Removed check for non-Linux systems, a false problem + +2017-01-19 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1655268 "--gpg-binary option not working" + - If gpg binary is specified rebuild gpg profile using new binary location + +2017-01-16 Kenneth Loafman <kenn...@loafman.com> + + * Fixed bug #1623342 with patch supplied by Daniel Jakots + - Failing test on OpenBSD because tar/gtar not found + * Fixed bug #1654220 with patch supplied by Kenneth Newwood + - Duplicity fails on MacOS because GPG version parsing fails + 2016-12-31 Kenneth Loafman <kenn...@loafman.com> * Prep for 0.7.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/bin/duplicity new/duplicity-0.7.12/bin/duplicity --- old/duplicity-0.7.11/bin/duplicity 2016-12-31 17:33:12.000000000 +0100 +++ new/duplicity-0.7.12/bin/duplicity 2017-03-21 21:08:48.000000000 +0100 @@ -2,7 +2,7 @@ # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # duplicity -- Encrypted bandwidth efficient backup -# Version 0.7.11 released December 31, 2016 +# Version 0.7.12 released March 21, 2017 # # Copyright 2002 Ben Escoto <b...@emerose.org> # Copyright 2007 Kenneth Loafman <kenn...@loafman.com> @@ -48,9 +48,9 @@ # The following is for starting remote debugging in Eclipse with Pydev. # Adjust the path to your location and version of Eclipse and Pydev. if platform.platform().startswith('Linux'): - pysrc = "/opt/liclipse/plugins/org.python.pydev_5.0.0.201605050916//pysrc" + pysrc = "/opt/liclipse/plugins/org.python.pydev_5.4.0.201611281405/pysrc" elif platform.platform().startswith('Darwin'): - pysrc = "/Applications/LiClipse.app/Contents/liclipse/plugins/org.python.pydev_5.2.0.201608171655/pysrc" + pysrc = "/Applications/LiClipse.app/Contents/liclipse/plugins/org.python.pydev_5.4.0.201611281405/pysrc" else: raise Exception("Platform %s not supported by pydevd." % platform.platform()) sys.path.append(pysrc) @@ -1278,7 +1278,7 @@ log Python, duplicity, and system versions """ log.Log(u'=' * 80, verbosity) - log.Log(u"duplicity 0.7.11 (December 31, 2016)", verbosity) + log.Log(u"duplicity 0.7.12 (March 21, 2017)", verbosity) log.Log(u"Args: %s" % util.ufn(' '.join(sys.argv)), verbosity) log.Log(u' '.join(platform.uname()), verbosity) log.Log(u"%s %s" % (sys.executable or sys.platform, sys.version), verbosity) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/bin/duplicity.1 new/duplicity-0.7.12/bin/duplicity.1 --- old/duplicity-0.7.11/bin/duplicity.1 2016-12-31 17:33:12.000000000 +0100 +++ new/duplicity-0.7.12/bin/duplicity.1 2017-03-21 21:08:48.000000000 +0100 @@ -1,4 +1,4 @@ -.TH DUPLICITY 1 "December 31, 2016" "Version 0.7.11" "User Manuals" \" -*- nroff -*- +.TH DUPLICITY 1 "March 21, 2017" "Version 0.7.12" "User Manuals" \" -*- nroff -*- .\" disable justification (adjust text to left margin only) .\" command line examples stay readable through that .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/bin/rdiffdir new/duplicity-0.7.12/bin/rdiffdir --- old/duplicity-0.7.11/bin/rdiffdir 2016-12-31 17:33:12.000000000 +0100 +++ new/duplicity-0.7.12/bin/rdiffdir 2017-03-21 21:08:48.000000000 +0100 @@ -1,6 +1,6 @@ #!/usr/bin/env python2 # rdiffdir -- Extend rdiff functionality to directories -# Version 0.7.11 released December 31, 2016 +# Version 0.7.12 released March 21, 2017 # # Copyright 2002 Ben Escoto <b...@emerose.org> # Copyright 2007 Kenneth Loafman <kenn...@loafman.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/bin/rdiffdir.1 new/duplicity-0.7.12/bin/rdiffdir.1 --- old/duplicity-0.7.11/bin/rdiffdir.1 2016-12-31 17:33:12.000000000 +0100 +++ new/duplicity-0.7.12/bin/rdiffdir.1 2017-03-21 21:08:48.000000000 +0100 @@ -1,4 +1,4 @@ -.TH RDIFFDIR 1 "December 31, 2016" "Version 0.7.11" "User Manuals" \" -*- nroff -*- +.TH RDIFFDIR 1 "March 21, 2017" "Version 0.7.12" "User Manuals" \" -*- nroff -*- .\" disable justification (adjust text to left margin only) .\" command line examples stay readable through that .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/_cf_cloudfiles.py new/duplicity-0.7.12/duplicity/backends/_cf_cloudfiles.py --- old/duplicity-0.7.11/duplicity/backends/_cf_cloudfiles.py 2015-02-02 14:12:09.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/backends/_cf_cloudfiles.py 2017-03-13 17:24:00.000000000 +0100 @@ -35,9 +35,10 @@ from cloudfiles import Connection from cloudfiles.errors import ResponseError from cloudfiles import consts - except ImportError: - raise BackendException("This backend requires the cloudfiles " - "library available from Rackspace.") + except ImportError as e: + raise BackendException("""\ +Cloudfiles backend requires the cloudfiles library available from Rackspace. +Exception: %s""" % str(e)) self.resp_exc = ResponseError conn_kwargs = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/_cf_pyrax.py new/duplicity-0.7.12/duplicity/backends/_cf_pyrax.py --- old/duplicity-0.7.11/duplicity/backends/_cf_pyrax.py 2015-07-04 16:50:32.000000000 +0200 +++ new/duplicity-0.7.12/duplicity/backends/_cf_pyrax.py 2017-03-13 17:42:26.000000000 +0100 @@ -35,9 +35,10 @@ try: import pyrax - except ImportError: - raise BackendException("This backend requires the pyrax " - "library available from Rackspace.") + except ImportError as e: + raise BackendException("""\ +Pyrax backend requires the pyrax library available from Rackspace. +Exception: %s""" % str(e)) # Inform Pyrax that we're talking to Rackspace # per Jesus Monzon (gsusmonzon) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/azurebackend.py new/duplicity-0.7.12/duplicity/backends/azurebackend.py --- old/duplicity-0.7.11/duplicity/backends/azurebackend.py 2016-05-12 19:01:14.000000000 +0200 +++ new/duplicity-0.7.12/duplicity/backends/azurebackend.py 2017-03-13 17:31:05.000000000 +0100 @@ -47,9 +47,10 @@ from azure.storage.blob import BlobService self.AzureMissingResourceError = azure.common.AzureMissingResourceHttpError self.AzureConflictError = azure.common.AzureConflictHttpError - except ImportError: - raise BackendException('Azure backend requires Microsoft Azure Storage SDK for Python ' - '(https://pypi.python.org/pypi/azure-storage/).') + except ImportError as e: + raise BackendException("""\ +Azure backend requires Microsoft Azure Storage SDK for Python (https://pypi.python.org/pypi/azure-storage/). +Exception: %s""" % str(e)) if 'AZURE_ACCOUNT_NAME' not in os.environ: raise BackendException('AZURE_ACCOUNT_NAME environment variable not set.') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/b2backend.py new/duplicity-0.7.12/duplicity/backends/b2backend.py --- old/duplicity-0.7.11/duplicity/backends/b2backend.py 2016-08-22 13:08:49.000000000 +0200 +++ new/duplicity-0.7.12/duplicity/backends/b2backend.py 2017-02-08 17:49:12.000000000 +0100 @@ -24,6 +24,7 @@ import os import hashlib +from sys import version_info import duplicity.backend from duplicity.errors import BackendException, FatalBackendException @@ -63,6 +64,7 @@ self.id_and_key = self.account_id + ":" + account_key self._authorize() + self.upload_info = None try: self.find_or_create_bucket(self.bucket_name) @@ -71,7 +73,12 @@ def _authorize(self): basic_auth_string = 'Basic ' + base64.b64encode(self.id_and_key) - headers = {'Authorization': basic_auth_string} + v = version_info + headers = { + 'Authorization': basic_auth_string, + 'User-Agent': 'duplicity version $version, python %s.%s.%s' % ( + v[0], v[1], v[2]), + } request = urllib2.Request( 'https://api.backblazeb2.com/b2api/v1/b2_authorize_account', @@ -134,6 +141,7 @@ params = { 'bucketId': self.bucket_id, 'maxFileCount': 1000, + 'prefix': self.path, } try: resp = self.get_or_post(url, params) @@ -245,9 +253,11 @@ """ Get an upload url for a bucket """ - endpoint = 'b2_get_upload_url' - url = self.formatted_url(endpoint) - return self.get_or_post(url, {'bucketId': bucket_id}) + if self.upload_info is None: + endpoint = 'b2_get_upload_url' + url = self.formatted_url(endpoint) + self.upload_info = self.get_or_post(url, {'bucketId': bucket_id}) + return self.upload_info def get_or_post(self, url, data, headers=None, data_file=None): """ @@ -264,6 +274,9 @@ data = data_file else: data = json.dumps(data) if data else None + v = version_info + headers['User-Agent'] = "duplicity version $version, " + \ + "python %s.%s.%s" % (v[0], v[1], v[2]) encoded_headers = dict( (k, urllib2.quote(v.encode('utf-8'))) @@ -278,6 +291,7 @@ except ValueError: return out except urllib2.HTTPError as e: + self.upload_info = None if e.code == 401: self.auth_token = None log.Warn("Authtoken expired, will reauthenticate with next attempt") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/dpbxbackend.py new/duplicity-0.7.12/duplicity/backends/dpbxbackend.py --- old/duplicity-0.7.11/duplicity/backends/dpbxbackend.py 2016-12-09 16:36:26.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/backends/dpbxbackend.py 2017-03-13 17:57:34.000000000 +0100 @@ -1,4 +1,5 @@ # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- +# pylint: skip-file # # Copyright 2013 jno <j...@pisem.net> # Copyright 2016 Dmitry Nezhevenko <d...@dion.org.ua> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/gdocsbackend.py new/duplicity-0.7.12/duplicity/backends/gdocsbackend.py --- old/duplicity-0.7.11/duplicity/backends/gdocsbackend.py 2016-07-02 14:44:03.000000000 +0200 +++ new/duplicity-0.7.12/duplicity/backends/gdocsbackend.py 2017-03-13 17:39:00.000000000 +0100 @@ -43,9 +43,10 @@ import gdata.client import gdata.docs.client import gdata.docs.data - except ImportError: - raise BackendException('Google Docs backend requires Google Data APIs Python ' - 'Client Library (see http://code.google.com/p/gdata-python-client/).') + except ImportError as e: + raise BackendException("""\ +Google Docs backend requires Google Data APIs Python Client Library (see http://code.google.com/p/gdata-python-client/). +Exception: %s""" % str(e)) # Setup client instance. self.client = gdata.docs.client.DocsClient(source='duplicity $version') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/hubicbackend.py new/duplicity-0.7.12/duplicity/backends/hubicbackend.py --- old/duplicity-0.7.11/duplicity/backends/hubicbackend.py 2015-07-04 17:33:22.000000000 +0200 +++ new/duplicity-0.7.12/duplicity/backends/hubicbackend.py 2017-03-13 17:43:25.000000000 +0100 @@ -36,9 +36,10 @@ try: import pyrax - except ImportError: - raise BackendException("This backend requires the pyrax " - "library available from Rackspace.") + except ImportError as e: + raise BackendException("""\ +Hubic backend requires the pyrax library available from Rackspace. +Exception: %s""" % str(e)) # Inform Pyrax that we're talking to Hubic pyrax.set_setting("identity_type", "duplicity.backends.pyrax_identity.hubic.HubicIdentity") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/imapbackend.py new/duplicity-0.7.12/duplicity/backends/imapbackend.py --- old/duplicity-0.7.11/duplicity/backends/imapbackend.py 2016-01-29 11:56:06.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/backends/imapbackend.py 2017-02-21 22:52:10.000000000 +0100 @@ -209,7 +209,7 @@ raise Exception(list[0]) if list[0] == '': return ret - nums = list[0].split(" ") + nums = list[0].strip().split(" ") set = "%s:%s" % (nums[0], nums[-1]) (result, list) = self.conn.fetch(set, "(BODY[HEADER])") if result != "OK": @@ -257,6 +257,7 @@ self.conn.close() self.conn.logout() + duplicity.backend.register_backend("imap", ImapBackend) duplicity.backend.register_backend("imaps", ImapBackend) duplicity.backend.uses_netloc.extend(['imap', 'imaps']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/mediafirebackend.py new/duplicity-0.7.12/duplicity/backends/mediafirebackend.py --- old/duplicity-0.7.11/duplicity/backends/mediafirebackend.py 2016-02-18 19:17:54.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/backends/mediafirebackend.py 2017-03-13 17:46:15.000000000 +0100 @@ -37,9 +37,10 @@ def __init__(self, parsed_url): try: import mediafire.client - except ImportError: - raise BackendException("This backend requires " - "the mediafire library") + except ImportError as e: + raise BackendException("""\ +Mediafire backend requires the mediafire library. +Exception: %s""" % str(e)) duplicity.backend.Backend.__init__(self, parsed_url) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/onedrivebackend.py new/duplicity-0.7.12/duplicity/backends/onedrivebackend.py --- old/duplicity-0.7.11/duplicity/backends/onedrivebackend.py 2016-12-29 17:27:38.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/backends/onedrivebackend.py 2017-01-27 17:33:35.000000000 +0100 @@ -70,11 +70,11 @@ global OAuth2Session import requests from requests_oauthlib import OAuth2Session - except ImportError: + except ImportError as e: raise BackendException(( 'OneDrive backend requires python-requests and ' 'python-requests-oauthlib to be installed. Please install ' - 'them and try again.')) + 'them and try again.\n' + str(e))) self.names_to_ids = None self.user_id = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/pydrivebackend.py new/duplicity-0.7.12/duplicity/backends/pydrivebackend.py --- old/duplicity-0.7.11/duplicity/backends/pydrivebackend.py 2016-11-01 15:12:11.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/backends/pydrivebackend.py 2017-03-13 17:22:41.000000000 +0100 @@ -36,9 +36,10 @@ from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from pydrive.files import FileNotUploadedError - except ImportError: - raise BackendException('PyDrive backend requires PyDrive installation' - 'Please read the manpage to fix.') + except ImportError as e: + raise BackendException("""\ +PyDrive backend requires PyDrive installation. Please read the manpage for setup details. +Exception: %s""" % str(e)) # let user get by with old client while he can try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/backends/swiftbackend.py new/duplicity-0.7.12/duplicity/backends/swiftbackend.py --- old/duplicity-0.7.11/duplicity/backends/swiftbackend.py 2016-08-12 22:47:24.000000000 +0200 +++ new/duplicity-0.7.12/duplicity/backends/swiftbackend.py 2017-03-13 17:49:10.000000000 +0100 @@ -34,9 +34,10 @@ try: from swiftclient import Connection from swiftclient import ClientException - except ImportError: - raise BackendException("This backend requires " - "the python-swiftclient library.") + except ImportError as e: + raise BackendException("""\ +Swift backend requires the python-swiftclient library. +Exception: %s""" % str(e)) self.resp_exc = ClientException conn_kwargs = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/commandline.py new/duplicity-0.7.12/duplicity/commandline.py --- old/duplicity-0.7.11/duplicity/commandline.py 2016-12-09 16:36:26.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/commandline.py 2017-01-21 14:01:05.000000000 +0100 @@ -1089,10 +1089,24 @@ "remove-old", "restore", "verify", "full", or "inc". """ + # build initial gpg_profile globals.gpg_profile = gpg.GPGProfile() + # parse command line args = parse_cmdline_options(cmdline_list) + # if we get a different gpg-binary from the commandline then redo gpg_profile + if globals.gpg_binary is not None: + src = globals.gpg_profile + globals.gpg_profile = gpg.GPGProfile( + passphrase=src.passphrase, + sign_key=src.sign_key, + recipients=src.recipients, + hidden_recipients=src.hidden_recipients) + log.Debug(_("GPG binary is %s, version %s") % + ((globals.gpg_binary or 'gpg'), + "%d.%d.%d" % globals.gpg_profile.gpg_version)) + # we can now try to import all the backends backend.import_backends() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/globals.py new/duplicity-0.7.12/duplicity/globals.py --- old/duplicity-0.7.11/duplicity/globals.py 2016-12-31 17:33:12.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/globals.py 2017-03-21 21:08:48.000000000 +0100 @@ -26,7 +26,7 @@ # The current version of duplicity -version = "0.7.11" +version = "0.7.12" # Prefix for all files (appended before type-specific prefixes) file_prefix = "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/gpg.py new/duplicity-0.7.12/duplicity/gpg.py --- old/duplicity-0.7.11/duplicity/gpg.py 2016-12-24 22:30:07.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/gpg.py 2017-02-11 17:53:06.000000000 +0100 @@ -87,19 +87,19 @@ else: self.hidden_recipients = [] - self.gpg_major = self.get_gpg_major(globals.gpg_binary) + self.gpg_version = self.get_gpg_version(globals.gpg_binary) - _version_re = re.compile(r'^gpg.*\(GnuPG\) (?P<maj>[0-9])\.[0-9]+\.[0-9]+$') + _version_re = re.compile(r'^gpg.*\(GnuPG(?:/MacGPG2)?\) (?P<maj>[0-9]+)\.(?P<min>[0-9]+)\.(?P<bug>[0-9]+)$') - def get_gpg_major(self, binary): + def get_gpg_version(self, binary): gpg = gpginterface.GnuPG() if binary is not None: gpg.call = binary res = gpg.run(["--version"], create_fhs=["stdout"]) line = res.handles["stdout"].readline().rstrip() - mtc = self._version_re.search(line) - if mtc is not None: - return int(mtc.group("maj"), 10) + m = self._version_re.search(line) + if m is not None: + return (int(m.group("maj")), int(m.group("min")), int(m.group("bug"))) raise GPGError("failed to determine gpg version of %s from %s" % (binary, line)) @@ -134,13 +134,13 @@ gnupg.call = globals.gpg_binary gnupg.options.meta_interactive = 0 gnupg.options.extra_args.append('--no-secmem-warning') - if globals.use_agent: + if globals.use_agent and profile.gpg_version < (2, 0, 0): + # gpg2 always requires the agent where gpg1 does not gnupg.options.extra_args.append('--use-agent') - elif profile.gpg_major == 2: + if profile.gpg_version >= (2, 1, 0): # This forces gpg2 to ignore the agent. # Necessary to enforce truly non-interactive operation. - if platform.platform().startswith('Linux'): - gnupg.options.extra_args.append('--pinentry-mode=loopback') + gnupg.options.extra_args.append('--pinentry-mode=loopback') if globals.gpg_options: for opt in globals.gpg_options.split(): gnupg.options.extra_args.append(opt) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/duplicity/util.py new/duplicity-0.7.12/duplicity/util.py --- old/duplicity-0.7.11/duplicity/util.py 2015-12-22 13:33:02.000000000 +0100 +++ new/duplicity-0.7.12/duplicity/util.py 2017-03-11 15:01:53.000000000 +0100 @@ -77,6 +77,7 @@ # non-ascii will cause a UnicodeDecodeError when implicitly decoding to # unicode. So we decode manually, using the filesystem encoding. # 99.99% of the time, this will be a fine encoding to use. + e = unicode(e).encode('utf-8') return ufn(str(e)) @@ -94,7 +95,7 @@ except Exception as e: if globals.ignore_errors: log.Warn(_("IGNORED_ERROR: Warning: ignoring error as requested: %s: %s") - % (e.__class__.__name__, util.uexc(e))) + % (e.__class__.__name__, uexc(e))) return None else: raise diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/po/duplicity.pot new/duplicity-0.7.12/po/duplicity.pot --- old/duplicity-0.7.11/po/duplicity.pot 2016-12-31 17:26:05.000000000 +0100 +++ new/duplicity-0.7.12/po/duplicity.pot 2017-02-11 17:19:35.000000000 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: Kenneth Loafman <kenn...@loafman.com>\n" -"POT-Creation-Date: 2016-12-31 09:50-0600\n" +"POT-Creation-Date: 2017-02-11 10:19-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <l...@li.org>\n" @@ -804,7 +804,12 @@ "currently work only when backing up,not restoring." msgstr "" -#: ../duplicity/commandline.py:1120 +#: ../duplicity/commandline.py:1106 +#, python-format +msgid "GPG binary is %s, version %s" +msgstr "" + +#: ../duplicity/commandline.py:1134 #, python-format msgid "" "Bad URL '%s'.\n" @@ -812,7 +817,7 @@ "\"file:///usr/local\". See the man page for more information." msgstr "" -#: ../duplicity/commandline.py:1145 +#: ../duplicity/commandline.py:1159 msgid "Main action: " msgstr "" @@ -1660,12 +1665,12 @@ msgid "Cleanup of temporary directory %s failed - this is probably a bug." msgstr "" -#: ../duplicity/util.py:96 +#: ../duplicity/util.py:97 #, python-format msgid "IGNORED_ERROR: Warning: ignoring error as requested: %s: %s" msgstr "" -#: ../duplicity/util.py:162 +#: ../duplicity/util.py:163 #, python-format msgid "Releasing lockfile %s" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/setup.py new/duplicity-0.7.12/setup.py --- old/duplicity-0.7.11/setup.py 2016-12-31 17:33:12.000000000 +0100 +++ new/duplicity-0.7.12/setup.py 2017-03-21 21:08:48.000000000 +0100 @@ -28,7 +28,7 @@ from setuptools.command.sdist import sdist from distutils.command.build_scripts import build_scripts -version_string = "0.7.11" +version_string = "0.7.12" if sys.version_info[:2] < (2, 6) or sys.version_info[:2] > (2, 7): print("Sorry, duplicity requires version 2.6 or 2.7 of python.") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/duplicity-0.7.11/testing/functional/test_restart.py new/duplicity-0.7.12/testing/functional/test_restart.py --- old/duplicity-0.7.11/testing/functional/test_restart.py 2016-12-08 18:29:01.000000000 +0100 +++ new/duplicity-0.7.12/testing/functional/test_restart.py 2017-01-11 14:59:22.000000000 +0100 @@ -323,11 +323,11 @@ https://launchpad.net/bugs/929067 """ - if platform.platform().startswith('Linux'): + if platform.system().startswith('Linux'): tarcmd = "tar" - elif platform.platform().startswith('Darwin'): + elif platform.system().startswith('Darwin'): tarcmd = "gtar" - elif platform.platform().endswith('BSD'): + elif platform.system().endswith('BSD'): tarcmd = "gtar" else: raise Exception("Platform %s not supported by tar/gtar." % platform.platform())