Build VM status summary

I wrote up a quick summary/walkthrough with some short videos on http://blog.sergiusens.org/posts/snapcraft-build-environments/ for those wanting a quick summary of the status of Status Tracking for Build VM

1 Like

have you thought about documenting which snapcraft version/channel we need? The statement that “you just need to run snapcraft to get a resulting snap. Given that we set the base to core18 a virtual machine will be setup” is wrong:

$ snapcraft
Installing build dependencies: bzip2-doc cmake cmake-data docbook-xml docbook-xsl fonts-font-awesome gir1.2-gexiv2-0.10 gir1.2-json-1.0 gir1.2-osmgpsmap-1.0 gir1.2-poppler-0.18 gir1.2-rsvg-2.0 gobject-introspection libaa1-dev libamd2 libart-2.0-dev libblas-dev libbtf1 libbz2-dev libcamd2 libccolamd2 libcdt5 libcgraph6 libcholmod3 libcups2-dev libcupsfilters-dev libcupsimage2-dev libcurl4-gnutls-dev libcxsparse3 libdbus-glib-1-dev libexif-dev libexif-doc libexiv2-dev libflickcurl-dev libflickcurl0 libgexiv2-dev libgirepository1.0-dev libglade2-0 libgpm-dev libgraphblas1 libgraphicsmagick-q16-3 libgraphicsmagick1-dev libgraphviz-dev libgs-dev libgtk2.0-dev libgts-0.7-5 libgts-bin libgudev-1.0-dev libgvc6 libgvc6-plugins-gtk libgvpr2 libheif-dev libheif1 libidn11-dev libijs-dev libijs-doc libilmbase-dev libjbig-dev libjbig2dec0-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjs-modernizr libjson-glib-dev libjsoncpp1 libklu1 liblab-gamut1 liblapack-dev liblcms2-dev libldl2 liblensfun-data-v1 liblensfun-dev liblensfun1 liblzma-dev libmetis5 libmng-dev libncurses5-dev libopenexr-dev libopenjp2-7-dev libosmgpsmap-1.0-1 libosmgpsmap-1.0-dev libpaper-dev libpathplan4 libpoppler-dev libpoppler-glib-dev libpugixml-dev libpugixml1v5 libraptor2-dev libraw-dev librbio2 librhash0 librsvg2-dev libslang2-dev libsoup2.4-dev libspiro-dev libspiro0 libspqr2 libsqlite3-dev libsuitesparse-dev libtiff-dev libtiff5-dev libtiffxx5 libtinfo-dev libumfpack5 libuv1 libwebp-dev libwmf-dev libxdot4 libxml2-dev libxml2-utils libxmu-dev libxmu-headers libxpm-dev libxslt1-dev libxt-dev libyajl-dev python-cairo-dev python-glade2 python-gobject-2-dev python-gtk2-dev python-gtk2-doc raptor2-utils sgml-data sphinx-rtd-theme-common xml-core xsltproc
[sudo] password for dllewellyn:

Aborted!

I do have base: core18 in my snapcraft.yaml.

$ snapcraft version
snapcraft, version 2.42.1

I am showing rather unreleased code :slight_smile: Maybe I should have written, all you _will_need to do.

You need to be on edge/bases, set SNAPCRAFT_BUILD_ENVIRONMENT=qemu and install (for now) qemu-system-x86 and cloud-utils.

1 Like

excellent, thanks, I’ll give it a gander :slight_smile:

Feel free to reach out on irc or telegram for an expedited getting started, I do acknowledge that it might be to early if you want click and run :slight_smile:

the snapcraft:edge/bases snap is missing cloud-localds which is in the apt package cloud-image-utils. Installing via apt to my host gets past the error.

building gimp locally using the edge/bases snapcraft channel with SNAPCRAFT_BUILD_ENVIRONMENT=qemu in the environment I successfully finish the build up to the point where it tries to assemble the final snap from prime/. Here it fails complaining that the .desktop file I’ve told it to use for gimp isn’t where I said it would be. It is wrong:

Priming gimp 
Priming scripts 
Failed to generate snap metadata: The path 'prime/usr/share/applications/gimp.desktop' set for 'desktop' in 'gimp' does not exist. Make sure that the files are in the `prime` directory.
An error occurred. Dropping into a debug shell.
Last login: Wed Aug 22 23:17:46 2018 from 10.0.2.2
gimp # ls prime/usr/share/applications/gimp.desktop
prime/usr/share/applications/gimp.desktop

As you can see I execute an ls in the debug shell (the paste above is from when I ran a second time with --debug to diagnose the problem after encountering it) with the path it says isn’t present. The ls output clearly says that the file is correctly in the location snapcraft says it is looking for it.

Thanks, this is indeed a bug, how to fix it depends on how that desktop file entry is declared as it seems that path is hardcoded somewhere.

I’ve declared it with the following:

apps:
  gimp:
    command: desktop-launch $SNAP/usr/bin/gimp
    desktop: usr/share/applications/gimp.desktop
    plugs: [...]

In previous builds that correctly finds the desktop file in the prime directory which is installed there by my build process. With the qemu build, though, it doesn’t find it at all.

great, so it is a bug in our code base most likely, I’ll have to look through it and make sure the abspath for prime is used.
It does not find it in the qemu scenario (nor multipass, it is somewhat enabled for this mode too, just a little slower) because parts, stage and prime are no longer collocated with your source.

1 Like