← Back to team overview

checkbox-dev team mailing list archive

stubbox on snappy

 

To get stubbox (which is plainbox with a dummy provider for
evaluation) on a armv7 snappy device please follow along. NOTE: arch
is not all, this is a binary package, despite the name.

tl;dr;

wget "https://www.dropbox.com/s/ivuqwadfd37a116/stubbox_0.21.2_all.snap?dl=1";
-o stubbox_0.21.2_all.snap
snappy-remote --url=ssh://1.2.3.4 install ./stubbox_0.21.2_all.snap

Replace the 1.2.3.4 above with the IP address of your board.

On the actual device you can run any of the stubbox jobs (with confinement!):

(BeagleBoneBlack)ubuntu@bb2:~$ stubbox.stubbox run -i
2013.com.canonical.plainbox::stub/dependency/good

You can put your .provider definition files in
~/apps/stubbox.sideload/0.21.2/.local/share/plainbox-providers-1 and
they will be picked up by stubbox.stubbox

As for the not-so-short-version:

This relies on:
 - native building on beagle running regular 14.04
 - upstream pex, to build the .pex file
 - zip, unzip and change some of the files inside
   - __main__.py is patched to work around bug [2]
 - additional shared libraries needed for python3-lxml are provided in
snap-top-level lib/ directory
   - those are libexslt.so.0  libgcrypt.so.11  libxml2.so.2  libxslt.so.1
 - rpath of _each_ .so file is set with patchelf --set-rpath
'/apps/stubbox.sideload/current/lib/'
   - this implies the snap won't work unless side-loaded :-(((
   - we can make a "production" version that can be uploaded into the
store though
   - I need to experiment with $ORIGIN to see if this will work for
interpreted stuff
   - this includes .so files built by pex / setuptools natively

None of this mess is automated yet. If you have any questions, please ask.

[1]  https://bugs.launchpad.net/ubuntu-core-launcher/+bug/1457183

Thanks
ZK

PS: to the people on BCC, remember this is a _public_ mainling list.