duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Duplicity bug report: duplicity crashes if the GPG


From: Maurizio Vitale
Subject: Re: [Duplicity-talk] Duplicity bug report: duplicity crashes if the GPG key is not trusted
Date: Thu, 12 Mar 2009 15:04:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Kenneth Loafman <address@hidden> writes:

> Maurizio Vitale wrote:
>> I don't seem to be getting the registration confirmation from Savannah,
>> hence cannot properly report bugs.
>> Hope mailing here works as a temporary substitute.
>> 
>> I'm trying to simulate what happens when the backed up machine fails and
>> you need to start the backup process from
>> another machine. Normally you would import the (carefully saved) GPG
>> secret key and use it to restore from your backup.
>> 
>> After that you're on a new machine and you can start backing up again.
>> You can generate a new GPG key or you may want
>> to keep using the old one. If you chose to use the old one you have to
>> remember to do gpg --edit-key <KEY ID> and
>> trust the key.
>> 
>> Failure to do so result in duplicity crashing with a stack trace. The
>> log explains what happens, but it would be nice if
>> duplicity exited with a nice error message instead.
>
> I've been running with my own keys for ages and have never marked them
> as trusted one way or another.  I wonder if this is something in a newer
> version of gpg that we need to be aware of?

I don't know: I think keys --export'ed from one machine and --import'ed
on another are not trusted (it is probably the --import part that makes
them so). I seem to remember old versions of gpg asking the level
of confidence as part of the import, but what I have now (1.4.9)
doesn't, hence the need for the "blessing" step with --edit-key.

I don't think it should be your concern (unless you talk about gpg keys
in the documentation). But making duplicity not crashing when this
happens would definitely be good.

Anyhow, I think you can reproduce it by:
        - creating a new GPG key, all defaults, never expiring and w/
        passphrase.
        - exporting an armored version of the private key
        - going to a different machine
        - importing the key
        - trying to make a backup using the key (this key would be ok
          for restoring a backup, but not for encrypting a new one)

          you should nbe getting the same failure I was getting....


> Would you mind showing a stack trace with that occurring.  I can't
> recreate it here, Ubuntu 8.04, 32-bit.  What distro, etc.?

[this is on Ubuntu 8.10, 64-bit, gpg 1.4.9]

2009-03-11_22:20:32: Starting backup procedure for backup-restore (backup on 
aws)
2009-03-11_22:20:32: removing old backups
No old backup sets found, nothing deleted.
2009-03-11_22:20:32: performing new backup
2009-03-11_22:20:32: /usr/bin/duplicity full --encrypt-key BD0CC45E --sign-key 
BD0CC45E --verbosity 9 /home/mav/workspace/ s3+http://polymath/backup
Main action: full
0 files exist on backend
Extracting backup chains from list of files: []
Collection Status
-----------------
Connecting with backend: BotoBackend
Archive dir: None

