Snapcraft: arch-specifc snaps on your development machine?

Michael Nelson michael.nelson at canonical.com
Mon Sep 7 05:51:05 UTC 2015


Hi all,

I'm trying to find a way to create snaps on my development machine
(trusty/amd64) for a specific architecture (armhf/rPi2), but so far without
success.

This would be useful, at least to me, as I can then create snaps without
the physical hardware present (and without needing to switch SD cards to a
non-core image for building the snap etc.), leaving my specific hardware
headless on the network ready to ssh the built snap for testing.

The approach I tried most recently was to create an armhf chroot using
qemu-debootstrap. I have a script which creates the chroot, sets it up with
trunk of snapcraft, then tries to assemble the snapcraft wget-deb example
[1], but even though the example is not a golang example, it ends while
"snapping wget" with a golang runtime error [2] which seems to be a
qemu-with-golang bug [3].

Chatting with Christopher Halse Rogers, it sounds like using a normal
debootstrap environment with cross-compiling may be a better alternative. I
just tried such an environment to assemble the snap, but it turns out that
the ubuntu snapcraft plugin is using dget which doesn't cope with the
arch-specific sources.list entries [4].

So, before I spend too much time on things I'm not very familiar with, is
there something I could do differently above, and/or are there already
plans for snapcraft to make creating snaps on your development machine
easier (and what are they)?

Thanks either way!
-Michael

[1]
https://github.com/absoludity/snapcraft-test/blob/master/create-snapcraft-armhf-chroot
- thanks Ryan for the base of this in the RPi2 image build script
[2] http://paste.ubuntu.com/12304815/
[3] https://groups.google.com/forum/#!topic/golang-nuts/MqKTX_XIOKE
[4] http://paste.ubuntu.com/12305079/ - according to Christopher, this
could be using apt-get download? (but perhaps there's a reason for dget).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20150907/1257296a/attachment.html>


More information about the snappy-app-devel mailing list