### Ubuntu Snappy packages

Ubuntu `.snap` packages are basically container-ish `.deb` packages, meant for parallel installation, incremental updates, or something.

 -
 -
 -

The outer shell of `.snap` packages is still a classic Debian 2.0 binary `ar`chive.

    debian-binary      # "2.0\n"
    _click-binary      # "0.4\n"
    control.tar.gz
    data.tar.gz

There's a click-package thingy, and an extra control file though. But the standard Debian headers are present:

     new debian package, version 2.0.
     size 32870 bytes: control archive=1672 bytes.
         188 bytes,     7 lines      control
        2722 bytes,    58 lines      hashes.yaml
         763 bytes,    34 lines      manifest
         118 bytes,     4 lines   *  preinst
     Package: hello-world
     Version: 1.0.14
     Click-Version: 0.4
     Architecture: all
     Maintainer: Snappy Developers
     Installed-Size: 56
     Description: Hello world example

The `hashes.yaml` seems to be the new md5sums. It relists filenames with a sha512 each and fs attributes:

   archive-sha512:
   files:
   - name: bin
     mode: drwxrwxr-x
   - name: bin/echo
     size: 31
     sha512:
     mode: frwxrwxr-x

The `manifest` is where it gets seriously redundant. It's a JSON blob, whose main purpose seems the `"hooks": {` dict to associate binaries with apparmor profiles.

The main difference lies in how packaged files are arranged into the `data.tar.gz` archive:

    drwxrwxr-x root/root         0 2015-04-27 21:42 ./bin
    -rwxrwxr-x root/root        31 2015-04-27 21:42
    -rwxrwxr-x root/root        27 2015-04-27 21:42
    -rwxrwxr-x root/root       270 2015-04-27 21:42
    -rwxrwxr-x root/root       445 2015-04-27 21:42
    -rwxrwxr-x root/root       710 2015-04-27 21:42
    drwxrwxr-x root/root         0 2015-04-27 21:42 ./meta
    -rw-r--r-- root/root       111 2015-04-27 21:42
    -rw-r--r-- root/root       111 2015-04-27 21:42
    -rw-r--r-- root/root       111 2015-04-27 21:42
    -rw-rw-r-- root/root     38406 2015-04-27 21:42
    -rw-rw-r-- root/root       276 2015-04-27 21:42
    -rw-rw-r-- root/root        58 2015-04-27 21:42
    -rw-r--r-- root/root       111 2015-04-27 21:42
    -rw-r--r-- root/root       111 2015-04-27 21:42

Basically application files should use shorter local paths. A snappy installation will unpack them into alongside other releases. A symlink will be point there. (On installation or invocation?)

Packages are furthermore constrained to writing to non-XDG-compliant config stores in

Interesting for packaging is just crafting the `meta/package.yaml` descriptor. It basically just duplicates Debian package information, and is a NIH syndrome variant of AppStream. It's primary purpose is listing executables:

    name: mypkg
    version: 1.2.3
    binaries:
      - name: mypkg
        exec:


### Implement in XPM ?

Not sure if that makes sense as target. It's possibly too early. Doesn't look very well designed.