attic-labs / noms

The versioned, forkable, syncable database
Apache License 2.0
7.45k stars 267 forks source link

Add support for building snaps #3844

Closed ghost closed 3 months ago

ghost commented 5 years ago

I've opened this PR to request support for building a snap package of noms.

To give you a bit more context, snaps are cross-distro Linux software packages, supported on LTS and non-LTS Ubuntus, as well as Debian, Manjaro, Fedora, OpenSUSE, Arch, and many others distributions. Snaps come with automatic updates, which could be quite useful for applications with focus on security and privacy, like noms. Also, we have an audience of millions of users in the Snap Store (snapcraft.io/store), so this could give extra exposure to your project.

Snaps can be built locally using the snapcraft cli tool, build/CI systems (e.g. Travis) or online via build.snapcraft.io, which is a free service for snap users. Here are the steps to get a snap built locally with snapcraft:

  1. Install snapcraft tool and checkout the forked repo that has the snapcraft.yaml file for building the snap.

snap install snapcraft --classic --beta git clone https://github.com/igorljubuncic/noms.git cd noms git checkout add-snapcraft snapcraft

This command will generate a .snap file, something like noms_1.0_amd64.snap.

  1. Test the snap.

Lego can be installed and tested locally with:

snap install noms_1.0_amd64.snap --dangerous

The --dangerous flag is necessary because the snap isn't in the store yet, and isn't signed.

Once installed, the noms command can be executed, e.g.: snap run noms

  1. Register snap name and upload snap to the store.

snapcraft login snapcraft register

snapcraft push noms_1.0_amd64.snap --release edge

  1. Test the version available in the store

You can do this on a clean machine (install from store and run). No need for the --dangerous flag anymore.

snap install noms --edge

Once (and if) you are happy, you can push a stable release to the stable channel, update the store page, and promote the application online. We can help there, and we'd be glad to feature your application in our store. We can also help with any questions or issues you may have.

In parallel, I am going to have a look at the CLA.

Thank you.