Commit Graph

119 Commits

Author SHA1 Message Date
Bruno fb5e72fbbf
build/linux: Build 'openblas' with DYNAMIC_ARCH enabled (for now)
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.
2024-11-03 10:55:30 -03:00
Bruno 9d8e20f432
build/linux: Build flatpak with GCC to avoid LLVM/freedesktop branch hell
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.
2024-11-03 10:55:27 -03:00
Bruno 5284b5258f
build/linux: Clean Flatpak dist stage output 2024-11-03 10:55:23 -03:00
Bruno d5c7c9304c
build/linux: Stop Flatpak scripts if any command fails 2024-11-03 10:55:19 -03:00
Bruno 1182d7606c
build/linux: Make flatpak scripts humanly readable
Despite my good intentions in the previous structure, it
was just too complicated and not linear to read. Let's
make it more orthodox.
2024-11-03 10:55:08 -03:00
Bruno 975a462dc2
build/linux: Instruct contributors about flatpak-builder dependency
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.
2024-11-03 10:48:27 -03:00
Bruno d9710697d6
build/linux: Sync with beta manifest updating some modules
Ported from: f381737705

This updates openexr, libdeflate, poppler and suitesparse, after testing them.
2024-10-28 20:40:50 -03:00
Bruno 5778d9353a
build/linux: Restore 'gjs' bundling in AppImage
This got lost in a988084a
2024-10-14 17:48:35 -03:00
Bruno dc08645614
build/linux: Rectify comment about WMF support on AppImage
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.
2024-10-14 16:05:33 -03:00
Bruno 47852ef90f
build/linux: Do not impose 'GIMP3_DIRECTORY' var on AppImage's AppRun
This var points to a dir that exists outside of the AppImage bundle and it
exists to be customized if needed. So, let's not impose it in the AppRun.
2024-10-14 10:43:29 -03:00
Bruno 6b13a097ab
build/linux: Bundle complete GTK and ISO locales as in Windows bundling script
Since the 'bund_usr' is now smater, we can have parity with Windows bundle.
2024-10-12 10:32:44 -03:00
Bruno be67c70a89
build/linux: Add "Image Graph" support to AppImage
To we properly bundle graphviz, the 'bund_usr' function was improved.
2024-10-10 09:29:29 -03:00
Bruno 4a41b76411
build/linux: Update ghostscript, json-c and graphviz modules
Ported from: e499861f14
2024-09-29 12:58:47 -03:00
Bruno cf2893747d gitlab-ci, build: Do not bundle nor dist any Lua related files
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.
2024-09-28 01:42:44 +00:00
Bruno aa10a33db9
build/linux: Sync with Beta manifest regarding imath, poppler, suitesparse and graphviz
Ported from: 1ddf27837b
2024-09-14 17:44:04 -03:00
Bruno a988084a97 build/linux: Refactor AppImage bundling script to easier maintenance
- 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.
2024-09-09 10:51:52 +00:00
Bruno 898f8917ab
build/linux: Sync with Beta manifest regarding IFF support
Ported from: 0acddb8909
2024-09-08 16:57:47 -03:00
Bruno 23bae9ab42
gitlab-ci, build: Move appimage code out of gitlab-ci and reduce verbosity
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).
2024-08-30 12:44:40 -03:00
Jehan 75978104de build: AppImage also uses appstreamcli to validate the AppStream data…
… so let's make a quick edit for our 'date="TODO"' trick.
2024-08-30 00:06:58 +02:00
Anders Jonsson a9cf2d7a3e desktop: change gimp20 to gimp30 for gettext
The real used value for gettext_package is
already changed in meson.build
2024-08-29 09:09:29 +00:00
Bruno 0e245e86c1 build/linux: Always use latest commit in luajit and lua-lgi modules
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
2024-08-28 11:16:57 +00:00
Bruno d389068d5d build/linux: Update suitesparse module on flatpak manifest 2024-08-28 11:16:57 +00:00
Bruno d7806d92ec
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
2024-08-20 07:39:39 -03:00
Bruno 18188dbb1c build/linux: Sync with Beta manifest regarding gexiv2 and exiv2 headers
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.
2024-08-20 10:33:10 +00:00
Jehan 965dd51e80 build: don't bundle iso_639.xml anymore.
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).
2024-08-15 15:50:30 +02:00
Bruno b4ad767296 build/linux: Sync with Beta manifest regarding openexr and imath (add libdeflate)
Ported from: 55fdadd10f
2024-08-15 11:09:48 +00:00
Bruno aabfec824d
build/linux: Sync with Beta manifest regarding graphviz
Ported from: 395358b517
2024-08-11 13:59:17 -03:00
Bruno d351bbe283
build/linux: Sync with Beta manifest regarding gimp module
Ported from: 61050e962c
2024-08-11 12:18:21 -03:00
Bruno 9c4425f0f0
build/linux: Sync with Beta manifest regarding libheif and x265
Ported from: 1690804247
2024-08-11 10:37:02 -03:00
Bruno 2eb4f579f1
build/linux: Sync with Beta manifest regarding suitesparse and openblas
Ported from: 537cbf411c
2024-08-10 20:31:23 -03:00
Bruno 9e4cf76228
build/linux: Sync with Beta manifest regarding poppler
Ported from: 7a71694e85
2024-08-10 08:02:17 -03:00
Bruno 1c08f08e97
build/linux: Sync with Beta manifest updating gexiv2 and exiv2
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.
2024-08-09 11:48:07 -03:00
Jehan 84471f397a Issue #5331: use the $XDG_CONFIG_HOME config folder unconditionally.
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
2024-08-09 13:12:04 +02:00
Bruno 87aabad121 build/linux: Clarify some flatpak scripts comments 2024-07-28 11:02:17 +00:00
Bruno 641f58b801
build/linux: Sync with beta manifest regarding mess
Ported from: b67fdab3bc
2024-07-27 21:43:13 -03:00
Bruno 12c2680c4f build/linux: Move 'suitesparse' to GEGL module
'suitesparse' is NOT a direct GIMP dependency!
2024-07-24 21:37:58 +00:00
Bruno c100b01031 build: Add support to running build scripts in their respective dirs
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.
2024-07-24 15:37:10 +00:00
Bruno 08294f9c34 build/linux: Sync with beta manifest regarding x265
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.
2024-07-21 19:33:01 +00:00
Bruno a90ee6f196 build: Make infos, warnings and errors outputs consistent
This verbose style is inspired by 2_bundle-gimp-uni_dep.py
2024-07-20 21:09:47 +00:00
Bruno 617a49fa75 build: Slightly improve script comments to match gimp-web-devel
Also, fix an inconsistency in the local compatibility of flatpak deps script.
2024-07-20 21:09:47 +00:00
Bruno e01973b911 build: Simplify all the arch stuff
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.
2024-07-20 21:09:47 +00:00
Bruno 25734cb579 build/linux: Make 'flatpak update' more consistent with other scripts
Like updating MSYS2, let's update GNOME runtime only in deps script.
2024-07-20 21:09:47 +00:00
Bruno 48fc6b40b9 build/linux: Sync with beta manifest regarding appstream and xmu 2024-07-15 13:38:33 +00:00
Bruno f1a69c3eae build/linux: Sync with beta manifest regarding debloating
The effect, however, will be subtle, since Flatpak 'cleanup' is broken:
https://github.com/flatpak/flatpak-builder/issues/14
2024-07-14 17:31:12 +00:00
Bruno 9d86492b14 build: Make scripts numbering and storing consistent
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.
2024-07-10 00:04:03 +00:00
Bruno 40ecfd40ad Issue #11455: Split flatpak jobs
- 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)
2024-07-07 21:46:52 +00:00
Bruno 98d3956fef
build/linux: Fix flatpak ignoring fork source code
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)
2024-07-06 13:08:47 -03:00
Bruno 26645ab404 build/linux: Temporarily drop 'aalib'
It's failing badly even with the gcc trick.
I hope re-adding it soon with the MSYS2 patches.
2024-07-06 11:19:41 +00:00
Bruno ad7ef08ea0 build/linux: Antecipate some Clang changes to properly work on aarch64
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.
2024-07-06 11:19:41 +00:00
Bruno 78c85f6f45 build/linux: Sync poppler, ghostscript and openblas with beta manifest 2024-07-06 11:19:41 +00:00
Bruno 2450b93062 meson, build/linux: Fix 'sed' hell in Flatpak build
Thanks @Jehan for noticing the right fix, way better than !1281
and subsequent tortuous workarounds.
2024-06-24 17:39:46 +00:00
Bruno d071d01666 Revert "build/linux: Drop 'cfitsio' for now due to security concerns"
This reverts commit d64cbf1993.

