Call for testing: snapcraft 3.0


#1

Hello Snapcrafters! The Snapcraft team is delighted to announce that version 3.0 is now available.

Traditionally, the only base that has existed was derived from Ubuntu 16.04 LTS. With the release of Ubuntu 18.04 LTS a new base was created. The current architecture also allows for other bases to exist, such as one derived from Fedora. Building a snap with no base requires developers build on Ubuntu 16.04 LTS; the introduction of bases and build environments in snapcraft 3.0 automatically provision the correct Operating System to build a snap for a specific base.

Extensions provide to a snapcraft.yaml, like plugins do for build lifecycles, a separation of concerns with common building blocks that make a snap operational by also reducing the common declarations required. The implicit property extensions have is that they essentially expand a snapcraft.yaml allowing an author to adopt that.

Making use of bases exposes new features, but also, removes some functionality that has been carrying deprecation in prior releases. Although, if you are not making use of bases, the deprecated functionality will still be available.

Availability

The installation methods below are available for testing, please move back to your regular track/offering when testing is done.

snap

The snap is available in the candidate channel:

$ sudo snap install --candidate --classic snapcraft

Of, if you already have it installed:

$ sudo snap refresh --candidate snapcraft

Full list of changes

The final release notes will be found by going to https://github.com/snapcore/snapcraft/releases/tag/3.0

