19

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.

3
  • 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, 2015 at 18:01
  • // , Actually, that seems like a pretty good answer. Jun 12, 2015 at 18:58
  • 1
    deb2snap is not maintained anymore.
    – dholbach
    Jun 14, 2016 at 8:31

2 Answers 2

4

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.

2
  • // , 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. Jun 14, 2016 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, 2017 at 1:13
-1

I found deb2snap which converts deb packages to snaps.

Haven't tried it.

3
  • 3
    It's not maintained anymore.
    – dholbach
    Jun 10, 2016 at 12:10
  • // , @dholbach, why do you say this? /\ Jun 14, 2016 at 21:43
  • 3
    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, 2016 at 4:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .