Commit graph

2508 commits

Author SHA1 Message Date
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Marc Durdin
808b6557d6 maint(common): use cpp_std=c++17 in meson project default_options
We attempted to set the C++ version in standard.meson.build, but this
does not work well as the option name varies by platform, and it also
triggers a warning in meson. This fix moves the setting into each
meson.build project() default_options. As there are only a handful
of these, the maintenance burden is not high.

Fixes: #14432
Relates-to: #14355
Build-bot: build
Test-bot: skip
2025-08-01 10:23:57 +10:00
Eberhard Beilharz
8e64a2ad75
Merge pull request #14403 from keymanapp/fix/linux/stoptestserver
maint(linux): fix stopping of test server
2025-07-29 11:34:21 +02:00
Eberhard Beilharz
6c56eb82fa
Merge pull request #14408 from keymanapp/docs/linux/testsvcreadme 2025-07-28 09:26:43 +02:00
Eberhard Beilharz
ab060806ef
Merge pull request #14407 from keymanapp/refactor/linux/commoninclude 2025-07-28 09:26:27 +02:00
Eberhard Beilharz
08746e24a2
refactor(linux): remove shellcheck warnings
Test-bot: skip
2025-07-25 19:54:25 +02:00
Eberhard Beilharz
c08ac71b30
docs(linux): update readme for test service
Build-bot: skip
Test-bot: skip
2025-07-25 19:51:47 +02:00
Eberhard Beilharz
bfc3aa3456
refactor(linux): move dbus defines to common include
This got missed in #14372.

Fixes: #13281
Follow-up-of: #14372
Test-bot: skip
2025-07-25 19:39:50 +02:00
Eberhard Beilharz
183a8455b0
maint(linux): fix stopping of test server 2025-07-25 15:53:15 +02:00
Eberhard Beilharz
c8e0ac314b
Merge pull request #14356 from keymanapp/fix/linux/14349_pkg_resources
Until Ubuntu 24.10/Debian 12 `python3-pkg-resources` got installed as a dependency of `python3-numpy`. With numpy version 2 (Ubuntu >= 25.04/ Debian >= 13) this is no longer the case, so we have to explicitly add it as a runtime dependency. It might be a bug that this dependency doesn't get automatically added, but this workaround will do.

Fixes: #14349
Fixes: KEYMAN-LINUX-82
2025-07-21 08:37:10 +02:00
Eberhard Beilharz
d0d774f72c
refactor(linux): move defines to common header files
Fixes: #13281
Test-bot: skip
2025-07-17 19:41:26 +02:00
Eberhard Beilharz
0b35b3fd9c
fix(linux): add python3-pkg-resources as explicit dependency
Until Ubuntu 24.10/Debian 12 `python3-pkg-resources` got installed as a
dependency of `python3-numpy`. With numpy version 2 (Ubuntu >= 25.04/
Debian >= 13) this is no longer the case, so we have to explicitly add
it as a runtime dependency. It might be a bug that this dependency
doesn't get automatically added, but this workaround will do.

Fixes: #14349
Fixes: KEYMAN-LINUX-82
2025-07-14 19:43:37 +02:00
Eberhard Beilharz
169490e3fa
maint(linux): remove Oracular from launchpad builds
Ubuntu 24.10 Oracular is EOL, so we remove it from our launchpad builds.

Test-bot: skip
2025-07-09 11:21:00 +02:00
Eberhard Beilharz
38f43d84cf
refactor(common): some reformattings in shellHelperFunctions.sh
Also always include `jq.inc.sh`. The include file already has everything
we did here.