The issues and features worked on for 3.0 can be seen on the 3.0 launchpad milestone which are reflected in the following change list:

  • snap: add the https transport (#2244)
  • build providers: environment setup for projects (#2225)
  • build providers: provide support to shell in (#2249)
  • build providers: shell in provider if debug is used (#2252)
  • build-providers: add support for --shell-after (#2253)
  • build providers: add support for --shell (#2254)
  • build providers: snapcraft images for multipass (#2258)
  • build providers: allow setting ram and disk size (#2260)
  • build providers: inject the base for classic (#2261)
  • build providers: allow snapcraft channel selection (#2265)
  • build providers: refresh packages on bring up (#2267)
  • build providers: let the implementor pick the image (#2269)
  • reporting: fail gracefully on submit errors (#2271)
  • meta: friendlier message for incorrect app command (#2272)
  • snap: use a newer PyYAML and drop patches (#2274)
  • build providers: use the best CPU configuration (#2273)
  • build providers: use the provider if exported (#2275)
  • snap: move to a newer pysha3 (#2277)
  • spread: move legacy wiki tests to spread (#2276)
  • snap: pull early (#2278)
  • build providers: re-exec as root (#2281)
  • build providers: cleaner start and launch messaging (#2282)
  • build providers: make use of time for multipass stop (#2284)
  • meta: support relocatable prime for path verification (#2287)
  • build providers: use multipass automatically when on darwin (#2288)
  • snap: workaround the dirty tree (#2294)
  • tests: use SNAPCRAFT_PACKAGE_TYPE everywhere (#2295)
  • tests: move most tests to spread and reorder travis.yaml (#2301)
  • snap: improve early base detection logic (#2309)
  • meta: link the icon correctly across filesystems (#2313)
  • project loader: remove remote parts support for bases (#2304)
  • tests: use mocked plugins for list-plugins (#2315)
  • tests: add spread suite for plainbox plugin (#2317)
  • plugins: remove the tar-content plugin when using a base (#2319)
  • plugins: remove the copy plugin when using a base (#2308)
  • meta: add support for the license field (#2318)
  • build providers: use the new snapcraft: remote for multipass (#2293)
  • plugins: remove the python2 and python3 plugin when using a base (#2325)
  • plugins: remove the ament plugin when using a base (#2324)
  • plugins: remove implicit source (#2326)
  • go plugin: support for bases (#2323)
  • pluginhandler: remove legacy plugin loading without project (#2329)
  • godeps plugin: support for bases (#2328)
  • pluginhandler: remove big solidus workaround (#2330)
  • pluginhandler: remove prepare, build and install scriptlets (#2327)
  • waf plugin: support for bases (#2332)
  • meson plugin: add support for bases (#2331)
  • lifecycle: remove lxd support for bases (#2335)
  • tests: remove dependency on snapcraft for integration tests (#2353)
  • schema: enfore string for versions (#2334)
  • lifecycle: switch to multipass by default (#2339)
  • schema: remove the deprecated snap keyword for bases (#2344)
  • tests: use valid snap names in unit tests (#2352)
  • scons plugin: add support for bases (#2357)
  • nodejs plugin: add support for bases (#2356)
  • pluginhandler: library detection instead of injection (#2337)
  • dotnet plugin: add support for bases (#2358)
  • schema: remove deprecated plugin pull and build-properties (#2361)
  • plainbox-provider plugin: add support for bases (#2360)
  • multipass: change default CPU value (#2365)
  • python plugin: add support for bases (#2362)
  • maven plugin: add support for bases (#2364)
  • gradle plugin: add support for bases (#2372)
  • ant plugin: add support for bases (#2370)
  • jdk plugin: remove jdk (#2376)
  • build providers: destroy on create failures (#2374)
  • cli: remove disable-parallel-build and geoip toggles (#2377)
  • yaml loading: properly handle unhashable types (#2247)
  • pluginhandler: stop using alias for snapcraftctl (#2251)
  • local source: don’t include .snapcraft directory (#2256)
  • meta: take charge of environment used to run commands (#2257)
  • cli: show trace if no tty (#2259)
  • catkin plugin: use SnapcraftException (#2255)
  • project_loader: add preflight check (#2250)
  • project: catch parent YAML exceptions (#2263)
  • tests: disable integration tests using snaps in bionic container (#2266)
  • catkin, rosdep: stop using FileNotFoundErrors (#2270)
  • sanity checks: allow snap/local dir (#2268)
  • sanity checks: run properly on build VMs (#2279)
  • snapcraft snap: refactor override-build into a script (#2283)
  • config: change default outdated action to clean (#2286)
  • snapcraft snap: vendor legacy snapcraft (#2285)
  • schema: add “legacy” adapter type (#2262)
  • sources: properly handle pull failures (#2292)
  • packaging: pin click to v6 in requirements.txt (#2298)
  • meta: put environment into runner instead of app wrapper (#2291)
  • part grammar processor: lazily capture attributes from plugin (#2296)
  • pluginhandler: update build should overwrite organize (#2290)
  • requirements.txt: stop using pymacaroons-pynacl (#2302)
  • project_loader: add build-environment part property (#2322)
  • catkin, catkin-tools plugins: add support for bases (#2333)
  • schema, meta: support layout (#2338)
  • schema, meta: support app command-chain (#2341)
  • schema, meta: add “full” app adapter (#2343)
  • ruby plugin: add support for base (#2346)
  • extensions: support adding root properties (#2347)
  • extensions: remove root extensions (#2348)
  • extensions: use extension docstring (#2349)
  • extensions: parse all declared extensions before applying (#2350)
  • extensions: cleanup and generic tests (#2355)
  • {make,cmake,autotools} plugin: add support for bases (#2363)
  • qmake plugin: add support for bases (#2366)
  • {kbuild,kernel} plugin: add support for bases (#2368)
  • tests: add spread test exercising multipass build VMs (#2367)
  • plugins: remove jhbuild (#2371)
  • rust plugin: add support for bases (#2373)
  • sanity checks: verify that command-chain is not used with legacy adapter (#2375)
  • cli: use the better snapcraft.io/account URL (#2280)
  • storeapi: use structured data for the conflicted current value (#2316)
  • rust plugin: do not ignore the cross compile target (#2264)
  • nodejs plugin: add support for ppc64el and s390x (#2310) (#2310)
  • nodejs plugin: update to the latest 8.x LTS version (#2342)
  • yaml: replace yaml.safe_load() with CSafeLoader (#2218)

How to package OpenJDK 11 / OpenJFX 11 desktop application?
Theme of Qt5 app broken in 18.10
#2
maciek@galeon:work/canonical/graphics-debug-tools (git)-[master]  snapcraft -d             
DEPRECATED: The 'install' keyword has been replaced by 'override-build'
See http://snapcraft.io/docs/deprecation-notices/dn9 for more information.

But http://snapcraft.io/docs/deprecation-notices/dn9 is a 404


#3

With a little trouble caused by https://github.com/CanonicalLtd/multipass/issues/456 and setting SNAPCRAFT_BUILD_ENVIRONMENT=multipass I was able to build a snap of graphics-debug-tools-bboozzoo on Arch.

Just for the record, multipass wasn’t used automatically, which I assumed it would. I had to set SNAPCRAFT_BUILD_ENVIRONMENT=multipass to make it work. The docs on docs.snapcraft.io do not appear to mention multipass anywhere.


#4

The documentation site has been replaced by a new system, refer https://github.com/canonical-docs/snappy-docs/tree/master/deprecation-notices for the deprecation notices.


#5

Yes, it is automatic, if you are using bases, we do not want to break everyone’s CI from one day to the other.


#6

This is unfortunate, I did ask for the redirects in one of the checkpoint posts.
@Lukewh was setting under your jurisdiction


#7

I’ll look into it and get back to you.


#8

Working fine for my snaps


#9

I wanted to try this to use base 18 but it appears the commands have changed? There is no longer a cleanbuild command? And SNAPCRAFT_BUILD_ENVIRONMENT no longer accepts lxd?


#10

@sergiusens Can you confirm that this release will not be SRUed in to Bionic? I need to make sure we can still build snaps using wiki parts until a suitable replacement process is found.


#11

snapcraft should run apt update before installing dependencies. Otherwise if fails to run from provided Docker images.


#12

I can confirm this is the case; we might be doing one minor SRU of our legacy branch onto the archives and that will be it.


#13

Thanks for the feedback, this release will however not be freshened into bespoke docker images yet (it is a different set that needs creating depending on the base being targeted).


#14

I’m getting this error:

Failed to generate snap metadata: The specified command 'desktop-launch' defined in the app 'picard' does not exist or is not executable.
Ensure that 'desktop-launch' is relative to the prime directory.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

When trying to build the picard 2.0.x snap:

With snapcraft 3.0. If I try to snapcraft --debug and find the desktop-launch executable:

$ sudo snapcraft-picard # find . -iname desktop-launch

It gives me nothing. It seems this same problem: https://bugs.launchpad.net/snapcraft/+bug/1800057


#15

This should be solved in edge where an appropriate error is raised when using wiki parts with bases.


#16

And here are the actual release notes https://github.com/snapcore/snapcraft/releases/tag/3.0


#17

I have just moved 3.0.1 to candidate, folks with existing projects built with 3.0 from candidate will need to run snapcraft clean when using this one. Here’s the list of fixes associated with this point release:

  • cli: hide progress bar for dumb terminals (#2369)
  • build providers: checks for when multipass is missing (#2354)
  • meta: add assumes if using “full” app adapter (#2379)
  • project_loader: raise error if part in after is undefined (#2386)
  • project_loader: do not install base if already installed (#2384)
  • cli: consolidate re-execution (#2385)
  • project: early snapcraft.yaml validation (#2388)
  • build providers: fix osx non base and injection (#2394)
  • project_loader: add git to build-packages for version: git (#2403)
  • cli: handle yaml errors for cleanbuild (#2404)
  • multipass: avoid stdin where possible (#2408)
  • build providers: preset the timezone (#2407)
  • python plugin: process deps before and separately from setup.py (#2409)
  • yaml_utils: allow unicode while encoding (#2414)
  • cli: snapcraft init with a base (#2411)
  • schema: add support for title (#2412)

#18

Do you plan to update Docker images at https://hub.docker.com/r/snapcore/snapcraft/tags/ ? Or setup CI job to do this automatically? I’d like to build snaps without installing a lot of things on my system and without LXD.


#19

The features added here are mostly related to bases which have many implications when using docker, this release is snap only as well.

We will look into how to cope with a multi base world and different build environments targeting those bases in a close future.


#20

I’d like to build snaps without installing a lot of things on my system and without LXD.

Hi @abitrolly. Prior to snapcraft 3.0 and the base keyword, snapcraft would indeed install packages on your system. We didn’t like that either, so in snapcraft 3.0 if you use a base (base: core18), snapcraft will use multipass to build your snap. Your system will no longer be polluted by build packages and intermediate build state.