Package: duplicity
Version: 0.7.06-2
Severity: normal
Hi,
as the python-oauth2client package has been upgraded in Sid, Duplicity's
PyDrive backend needs to be adjusted to the new oauth2client API.
The following patch and an upgrade of python-googleapi to 1.5.0 is
sufficient to make the PyDrive backend work again.
--- pydrivebackend.py.old 2016-04-11 20:07:11.133934930 +0200
+++ pydrivebackend.py 2016-04-11 19:56:57.844088280 +0200
@@ -33,7 +33,8 @@
global pydrive
import httplib2
from apiclient.discovery import build
- from oauth2client.client import SignedJwtAssertionCredentials
+ from oauth2client.service_account import ServiceAccountCredentials
+ from oauth2client import crypt
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from pydrive.files import FileNotUploadedError
@@ -43,7 +44,8 @@
if 'GOOGLE_DRIVE_ACCOUNT_KEY' in os.environ:
account_key = os.environ['GOOGLE_DRIVE_ACCOUNT_KEY']
- credentials = SignedJwtAssertionCredentials(parsed_url.username +
'@' + parsed_url.hostname, account_key,
scopes='https://www.googleapis.com/auth/drive')
+ signer = crypt.Signer.from_string(account_key)
+ credentials = ServiceAccountCredentials(parsed_url.username + '@'
+ parsed_url.hostname, signer, scopes='https://www.googleapis.com/auth/drive')
credentials.authorize(httplib2.Http())
gauth = GoogleAuth()
gauth.credentials = credentials
Regards, Jindrich
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.5.0 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages duplicity depends on:
ii libc6 2.22-6
ii librsync1 0.9.7-10
ii python 2.7.11-1
ii python-lockfile 1:0.12.2-1
Versions of packages duplicity recommends:
ii python-oauthlib 1.0.3-1
pn python-paramiko <none>
ii python-urllib3 1.13.1-2
ii rsync 3.1.1-3
Versions of packages duplicity suggests:
ii lftp 4.7.1-1
pn ncftp <none>
pn python-boto <none>
pn python-cloudfiles <none>
ii python-gdata 2.0.18+dfsg1-2
pn python-swiftclient <none>
pn tahoe-lafs <none>
-- no debconf information
-- debsums errors found:
debsums: changed file
/usr/lib/python2.7/dist-packages/duplicity/backends/pydrivebackend.py (from
duplicity package)