Commit graph

2589 commits

Author SHA1 Message Date
Eberhard Beilharz
9e991a14e0
Merge pull request #15133 from keymanapp/chore/linux/cherry-pick/changelog 2025-11-17 08:32:41 +01:00
Marc Durdin
8f95d84014
Merge pull request #15114 from keymanapp/maint/resources/builder-timing
maint(resources): add build timing report to builder
2025-11-14 14:24:11 +01:00
Eberhard Beilharz
e56619911d
chore(linux): add support for Ubuntu 26.04 LTS Resolute
Build-bot: skip
Test-bot: skip
2025-11-11 11:28:20 +01:00
Eberhard Beilharz
3a942a92f0
chore(linux): Update debian changelog
(cherry picked from commit 9eeb6be695)
2025-11-10 17:06:49 +01:00
Marc Durdin
c573709ee6 maint(resources): add build timing report to builder
This is enabled automatically for CI builds, and can be enabled with
`--timing` parameter otherwise. Also, adds `builder_launch`,
documentation to come.

Test-bot: skip
2025-11-10 11:03:45 +01:00
Eberhard Beilharz
57681ce516
Merge pull request #14965 from keymanapp/chore/linux/cherry-pick/changelog
chore(linux): Update debian changelog 🍒
2025-11-04 19:28:46 +01:00
Eberhard Beilharz
e77d2432ef
Merge pull request #14973 from keymanapp/chore/linux/14957_parseversion
chore(linux): replace deprecated `parse_version`

`pkg_resources` which contains `parse_version` is deprecated. Latest versions output a warning. This change uses the suggested replacement, `package.version.parse` which is available in all supported Ubuntu versions.

Fixes: #14957
2025-10-17 09:15:18 +02:00
Eberhard Beilharz
917c6c20a1
Merge pull request #14971 from keymanapp/fix/linux/10178_exitibus
fix(linux): use `ibus` command to restart ibus