Test-bot: skip
2025-07-07 18:44:28 +02:00
Eberhard Beilharz
8304efed3c
chore(linux): Update debian changelog
(cherry picked from commit a5290c1d5d)
2025-06-04 19:14:26 +02:00
Eberhard Beilharz
dabb63ed81
docs(linux): clarify requirement of patched ibus for Keyman < 18 2025-06-04 11:17:08 +02:00
Eberhard Beilharz
3d006659f9 chore(linux): clarify that it's a Python test runner
Rename the directory to make it clearer that it's test runner for Python
tests. Addresses code review comments.
2025-06-02 15:20:42 +02:00
Eberhard Beilharz
581e4e03ef chore(linux): add TC test runner
This adds a modified version of JetBrains' TeamCity test runner that
makes use of the `parent` property in the service messages and thus
allows to properly indent and fold the block that contains the test
output.

Test-bot: skip
2025-06-02 15:20:42 +02:00
Eberhard Beilharz
10e21cb433
maint(linux): sudo not required for removing temporary files 🍒
Since we have write access to the directory we don't need `sudo` for
removing the temporary dependency files if we pass `-f` to `rm`.

Cherry-pick-of: commit 4f27f6e256
Cherry-pick-of: #14085
Test-bot: skip
2025-05-30 11:12:56 +02:00
Eberhard Beilharz
3cb9fe2a65
fix(linux): fix variable replacements
This fixes the version numbers in `km-config` which broke with #13854.
This also fixes opening the download page in `km-config` because that
uses a version number in the URL.

Fixes: #14031
Follow-up-of: #13854
2025-05-22 16:20:18 +02:00
Eberhard Beilharz
4ea6296237
Merge pull request #13980 from keymanapp/fix/linux/13971_installpath
This makes the path in `com.keyman.SystemService1.service` configurable when using basu (e.g. Gentoo Linux).

Fixes: #13971
2025-05-20 14:59:07 +02:00
Eberhard Beilharz
ee93d0d27a
maint(linux): add --no-werror option to not report warnings as errors
By default we add the `--werror` option to meson builds. This might cause
problems when compiling with a different compiler, so this option adds
the `--no-werror` option to our build scripts. This enables integrators
to compile with other compiler versions.

Fixes: #13970
Test-bot: skip
2025-05-20 09:01:22 +02:00
Eberhard Beilharz
8e4e92067d
fix(linux): configurable path in .service file when using basu
This makes the path in `com.keyman.SystemService1.service`
configurable when using basu (e.g. Gentoo Linux).
2025-05-19 09:46:41 +02:00
Marc Durdin
5cee89d0cc fix(linux): use correct header guard define in OrderedOutputDevice.h
Test-bot: skip
Fixes: #13911
2025-05-16 16:16:54 +02:00
Eberhard Beilharz
b3dd2a6881
Merge pull request #13889 from keymanapp/chore/linux/cherry-pick/changelog 2025-05-15 18:18:53 +02:00
Eberhard Beilharz
1e8f692410
Merge pull request #13754 from keymanapp/chore/common/13399_tc-config 2025-05-15 16:32:53 +02:00
Eberhard Beilharz
6f8cba7815
Merge pull request #13913 from keymanapp/maint/linux/sourcepkg
Until now we accidentally included three files `linux/keyman_build_deps*` in the source package that get created during installing dependencies. This change deletes the files after installing the dependencies before we create the source package.
2025-05-15 16:28:08 +02:00
Eberhard Beilharz
8ef92c7d1b
Merge pull request #13912 from keymanapp/maint/linux/logging 2025-05-15 16:27:21 +02:00
Eberhard Beilharz
ab31d72f79
Merge pull request #13910 from keymanapp/maint/linux/questing
This adds the next Ubuntu version, 25.10 Questing Quokka, to the launchpad package builds.
2025-05-15 16:26:49 +02:00
Eberhard Beilharz
1f8b352529
Merge pull request #13904 from keymanapp/maint/linux/debpkg
This fixes Lintian warnings and other comments from the Debian review of the package. It also removes unnecessary files from the source package.

Note: this PR uses `Expat` instead of `MIT` in the `debian/license` file since that is the term that Debian uses and that the Debian tools output. It doesn't really matter since the term serves only as a key in the `license` file that links the files to the full text of the license further down in the `license` file.

