Commit graph

2104 commits

Author SHA1 Message Date
Eberhard Beilharz
591b153e89
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.

Cherry-pick-of: #14600
Build-bot: skip
Test-bot: skip
2025-08-25 15:56:48 +02:00
Eberhard Beilharz
95e594c1fa
maint(linux): fix lintian warnings
This addresses comments from Debian review of the package.

Cherry-pick-of: #13904
Test-bot: skip
2025-08-22 16:55:08 +02:00
Eberhard Beilharz
cc4de75bd7
Merge pull request #14118 from keymanapp/chore/linux/changelog 2025-06-05 12:28:46 +02:00
Eberhard Beilharz
a5290c1d5d
chore(linux): Update debian changelog 2025-06-04 19:14:19 +02:00
Eberhard Beilharz
305483d0b8
docs(linux): clarify requirement of patched ibus for Keyman < 18 🍒
Cherry-pick-of: #14112
Test-bot: skip
2025-06-04 11:56:31 +02:00
Eberhard Beilharz
4f27f6e256
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`.
2025-05-30 11:02:46 +02:00
Eberhard Beilharz
fc9efa39fb
maint(linux): fix typo of temporary dependency package
This fixes a typo when we try to remove the temporary files created
during dependency installation. This caused build failures because
the wrong spelling was not in the list of allowed commands, so sudo
kept asking for a password.
2025-05-30 10:48:28 +02:00
Eberhard Beilharz
c811af7029
Merge pull request #14000 from keymanapp/maint/linux/cherry-pick/13970_werror
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
Cherry-pick-of: #13988
2025-05-21 08:53:35 +02:00
Eberhard Beilharz
fdd1e79a45
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
Cherry-pick-of: #13988
Test-bot: skip
2025-05-20 15:10:16 +02:00
Eberhard Beilharz
f6dd1037c2
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).

(cherry picked from commit 8e4e92067d)
2025-05-20 15:01:50 +02:00
Eberhard Beilharz
55bf72d1e9
Merge pull request #13888 from keymanapp/chore/linux/changelog 2025-05-16 17:38:23 +02:00
Eberhard Beilharz
b02ced4cbb
chore(linux): Update debian changelog 2025-05-16 16:50:47 +02:00
Marc Durdin
084e92059e fix(linux): use correct header guard define in OrderedOutputDevice.h
Test-bot: skip
Fixes: #13911
Cherry-pick-of: #13962
2025-05-16 16:18:20 +02:00
Eberhard Beilharz
e3b7b25107
change(linux): add ICU dependency needed to build on Arch Linux 🍒
Co-authored-by: Nikita Moor <nikita@lreis.ac.cn>
Fixes: #13814
Cherry-pick-of: #13842
2025-05-06 14:58:28 +02:00
Eberhard Beilharz
7abb9b390a
chore(linux): add a stub unit test to allow successful coverage reporting
Previously keyman-system-service didn't have any unit tests. With the
gcov/lcov versions available for Ubuntu 24.04 Noble this suddenly caused
a failure when trying to generate the test coverage report, although it
worked fine with older versions.

This change adds a do-nothing unit test stub for keyman-system-service.
This allows to generate the coverage reporting with Ubuntu 24.04 Noble.

Cherry-pick-of: #13740
2025-04-24 10:15:53 +02:00
Eberhard Beilharz
2558b724b8
chore(linux): Update debian changelog 2025-04-23 11:21:14 +02:00
Marc Durdin
f4f0cf6e80 chore: stable-18.0 2025-04-23 07:06:13 +07:00
Eberhard Beilharz
8044de4649
chore(linux): Update debian changelog 2025-04-04 15:12:52 +02:00
Eberhard Beilharz
565f1b4dec
Merge pull request #13648 from keymanapp/fix/linux/13647_kbd-details
fix(linux): fix crash if kmp doesn't have name field

Fixes: #13647
Fixes: KEYMAN-LINUX-80
2025-04-04 08:57:49 +02:00
Eberhard Beilharz
d1b74d0175
chore(linux): fall back to package id
This change addresses a code review comment. In the case where the kmp
doesn't contain a name, we now use the `packageID` instead.
2025-04-03 15:56:07 +02:00
Eberhard Beilharz
6d39ab0b06
Merge pull request #13625 from keymanapp/fix/linux/13590_arrow-keys
fix(linux): allow unhandled keys to pass through to compliant apps

This change fixes a bug introduced in #13372. Before that engine.c determined if keys are handled or not. For keys that we didn't handle we returned FALSE. However, that didn't allow the Core to adjust the context where necessary, so #13372 moved that to Core. However, this caused ibus_keyman_engine_process_key_event to return TRUE even if we didn't handle the key. Instead we called ibus_engine_forward_key_event with the non-handled key. This worked in most applications, but not in the Text Editor.

This change now does no longer call ibus_engine_forward_key_event for compliant apps but instead returns FALSE from ibus_keyman_engine_process_key_event for unhandled keys, allowing the app to see and act on the key event.

An 'unhandled' key here is a key that doesn't match a rule in the keyboard and isn't a character key. Core returns a QIT_EMIT_KEYSTROKE action for that key.

Fixes: #13590
2025-04-03 10:26:27 +02:00
Eberhard Beilharz
5df36c05a4
fix(linux): fix crash if kmp doesn't have name field
Fixes: #13647
Fixes: KEYMAN-LINUX-80
2025-04-02 18:20:11 +02:00
Eberhard Beilharz
659e844f83
docs(linux): add function headers for some of the engine methods 2025-04-01 16:46:18 +02:00
Eberhard Beilharz
ac6b521583
docs(linux): clarify the newly added return values
Addresses code review comments.
2025-04-01 16:44:29 +02:00
Eberhard Beilharz
915d30cd95
fix(linux): fix cursor movement
This change fixes a bug introduced in #13372. Before that `engine.c`
determined if keys are handled or not. For keys that we didn't handle
we returned `FALSE`. However, that didn't allow the Core to adjust the
context where necessary, so #13372 moved that to Core. However, this
caused `ibus_keyman_engine_process_key_event` to return `TRUE` even if
we didn't handle the key. Instead we called `ibus_engine_forward_key_event`
with the non-handled key. This worked in most applications, but not
in the Text Editor.

This change now does no longer call `ibus_engine_forward_key_event` for
compliant apps but instead returns `FALSE` from
`ibus_keyman_engine_process_key_event` for unhandled keys, allowing the
app to see and act on the key event.

Fixes: #13590
2025-03-31 17:58:08 +02:00
Eberhard Beilharz
4a9a3dc55f
refactor(linux): remove a warning
The previous code resulted in warnings showing up:
`(ibus-engine-keyman:4276): GLib-CRITICAL **: 14:31:16.030: g_hash_table_lookup: assertion 'hash_table != NULL' failed`.
This should work around the warning.
2025-03-31 16:33:31 +02:00
Eberhard Beilharz
3e3a0dbce1
refactor(linux): mark undocumented keycodes as internal
Several keys that are defined in `winuser.h` were added after Keyman
defined its vkeys and so are not documented in the Keyman docs. This
change adds underscores before and after to mark them as being internal.
It's still useful to have them in the source code because it makes the
mapping between Linux keys and Keyman vkeys easier.

Addresses code review comment.
2025-03-26 16:49:31 +01:00
Eberhard Beilharz
a645fea903
fix(linux): improve key mapping to allow Core to reset context
This change tries to map all keys to corresponding Core VKeys so that
Core sees them and can reset the context if necessary. Previously we
had 0 for most of the keys, which meant that we didn't send them to
Core but instead returned right away. While this doesn't directly fix
the failing user tests described in #12968, it fixes the original tests
in #11172.

Closes: #12968
2025-03-21 18:15:46 +01:00
Eberhard Beilharz
74f3a2a975
fix(linux): improve emitting keystrokes
For some reason when using a LDML keyboard we ended up emitting a
keystroke even though Core returned `FALSE for `emitting_keystroke`.
I wasn't able to track down where this happened, but this change seems
like an easy way to fix it.

