2009-12-22

Ubuntu One on Gentoo

And now for something completely different ! (ie not banshee related)

For years now, I've been running Gentoo Linux on my desktop machine, and I'm mostly happy with it. Earlier this year, I had the opportunity to get my hands on a cheap used laptop : an Apple iBook G4. First thing I did with it was a clean install of Ubuntu.

Since then, I've been looking for a way to easily synchronize files between my desktop and laptop. Obvious alternatives like Dropbox wouldn't work, because they don't provide PowerPC binaries for Linux.

So when Ubuntu One came out, it seemed like a perfect fit. I just had to get it running on Gentoo !

This being all about sharing, I also wrote some ebuilds, so that others might also enjoy it.

Installation instructions

My ebuilds are grouped in an overlay, which translated from Gentoo-speak to Ubuntu-speak would be something like a PPA.

First you have to install the layman tool, to help manage your overlays :
  emerge layman

Then you can add my overlay :
  layman -f --overlays http://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one/blobs/raw/master/gentoo-ubuntu-one.xml --add gentoo-ubuntu-one

This will also fetch the content of the overlay. If you want to update the overlay later, just run "layman -s gentoo-ubuntu-one".

You then have to edit your /etc/make.conf, so that this new overlay can be found. Just add this line at the bottom :
  source /usr/local/portage/layman/make.conf

What's left now is just to actually install the Ubuntu One client :
  emerge ubuntuone-client

This should install all necessary dependencies. You probably have to restart nautilus for the Ubuntu One integration to be visible.

To start it, just go to Applications > Internet and click "Ubuntu One". This will open a page in you web browser, where you'll have to sign in and add your computer to your Ubuntu One account.

Caveat emptor

  • The packages for Evolution contacts synchronization are not included, because I don't need that feature and it looks like it the dependencies could be tricky.
  • The Ubuntu One applet has a tendency to take 100% of my CPU. After killing it, synchronization still works. Further investigation is needed on that front.
  • These are my first serious attempt at writing ebuilds, so they might be broken in various ways. I'd be happy to hear about your experience anyway !

11 comments:

Anonymous said...

layman -f --overlays http://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one/blobs/raw/master/gentoo-ubuntu-one.xml --add gentoo-ubuntu-one

missing the -f option with the command work :-)

Anonymous said...

All ebuild should contain "amd64" beside "~x86" in KEYWORDS and the dev-libs/protobuf package should put into /etc/portage/package.keywords to get a working Ubuntu One on a 64-bit gentoo system.

Bertrand said...

@cvk :
Thanks for pointing out my mistake. I've updated the post to fix the layman command.

I also added the keyword to all ebuilds. I guess you meant "~amd64" ?

Anonymous said...

What can be wrong when installing ubuntuone (sabayon linux)?

layman -f --overlays http://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one/blobs/raw/master/gentoo-ubuntu-one.xml --add gentoo-ubuntu-one
* Running command "/usr/bin/git clone "git://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one.git" "/var/lib/layman/gentoo-ubuntu-one""...
Initialized empty Git repository in /var/lib/layman/gentoo-ubuntu-one/.git/
remote: Counting objects: 203, done.
remote: Compressing objects: 100% (187/187), done.
remote: Total 203 (delta 81), reused 0 (delta 0)
Receiving objects: 100% (203/203), 22.99 KiB | 4 KiB/s, done.
Resolving deltas: 100% (81/81), done.
* Successfully added overlay "gentoo-ubuntu-one".



emerge ubuntuone-client

* IMPORTANT: 3 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "ubuntuone-client".

* IMPORTANT: 3 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.



layman -s gentoo-ubuntu-one
* Running command "cd "/var/lib/layman/gentoo-ubuntu-one" && /usr/bin/git pull"...
Already up-to-date.
*
* Success:
* ------
*
* Successfully synchronized overlay "gentoo-ubuntu-one".
*
* Warnings:
* ------
*
* Overlay "gentoo-ubuntu-one" could not be found in the remote lists.
* Please check if it has been renamed and re-add if necessary.
*



