Re: [cocci] Flatpak package for Coccinelle

Jan Tojnar
2024-11-12T00:27:19Z

On Tue, 2024-11-05 at 15:34 +0100, Victor Gambier wrote:
> Hi everyone,
>
> As Julia mentioned above, I started working on Coccinelle earlier
> this
> fall.

Hi Victor, love to see more people working on Coccinelle.

> I'd love to help package Coccinelle into Flatpak! I've read the
> discussion above, but some time has passed since then and things
> might
> have changed, so, in short: how can I help? Are you still interested?
> What questions remain?

Unfortunately, I will not be able to drive this forward in the near
future. Feel free to take over.

The primary thing that was missing is the decision on the degree of
integration we want to have, i.e. points (3) through (5) in the opening
message.

Depending on that, we will want to
- merge https://github.com/coccinelle/coccinelle/pull/370
- update the release script to bump the version in the metainfo file
- add CI for building the flatpak image
- push stable version to Flathub – based on the previous PR
https://github.com/flathub/flathub/pull/5354

> > The procedure consists of updating the version and release date in
> > the
> > metainfo file (the following line):
> >
> >      <release version="1.2" date="2024-03-28" type="stable"/>
> >
> > I would say it is easy to forget and pretty amenable to automation.
> (3) I can update the release script to update the version of the
> AppStream metadata, that does seem like the best solution.

👍

> > (4) is already implemented in
> > https://github.com/coccinelle/coccinelle/pull/370
> (4) If I understand correctly, you've already written the manifest,
> and
> this is something we only have to do once, right?

Yes, the manifest is in the PR. It might need some minor changes in the
future, e.g. bumping the runtime version once a year:
https://freedesktop-sdk.gitlab.io/documentation/updating-sdk/release-notes/
But otherwise it should be pretty stable, as there are no other
dependencies tracked in Flatpak other than the OCaml runtime extension.

> If the license was the
> last thing you needed, feel free to mark your PR as ready and I'll
> review/merge it.

I have undrafted it, feel free to take a look.

> > (5) would require introduction of GitHub/GitLab CI configuration
> > file
> > into the repository and perhaps some configuration changes to
> > GitHub/GitLab repository (regarding storage of built assets).
> (5) That integration seems nice. I'd like to improve the way we do CI
> and releases, and this seems like a nice addition. We might have to
> think about whether or not master is, as it stands, the best branch
> for
> this. What would this look like in practice from the point of view of
> the user? Would they just download a .flatpak file from the
> GitHub/GitLab releases page?
>

Yes, CI would build a Flatpak package, user would download a .flatpak
file from the artifact list on the CI execution page, and install it
directly.

I imagine having it on master (or even temporary development branches)
would be useful for users to test fixes for issues they reported,
without needing the OCaml development environment.

For stable releases, other installation sources (e.g. from Flathub or
Linux distro repository) would probably be more suitable, since if I
understand it correctly, the .flatpak file is more akin to a .exe file
(no automatic updates).

Cheers,

Jan