Ubuntu – How to repackage a .deb for Ubuntu Snappy

debpackagingsnapubuntu-core

I want to convert some Ubuntu software in .deb, specifically guake, to packages for Ubuntu Snappy*.

According to the documentation on the Ubuntu dev tools,

All metadata lives in meta/package.yaml. The details of that file are documented in the snappy developer documentation, but in short, it's super simple and you can get away with something as straightforward as:

name: pkgname  
version: version-string  
apps:  
  binary:  
   - command: path/to/binary  
  another-binary  
   - command: path/to/another-binary  

… your package is called "pkgname" … version "version-string" and … binaries, called pkgname/name and pkgname/another.

I googled it myself, and have found little on the subject of such conversion.

As a build engineer, by trade, and an Ubuntu enthusiast by love, I may be in a position to benefit from learning this sort of thing.

How does a .deb turn into snap*?

* Apparently, the format for packages for Ubuntu Snappy is called the "snap" format.

Best Answer

Take a look at https://github.com/ubuntu/snappy-playpen/blob/fd5d4a3a1e3f0acc13370adbf98c9a3481d1328a/leafpad/snapcraft.yaml for a simple example.

The relevant part of snapcraft.yaml here is: parts: leafpad: plugin: nil stage-packages: [leafpad]

Here you define a part called leafpad, for which nothing needs to be done (nil plugin), but the contents of the Ubuntu package leafpad to be staged. That's it.

https://developer.ubuntu.com/snappy/build-apps/ obviously has more information on that.