This showed up when debugging why the changes in #13372 didn't work for
non-compliant apps.
2025-03-21 09:03:21 +01:00
Eberhard Beilharz
42f7142b41
refactor(linux): rename initialize_queue method
The new name `initialize_queue_items` makes it clearer that we initialize
some items in the queue and not the entire queue (which might still
contain items that we do want to keep).
2025-03-20 18:09:34 +01:00
Eberhard Beilharz
5ccbb65be2
chore(linux): some more replacements of setup.py
The recommended replacement for `setup.py build` is to use the `build`
module, so we have to add this as additional build dependency.

This change also removes the `devdist` target from the makefile - it
isn't referenced in any script, so I think we can do without.

Unfortunately the `python3-build` package available on Ubuntu 22.04 Jammy
is buggy and looks for `/usr/local/bin/python` so we can't use that.
Instead we continue to use `setup.py` for building on Jammy.
2025-03-18 19:57:37 +01:00
Eberhard Beilharz
3346a31115
chore(linux): replace deprecated setup.py
Now that we no longer support Focal we can move to more modern ways of
installing `km-config`. This change removes the deprecated use of
`setup.py` and replaces it with `pip3 install`.

Fixes: #13319
2025-03-17 18:41:25 +01:00
Marc Durdin
f7bed1d2f6 chore(common): update tests where region data has been added
The 2025-02-18 release of langtags.json includes tag data for sa-Latn
and he-Latn, so tests related to those tags now need to account for
region.

