Fixes: #12237
We were building with that option disabled here because it was making our
runners to randomly fail at building it. However, that option disabled also
makes some machines to fail, due to its low-level nature. So, there is no
fix for it(?), let's enable then and hope the runners willn't fail again.
Despite building GIMP with Clang helped a lot to make our deps builds robust,
it is very hard to maintain, not because of LLVM but because of freedesktop.
We needed to ensure that the branch of LLVM matched the one of freedesktop on
which GNOME SDK is based. That stopped to work resulting on bad inconsistency:
1) flathub never had a problem; 2) GNOME runners sometimes worked, others not;
3) locally it stopped to work completely, so the .json right now is unportable.
Some annoying bugs were:
- "error: Requested extension *llvm* not installed"
- "Similar refs found for *llvm*"
So, let's end this not using any extension anymore while keeping only the nice
improvements in the custom builds.
GNOME docker image and Flathub runner seems to use edge flatpak-builder,
which auto set -DCMAKE_INSTALL_LIBDIR option, crucial for some deps.
Pre-1.4.3 versions don't do this so the build fails in some machines.
Let's prevent this making the script more clear about flatpak-builder.
The previous comment is wrong, because GIMP never had WMF export. Let's
clarify, however, that WMF support is still tricky because of some
options available at configure time regarding 'fontmap' and so on.
Following 78665ca372
Since our official builds tends to be vanilla (only using meson
standard options), there is no need to shipping these lua files.
This commit can be reverted in the future if Lua is stable again.
- Simplify three functions into 'bund_usr' (similar to 'bundle' in Win script)
- Add 'wipe_usr' function (similar to 'clean' in Win script)
- Verbose the steps of AppImage making
- Log (go)appimagetool bundling of deps (not only the the .appimage making)
- Change AppRun to be more clear about our .appimage compatibility
This refactoring is not perfect but is good enough to anyone understand
how our AppImage is made just reading the script.
This should be enough to not "annoy" developers with repetitive ninja and
not too relevant appimagetool output. This makes easier to devs to look at
the runner log without needing to revert 9653e50e (the revert/split would
make us lose .appimage in some custom Deb pipelines and 50% of ccache hits).
luajit download server to tarballs stopped to work, which is expected,
since it was advised by the team in https://luajit.org/download.html:
"Please do not use obsolete versions from older tarballs or zip files.
Please remove any outdated links to these downloads — these links will
cease to work soon."
We also will not use the official git server since it does not support
all git clone features, which makes flatpak-builder cloning stage fail.
---
Regarding lua-lgi, we will not use the latest commit since seems that
our goat exercises or gobject-introspection or lua-lgi iteself is broken
since lua-lgi commit: 3f47eb57ef5a84be878ce33c15b7ff037059b08d
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
Ported from: 37b173e3a9
and ac0069eb20
The reason for this change is because part of our API (babl, gegl and
gimp headers) directly links to gexiv2 then exiv2 headers so these two
should be provided, even if they aren't on babl/gegl/gimp namespaces.
This change is useful to beta. But, despite we not using extensions on
GIMP nightly to need these headers, doesn't hurt syncing this change.
Indeed, this commit clarify "why" we aren't cleaning these headers.
Note that we still need the iso_639.mo files at runtime. Only the XML
files don't need to be parsed anymore at runtime (they are parsed at
build-time now).
Ported from: 3772514155
Just to note, ALL the previous "Sync with..." commits were tested in flathub
and gnome-nightly flatpaks, and this actual one (and future ones will be) too.
This is the pendant commit to the one I'm going to commit on the beta
branch for RC1. There in fact was a way to always use the
$XDG_CONFIG_HOME folder, unconditionally (and prevent the weird
inconsistencies of having config folder in .var for some flatpak
installations and in XDG folder for others).
See: https://github.com/flathub/org.gimp.GIMP/pull/287
It's perfectly reasonable that someone can misunderstand the scripts info in
gimp-web-devel and try to run them not from git root but from their dirs. So,
let's add that possibility as a fallback (a pretty natural one by the way).
Also, change the error message to direct contributors to gimp-web-devel.
Ported from ca5688bf6d
Just to note, we are already not using Assembly code
in 10bit and 12bit libraries. So, no feature dropped.
---
Also, little fixes to some dev docs regarding Clang.
The ARTIFACTS_SUFFIX is being dropped on building scripts because:
1) This will make possible to further simplify Installer scripts in other commit
2) There is no script that uses multi-arch _build/_install at same time on CI
However, there are two use cases: to build Debian and flatpak; and, on Win,
to build on CLANGARM64 and CLANG64 (?). But probably they are pretty niche.
I suppose that people who build on Debian (or other dev-oriented distro)
willn't want to mantain deps in two sys prefixes (pkg and GNOME runtime)
+ two gimp prefixes (out of sandbox and sandbox) due to huge storage use.
Why someone would want to build with emulation on Win ARM64 I don't know.
Anyway, people that know how to do this stuff probably can change the .sh.
3) When building locally, the contributor doesn't need to know the arch at all.
Indeed, without this suffix, the scripts are inline with gimp-web-devel and
prevent some first-sight confusion when reading them that I've seen on IRC.
4) These arch suffixes can be understood as '_install-*' being distributable
which is not true. So, without this suffix we could make more clear
what is a package (when GitLab fix the glob bug in 'expose_as' someday).
---
Despite .gitlab-ci.yml not being a script, it needed to be touched too
because cross scripts depends on Debian jobs due to gimp-data MR.
The numbering is now inline with actual the order of jobs on CI
to make easier to understand what the numbers represent.
To understand why bundling is number 2 see: d09a2a6f and 2dc6f411
The storing of Windows scripts was changed to make easier to
call them, to better convey that they work outside CI and
to be consistent with other build/ subdirectories.
- Dependencies not present in GNOME runtime are now built in deps stage
This makes easier to follow the progress of the overall pipeline and
to know how much time was spent on each stage
(like crossbuilds, the artifact size is brutal but only lasts 2 hours)
- babl and GEGL build now have output in GitLab runner, unlike others deps
This makes clearer to spot if something goes wrong in these crucial deps
- GIMP is still built in its stage but now alone, like Debian and Windows
This makes possible to retrigger only this job when runner errors occours,
without needing to start monolithically the deps+gimp build from scratch
Also:
- babl, GEGL and GIMP now have meson-log.txt artifact like other builds
- dist job now have all commands self-contained on its script (needs to
be merged to be tested according to my tests)
See: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1670#note_2152565
This makes the NIGHTLY flatpak use the local GIMP source. This reduces the
internet usage and makes possible to generate .flatpak from every branch out
there, which turns the flatpak finally really useful to code development.
Of course, this makes impossible to run 'flatpak-builder NIGHTLY_manifest.json'
without cloning or downloading GIMP code, but this is not a regression since:
1) the NIGHTLY manifest is in-source to begin with, so same thing as our other
building methods (except macOS), which runs over the code they are stored
2) the chances of someone downloading partial source code (the NIGHTLY manifest
alone) so being unable to build are low since this file isn't too easy to find
3) even if someone do this and don't like, we are not violating flatpak building
pratices since this option exists to be used (and will be in NIGHTLY only)
Despite we not building gimp nightly on aarch64 we need to sync with beta.
So, this updates to LLVM/Clang 18, which fixes 'gexiv2' and 'poppler'
problems with deps on that arch. 'json-c' and 'luajit' were adjusted too
with the use of proper build options to fix errors.
Temporarily drops 'cfitsio' which started weeks ago to change its hash.
In my tests, after "fixing" the hash, sometimes it alternates to another,
which breaks the build again. This is too hard to maintain and unsafe(?).
* Since the appimage is for testing purposes, let's use system 'libc'
* Hardcode python path since the wildcard wasn't expanding misteriously
* Improve system theme recognition making way simpler
The move to Clang in 85ed2847 didn't take into account caching,
Now, this is fixed or, better saying, reintroduced(?): e545116b
Also, flatpak-builder output was confined to the .log file to make
possible checking the end of the CI output, which was being cut.
They were generating a distracting output in CLANG* shells, as noted by
@lillolollo in a comment from MR: Infrastructure/gimp-web-devel!65
In the process, make AppImage and Windows (native) scripts use these
variables, without hardcoding the same variables from .yml anymore.
Creating a temporary config directory for the in-build GIMP (run as a tool or
for unit-testing) is not done as a build target anymore, but in the
in-build-gimp.sh script as a unique temp directory, then cleaned out on exit.
This has a few advantages:
- It is properly cleaned out once the build ends (instead of leaving a full
config dir as trash inside the build dir).
- It is not reused from one build to another (with risk of carrying bugs and
issues over).
- Every use of the in-build GIMP will have its own config directory, and in
particular when they are called in parallel.
As a side update, make sure that all `gimp_exe` runs depend on
`gimp_exe_depends`.
As hinted in d09a2a6f
We now use the word 'bundle' to signify "program files in the same prefix"
(e.g. .appimage, .zip, .app). This is in line with our source and dev-docs
(just take a search in the repo). So, appimage and windows scripts changed.
The word 'package' normally means "program files distributed for install in
the same prefix or not" (e.g. .deb, .msi, .dmg). This is in line with CMake
naming of some commands, but meson prefers to call 'dist', which we use more.
So, this partly reverts some things of GNOME/gimp!1171 and reinforce others
for even more "rationality" in the overall build structure of GIMP.
AppImage is pretty fast to make, like the win crossbuild; and portable,
being very appropriate to do quick tests on Linux when pushing to git.
The overall organization of Debian jobs was changed to take advantage
of this and make things less complicated (but less clear at first sight).
I reinforce that this was the most efficent way to make the AppImage.