Guide/tutorial/doc on how to create a flatpak (as a package maintainer/from an RPM)

As I’ve mentioned in my review I’ve created various bug reports for RPM packages on Fedora that I feel need an flatpak on and are still missing that.

Now, as I’ve seen your existing doc is not really easy and packagers need more help.
Is there any tutorial/guidelines/help or “getting started” guide on that topic? Especially on how to create a flatpak when you are already used to building RPMs?

As an FYI, at its core Flatpak is just a manager for an OSTree repo with some special metadata attached. This means that there can be multiple ways to build Flatpaks. You can:

  • Use flatpak build* commands directly, which will manage a build tree and write out the metadata files. AFAIK the below two tools are just wrappers over this.
  • Use flatpak-builder, which is a program that takes in a manifest file with build instructions and automatically builds everything. This is how most Flatpaks are built, including all the ones on Flathub.
  • Use flatpak-module, which is how all the Fedora Flatpaks are built. It basically integrates Flatpaks with Fedora Modularity AFAIK and also uses a different build specification than flatpak-builder.

Now, with that explanation in mind, back to the original question: the Fedora docs have a guide for this here that’s likely what you want.

1 Like

Thanks, indeed probably matches what I’ve been looking for best.