By the way, change to a more trustful source repo in the hope of working.
2024-06-21 14:20:39 +00:00
Bruno ebeef5d7ef
build/linux: Move HEIC support to an extension
Ported from downstream (with proper adaptations):
3d7f13ff3c
2024-06-20 14:33:47 -03:00
Bruno 744abbbd6b build: Respect contributor's own GIMP_PREFIX
This makes the scripts less pervasive locally.
2024-06-20 16:20:11 +00:00
Bruno 5e500aeb78
Issue #11714: Temporary fix failing Flatpak builds 2024-06-20 08:03:22 -03:00
Bruno a1cb43d977 build/linux: Add way to locally emulate flatpak CI building
This is useful to debugging only
2024-06-19 01:02:58 +00:00
Bruno bb9716d609
build/linux: Enable colorful output under 'flatpak-builder'
Following 0f425554

Ninja and Cmake (which some modules use) supports colorful output.
To enable it, we need to set in the manifest due to the sandboxing.

See also: https://github.com/flatpak/flatpak-builder/issues/605
2024-06-18 16:09:05 -03:00
Bruno d64cbf1993
build/linux: Drop 'cfitsio' for now due to security concerns
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(?).
2024-06-18 14:58:07 -03:00
Bruno Lopes 3a54c37daa
gitlab-ci, build/linux: Move Flatpak CI code to scripts that works
This will make easier to debug problems locally if needed and
have the potential to reduce the first barrier for Linux newbies.
2024-06-18 14:57:39 -03:00
Bruno a2bd501cee build/windows: Move Store assets generation to gimp-data
gimp-data is the correct place, along with the installer assets.
2024-06-04 16:29:59 +00:00
Bruno Lopes a91599c454 build/linux: Reduce bashisms on AppImage script 2024-06-01 16:27:20 +00:00
Bruno Lopes 375782fd64 gitlab-ci: Use LLD linker in Debian and Flatpak jobs
Following 55427487 and 85ed2847

It is a bit unusual to use 'clang' + 'GNU ld' combo.
Also, lld is advertised to be way faster.
2024-06-01 11:28:21 +00:00
Bruno Lopes bad250429c build/linux: Fix stuck AppImage
* 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
2024-05-08 22:02:23 +00:00
Bruno Lopes e96494d5a3 build/linux: Re-enable ccache in Flatpak builds
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.
2024-05-02 08:58:29 -03:00
Bruno Lopes 0a2433c062 build/linux: Fix failing Flatpak jobs due to old path 2024-04-28 14:24:48 +00:00
Bruno Lopes 28ba5d6918 gitlab-ci: Silence universal variables
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.
2024-04-22 13:22:31 +00:00
Jehan 2f9881c03f build, tools, gimp-data: removing gimp_exe_config_dir from the root meson.build.
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`.
2024-04-21 20:43:29 -03:00
Bruno Lopes 2dc6f41114 gitlab-ci, build: Use 'bundling' naming instead of 'packaging'
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.
2024-04-20 22:32:46 -03:00
Bruno Lopes 9653e50e5f gitlab-ci, build: Unify Debian jobs and add AppImage artifact
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.
2024-04-18 20:54:49 -03:00