Fixes: #13905
2025-05-15 16:25:38 +02:00
Eberhard Beilharz
eb82779380
maint(linux): remove temporary files created during dependency installation
Until now we accidentally included three files `linux/keyman_build_deps*`
in the source package that get created during installing dependencies.
This change deletes the files after installing the dependencies before
we create the source package.
2025-05-14 17:01:11 +02:00
Eberhard Beilharz
9254a391a6
maint(linux): fix logging in deb-packaging.sh 2025-05-14 16:41:55 +02:00
Eberhard Beilharz
2ff91ea0c5
maint(linux): add Questing to launchpad package builds
This adds the next Ubuntu version, 25.10 Questing Quokka to the launchpad
package builds.
2025-05-14 10:49:23 +02:00
Eberhard Beilharz
6c4904965c
Merge pull request #13909 from keymanapp/maint/linux/cleanupmeson
Since Keyman 18 we no longer require a patched ibus, so we can remove the check from the meson build file.
2025-05-14 10:46:41 +02:00
Eberhard Beilharz
d75372f3c3
maint(linux): remove check for patched ibus from meson.build
Since Keyman 18 we no longer require a patched ibus, so we can remove
the check from the meson build file.
2025-05-14 08:46:58 +02:00
Eberhard Beilharz
ac0f424aa0
maint(linux): ignore unnecessary files from source package 2025-05-13 20:07:33 +02:00
Eberhard Beilharz
fc79e38cc4
maint(linux): fix lintian warnings
This addresses comments from Debian review of the package.
2025-05-13 20:07:32 +02:00
Eberhard Beilharz
db4593127f
maint(linux): remove generated file that got accidentally committed
Test-bot: skip
2025-05-13 19:05:47 +02:00
Eberhard Beilharz
9d2ab35531
maint(common): move TC build configs for Linux to scripts
This change adds scripts for the TeamCity build configurations for
Linux builds.

Part-of: #13399
Test-bot: skip
2025-05-12 17:42:25 +02:00
Eberhard Beilharz
bd7470fc0e
maint(linux): improve getting PR# in upload-to-debian.sh
With this change we wait two seconds after creating the PR before trying
to get the number of the PR so that GitHub can catch up. Previously
recently it wasn't able to get the PR#.

Also adjust the commit message and use the new header for skipping tests.
2025-05-12 16:41:38 +02:00
Eberhard Beilharz
161ceb92da
chore(linux): Update debian changelog
(cherry picked from commit 1140972ba7930f1501cc3f44ad066c740d08e759)
2025-05-12 16:01:03 +02:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Eberhard Beilharz
477172dacc
Merge pull request #13842 from keymanapp/change/linux/icudep 2025-05-06 14:56:37 +02:00
Eberhard Beilharz
d661905c60
Merge pull request #13779 from keymanapp/maint/linux/tcnoble
This change overrides a check added in Ubuntu 24.04+ that prevents mixing Python packages installed through apt and through pip. This allows to install the necessary Python package for TC which isn't available as Debian package. This change allows builds on Ubuntu 24.04 based TC agents.
2025-05-06 14:56:12 +02:00
Eberhard Beilharz
5bc7c22f80
change(linux): add ICU dependency needed to build on Arch Linux
Co-authored-by: Nikita Moor <nikita@lreis.ac.cn>
Fixes: #13814
2025-05-06 12:11:10 +02:00
Eberhard Beilharz
397b5bdf93
maint(linux): streamline use of env variables to detect running on TC
This changes the variable we use to detect if we're running on TC to
be the same as the one used on #13810.
2025-05-06 11:49:59 +02:00
Eberhard Beilharz
cf93da452f
maint(linux): add clarifying comment on why different TEAMCITY variables 2025-05-06 11:46:48 +02:00
Marc Durdin
43cf66a9d4
Merge pull request #13796 from keymanapp/maint/meson-versioning-improvements
maint(common): cleanup meson versioning
2025-05-02 13:39:47 +07:00
Marc Durdin
9d2db4faf3 maint(common): consolidate standard.meson.build configuration
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
2025-04-30 09:16:43 +07:00