Fixes: #13288
2025-03-10 09:33:01 +07:00
Darcy Wong
1380597be2
Merge branch 'beta' into chore/common/crowdin-vi 2025-03-05 19:45:39 +07:00
Eberhard Beilharz
5a58410312
chore(linux): Update debian changelog 2025-03-01 09:38:05 +01:00
Eberhard Beilharz
097a416a06
Merge pull request #13363 from keymanapp/fix/linux/13282_fcitx5-configtool
fix(linux): ignore exception when fcitx5-configtool is not found
2025-02-27 17:14:20 +01:00
Eberhard Beilharz
788e778645
Merge pull request #13356 from keymanapp/fix/linux/12902_UninstallException
fix(linux): ignore DBusException during install and uninstall
2025-02-27 15:28:52 +01:00
Eberhard Beilharz
d90b718aa5
fix(linux): ignore exception when fcitx5-configtool is not found
Fixes: #13282
Fixes: KEYMAN-LINUX-7S
2025-02-27 11:12:30 +01:00
Eberhard Beilharz
749039b120
chore(linux): update to current Debian policy version 2025-02-27 10:02:16 +01:00
Eberhard Beilharz
a35c6b3c29
Merge pull request #13355 from keymanapp/refactor/linux/tests
refactor(linux): extract method for setting up mocks in tests
2025-02-27 08:37:20 +01:00
Eberhard Beilharz
6fe916ca8b
fix(linux): ignore DBusException during install and uninstall
Fixes: #12902
Fixes: #13283
Fixes: KEYMAN-LINUX-7J
Fixes: KEYMAN-LINUX-7R
2025-02-26 18:24:27 +01:00
Eberhard Beilharz
a4492963e9
refactor(linux): improve dbus_util.py code 2025-02-26 17:19:09 +01:00
Eberhard Beilharz
3e09884c68
chore(linux): adjust to renamed xdg module
The `xdg` module got renamed to `xdg_base_dirs`. However, Ubuntu still
ships the `python3-xdg` package with the old module, so we'll have to
support both so that it'll work with both Ubuntu packages and in a
virtual environment.
2025-02-26 12:14:00 +01:00
Eberhard Beilharz
615d90765c
refactor(linux): extract method for setting up mocks in tests 2025-02-26 12:01:54 +01:00
Eberhard Beilharz
2c7cd3a8d2
chore(linux): Update to new Debian policy version 2025-02-22 12:22:34 +01:00
Darcy Wong
1a1056ca50 chore(common): Add crowdin strings for Vietnamese 2025-02-22 07:37:36 +07:00
Eberhard Beilharz
3d77fe7492
fix(linux): address compiling with ICU 76
Turns out that Keyman 18 already compiles with ICU 76, so the only thing
left to do is mark the Debian bug as being closed by this change.

Fixes: #12920
2025-02-19 17:25:02 +01:00
Eberhard Beilharz
11694db9e3
Merge pull request #13234 from keymanapp/refactor/linux/13204_enable-integration-tests
refactor(linux): re-enable integration tests 🕷️
2025-02-19 11:54:27 +01:00
Eberhard Beilharz
ca96a8c38d
chore(linux): address code review comments 2025-02-19 10:59:44 +01:00
Eberhard Beilharz
30224a1b41
Merge pull request #13248 from keymanapp/refactor/linux/cleanup-tests
refactor(linux): cleanup code of test fixture 🕷️
2025-02-17 17:11:52 +01:00