When using Kubuntu exiting ibus sometimes used to hang (#10178). This was because ibus' `bus.exit()` doesn't shutdown properly (see https://github.com/ibus/ibus/issues/2816#issuecomment-3410473708). The recommended way is to use the `ibus exit` command. Since we no longer use the API we can directly use the `ibus restart` command, which this PR implements.

Fixes: #10178
2025-10-17 09:14:46 +02:00
Eberhard Beilharz
ddb9522337
chore(linux): replace deprecated parse_version
`pkg_resources` which contains `parse_version` is deprecated. Latest
versions output a warning. This change uses the suggested replacement,
`package.version.parse` which is available in all supported Ubuntu
versions.

Fixes: #14957
2025-10-16 18:27:57 +02:00
Eberhard Beilharz
9fb6618924
Merge pull request #14950 from keymanapp/test/linux/clitests
test(linux): add regression tests for cli tools to autopkgtests 🍲

This change adds tests that execute km-package-install, km-package-list-installed, and km-package-uninstall and verifies the results. We have two sets of tests, for both gnome-shell and ibus-proper environments.
2025-10-16 18:03:04 +02:00
Eberhard Beilharz
be2118aaf2
Merge pull request #14962 from keymanapp/fix/linux/14943_installschema
fix(linux): install schema during `keyman-config/build.sh install`

- improve documentation for installing km-config
- install schema during `keyman-config/build.sh install`
- remove schema during `keyman-config/build.sh uninstall`
- improve two scenarios when running `keyman-config/build.sh install`:
    - on newer Ubuntu versions it's no longer possible to directly install Python packages, so we have to use a virtual environment. This change detects a virtual environment and installs into that.
    - detect if we're running directly as `root` user instead of `sudo` and explicitly install into `/usr/local`.
- remove obsolete targets from Makefile. `make deb` no longer worked, so this change removes it. The other removed targets in the Makefile were just calling `./build.sh` and so are not really necessary and not used.
- update packaging documentation

Fixes: #14943
2025-10-16 17:12:09 +02:00
Eberhard Beilharz
1958cd52bf
fix(linux): use ibus command to restart ibus
When using Kubuntu exiting ibus sometimes used to hang (#10178). This
was because ibus' `bus.exit()` doesn't shutdown properly
(see https://github.com/ibus/ibus/issues/2816#issuecomment-3410473708).
The recommended way is to use the `ibus exit` command. Since we no longer
use the API we can directly use the `ibus restart` command, which this
PR implements.

Fixes: #10178
2025-10-16 16:58:18 +02:00
Eberhard Beilharz
da1371ff4c
fix(linux): remove schema during keyman-config/build.sh uninstall
Part-of: #14943
Test-bot: skip
2025-10-16 16:47:57 +02:00
Eberhard Beilharz
7574d2eb68
Merge pull request #14953 from keymanapp/fix/linux/14911_instshared
fix(linux): fix installing keyboard in shared area 🍲

Installing into the shared area (`/usr/local/share`) requires `root` permissions, so in order to install into the shared area the user has to call `km-package-install` with `sudo`. But we also want to add the keyboard to the user's list of available keyboards so that he can switch to it. That needs to be done in the user context. However, when `sudo` ran the command in the user context, the environment variables to connect to the user's session dbus were not set.

This change fixes this by passing `DBUS_SESSION_BUS_ADDRESS` along with the `sudo -u <user>` call. Since `root` doesn't have this variable set (or at least not pointing to the user's dbus), we construct the dbus address based on the user's uid.

On newer Ubuntu versions (>=25.04) we also have to set `XDG_RUNTIME_DIR`, at least when running the autopkgtests.

Fixes: #14911
2025-10-16 15:33:34 +02:00
Eberhard Beilharz
7da6a4e98c
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-10-16 15:17:35 +02:00
Eberhard Beilharz
58875a5680
fix(linux): refactor common strings
Also some other minor changes to address code review comments.
2025-10-16 12:33:56 +02:00
Eberhard Beilharz
be62a31a25
Merge pull request #14938 from keymanapp/chore/linux/sentryautopkgtests
chore(linux): don't report errors to Sentry when running autopkgtests 🍲
2025-10-16 12:11:09 +02:00
Eberhard Beilharz
b5535ff4c0
Merge pull request #14956 from keymanapp/refactor/linux/removeoldcode
refactor(linux): remove no-longer-needed Python 3.7 code

Our oldest supported Ubuntu version is 22.04 which comes with Python 3.10, so we can remove the code for Python 3.7.
2025-10-16 11:36:50 +02:00
Eberhard Beilharz
3e51820482
chore(linux): Update debian changelog
(cherry picked from commit 392d85a1ad)
2025-10-15 12:09:39 +02:00
Eberhard Beilharz
f9a41473c0
chore(linux): remove obsolete targets from Makefile
`make deb` no longer worked, so this change removes it. The other targets
were just calling `./build.sh` and so are not really necessary and not
used.
2025-10-15 11:57:02 +02:00
Eberhard Beilharz
211f05afe3
fix(linux): improve local installation
This improves two scenarios when running `keyman-config/build.sh install`:
- on newer Ubuntu versions it's no longer possible to directly install
  Python packages, so we have to use a virtual environment. This change
  detects a virtual environment and installs into that.
- detect if we're running directly as `root` user instead of `sudo`
  and explicitly install into `/usr/local`.

Test-bot: skip
2025-10-15 11:57:02 +02:00
Eberhard Beilharz
d3abb26bca
fix(linux): install schema during keyman-config/build.sh install
Also improve detection when running with root permissions.

Fixes: #14943
Test-bot: skip
2025-10-15 11:57:01 +02:00
Eberhard Beilharz
d1fa884266
refactor(linux): remove no-longer-needed code
Our oldest supported Ubuntu version is 22.04 which comes with Python 3.10,
so we can remove the code for Python 3.7.

Test-bot: skip
2025-10-14 18:03:57 +02:00
Eberhard Beilharz
69513108e3
test(linux): add regression tests for cli tools to autopkgtests
This change adds tests that execute km-package-install,
km-package-list-installed, and km-package-uninstall and verifies the
results. We have two sets of tests, for both gnome-shell and
ibus-proper environments.

Test-bot: skip
2025-10-14 17:54:36 +02:00
Eberhard Beilharz
b7d5e89577
fix(linux): fix installing keyboard in shared area
Installing into the shared area (`/usr/local/share`) requires `root`
permissions, so in order to install into the shared area the user has
to call `km-package-install` with `sudo`. But we also want to add the
keyboard to the user's list of available keyboards so that he can
switch to it. That needs to be done in the user context. However,
when `sudo` ran the command in the user context, the environment
variables to connect to the user's session dbus were not set.

This change fixes this by passing `DBUS_SESSION_BUS_ADDRESS` along
with the `sudo -u <user>` call. Since `root` doesn't have this variable
set (or at least not pointing to the user's dbus), we construct the
dbus address based on the user's uid.

On newer Ubuntu versions (>=25.04) we also have to set `XDG_RUNTIME_DIR`,
at least when running the autopkgtests.

Fixes: #14911
2025-10-14 17:54:36 +02:00
Eberhard Beilharz
3690fec1f2
fix(linux): don't cache files when running with sudo
When running `km-package-install` with `sudo`, cache files owned by
root get created in the users directory. This makes it harder to
replace, and if the user tries to install the keyboard again under his
user account, installation will fail. This change prevents the use
of the cache when running with `sudo`.

Test-bot: skip
2025-10-14 09:55:47 +02:00
Eberhard Beilharz
eaf0183460
chore(linux): don't report errors to Sentry when running autopkgtests
Test-bot: skip
2025-10-13 18:29:24 +02:00
Eberhard Beilharz
584e9d87aa
refactor(linux): extract functions
Test-bot: skip
2025-10-10 15:50:25 +02:00
Eberhard Beilharz
6ef624e7e6
fix(linux): replace dbus-x11 dependency
When using a different DBus implementation `dbus-launch` might not exist,
but instantiating a `SessionBus` object might start a session dbus if
it's not already running. This change also replaces the `dbus-x11`
dependency with `default-dbus-session-bus | dbus-session-bus` and changes
the way we detect if dbus is already running.

Also remove `DBUS_SESSION_BUS_ADDRESS` from `sudo gsettings` call. It
turns out we don't need this since we execute the `gsettings` command
in the context of the user anyway which connects to the user's session
dbus.

Fixes: #14888
2025-10-07 16:23:49 +02:00
Eberhard Beilharz
65f2e354eb
maint(linux): suppress output of stopping processes after test run
This change suppresses the output of ending the processes started for
the test run. The output doesn't help much but clutters the overall
output and shows up as warnings on TC.
2025-10-06 16:13:44 +02:00
Eberhard Beilharz
6c2237d800
Merge pull request #14817 from keymanapp/maint/linux/13887_integrtests
maint(linux): fix integration tests in Docker

This PR allows the integration tests to work when running them in a Docker container. Also fixes things when running on TC's Ubuntu 24.04 Noble build agent, and improves the behavior when running directly on a developer's machine (previously typing stopped working after the tests...).

Also fixes building mcompile in a Docker container.

Fixes: #13887
2025-10-06 12:01:38 +02:00
Eberhard Beilharz
5862a061bc
Merge pull request #14856 from keymanapp/chore/linux/cherry-pick/changelog
chore(linux): Update debian changelog 🍒
2025-10-06 12:01:03 +02:00
Eberhard Beilharz
4f38d527b4
Apply suggestions from code review
Co-authored-by: Markus Greiner <90342882+Markus-SWAG@users.noreply.github.com>
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-09-30 11:01:31 +02:00
Eberhard Beilharz
167ec33d54
chore(linux): Merge remote-tracking branch 'origin/master' into maint/linux/remotedbgdocker 2025-09-30 08:29:02 +02:00
Eberhard Beilharz
994cb7327e
chore(linux): Update debian changelog
(cherry picked from commit d93f3a4931)
2025-09-29 11:38:55 +02:00
Eberhard Beilharz
2997536abb
Merge branch 'master' into chore/linux/lintian 2025-09-29 08:54:10 +02:00
Eberhard Beilharz
4d477d4a64
docs(linux): update comment 2025-09-26 17:50:49 +02:00
Eberhard Beilharz
e0e4276fb3
maint(linux): improve running integration tests on developer's machine
This improves running the integration tests on a developer's machine.
While the tests did run fine it was no longer possible to type after
running the tests. The reason was that starting the `ibus-daemon` for
testing together with `mutter` replaced some processes that belonged to
the `ibus-daemon` of the session.

This change now checks if ibus is still functional after killing the
testing `ibus-daemon` (by checking the current engine with `ibus engine`).
Otherwise it kills the lonely remaining `ibus-daemon` and restarts `ibus`.

Test-bot: skip
2025-09-25 19:34:22 +02:00
Eberhard Beilharz
e0d0a4d4c1
maint(linux): fix running integration tests in Docker
Fixes: #13887
Test-bot: skip
2025-09-25 19:32:29 +02:00
Eberhard Beilharz
db3cd5092d
maint(linux): remove several shellcheck directives and warnings
This change improves our `.shellcheckrc` file so that several directives
are no longer needed and source files are still found. Also remove some
directives that are no longer necessary, either because the changes to
`.shellcheckrc` makes them obsolete, or because the lines changed so
that they no longer contain the problem.

Also remove some shellcheck warnings.

Build-bot: skip
Test-bot: skip
2025-09-23 18:30:16 +02:00
Eberhard Beilharz
23f8c59c07
maint(linux): allow to remote debug integration tests in Docker
This adds a `--remote-debug` option to `resources/docker-images/run.sh`.
If specified the container will expose `localhost:2345` for remote
debugging inside of the container.

This is useful for debugging integration tests in the container.

Build-bot: skip
Test-bot: skip
2025-09-23 18:20:32 +02:00
Eberhard Beilharz
ddc0ae77e3
chore(linux): remove no longer needed lintian overrides
It looks like we no longer need these lintian overrides:
- `package-contains-documentation-outside-usr-share-doc` got resolved
  by excluding these directories from our source package
- the other one was a false positive that looks like it got fixed in
  Debian
2025-09-22 17:54:43 +02:00
Eberhard Beilharz
643a7fb984
Merge pull request #14802 from keymanapp/refactor/linux/testscript 2025-09-22 12:02:53 +02:00
Eberhard Beilharz
9f4ba0c51b
Merge pull request #14801 from keymanapp/refactor/linux/mesonwarning 2025-09-22 12:02:39 +02:00
Eberhard Beilharz
9037871235
Merge pull request #14798 from keymanapp/maint/linux/cherry-pick/cherryupload 2025-09-22 12:02:20 +02:00
Eberhard Beilharz
b2046e065a
refactor(linux): remove shellcheck warnings
Build-bot: skip
Test-bot: skip
2025-09-19 18:41:26 +02:00
Eberhard Beilharz
37e0491b49
refactor(linux): remove a meson deprecation warning
`meson.build_root()` is deprecated in Meson 1.0+.

Test-bot: skip
2025-09-19 18:38:54 +02:00
Eberhard Beilharz
c1c0c1f926
maint(linux): improve upload-to-debian script 🍒🍒
- directly get PR# from `gh pr create`
- add `Build-bot: skip` trailers
- 🍒-pick of the improved 🍒-pick #14785

Cherry-pick-of: #14785
Build-bot: skip
Test-bot: skip
2025-09-19 15:45:07 +02:00
Eberhard Beilharz
ce09b38a38
chore(linux): Update debian changelog
(cherry picked from commit 7c0c097f14)
2025-09-18 11:35:19 +02:00
Eberhard Beilharz
259ccfcf10
chore(linux): remove automatic installation of onboard-keyman
`onboard-keyman` isn't available on Debian/Ubuntu and doesn't work
properly with Wayland. This change removes the `onboard-keyman`
recommends which used to cause `onboard-keyman` to be installed
automatically together with `keyman`. The user can still manually install
`onboard-keyman`.

Fixes: #14769
Fixes: #5214
Build-bot: skip
Test-bot: skip
2025-09-17 15:30:32 +02:00