Found 0 backup chains without signatures.
No backup chains with active signatures found
No orphaned or incomplete backup sets found.
Last full backup date: none
Using temporary directory /tmp/duplicity-Oxq6WX-tempdir
Registering (mktemp) temporary file 
/tmp/duplicity-Oxq6WX-tempdir/mktemp--joRTg-1
AsyncScheduler: instantiating at concurrency 0
Registering (mktemp) temporary file 
/tmp/duplicity-Oxq6WX-tempdir/mktemp-EvEXoN-2
Selecting /home/mav/workspace
Comparing () and None
Getting delta of (() /home/mav/workspace dir) and None
Generating delta - new file: .
Selecting /home/mav/workspace/.metadata
Comparing ('.metadata',) and None
Getting delta of (('.metadata',) /home/mav/workspace/.metadata dir) and None
Generating delta - new file: .metadata
Selecting /home/mav/workspace/.metadata/.lock
Comparing ('.metadata', '.lock') and None
Getting delta of (('.metadata', '.lock') /home/mav/workspace/.metadata/.lock 
reg) and None
Generating delta - new file: .metadata/.lock
Selecting /home/mav/workspace/.metadata/.log
Comparing ('.metadata', '.log') and None
Getting delta of (('.metadata', '.log') /home/mav/workspace/.metadata/.log reg) 
and None
Generating delta - new file: .metadata/.log
Selecting /home/mav/workspace/.metadata/.plugins
Comparing ('.metadata', '.plugins') and None
Getting delta of (('.metadata', '.plugins') 
/home/mav/workspace/.metadata/.plugins dir) and None
Generating delta - new file: .metadata/.plugins
Selecting /home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.core
Comparing ('.metadata', '.plugins', 'org.eclipse.cdt.core') and None
Getting delta of (('.metadata', '.plugins', 'org.eclipse.cdt.core') 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.core dir) and None
Generating delta - new file: .metadata/.plugins/org.eclipse.cdt.core
Selecting /home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.core/.log
Comparing ('.metadata', '.plugins', 'org.eclipse.cdt.core', '.log') and None
Getting delta of (('.metadata', '.plugins', 'org.eclipse.cdt.core', '.log') 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.core/.log reg) and None
Generating delta - new file: .metadata/.plugins/org.eclipse.cdt.core/.log
Selecting 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml
Comparing ('.metadata', '.plugins', 'org.eclipse.cdt.core', 
'shareddefaults.xml') and None
Getting delta of (('.metadata', '.plugins', 'org.eclipse.cdt.core', 
'shareddefaults.xml') 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml 
reg) and None
Generating delta - new file: 
.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml
Selecting /home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.make.core
Comparing ('.metadata', '.plugins', 'org.eclipse.cdt.make.core') and None
Getting delta of (('.metadata', '.plugins', 'org.eclipse.cdt.make.core') 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.make.core dir) and None
Generating delta - new file: .metadata/.plugins/org.eclipse.cdt.make.core
Selecting /home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/.log
Comparing ('.metadata', '.plugins', 'org.eclipse.cdt.make.core', '.log') and 
None
Getting delta of (('.metadata', '.plugins', 'org.eclipse.cdt.make.core', 
'.log') /home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/.log 
reg) and None
Generating delta - new file: .metadata/.plugins/org.eclipse.cdt.make.core/.log
Selecting 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
Comparing ('.metadata', '.plugins', 'org.eclipse.cdt.make.core', 'specs.c') and 
None
Getting delta of (('.metadata', '.plugins', 'org.eclipse.cdt.make.core', 
'specs.c') 
/home/mav/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c reg) 
and None
Generating delta - new file: 
.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
gpg: B55457F8: There is no assurance this key belongs to the named user
gpg: [stdin]: sign+encrypt failed: unusable public key
Removing still remembered temporary file 
/tmp/duplicity-Oxq6WX-tempdir/mktemp--joRTg-1
Removing still remembered temporary file 
/tmp/duplicity-Oxq6WX-tempdir/mktemp-EvEXoN-2
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 589, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 582, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 562, in main
    full_backup(col_stats)
  File "/usr/bin/duplicity", line 235, in full_backup
    bytes_written = write_multivol("full", tarblock_iter, globals.backend)
  File "/usr/bin/duplicity", line 149, in write_multivol
    globals.gpg_profile, globals.volsize)
  File "/usr/lib/python2.5/site-packages/duplicity/gpg.py", line 241, in 
GPGWriteFile
    data = block_iter.next(bytes_to_go).data
  File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 466, in 
next
    result = self.process(self.input_iter.next(), size)
  File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 572, in 
process
    data, last_block = self.get_data_block(fp, size - 512)
  File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 599, in 
get_data_block
    if fp.close():
  File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 401, in 
close
    self.callback(self.sig_gen.getsig(), *self.extra_args)
  File "/usr/lib/python2.5/site-packages/duplicity/diffdir.py", line 114, in 
callback
    sigTarFile.addfile(ti, cStringIO.StringIO(sig_string))
  File "/usr/lib/python2.5/site-packages/duplicity/tarfile.py", line 769, in 
addfile
    copyfileobj(fileobj, self.fileobj, tarinfo.size)
  File "/usr/lib/python2.5/site-packages/duplicity/tarfile.py", line 199, in 
copyfileobj
    dst.write(buf)
  File "/usr/lib/python2.5/site-packages/duplicity/dup_temp.py", line 111, in 
write
    return self.fileobj.write(buf)
  File "/usr/lib/python2.5/site-packages/duplicity/gpg.py", line 139, in write
    res = self.gpg_input.write(buf)
IOError: [Errno 32] Broken pipe

close failed: [Errno 32] Broken pipe

>
> ...Thanks,
> ...Ken
>
>
> _______________________________________________
> Duplicity-talk mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/duplicity-talk

-- 
Maurizio Vitale
Polymath Solutions




reply via email to

[Prev in Thread] Current Thread [Next in Thread]