Commit graph

2535 commits

Author SHA1 Message Date
Eberhard Beilharz
189ee50e24
fix(linux): don't crash if kmp.json is missing keyboards section
Some keyboards seem to be missing the `keyboards` section in the
`kmp.json` file. This change prevents a crash and instead returns `None`
and thus we don't create a .ldml file and so onboard will show the
default keyboard instead. The alternative would be to create an empty
.ldml file, but that causes onboard to show a keyboard with all key caps
being empty.

Fixes: #14707
Fixes: KEYMAN-LINUX-8P
Test-bot: skip
2025-09-08 18:06:36 +02:00
Eberhard Beilharz
5c9e4f2c08
maint(linux): remove obsolete Makefile
All commands from `linux/Makefile` are now available elsewhere and not
used anymore. The one exception was `make tmpsources` - this change
moves the code to the TC build script.

Test-bot: skip
2025-09-05 10:40:16 +02:00
Eberhard Beilharz
a3ec6bed17
Merge pull request #14598 from keymanapp/maint/linux/packaging
This change creates a temporary worktree for creating Debian packages. This will allow us to work from a clean state of the source repo. Also exclude any generated patch directories (`.pc`).
2025-09-01 15:11:48 +02:00
Eberhard Beilharz
6e2049b788
Merge pull request #14639 from keymanapp/maint/linux/14563_tarignore
This generates the `--tar-ignore`s to avoid having to manually maintain the list when adding new files or folders for other platforms. Instead now we have a list of files and directories to include, and a list of exceptions to exclude from the includes. From that we generate the tar-ignore list.

Fixes: #14563
2025-09-01 15:05:12 +02:00
Eberhard Beilharz
c8bea7496f
maint(linux): remove residues of previous runs on startup 2025-08-29 12:33:06 +02:00
Eberhard Beilharz
a1287739b4
maint(linux): more doc comments 2025-08-29 12:15:56 +02:00
Eberhard Beilharz
906b6a45fc
maint(linux): add doc comments 2025-08-29 09:57:25 +02:00
Eberhard Beilharz
537ffcff9d
Update linux/scripts/dist.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-29 09:39:15 +02:00
Eberhard Beilharz
3dbb7e56c7
Merge pull request #14572 from keymanapp/refactor/linux/launchpad 2025-08-28 19:14:52 +02:00
Eberhard Beilharz
2754e4bef4
maint(linux): generate tar-ignore in dist.sh
This generates the `--tar-ignore`s to avoid having to manually maintain
the list when adding new files or folders for other platforms. Instead
now we have a list of files and directories to include, and a list of
exceptions to exclude from the includes. From that we generate the
tar-ignore list.

Fixes: #14563
Test-bot: skip
2025-08-28 18:41:29 +02:00
Eberhard Beilharz
f9c23a5fba
refactor(linux): clarify missing quotes around ${SIM}
Addresses code review comment.
2025-08-28 17:18:15 +02:00
Eberhard Beilharz
cf273a27d9
maint(linux): address code review comments 2025-08-28 16:48:08 +02:00
Eberhard Beilharz
5d8b20dad6
Apply suggestion from @mcdurdin
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-28 15:48:22 +02:00
Eberhard Beilharz
f9be8e4132
chore(linux): Update debian changelog
(cherry picked from commit 701f7b72ec)
2025-08-27 18:02:50 +02:00
Eberhard Beilharz
4b5faef475
Merge pull request #14603 from keymanapp/refactor/linux/packaging-tests 2025-08-27 12:05:56 +02:00
Eberhard Beilharz
6cf43ddace
maint(linux): address code review comments 2025-08-25 17:47:45 +02:00
Eberhard Beilharz
488c0a684e
refactor(linux): use bash testing framework for packaging tests 2025-08-25 17:35:27 +02:00
Eberhard Beilharz
d201802e75
maint(linux): ignore generate patch directories
During a package build a  patch directory (`.pc`) might get created.
That can't and shouldn't be part of the source package. This change
excludes any `.pc` directories.

Build-bot: skip
Test-bot: skip
2025-08-25 15:54:54 +02:00
Eberhard Beilharz
525d54ab65
maint(linux): preserve created package files
Copy the generated files before removing the worktree so that they
are still available for reference.
2025-08-25 15:38:49 +02:00
Eberhard Beilharz
66b6a69909
maint(linux): create temporary worktree for packaging
This change creates a temporary worktree for creating Debian packages.
This will allow us to work from a clean state of the source repo. Also
exclude any generated patch directories (`.pc`).

Build-bot: skip
Test-bot: skip
2025-08-25 15:22:14 +02:00
Eberhard Beilharz
3c4264387c
refactor(linux): allow to run launchpad.sh from any directory
Previously the assumption was that `launchpad.sh` would be run from the
`linux` directory. This change sets the directory at the beginning of
the script, allowing it to be run from any directory. Also specify full
path to `launchpad.sh` in the TC build script.

Build-bot: skip
Test-bot: skip
2025-08-20 17:53:57 +02:00
Eberhard Beilharz
5efab30415
refactor(linux): remove shellcheck warnings and reformat
Build-bot: skip
Test-bot: skip
2025-08-20 17:14:35 +02:00
Marc Durdin
8ef8871eca
Merge pull request #14562 from keymanapp/maint/mac/14478-mac-inc-prefix
maint(mac): use mac_ prefix for functions in mac.inc.sh
2025-08-20 19:24:13 +07:00
Eberhard Beilharz
72ea66832d
Merge pull request #14542 from keymanapp/fix/linux/14465_normalizeLanguage
This fixes a bug where a keyboard didn't show up in the language dropdown if the first language it specified wasn't a normalized language tag. Previously in that case we added a custom keyboard with whatever language tag the keyboard specified. With this change we now continue to use the first language of the first keyboard but normalize it. Since the selection of the language now happens a little earlier it is slightly possible that there will be unexpected side effects that didn't show up in my testing.

Fixes: #14465
2025-08-20 14:09:11 +02:00
Marc Durdin
0d27ac91f7 maint(mac): use mac_ prefix for functions in mac.inc.sh
* Also renames resources/environment.sh to resources/build/mac/xcode-environment.inc.sh.
* Adds a few more exclusions to linux/scripts/dist.sh

Fixes: #14478
Test-bot: skip
Build-bot: build
2025-08-20 05:40:32 +02:00
Eberhard Beilharz
57970724fa
refactor(linux): some code cleanup in bash completion script
Build-bot: skip
Test-bot: skip
2025-08-18 19:54:33 +02:00
Eberhard Beilharz
951793ea84
fix(linux): normalize language tags from keyboard
This fixes a bug where a keyboard didn't show up in the language dropdown
if the first language it specified wasn't a normalized language tag.
Previously in that case we added a custom keyboard with whatever language
tag the keyboard specified. With this change we now continue to use
the first language of the first keyboard but normalize it. Since the
selection of the language now happens a little earlier it is slightly
possible that there will be unexpected side effects that didn't show up
in my testing.

Fixes: #14465
2025-08-18 19:49:38 +02:00
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