Bug 457680

Summary: scp destination fails if no username is specified.
Product: [Fedora] Fedora Reporter: simon
Component: duplicityAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 0.4.12-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-08 20:24:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description simon 2008-08-03 12:26:26 UTC
Description of problem:
The recent duplicity update caused my backup scripts to fail. This was due to not having a username specified in the scp://  based destination url.

Previously I had scp://hostname/path and this now fails. I have had to change it to scp://user@hostname/path.

My "hostname" is actually a ssh config entry pointing to the real host and I have specified the correct user there. I see no need to specify it again.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Try and run duplicity /source_path/ scp://remotehost/target_path
Actual results:
Fails with;
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 482, in <module>
  File "/usr/bin/duplicity", line 477, in with_tempdir
  File "/usr/bin/duplicity", line 405, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.5/site-packages/duplicity/commandline.py", line 464, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib/python2.5/site-packages/duplicity/commandline.py", line 374, in set_backend
    backend1, backend2 = backends.get_backend(arg1), backends.get_backend(arg2)
  File "/usr/lib/python2.5/site-packages/duplicity/backends.py", line 89, in get_backend
    return backend_class(pu)
  File "/usr/lib/python2.5/site-packages/duplicity/backends.py", line 334, in __init__
    self.host_string = parsed_url.username + "@" + parsed_url.hostname
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Expected results:
Performs backup.

Additional info:

Comment 1 Robert Scheck 2008-08-03 14:53:37 UTC
Simon, thanks your your report. I have forwarded this bug report to the upstream maintainer, because I'm personally not so good in fixing python code. As soon as I get a reply by upstream and/or a patch, I'll apply and ask you to test before pushing another update for Fedora and EPEL.

For the moment, either please downgrade or use the workaround you already discovered. I'll let you know, once I know more regarding this.

Comment 2 Robert Scheck 2008-08-03 15:15:09 UTC
Upstream report is https://savannah.nongnu.org/bugs/index.php?23988 - will be worked ASAP on it as per upstream's reply.

Comment 3 Robert Scheck 2008-08-05 15:33:42 UTC
Simon, can you please test, whether the patch from http://savannah.nongnu.org/support/download.php?file_id=16234 solves your problem?

The relevant file is /usr/lib[64]/python2.X/site-packages/duplicity/backends.py

Comment 4 simon 2008-08-06 06:53:41 UTC
The patch fixed my issue.

Comment 5 Robert Scheck 2008-08-08 20:24:59 UTC
Simon, thanks for your feedback. I've built updated packages which contain the
patch you confirmed as working. The packages should reach Fedora and EPEL repos
in the next days.

39788 (duplicity): Build on target fedora-4-epel succeeded.
39787 (duplicity): Build on target fedora-5-epel succeeded.

Package: duplicity-0.4.12-2.fc8 Tag: dist-f8-updates-candidate Status: complete
Package: duplicity-0.4.12-2.fc9 Tag: dist-f9-updates-candidate Status: complete
Package: duplicity-0.4.12-2.fc10 Tag: dist-f10 Status: complete

Comment 6 Fedora Update System 2008-08-08 20:28:28 UTC
duplicity-0.4.12-2.fc8 has been submitted as an update for Fedora 8

Comment 7 Fedora Update System 2008-08-08 20:28:29 UTC
duplicity-0.4.12-2.fc9 has been submitted as an update for Fedora 9

Comment 8 Fedora Update System 2008-08-12 18:19:25 UTC
duplicity-0.4.12-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2008-08-12 18:20:22 UTC
duplicity-0.4.12-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.