Page 1 of 1

Linux Snap Packages

Posted: 02 Jan 2019 20:35
by tjhanson
Hello, all.

I'm new to the forums, but this seemed like the closest match topic-wise.

Currently, there is a 3rd-party snap package ("openttd-casept") of OpenTTD available in the snap store. (Snaps are universal Linux packages) . Some time ago, I emailed the maintainer of the package asking him to update it from v1.7 to v1.8, and told him I'd be willing to take over maintaining it if he didn't want to any more. He updated the package, then said he'd be happy to have me take over.

I figured this would be a good time to investigate making the snap an official one, since the packaging stuff is already in place and I can confirm the snap works excellently. I'd be happy to maintain the stable release of it, as well working on setting up automatic submissions for the edge releases. However, a few other things would need to be in place.

1) An official OpenTTD account on (acts as an "brand account"). (More Info)
2) Register the snap name "openttd" from the OpenTTD account
3) Add me (and anyone else who wants to be involved with snaps) as collaborators to the account.
4) Info on the OpenTTD website to inform people of the snap's availability (likely post this on the download page).

I'm not sure who would need to do what to make this happen, but at that point I'd be able to manage building/submitting the snap package, with the name "openttd" and the publisher name "OpenTTD Developers" (or similar). I'd also be able to look into setting it up so that new GitHub commits trigger automatic builds to the "edge" channel of the snap store.

It would greatly improve the experience for Linux users - many distros currently ship out-of-date versions of OpenTTD, and snap packages eliminate this by allowing OpenTTD to control what is being shipped.

Let me know whatall can be done about moving this forward, whether there is interest, if this is the wrong place for this, any questions, etc. Thanks!

Re: Linux Snap Packages

Posted: 06 Jan 2019 18:38
by orudge
We’ve recently got OpenTTD into the Windows Store, so should maybe look at this too.

The registering official accounts bit I can do. The package generation should ideally be done on our build infrastructure; may need to talk to TrueBrain about that. :)

Re: Linux Snap Packages

Posted: 06 Jan 2019 23:55
by planetmaker
I registered on snap the other day.

I haven't yet done anything further with it as I'm currently awaiting the re-creation of our build services. As far as I can tell: TB is aware of these end-points and we're looking on how to push builds from the CF there.

Re: Linux Snap Packages

Posted: 13 Jan 2019 01:51
by Eddi
note that this might take a while because getting the CF up and making sure we can make release builds to publish on our website, for all supported platforms, takes precedence.
after that probably comes making nightly builds again.
only then it makes sense to look into how to make use of these other distribution methods, preferably with automatted distribution.

Re: Linux Snap Packages

Posted: 14 Jan 2019 17:41
by tjhanson
Good to hear that there is at least some interest in this, even if it isn't until the other build stuff is back in place.

Just want to mention that (as far as I understand) the automated builds for Snap packages occur on the Snapcraft's infrastructure, using a config file placed in the git repo. Just something to keep in mind when that point is reached.

Also figure I should put a link to the existing snap config made by casept:
Might be useful in the future; only a few modifications should be needed to make it compile from source instead of using the tar file.

Thanks for your guys' feedback, and let me know if I can do anything or if you have any questions.

Re: Linux Snap Packages

Posted: 15 Jan 2019 10:24
by planetmaker
You seem to have everything configured so that the snap package is being built nicely. Maybe you can make a pull-request so that it builds directly from the repo?

Re: Linux Snap Packages

Posted: 31 Jan 2019 04:26
by tjhanson
Long wait on this reply; my apologies. Taking a class this semester that is really difficult.

The snap package will need to be configured to build using the code rather than the precompiled binaries. I'll look into it sometime in the near future and see if I can get it to work - if so, I'll figure out how to do a pull request so the file is added (I'm not a developer so it'll take some learning from me).

Thanks for your replies; I'll report back if I get anything working correctly.

Re: Linux Snap Packages

Posted: 31 Jan 2019 10:28
by planetmaker
Of course the snap packs are compiled from source. The idea is to have the snap packs compiled and deployed on the same pipeline during release builds.

Thus the question is to teach the azure-pipelines to use an appropriate image and build the snap pack. And additional to making it available in our usual CDN, also making it available on the flatplack platform. Now that the builds actually work, it "just" two things:
* figuring out how to add an appropriate build node which builds the flatpack
* uploading it to from the build service.

In principle that is all documented when the other build nodes were created... mostly here