2017-01-29 23:08:12 +08:00
|
|
|
GIMP Flatpak HowTo
|
|
|
|
==================
|
|
|
|
|
2017-10-24 03:16:05 +08:00
|
|
|
Stable build
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
The stable manifest is maintained at flathub: https://github.com/flathub/org.gimp.GIMP
|
|
|
|
|
2018-04-28 00:35:33 +08:00
|
|
|
To prepare a new build:
|
|
|
|
|
2018-05-28 04:20:09 +08:00
|
|
|
* A few hours before the release, update the manifest to point to last
|
|
|
|
master commit (even if the release is not tagged yet).
|
|
|
|
* Commit in a branch and push (DO NOT PUSH TO MASTER):
|
|
|
|
|
|
|
|
> git checkout -b test-gimp-2-10-4-release
|
|
|
|
> git commit -a
|
|
|
|
> git push origin HEAD:test-gimp-2-10-4-release
|
|
|
|
|
|
|
|
* Create a pull-request from this branch.
|
2018-04-28 00:35:33 +08:00
|
|
|
* In the comment section, just write "bot, build".
|
|
|
|
This will trigger test builds to test the manifest.
|
2018-05-28 04:20:09 +08:00
|
|
|
* Check the test build on https://flathub.org/builds/
|
|
|
|
* At release time, assuming the last test build succeeded, update the
|
|
|
|
manifest to track the release tag instead.
|
|
|
|
* Merge the pull request to master.
|
2018-04-28 00:35:33 +08:00
|
|
|
* Check the final build on https://flathub.org/builds/
|
|
|
|
|
|
|
|
See also:
|
|
|
|
https://github.com/flathub/flathub/wiki/App-Maintenance#test-builds-and-pull-requests
|
|
|
|
|
2017-10-24 03:16:05 +08:00
|
|
|
Development and nightly builds
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Flathub does not host non-stable builds, therefore they are maintained
|
|
|
|
separately on the GIMP repository. Nevertheless they should remain as
|
|
|
|
close to the stable manifest as possible since they are meant to become
|
2018-06-06 08:31:18 +08:00
|
|
|
stable too eventually.
|
2017-10-24 03:16:05 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
Building
|
|
|
|
--------
|
2017-10-24 03:16:05 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
* Dependencies:
|
|
|
|
- flatpak (at least 0.9.5)
|
|
|
|
- flatpak-builder (at least 0.9.5)
|
|
|
|
- appstream-compose
|
|
|
|
- a GPG key to sign the builds
|
2017-12-06 22:23:19 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
Note: there are packages of `flatpak` and `flatpak-builder` for most
|
|
|
|
distributions. Check: http://flatpak.org/getting.html
|
|
|
|
Note 2: `appstream-compose` is used to parse the appdata file and
|
|
|
|
generate the appstream (metadata like comments, etc.).
|
|
|
|
On Fedora, this is provided by the package `libappstream-glib`,
|
|
|
|
on Ubuntu by `appstream-util`…
|
2017-12-06 22:23:19 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
* Install the runtimes and the corresponding SDKs if you haven't already:
|
2017-12-06 22:23:19 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
> flatpak remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo
|
|
|
|
> flatpak install gnome org.gnome.Platform/x86_64/3.28 org.gnome.Sdk/x86_64/3.28
|
|
|
|
> flatpak install gnome org.gnome.Platform/i386/3.28 org.gnome.Sdk/i386/3.28
|
|
|
|
> flatpak install gnome org.gnome.Platform/arm/3.28 org.gnome.Sdk/arm/3.28
|
|
|
|
> flatpak install gnome org.gnome.Platform/aarch64/3.28 org.gnome.Sdk/aarch64/3.28
|
|
|
|
|
|
|
|
Or simply update them if you have already installed them:
|
|
|
|
|
|
|
|
> flatpak update
|
|
|
|
|
|
|
|
* Run the build script:
|
2017-12-06 22:23:19 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
> ./gimp-flatpak-cron.sh <GPGKEY> <REPO> <LOGDIR> <BUILDDIR>
|
2017-05-13 03:40:43 +08:00
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
Note that it is named with the "-cron" suffix because it is a good cron
|
|
|
|
script for nightlies.
|
|
|
|
|
|
|
|
The parameters:
|
|
|
|
|
|
|
|
GPGKEY: your GPG key used to sign the builds
|
|
|
|
REPO: the directory where the repository is locally.
|
|
|
|
For instance, it could be /var/www/html/flatpak/ (which could map
|
|
|
|
to https://download.gimp.org/flatpak/ for instance)
|
|
|
|
LOGDIR: where the logs of the build will be kept (under subdirectories
|
|
|
|
by date).
|
|
|
|
BUILDDIR: where the built prefix will be kept for later review.
|
|
|
|
|
|
|
|
The export commands will output a commit hash. Save it for further
|
|
|
|
verification.
|
|
|
|
|
|
|
|
Maintaining the manifests
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
2017-05-13 03:40:43 +08:00
|
|
|
|
2017-01-29 23:08:12 +08:00
|
|
|
* GIMP uses Flatpak's GNOME runtime, which contains a base of libraries,
|
|
|
|
some of which are dependencies of GIMP.
|
|
|
|
Check out the available versions at: http://flatpak.org/runtimes.html
|
|
|
|
Verify that we use the last runtime version in `org.gimp.GIMP.json`:
|
|
|
|
|
2018-05-28 04:20:09 +08:00
|
|
|
> "runtime-version": "3.28"
|
2017-01-29 23:08:12 +08:00
|
|
|
|
|
|
|
* Other GIMP dependencies which are not available in the GNOME runtime
|
|
|
|
should be built along as modules within GIMP's flatpak.
|
2018-06-06 08:31:18 +08:00
|
|
|
Check format in `org.gimp.GIMP-nightly.json` and add modules if
|
|
|
|
necessary. For more information and options, check flatpak builder's
|
|
|
|
manifest format:
|
2017-01-29 23:08:12 +08:00
|
|
|
http://flatpak.org/flatpak/flatpak-docs.html#flatpak-builder
|
|
|
|
|
|
|
|
* On the other hand, if we increased the runtime version in particular,
|
|
|
|
some modules may no longer be necessary.
|
|
|
|
For instance, at time of writing, GNOME runtime 3.22 includes libpng
|
|
|
|
1.6.17 but GIMP requires "libpng >= 1.6.25".
|
|
|
|
Similarly lcms2 was available in the runtime but on a low version.
|
|
|
|
On a higher version runtime, these modules can likely be removed from
|
|
|
|
our manifest.
|
|
|
|
|
2017-01-30 23:41:51 +08:00
|
|
|
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:
|
|
|
|
|
2018-06-06 08:31:18 +08:00
|
|
|
> flatpak run --devel --command=bash org.gnome.Sdk//3.28
|
2017-06-07 22:53:00 +08:00
|
|
|
|
|
|
|
Or if you already have a build:
|
|
|
|
|
2017-01-30 23:41:51 +08:00
|
|
|
> flatpak run --devel --command=bash org.gimp.GIMP
|
|
|
|
|
|
|
|
GIMP manifest available at:
|
|
|
|
|
|
|
|
> less /app/manifest.json
|
|
|
|
|
|
|
|
GNOME module list:
|
|
|
|
|
|
|
|
> less /usr/manifest.json
|
|
|
|
|
|
|
|
Freedesktop module list:
|
|
|
|
|
|
|
|
> less /usr/manifest-base-1.json
|
|
|
|
|
|
|
|
Finally the contents of the yocto-built image:
|
|
|
|
|
|
|
|
> less /usr/manifest.base
|
2017-01-29 23:08:12 +08:00
|
|
|
|
|
|
|
* For a stable release, remove the following line from the manifest:
|
|
|
|
|
|
|
|
> "desktop-file-name-prefix": "(Dev) ",
|
|
|
|
|
2017-09-23 19:37:56 +08:00
|
|
|
* For a stable release, set top "branch":"stable", and inside the
|
|
|
|
"gimp", "babl" and "gegl" modules, set "branch" to the git tag (ex:
|
|
|
|
"GIMP_2_10"), and "commit" to the git commit hash for this tag.
|
|
|
|
|
|
|
|
* For a development release, set top "branch":"dev", and inside the
|
|
|
|
"gimp", "babl" and "gegl" modules, set "branch" to the git tag (ex:
|
|
|
|
"GIMP_2_9_6"), and "commit" to the git commit hash for this tag.
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
2017-06-01 07:00:11 +08:00
|
|
|
* Test it locally with:
|
2017-01-29 23:08:12 +08:00
|
|
|
|
2017-06-01 07:00:11 +08:00
|
|
|
> flatpak --user remote-add --no-gpg-verify gimp /path/to/repo
|
|
|
|
|
|
|
|
Or remotely:
|
|
|
|
|
|
|
|
> flatpak --user remote-add --no-gpg-verify gimp http://example.com/repo
|
|
|
|
|
|
|
|
> flatpak --user install gimp org.gimp.GIMP
|
2017-09-23 19:37:56 +08:00
|
|
|
|
|
|
|
Once installed check that the commit hash outputted at export is the
|
|
|
|
same as the one from the local command:
|
|
|
|
|
|
|
|
> flatpak list --user -d
|
|
|
|
|
|
|
|
You can also run your flatpaked GIMP:
|
|
|
|
|
2017-01-29 23:08:12 +08:00
|
|
|
> flatpak run org.gimp.GIMP
|
|
|
|
|
|
|
|
Also an entry "(Dev) GNU Image Manipulation Software" should now be
|
|
|
|
available in your menus (or GNOME Overview). This will run the flatpak
|
|
|
|
build.
|