Monday, September 20, 2010

n900 goodies: unison, gphoto, working soprano, libferris, sixdof, coreutils, xerces3 et al

Some goodies for the n900 are now in my repository. Yes, I know it's evil to have my own, but if that's all it takes to be George Thorogood then so be it. In the at the aforementioned link you will find unison, gphoto, stldb4, libferris, ocaml, a compiled install of coreutils to avoid battling busybox, xercesc, xalanc, xqilla, and a (more) working soprano.

I'm a tad surprised that unison hasn't made its way into the main repositories yet. I can't imagine that outsiders like me are the only ones who use it or want to. If you follow the "only one me" assumption then unison works well for providing bidirectional data syncing. I have compiled unison without a GUI under the assumption that you will be starting the process from the laptop or other more endowed machine. Although unison is written in ocaml, you shouldn't need to install that to get the unison package going.

The coreutils is just a compile and DESTDIR install wrapped up into a tarball. Shove them into /opt somewhere and prepend them to your path and magically df -lh and other normal commands work again.

I have ported libferris to xercesc3 finally, so I had to package that for maemo5 too. Which explains the xml packages. I put xalanc and xqilla there too so I can play around with xsltfs:// and XQuery on the device. It's powerful enough for these things so why not do them ;)

Once I installed libferris on the device I discovered a strange crash. Long story short, the soprano on the device was using redland as it's backend, and redland was defaulting to using its hashes backend (Berkeley db) which wasn't available. So the current soprano works only with memory models it seems. Though support for sqlite is compiled into redland it isn't the default for soprano persistent storage. What is stranger is that db4.2 was already on my n900. So all of this could have gone away if redland was compiled with db4 support (which happens automatically when the db4-dev package is installed before compiling redland). To see if your redland will work with db4 run these on your n900... The first works if SQLite is supported, the second will fail if you do not have berkeley db4 support compiled. The redland (librdf) from my repository uses libdb4.2 on the device to enable the second command to work properly.


$ rdfproc -s sqlite myrdf add \
'http://witme.sf.net/libferris-core/0.1/myrdf-so2p.db' \
'http://witme.sf.net/libferris-core/0.1/start' \
'http://witme.sf.net/libferris-core/0.1/base'
rdfproc: added triple to the graph

$ rdfproc -s hashes myrdf add \
'http://witme.sf.net/libferris-core/0.1/myrdf-so2p.db' \
'http://witme.sf.net/libferris-core/0.1/start' \
'http://witme.sf.net/libferris-core/0.1/base'
rdfproc: added triple to the graph


So now the fun part starts, using libferris to "copy" images from the camera to flickr, mounting the sqlite databases on the device as filesystems, gluing the geolocations markers to those created on the desktop and other data/filesystem games.

No comments: