build/linux: Make flatpak maintainer instructions clearer

Some parts of the README got obscured or dated with time. Let's improve them:

- Remove redundant text about keeping GIMP buildable (it's already said on
  Cod. Style and Dev rights pages on gimp-web-devel, and not flatpak specific)
- Remove text about 1-hour timeout which isn't true according to my tests,
  specially after the improvements of splitted jobs and updated build options
- Reorder Anitya text to before "module dropping" text, it's linear this way
  ("module dropping" by checking runtime is last step of module cycle of life)
- Remove very confusing "flatpak run... gimp" line which was breaking the
  explanation flow about "module dropping" and it's not too useful since the
  manifest (which is only a bit different) can be acessed in-source with tags
- Changed title from "Mantaining the manifest" to "Mantaining the modules"
- Added not so clear "Versioning the flatpak" to separate it from other modules
  text. The title is not perfect, but at least make a needed pause on reading
This commit is contained in:
Bruno 2024-08-19 22:38:07 -03:00
parent 6ca0a78452
commit d7806d92ec
No known key found for this signature in database
1 changed files with 33 additions and 50 deletions

View File

@ -13,13 +13,9 @@ We recommend to look at the `README.md` file in respectively the `master` or
Flathub does not host nightly builds, therefore we publish them on GNOME's
Nightly repository. Our "nightlies" are actually "weeklies" through a [Gitlab job
schedule named "Flatpak
nightly"](https://gitlab.gnome.org/GNOME/gimp/-/pipeline_schedules).
This job will build whatever is on GIMP's repository `master` branch (this
branch should be kept buildable and usable at all time, not only for scheduled
jobs, but also for all contributors to be able to improve GIMP at all time).
The nightly manifest file is: `build/linux/flatpak/org.gimp.GIMP-nightly.json.in`
nightly"](https://gitlab.gnome.org/GNOME/gimp/-/pipeline_schedules), which builds
whatever is on GIMP's repository `master` branch. The nightly manifest file is:
`build/linux/flatpak/org.gimp.GIMP-nightly.json`
This file should remain as close as possible to the development manifest
(`org.gimp.GIMP.json` file on the `beta` branch of the Flathub repository) which
@ -33,14 +29,11 @@ Base rule to update the nightly build manifest:
* Regularly `org.gimp.GIMP-nightly.json` should be diffed and synced with
development and stable `org.gimp.GIMP.json`, in particular for all the
dependencies (which are mostly the same across all 3 builds).
* A merge request with the label `5. Flatpak package` will contain the `flatpak`
job, hence allowing theoretically to build a standalone flatpak (without being
published to the nightly repository) for MR code. In practice, jobs have an
1-hour timeout and our flatpak takes longer than 1 hour to build (there is an
exception in our repository, but only for the `master` branch), so we often
need to publish to `master` after mostly a visual review.
* A merge request with the label `5. Flatpak package` will contain the `*flatpak*`
jobs, hence allowing theoretically to build a standalone .flatpak (without being
published to the nightly repository) for MR code be tested.
## Maintaining the manifests
## Maintaining the modules
* GIMP uses Flatpak's [GNOME runtime](http://flatpak.org/runtimes.html), which
contains a base of libraries, some of which are dependencies of GIMP.
@ -54,41 +47,8 @@ Base rule to update the nightly build manifest:
necessary. For more options, check [flatpak builder's manifest
format](http://flatpak.org/flatpak/flatpak-docs.html#flatpak-builder).
* On the other hand, if we increased the runtime version in particular (or when
the `master` runtime evolves), some modules may no longer be necessary and can
be removed from our manifest.
A flatpak is a layered set of modules. Our GIMP build in particular is
built over the GNOME runtime, itself built over the Freedesktop
runtime, itself based on a yocto-built image.
Other than by trial and error, you can find the installed dependencies
by running:
```sh
flatpak run --devel --command=bash org.gnome.Sdk//master
```
Or if you already have a build:
```
flatpak run --devel --command=bash org.gimp.GIMP//master
```
Inside the flatpak sandbox, GIMP's manifest can be read with:
```sh
less /app/manifest.json
```
GNOME and Freedesktop's module lists (generated manifest as the SDK is built
from BuildStream):
```sh
less /usr/manifest.json
```
* Some sources have set a `x-checker-data` property which makes it possible to
check for updates using
* Among the dependencies we self-build, some sources on GIMP manifest have set a
`x-checker-data` property which makes it possible to check for updates using
[flatpak-external-data-checker](https://github.com/flathub/flatpak-external-data-checker).
To run the tool either install it locally, via flatpak or via OCI image.
@ -114,6 +74,29 @@ podman run --rm --privileged -v "$(pwd):/run/host:rw" ghcr.io/flathub/flatpak-ex
reasons only, we might bypass this limitation, adding a comment
explaining why we use an unstable release.
* On the other hand, if we increased the runtime version in particular (or when
the `master` runtime evolves), some modules may no longer be necessary and can
be removed from our manifest.
After all, a flatpak is a layered set of modules. Our GIMP build in particular
is built over the GNOME runtime, itself built over the Freedesktop
runtime, itself based on a yocto-built image.
Other than by trial and error, you can find the installed dependencies
by running:
```sh
flatpak run --devel --command=bash org.gnome.Sdk//master
```
Inside the flatpak sandbox, GNOME and Freedesktop's module lists
(generated manifest as the SDK is built from BuildStream) can be read with::
```sh
less /usr/manifest.json
```
## Versioning the flatpaks
* For the development releases and nightly builds, we added the
`desktop-file-name-prefix` property. For a stable release, the property line
can be removed from the manifest.
@ -126,6 +109,6 @@ podman run --rm --privileged -v "$(pwd):/run/host:rw" ghcr.io/flathub/flatpak-ex
"gimp", "babl" and "gegl" modules, set "tag" to the git tag (ex:
`GIMP_2_99_14`) and "commit" to the git commit hash for this tag.
* For a nightly build, set top "branch":"master", and inside the
* For a nightly build, set top `"branch":"master"`, and inside the
"gimp", "babl" and "gegl" modules, set "branch" to "master", and
remove any "commit" line.