Week 48 of 2017 in snapcraft

image

Welcome to the weekly development notes for snapcraft!

Events

Code-In

The team wants to say thank you to all the Code-In participants so far, we have seen a plethora of contributions ranging from:

  • fixing bugs in snapcraft picked up from the bug tracker.
  • adding support for type hinting to some python modules.
  • refactoring snapcraft code for better maintainability.
  • proof reading tutorials.
  • translating tutorials and videos to different languages.
  • creating snaps out of python, node and ruby projects.

Release 2.37

The milestone for 2.37 has been closed and the release notes are in progress. The user oriented release notes will start showing up in the following days.

In the meantime, check out the work that went into this release over at the milestone page.

Some things were dropped from the milestone such as the architectures rework which would provide build hints for architectures as the team decided the design needed one more round of brainstorming in order to present the feature in a clear manner to its users.

That said, this release is not without its excitement, when creating snaps with classic confinement, snapcraft will do the right thing with regards to setting rpaths and the linker for prebuilt binaries (as long as building on a matching target base), allowing snapcrafters to get rid of the need to export LD_LIBARY_PATH which has its drawbacks when calling other binaries from the host.

Also, a lot of work has gone into UI polish, running snapcraft help is now sane and all the error messages have been consolidated with a pattern of “what went wrong, why it went wrong and how to fix”. We really appreciate all of @mpt’s input for the team to get there.

Another feature we want to mention is a great leap forward for control of snaps in CI: the new snapcraft export-login command, along with the login --with option. Want to upload snaps just to the edge channel from CI? You can now export a login that can do only that, and nothing more. Want to create a CI system that puts your edge snap through a gauntlet of tests, and promotes it to beta if they pass? You can export a login that can do only that. Check snapcraft export-login --help for more details.

One more cool feature comes from @matiasb (thank you!), and that’s the addition of support for binary metadata (specifically icons right now) into snapcraft push-metadata.

Release 2.38

The 2.38 milestone has been planned and is good to go.

It will include the initial work on allowing to dump binaries from other bases to work correctly on the 16.04 base/core snap most developers target.

Also, long awaited, the ground works to allow for other sources of information to be consumed is going to get started in 2.38 which would allow adding handlers for consuming information from sources like appstream XMLs, setup.py, and similar.

On the cross compilation front, the on grammar is going to be expanded to also use from to clearly define behavior across different architectures when cross compiling.

Thank you, this is looking much better, but I think it can go further:

$ snapcraft help
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...

  Snapcraft is a delightful packaging tool.

Options:
  --version    Show the version and exit.
  -d, --debug
  --help       Show this message and exit.

Commands:
  build            Build artifacts defined for a part.
  clean            Remove content - cleans downloads, builds or...
  cleanbuild       Create a snap using a clean environment...
  close            Close <channel> for <snap-name>.
  create-key       Create a key to sign assertions.
  define           Shows the definition for the cloud part.
  enable-ci        Enable continuous-integration systems to...
  export-login     Save login configuration for a store account...
  gated            Get the list of snaps and revisions gating a...
  help             Obtain help for a certain plugin or topic.
  init             Initialize a snapcraft project.
  list-keys        List the keys available to sign assertions.
  list-plugins     List the available plugins that handle...
  list-registered  List snap names registered or shared with...
  list-revisions   Get the history on the store for <snap-name>.
  login            Login with your Ubuntu One e-mail address and...
  logout           Clear session credentials.
  pack             Create a snap from a directory holding a...
  prime            Final copy and preparation for the snap.
  pull             Download or retrieve artifacts defined for a...
  push             Push <snap-file> to the store.
  push-metadata    Push metadata from <snap-file> to the store.
  register         Register <snap-name> with the store.
  register-key     Register a key with the store to sign...
  release          Release <snap-name> on <revision> to the...
  search           Searches the remote parts cache for matching...
  sign-build       Sign a built snap file and assert it using...
  snap             Create a snap.
  stage            Stage the part's built artifacts into the...
  status           Get the status on the store for <snap-name>.
  update           Updates the parts listing from the cloud.
  validate         Validate a gated snap.
  whoami           Returns your login information relevant to...

For more help, use:
    snapcraft help topics
    snapcraft help <topic>
    snapcraft help <plugin-name>
$ snapcraft help init
There is no help topic or plugin 'init'. Try:

For topics:

    snapcraft help topics

For valid plugins:

    snapcraft list-plugins

I expect it to give me the same as snapcraft init --help (likewise for all of the commands)

You mean, running snapcraft help init being on par with snapcraft init --help? That is doable if that is the case

Yes exactly, snapcraft help foo should behave the same as snapcraft foo --help