emerge ubuntuone-client

* IMPORTANT: 3 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "ubuntuone-client".


* IMPORTANT: 3 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Bertrand said...

@Anonymous
I don't know anything about sabayon, so I can't really help you.

My ebuild have EAPI="2" so maybe you need portage-2.2* ?

Anonymous said...

thanks for response.
sabayon is a gentoo with an overlay.

I got
Portage 2.2_rc62 (default/linux/x86/10.0/desktop, gcc-4.4.2, glibc-2.10.1-r0, 2.6.31-sabayon i686)

So, I believe that is not the problem.

Unknown said...

I've update it to latest version:

ubuntuone-client-1.2.1.ebuild

ubuntuone-storage-protocol-1.2.0.ebuild

Bertrand said...

@coderoar
Thanks for the heads up !

As I'm not using Gentoo anymore, I won't be updating my overlay.
I've added a link to your overlay on the gitorious project page.

Anonymous said...

$ ubuntuone-preferences
Traceback (most recent call last):
File "/usr/bin/ubuntuone-preferences", line 31, in
import httplib2

I guess that ebuild should depend on dev-python/httplib2

Anonymous said...

Same story with simplejson

Unknown said...

It won't work for me. I know layman has changed. I'm new to Gentoo, but not to Linux. Here is my output.

Sorry it's not formatted, the pre and code tags aren't allowed even though the a tag is.

# layman -f --overlays http://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one/blobs/raw/master/gentoo-ubuntu-one.xml --add gentoo-ubuntu-one

* Fetching remote list,...
* Warning: an installed db file was not found at: ['/var/lib/layman/cache_0ff9e20f98221a5df8f4481d8b8edfd1.xml', '/var/lib/layman/cache_ac494f50f5736be7871962c0dec7b3bb.xml']
* Fetching new list... http://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one/blobs/raw/master/gentoo-ubuntu-one.xml
* Last-modified: Sun, 15 Sep 2013 18:33:13 GMT
* Failed to fetch overlay list!
* Original Error was: Failed to parse the overlays list fetched from http://gitorious.org/gentoo-ubuntu-one/gentoo-ubuntu-one/blobs/raw/master/gentoo-ubuntu-one.xml
* This means that the downloaded file is somehow corrupt or there was a problem with the webserver. Check the content of the file. Error was:
* mismatched tag: line 11, column 4

* Adding overlay,...
Traceback (most recent call last):
File "/usr/bin/layman-python2.7", line 45, in
main()
File "/usr/lib64/python2.7/site-packages/layman/cli.py", line 184, in __call__
result += getattr(self, action[1])()
File "/usr/lib64/python2.7/site-packages/layman/cli.py", line 233, in Add
result = self.api.add_repos(selection, update_news=True)
File "/usr/lib64/python2.7/site-packages/layman/api.py", line 138, in add_repos
if self.is_installed(ovl):
File "/usr/lib64/python2.7/site-packages/layman/api.py", line 82, in is_installed
return ovl in self.get_installed()
File "/usr/lib64/python2.7/site-packages/layman/api.py", line 480, in get_installed
self._installed_ids = self._get_installed_db(dbreload).list_ids()
File "/usr/lib64/python2.7/site-packages/layman/api.py", line 487, in _get_installed_db
self._installed_db = DB(self.config)
File "/usr/lib64/python2.7/site-packages/layman/db.py", line 68, in __init__
ignore=ignore,
File "/usr/lib64/python2.7/site-packages/layman/dbbase.py", line 101, in __init__
self.read_file(path)
File "/usr/lib64/python2.7/site-packages/layman/dbbase.py", line 133, in read_file
self.read(document, origin=path)
File "/usr/lib64/python2.7/site-packages/layman/dbbase.py", line 158, in read
document = ET.fromstring(text)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1301, in XML
return parser.close()
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1654, in close
self._raiseerror(v)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0