How do I repackage a .deb for Ubuntu Snappy?

6,353

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.

Share:
6,353

Related videos on Youtube

Nathan Basanese
Author by

Nathan Basanese

“It's not so important to be serious as it is to be serious about the important things. The monkey has an expression of seriousness that would do credit to any great scholar. But the monkey is serious because he itches.” After Nathan dropped out of public school in second grade, he home-schooled himself through high school, and attended four colleges on his way to earning his official degree. Nathan is a self taught high-rent IT monkey and privacy enthusiast. He's worked at Bitcoin startups, at Tesla, WebEx, and as a security advisor to RiskBazaar. Most recently, he won a hackathon, worked as a Systems Engineer/Architect for Cisco WebEx, advises a Bitcoin startup, and currently works on games.bitcoin.com. Nathan also swing dances, reads, writes, and studies social psychology. Ask him about Dunbar's number or firebreaks. You could contact me on https://earn.com/nathan, because we're both serious about the important things

Updated on September 18, 2022

Comments

  • Nathan Basanese
    Nathan Basanese over 1 year

    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.

    • Mateo
      Mateo almost 9 years
      this might be a good thing to look at, haven't tried myself, but might help someone form an answer: github.com/mikix/deb2snap
    • Nathan Basanese
      Nathan Basanese almost 9 years
      // , Actually, that seems like a pretty good answer.
    • dholbach
      dholbach almost 8 years
      deb2snap is not maintained anymore.
  • dholbach
    dholbach almost 8 years
    It's not maintained anymore.
  • Nathan Basanese
    Nathan Basanese almost 8 years
    // , @dholbach, why do you say this? /\
  • Nathan Basanese
    Nathan Basanese almost 8 years
    // , 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.
  • dholbach
    dholbach almost 8 years
    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.
  • Tele
    Tele over 7 years
    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.