Package: duplicity
Version: 0.6.08b-1+b1
Severity: important
Tags: patch

At lenny's duplicity (0.4.11-2), it was possible to run the following command 
in the remote host
without having the GPG keys or password:

  duplicity collection-status 
file:///var/backups/remote/remote-host.example.org/duplicity/

After upgrading to squeezy (duplicity 0.6.08b-1), I get the following prompt 
instead of the
regular collection-status message:

  A sincronizar os meta-dados remotos com a cache local...
  GnuPG passphrase: 

When running on a non-interactive script[1][2] I get the following error:

  A sincronizar os meta-dados remotos com a cache local...
  /usr/lib/python2.6/getpass.py:83: GetPassWarning: Can not control echo on the 
terminal.
    passwd = fallback_getpass(prompt, stream)
  Warning: Password input may be echoed.
  GnuPG passphrase: Traceback (most recent call last):
    File "/usr/bin/duplicity", line 1251, in <module>
      with_tempdir(main)
    File "/usr/bin/duplicity", line 1244, in with_tempdir
      fn()
    File "/usr/bin/duplicity", line 1145, in main
      sync_archive()
    File "/usr/bin/duplicity", line 955, in sync_archive
      globals.gpg_profile.passphrase = get_passphrase(1, "sync")
    File "/usr/bin/duplicity", line 128, in get_passphrase
      pass1 = getpass.getpass("GnuPG passphrase: ")
    File "/usr/lib/python2.6/getpass.py", line 83, in unix_getpass
      passwd = fallback_getpass(prompt, stream)
    File "/usr/lib/python2.6/getpass.py", line 118, in fallback_getpass
      return _raw_input(prompt, stream)
    File "/usr/lib/python2.6/getpass.py", line 135, in _raw_input
      raise EOFError
  EOFError

I can't find in upstream CHANGELOG[3] any reference about changed 
collection-status behavior but
I found that commenting the sync_archive() call at main() the problem was 
solved. Therefore I created
the following patch:

--- duplicity-0.6.08b/duplicity 2011-05-04 16:25:08.000000000 -0300
+++ duplicity-0.6.08b.orig/duplicity  2010-03-11 22:39:07.000000000 -0300
@@ -1130,8 +1130,7 @@
     check_resources(action)
 
     # check archive synch with remote, fix if needed
-    if action not in ["collection-status"]:
-      sync_archive()
+    sync_archive()
 
     # get current collection status
     col_stats = collections.CollectionsStatus(globals.backend,

Having the ability to check the backup sets in the remote host without having 
the backup keys
is an important feature to help backup auditing.

An issue was issued upstream[4].

[1] 
https://git.sarava.org/?p=puppet-backup.git;a=blob;f=templates/rsync-check.sh.erb;h=879faaf59baee3da996f10659e59bbe2efccb683;hb=HEAD
[2] 
https://git.sarava.org/?p=puppet-backup.git;a=blob;f=templates/rdiff-check.sh.erb;h=a2052ff75f1f1421aff98d0f1eab6c1f519d0d4b;hb=HEAD
[3] http://duplicity.nongnu.org/CHANGELOG
[4] https://bugs.launchpad.net/duplicity/+bug/777377

-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-vserver-amd64 (SMP w/1 CPU core)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to pt_BR.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages duplicity depends on:
ii  gnupg                   1.4.10-4         GNU privacy guard - a free PGP rep
ii  libc6                   2.11.2-10        Embedded GNU C Library: Shared lib
ii  librsync1               0.9.7-7          rsync remote-delta algorithm libra
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-central          0.6.16+nmu1      register and build utility for Pyt
ii  python-pexpect          2.3-1            Python module for automating inter

duplicity recommends no packages.

Versions of packages duplicity suggests:
pn  ncftp                         <none>     (no description available)
pn  python-boto                   <none>     (no description available)

-- no debconf information
diff -Naur duplicity-0.6.13.orig/duplicity duplicity-0.6.13/duplicity
--- duplicity-0.6.13.orig/duplicity	2011-04-02 14:48:22.000000000 -0300
+++ duplicity-0.6.13/duplicity	2011-05-04 16:28:33.000000000 -0300
@@ -1141,7 +1141,8 @@
     check_resources(action)
 
     # check archive synch with remote, fix if needed
-    sync_archive()
+    if action not in ["collection-status"]:
+      sync_archive()    
 
     # get current collection status
     col_stats = collections.CollectionsStatus(globals.backend,

Reply via email to