ubuntu one backend does not work without gnome/dbus/x11 session

Bug #1066625 reported by az
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

the current ubuntu one backend is unsuitable for unattended use, or without
gnome (it insists on gvfs and dbus) or on systems like debian where there's no ubuntuone python module.

this is unfortunate, and totally unnecessary as ubuntu one has a very clean and straightforward
restful web api, and the required oauth token can also be gotten easily from the ubuntu sso web service.

so, in order to improve the ubuntu one backend i've reworked it to get rid of
all the external dependencies and gnome/x11 assumptions.
the reworked u1backend uses no nonstandard extras beyond the httplib2 and oauth modules,
and doesn't require gnome, dbus, x-sessions or anything the like.

the oauth token is expected to be given in FTP_PASSWORD; if not the backend
prompts for ubuntu one id and password and requests a new token (and displays it for future use).

the attached patch makes the necessary changes to u1backend.py and the duplicity manpage.

regards,
az

Related branches

Revision history for this message
az (az-debian) wrote :
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 1066625] [NEW] ubuntu one backend does not work without gnome/dbus/x11 session

Thanks for the patch, however, I cannot apply it to the current source.
 Would you mind generating the patch against the current source in the
trunk. A bit has changed since then.

...Thanks,
...Ken

On Sun, Oct 14, 2012 at 7:18 PM, az <email address hidden> wrote:

> Public bug reported:
>
> the current ubuntu one backend is unsuitable for unattended use, or without
> gnome (it insists on gvfs and dbus) or on systems like debian where
> there's no ubuntuone python module.
>
> this is unfortunate, and totally unnecessary as ubuntu one has a very
> clean and straightforward
> restful web api, and the required oauth token can also be gotten easily
> from the ubuntu sso web service.
>
> so, in order to improve the ubuntu one backend i've reworked it to get rid
> of
> all the external dependencies and gnome/x11 assumptions.
> the reworked u1backend uses no nonstandard extras beyond the httplib2 and
> oauth modules,
> and doesn't require gnome, dbus, x-sessions or anything the like.
>
> the oauth token is expected to be given in FTP_PASSWORD; if not the backend
> prompts for ubuntu one id and password and requests a new token (and
> displays it for future use).
>
> the attached patch makes the necessary changes to u1backend.py and the
> duplicity manpage.
>
> regards,
> az
>
> ** Affects: duplicity
> Importance: Undecided
> Status: New
>
> ** Patch added: "slimmed down standalone ubuntu one backend"
>
> https://bugs.launchpad.net/bugs/1066625/+attachment/3398541/+files/ubuntuone.patch
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/1066625
>
> Title:
> ubuntu one backend does not work without gnome/dbus/x11 session
>
> Status in Duplicity - Bandwidth Efficient Encrypted Backup:
> New
>
> Bug description:
> the current ubuntu one backend is unsuitable for unattended use, or
> without
> gnome (it insists on gvfs and dbus) or on systems like debian where
> there's no ubuntuone python module.
>
> this is unfortunate, and totally unnecessary as ubuntu one has a very
> clean and straightforward
> restful web api, and the required oauth token can also be gotten easily
> from the ubuntu sso web service.
>
> so, in order to improve the ubuntu one backend i've reworked it to get
> rid of
> all the external dependencies and gnome/x11 assumptions.
> the reworked u1backend uses no nonstandard extras beyond the httplib2
> and oauth modules,
> and doesn't require gnome, dbus, x-sessions or anything the like.
>
> the oauth token is expected to be given in FTP_PASSWORD; if not the
> backend
> prompts for ubuntu one id and password and requests a new token (and
> displays it for future use).
>
> the attached patch makes the necessary changes to u1backend.py and the
> duplicity manpage.
>
> regards,
> az
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/duplicity/+bug/1066625/+subscriptions
>

Revision history for this message
az (az-debian) wrote :

On Tue, 16 Oct 2012 15:48:27 +0000, Kenneth Loafman writes:
>Thanks for the patch, however, I cannot apply it to the current source.
> Would you mind generating the patch against the current source in the
>trunk. A bit has changed since then.

that's odd. the newest rev for u1backend.py is 854, which is precisely
what the patch is relative to.
the manpage in trunk is newer, but (at least on my box) the patch applies
with a bit of offset and fuzz.

anyway, i've split the patch in two and regenerated both parts of it
relative to trunk; attached.

regards
az

--
Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/
Being a social outcast helps you stay concentrated on the really important
things, like thinking and hacking. -- Eric Raymond

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Thanks az for the fix. Turns out I needed the -l option on patch to ignore whitespace. The patch contained a mix of spaces and tabs which did not match the source.

Changed in duplicity:
importance: Undecided → Medium
status: New → Fix Committed
Changed in duplicity:
milestone: none → 0.6.20
Revision history for this message
az (az-debian) wrote :

ken, i've had to revise the patch a bit: i had made a fencepost mistake wrt. retries, and forgot to include a bit of delay between retries. the manpage patch is unchanged, the revised (and better tested) backend patch is attached. sorry for the hassle!

Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.