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  
   - command: path/to/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.

  • 4
    this might be a good thing to look at, haven't tried myself, but might help someone form an answer: github.com/mikix/deb2snap – Mateo Jun 12 '15 at 18:01
  • // , Actually, that seems like a pretty good answer. – Nathan Basanese Jun 12 '15 at 18:58
  • 1
    deb2snap is not maintained anymore. – dholbach Jun 14 '16 at 8:31

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.

| improve this answer | |
  • // , It wasn't obvious to me. This attempt at an answer isn't too comprehensive, but I may be able to piece something together from the contents of the pages at those links. I no longer work on systems that use Ubuntu in production or development environments, but I am still somewhat curious. – Nathan Basanese Jun 14 '16 at 21:44
  • 1
    This is not a good solution, debian packages are not only zipped files, they have scripts like preinst, postinst,prerm, porstrm...so on. They won't work without that. – Tele Jan 13 '17 at 1:13

I found deb2snap which converts deb packages to snaps.

Haven't tried it.

| improve this answer | |
  • 2
    It's not maintained anymore. – dholbach Jun 10 '16 at 12:10
  • // , @dholbach, why do you say this? /\ – Nathan Basanese Jun 14 '16 at 21:43
  • 2
    Because Michael Terry is a colleague of mine and he's not working on deb2snap any more. The last commit was a year ago and snapd/snapcraft have moved on since then. – dholbach Jun 15 '16 at 4:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.