Bug 170114 - sysutils/duplicity cannot resume encrypted backups
Summary: sysutils/duplicity cannot resume encrypted backups
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jase Thew
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 18:30 UTC by will
Modified: 2012-08-15 17:50 UTC (History)
0 users

See Also:


Attachments
file.diff (2.16 KB, patch)
2012-07-24 18:30 UTC, will
no flags Details | Diff
patch-duplicity-log.py.txt (353 bytes, patch)
2012-07-24 18:55 UTC, will
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description will 2012-07-24 18:30:12 UTC
Users of duplicity are unable to resume encrypted backups. GPG always returns an error that an invalid passphrase was used. This is a known bug, and the attached patches revert the change that caused the problem.

https://answers.launchpad.net/duplicity/+question/183711

Fix: Apply attached patches

Patch attached with submission follows:
How-To-Repeat: Try and resume an encrypted backup with duplicity
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-07-24 18:30:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jase

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jase Thew freebsd_committer freebsd_triage 2012-07-24 20:20:35 UTC
Hi William,

Are you seeing this problem in relation to gpg-agent or with exporting
PASSPHRASE into duplicity's environment? Also, are you seeing this issue
when running duplicity manually, or via a crontab entry?

Regards,

Jase.

-- 
Jase Thew
jase@FreeBSD.org
FreeBSD Ports Committer
Comment 3 will 2012-07-24 21:23:26 UTC
I've seen the issue with both, and I've only run it manually.

The thread I linked to mention people having the problem with both as well,
though using the env variable seems to work with some people some times. No
idea what's different about my setup from theirs.

On Tue, Jul 24, 2012 at 12:20 PM, Jase Thew <jase@freebsd.org> wrote:

> Hi William,
>
> Are you seeing this problem in relation to gpg-agent or with exporting
> PASSPHRASE into duplicity's environment? Also, are you seeing this issue
> when running duplicity manually, or via a crontab entry?
>
> Regards,
>
> Jase.
>
> --
> Jase Thew
> jase@FreeBSD.org
> FreeBSD Ports Committer
>
>


-- 
Will Orr
Comment 4 Jase Thew freebsd_committer freebsd_triage 2012-08-12 14:36:16 UTC
Hi Will,

Can you please try the patch listed in this comment [1] and ensure that
it works for you? If it does, I'll commit it to the port - I'd prefer to
take this route than to completely remove the functionality as suggested
earlier in the PR/upstream bug report.

Regards,

Jase.

[1] http://bit.ly/OiE140
-- 
Jase Thew
jase@FreeBSD.org
FreeBSD Ports Committer
Comment 5 will 2012-08-13 00:36:27 UTC
Hello,

I tried the patch, and it almost worked. The first line added (the if
statement) needs to have 4 more spaces prepended to it so that python
doesn't throw an IndentationError, but other than that, it works great.

On Sun, Aug 12, 2012 at 6:36 AM, Jase Thew <jase@freebsd.org> wrote:

> Hi Will,
>
> Can you please try the patch listed in this comment [1] and ensure that
> it works for you? If it does, I'll commit it to the port - I'd prefer to
> take this route than to completely remove the functionality as suggested
> earlier in the PR/upstream bug report.
>
> Regards,
>
> Jase.
>
> [1] http://bit.ly/OiE140
> --
> Jase Thew
> jase@FreeBSD.org
> FreeBSD Ports Committer
>
>


-- 
Will Orr
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-08-15 17:47:50 UTC
Author: jase
Date: Wed Aug 15 16:47:35 2012
New Revision: 302587
URL: http://svn.freebsd.org/changeset/ports/302587

Log:
  - Add temporary patch to fix resuming encrypted backups.
  
  PR:		ports/170114
  Submitted by:	William Orr <will@worrbase.com>
  Obtained from:	https://answers.launchpad.net/duplicity/+question/183711
  Approved by:	flo (mentor)

Added:
  head/sysutils/duplicity/files/patch-bin-duplicity   (contents, props changed)
Modified:
  head/sysutils/duplicity/Makefile   (contents, props changed)

Modified: head/sysutils/duplicity/Makefile
==============================================================================
--- head/sysutils/duplicity/Makefile	Wed Aug 15 16:40:13 2012	(r302586)
+++ head/sysutils/duplicity/Makefile	Wed Aug 15 16:47:35 2012	(r302587)
@@ -7,7 +7,7 @@
 
 PORTNAME=	duplicity
 PORTVERSION=	0.6.19
-PORTREVISION=	1
+PORTREVISION=	2	
 CATEGORIES=	sysutils
 MASTER_SITES=	http://launchpad.net/duplicity/0.6-series/${PORTVERSION}/+download/
 

Added: head/sysutils/duplicity/files/patch-bin-duplicity
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/duplicity/files/patch-bin-duplicity	Wed Aug 15 16:47:35 2012	(r302587)
@@ -0,0 +1,11 @@
+--- bin/duplicity.orig	2012-05-22 15:58:53.000000000 +0100
++++ bin/duplicity	2012-08-12 14:32:01.920372871 +0100
+@@ -321,6 +321,8 @@
+ 
+         # Settings are same, let's check passphrase itself if we are encrypted
+         if globals.encryption:
++            if not globals.gpg_profile.passphrase:
++                globals.gpg_profile.passphrase = get_passphrase(1, "verify")
+             fileobj = restore_get_enc_fileobj(globals.backend, vol1_filename,
+                                               manifest.volume_info_dict[1])
+             fileobj.close()
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Jase Thew freebsd_committer freebsd_triage 2012-08-15 17:48:05 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!