Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snapcraft configuration to build snaps #612

Merged
merged 1 commit into from May 11, 2017

Conversation

Projects
None yet
5 participants
@popey
Copy link
Contributor

commented May 1, 2017

Hi! This pull request adds preliminary support for building snaps. This provides a single package which can be easily installed and updated on many common Linux distributions.

Snaps are a cross distro packaging format designed with simplicity and security in mind. I have successfully build both stable (0.1.1c) and edge (github master) snaps of openspades and uploaded them to the snap store. Users of snap enabled Linux systems can install openspades 0.1.1c with one command, and it will appear on the desktop menu, or be launch-able from a terminal:-

snap install openspades

To install the current (as of last night) github master:-

snap install openspades --edge

I have tested this snap on 32-bit and 64-bit installs of Linux. I tested on Fedora 25, Debian 9, Elementary OS Loki, Ubuntu 16.04 and OpenSUSE Tumbleweed.

To test this PR on an up to date Ubuntu 16.04 system:-

snap install snapcraft --edge
git clone https://github.com/popey/openspades.git
cd openspades
git checkout add-snapcraft
snapcraft
snap install *.snap

(the --dangerous is because you're installing an unsigned package, not from the store)

You should then find openspades on the menu and runnable from the command line as openspades.

Ideally if/when this lands in master, you could hook up your build infrastructure using snapcraft to spit out a snap on each commit, and land that in the edge channel in the store. Adventurous users would then get automatic updates of openspades a few minutes/hours after each time you push a new change to master. If we get to that stage, then I can hand over the keys to the openspades builds in the store to you so you manage it rather than me. Happy to continue managing it in the meantime though. :)

I had to disable EAX by default as it crashes OpenAL on 32-bit Linux. Players can re-enable that of course if needed.

@yvt

This comment has been minimized.

Copy link
Owner

commented May 3, 2017

Sounds cool. Do I have to do something when publishing a new version, or is it automated?

@popey

This comment has been minimized.

Copy link
Contributor Author

commented May 3, 2017

It's mostly automated, yes. You have a few options in order of preference, once this branch lands:-

  1. Go to build.snapcraft.io and hook it up to your github master branch. It will build on every commit directly into the store. Anyone using the edge channel will get your latest and greatest within minutes.

  2. Use travis or landscape to build automatically as per our documentation at https://snapcraft.io/docs/build-snaps/ci-integration.

The net result of those two is the same, auto landing your commits to edge. The final option is a last resort.

  1. build manually using snapcraft on an Ubuntu 16.04 system.

In any case, once you have a build in the store which you want to release, you can use snapcraft (e.g. snapcraft release snap-name revision channel) to release it (or the web UI dashboard in the store) to the stable channel.

However, currently I'm the registrant of the "openspades" name under my store account. Once you're ready and have a store account (at http://dashboard.snapcraft.io/) I can ask the store admins to hand it over to you for future updates.

@yvt yvt merged commit 29f6cee into yvt:master May 11, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@popey

This comment has been minimized.

Copy link
Contributor Author

commented May 26, 2017

@yvt if you sign up to the store, I can get the snap handed over to you, so further updates can be published by you. Let me know once you have a store account and I'll hand it over. :)

@yvt

This comment has been minimized.

Copy link
Owner

commented Oct 5, 2017

@popey Sorry for late reply. I just signed up to http://dashboard.snapcraft.io/ with the email address i@yvt.jp.

@NotAFile

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2017

it might also be worth looking into "flatpak", the main snap competitor. Flatpak is supported by the GNOME folks and more geared towards Desktops, while Snap seems to be geared more towards servers

@popey

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2017

@yvt Awesome! I'll get our store team to transfer ownership of the snap to you.

@NotAFile It's a popular misconception that snaps are geared for servers. It's not true. Snaps are designed to be universal packages. We have a ton of desktop applications snapped (more, and more diverse than there are flatpaks in flathub in fact)

@theunknownxy

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2017

@NotAFile I actually tried flatpak on openspades a while ago. I just pushed the flatpak-builder config into a github repository, in case you want to try it: https://github.com/theunknownxy/openspades-flatpak
Feel free to ask if you have any questions about it(Although a new issue might be a better place than this pull request)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.