Bug 457680 - scp destination fails if no username is specified.
scp destination fails if no username is specified.
Product: Fedora
Classification: Fedora
Component: duplicity (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-08-03 08:26 EDT by Simon Goodall
Modified: 2008-08-12 14:20 EDT (History)
0 users

See Also:
Fixed In Version: 0.4.12-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-08-08 16:24:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Simon Goodall 2008-08-03 08:26:26 EDT
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 10:53:37 EDT
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 11:15:09 EDT
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 11:33:42 EDT
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 Goodall 2008-08-06 02:53:41 EDT
The patch fixed my issue.
Comment 5 Robert Scheck 2008-08-08 16:24:59 EDT
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 16:28:28 EDT
duplicity-0.4.12-2.fc8 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-08-08 16:28:29 EDT
duplicity-0.4.12-2.fc9 has been submitted as an update for Fedora 9
Comment 8 Fedora Update System 2008-08-12 14:19:25 EDT
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 14:20:22 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.