Skip to content

Snapcraft 2.34 is here

Compare
Choose a tag to compare
@sergiusens sergiusens released this 19 Sep 20:42
· 3483 commits to main since this release
2.34

Hello snapcrafters!

We are pleased to announce the release of snapcraft 2.34:

  • Available on all supported Ubuntu releases (Ubuntu 16.04 LTS and 17.04), and the development release (Artful Aardvark).
  • A windows MSI preview installer for snapcraft on Windows.
  • brew installabled on OS X by running brew install snapcraft (store interaction and cleanbuild are supported).
  • pip installable from PyPI (with caveats when setting up apt bindings) by running pip install snapcraft.
  • View the full list of merged PRs.
  • Specific bug fixes can be seen on the Launchpad milestone.

Contributions

This release saw some excellent contributions from outside the snapcraft core team, and we want to give a shout out to those folks. A team thank you to:

New in this release

Core

types

A new snap type was added: base, this opens the door to start producing base snaps.

Containers

Each build instance created now correctly works out isolated temporary folder locations for those users running many builds in parallel. There is also better detection of existing or missing lxd installations so first time users can better understand any problems with the host they are currently trying to use.

When running snapcraft from the snap, snapcraft now injects itself into the actual snap instead of apt installing the deb (for the case of today of only supporting one base), providing parity with the local environment at hand.

Additionally, when cleaning projects making use of persistent project containers, snapcraft destroys the container that was assigned for this work as well.

To enable the persistent build containers feature the SNAPCRAFT_CONTAINER_BUILDS environment variable needs to be set.

build-snaps

They work in a similar fashion to build-packages, build-snaps takes leverage of snaps in the store to create your snaps. This release exposes the feature through

build-packages

While build-packages have been around for a while, it is only now that they have gained the support for advanced grammar, just as what is provided for stage-packages.
Support for grammar-powered build-packages, both at the part-level and global are here to stay.

source caching

Logic has been added to cache source entries that provide a source-checksum entry for parts, this would behave like:

Cleanup

Release detection

Snapcraft used the deprecated linux_distribution method from the platform module, it now correctly handles the host it is running on through parsing of /etc/os-release.

Tour removal

The tour has been sunset in favour of the tutorial which can be currently found here.

Errors

Many new exceptions have been created to handle the many potential errors that can occur when running snapcraft. In addition to that, proper snapcraft generated and understood errors will produce a nice user friendly error message while situations that were not thought of in the code base will provide proper tracebacks. This will provide a faster turnaround time for fixes and a more apparent situation of wrongness to the users of snapcraft. The errors codes for these two situations are also different, being 1for the former and2` for the latter.

Plugins

nodejs

Catching up to yarn's latest developments, the snapcraft plugin now supports the latest release of yarn.

This plugin has also gained recording capabilities by means of running snapcraft with the environment variable SNAPCRAFT_BUILD_INFO set.

jhbuild

This is a new plugin which uses jhbuild to build mostly gnome projects

python

The python plugin now records the assets it used to build, to get a glimpse of this feature you need to run snapcraft with the environment variable SNAPCRAFT_BUILD_INFO set.

catkin

Support for multiple dependency types was added. The catkin plugin now supports a new API which raises an exception if the dependency type is anything other than apt. This is paving the way for support of pip dependencies coming from rosdep.

The plugin now properly defaults to creating a release build, to enable a debug build, edit the part as follows:

kbuild

This plugin has gained the crosscompiling logic that existed for the kernel plugin, unifying the code bases more with the side effect of having cross compilation support for kbuild

Support for Makefiles without install targets is now also of declarative nature, to set it as such here is an example:

ant & gradle

Support for authenticated proxies has been added, this should be transparent to the snapcraft author through means of consumption of the already existing environment variables for proxy management (http_proxy, https_proxy, ...).

Here's an example recording:

Final notes

To get the source for this release, check it out on github.

A great place to collaborate and discuss features, bugs and ideas on snapcraft are the forums. Please also feel free to file a bug.

Happy snapcrafting!
-- Sergio and the team