Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Jan Tojnar <jtojnar@gmail.com>
To: cocci@inria.fr
Subject: [cocci] Flatpak package for Coccinelle
Date: Sun, 23 Jun 2024 14:48:55 +0200	[thread overview]
Message-ID: <c3a8f4e3da654c061f7160c75dd0c4e155f3b51d.camel@gmail.com> (raw)

Hello Julia and everyone!

To make Coccinelle more easily available to a wider range of people, I
have decided to package it using Flatpak [1], a distribution-
independent package manager backed by Freedesktop.org and preferred by
many developers of Linux desktop environments like GNOME, KDE or
Pantheon. This will be useful for situations where Flatpak is more
available or familiar than OCaml toolchain, such as for most GNOME
developers.

Eventually, the goal is to have it available in the Flathub repository
but there are several (numbered) questions to resolve before that can
happen.

First, each app requires an ID [2] in reverse-DNS format. I think
`fr.inria.Coccinelle` would be nicest. But I have also seen
`fr.lip6.Coccinelle` floating around but that might be older domain
name. And following the guidelines literally (you should have control
over the domain), it would probably have to be
`fr.inria.gitlab.coccinelle.Coccinelle` or
`fr.inria.gitlabpages.coccinelle.Coccinelle` but that feels over the
top.

    (1) Is `fr.inria.Coccinelle` acceptable?

Second, uploading a package to Flathub requires an AppStream [3]
manifest, which contains items such as textual description of the
project, categories, authors, links and information about releases. I
took the description from the Coccinelle website but I am not sure what
the copyright status is:

> Coccinelle is a program matching and transformation engine which
provides the language SmPL (Semantic Patch Language) for specifying
desired matches and transformations in C code. Coccinelle was initially
targeted towards performing collateral evolutions in Linux. Such
evolutions comprise the changes that are needed in client code in
response to evolutions in library APIs, and may include modifications
such as renaming a function, adding a function argument whose value is
somehow context-dependent, and reorganizing a data structure. Beyond
collateral evolutions, Coccinelle is successfully used (by us and
others) for finding and fixing bugs in systems code.

Flathub and distro tooling combine metadata of software projects in
their repositories into indexes and other derivative databases so they
require the AppStream metadata to be distributed under one of several
licenses [4] vetted for mutual compatibility (e.g. Creative Commons,
Public Domain, or GNU Free Documentation License).

    (2) Could you clarify who the copyright holder of the above
description is, and if it can be shared under one for the licenses
listed in [4]?

Third, it is preferred [5] to ship the AppStream metadata upstream so
that other distributions can use it. Shipping the metainfo in the
Coccinelle repository would require updating the file with a new
version and date before each release but that can be integrated into
the existing maintenance version script. No problem if you do not want
that, we can maintain it locally in a Flathub repository.

    (3) Do you wish to include the AppStream metadata in the
repository?

Fourth, the Flatpak manifest can be also included in the Git repository
to allow building Coccinelle from the repo in a Flatpak environment.
This would improve access to the development versions of Coccinelle
but, since people who need those are probably more likely to be able to
obtain OCaml toolchain themselves, it might not be worth the
maintenance burden. I can help but I understand if this is not
something you want to bother with.

    (4) Do you wish to include Flatpak manifest in the repository?

On that note, having the Flatpak manifest in the repo would also allow
us to have GitHub/GitLab CI (Continuous Integration) environment
automatically build latest version of Coccinelle and allow users to
download it without having to build it, just like Flathub will enable
that for stable versions of Coccinelle.

    (5) Are you interested in such integration?

Lastly, one of the goals of Flatpak is to have upstream developers
publish their software using Flatpak themselves, essentially creating a
singular distribution platform for Linux systems. It is recommended [6]
that I ask you if you want to submit Coccinelle to Flathub yourself.
But I understand that you are busy and I can maintain the package if
you will not.

    (6) Do you want to maintain Coccinelle package on Flathub yourself?


I have opened a draft PR on GitHub so that external reviewers can give
input on the patches before submitting them here (if desired):

https://github.com/coccinelle/coccinelle/pull/370

I have also created a PR to add Coccinelle to Flathub:

https://github.com/flathub/flathub/pull/5354


Cheers,

Jan

[1]: https://en.wikipedia.org/wiki/Flatpak
[2]:
https://docs.flathub.org/docs/for-app-authors/requirements#application-id
[3]: https://en.wikipedia.org/wiki/AppStream
[4]:
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license
[5]:
https://docs.flathub.org/docs/for-app-authors/requirements#acceptable-but-should-be-submitted-upstream
[6]:
https://docs.flathub.org/docs/for-app-authors/submission/#theres-an-app-that-id-like-to-see-on-flathub-but-im-not-the-developer


             reply	other threads:[~2024-06-23 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 12:48 Jan Tojnar [this message]
2024-06-25  7:46 ` [cocci] Flatpak package for Coccinelle Julia Lawall
2024-06-25  9:38   ` Jan Tojnar
2024-11-05 14:34     ` Victor Gambier
2024-11-12  0:27       ` Jan Tojnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3a8f4e3da654c061f7160c75dd0c4e155f3b51d.camel@gmail.com \
    --to=jtojnar@gmail.com \
    --cc=cocci@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).