Linux Snap Packages

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
tjhanson
Engineer
Engineer
Posts: 3
Joined: 02 Jan 2019 20:00
Location: North Dakota
Contact:

Linux Snap Packages

Post 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 Snapcraft.io (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!
~Thor Hanson
User avatar
orudge
Administrator
Administrator
Posts: 25134
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Linux Snap Packages

Post 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. :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Linux Snap Packages

Post by planetmaker »

I registered OpenTTD.org 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.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Linux Snap Packages

Post 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.
tjhanson
Engineer
Engineer
Posts: 3
Joined: 02 Jan 2019 20:00
Location: North Dakota
Contact:

Re: Linux Snap Packages

Post 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:
https://github.com/casept/snap-openttd
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.
~Thor Hanson
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Linux Snap Packages

Post 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?
tjhanson
Engineer
Engineer
Posts: 3
Joined: 02 Jan 2019 20:00
Location: North Dakota
Contact:

Re: Linux Snap Packages

Post 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.
~Thor Hanson
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Linux Snap Packages

Post 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 https://flathub.org/home from the build service.

In principle that is all documented when the other build nodes were created... mostly here https://github.com/OpenTTD/CompileFarm
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests