Commit graph

1921 commits

Author SHA1 Message Date
Eberhard Beilharz
40aa8b8646
Merge pull request #11356 from keymanapp/chore/linux/fixtest
chore(linux): Fix typo
2024-05-06 11:34:35 +02:00
Eberhard Beilharz
7478db8b57
chore(linux): Fix typo
This suddenly started failing. I guess there was a deprecated
`assertEquals` in older Python libraries, but with the latest version in
Ubuntu 24.04 Noble this disappeared. Anyway, with this change we use
the same assert method as in the other test files.
2024-05-03 17:39:14 +02:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Marc Durdin
f119682cf0
Merge branch 'master' into chore/a18s1-merge-beta-into-master 2024-05-02 14:48:58 +10:00
Marc Durdin
38a0359361
Merge pull request #11295 from keymanapp/fix/linux/icon
fix(linux): Fix icon for .kmp files
2024-05-01 14:21:43 +10:00
Eberhard Beilharz
d81cff200b
Merge pull request #11292 from keymanapp/fix/linux/11225_environment-detection
fix(linux): Improve detection of Gnome environment
2024-04-30 15:52:41 +02:00
Eberhard Beilharz
888ec56d5a
chore(linux): Prepare for stable release
- Adjust branch name
- Update Debian standards version
- Update dependency name (`pkg-config` is deprecated and replaced by
  `pkgconf`)
2024-04-25 09:29:35 +02:00
Eberhard Beilharz
e9398133fc
chore(linux): Install python3-dev
On a new machine we need to install python3-dev so that we can access
`Python.h`. It shouldn't be in `debian/control`, so we put in our
script where we check the requirements.
2024-04-24 18:38:40 +02:00
Eberhard Beilharz
627703734a
fix(linux): Fix icon for .kmp files
It seems some Ubuntu versions ignore the `icon` field and only use
`generic-icon`, so this change adds that field. This will fix displaying
the icon on newer Ubuntu versions. And since we keep the `icon` field
it should still work everywhere else.

Fixes #11144.
2024-04-24 18:00:41 +02:00
Eberhard Beilharz
2044b188f8
fix(linux): Improve detection of Gnome environment
This change improves the way we detect if we're running a Gnome based
UI that needs it's keyboards installed under
`org.gnome.desktop.input-sources`. We use the environment variable
`XDG_CURRENT_DESKTOP` and check if it contains the word `gnome`.
Additionally this change renames `is_gnome_shell()` to
`is_gnome_desktop()`.

Fixes #11225.
2024-04-23 15:16:03 +02:00
Eberhard Beilharz
00a9335dc8
Merge pull request #11097 from keymanapp/chore/linux/cherry-pick/changelog
chore(linux): Update debian changelog 🍒
2024-04-02 08:28:12 +02:00
Darcy Wong
c8395c4598 chore(common): Merge beta to master Sprint b17s4 2024-03-28 09:54:49 +07:00
Eberhard Beilharz
a59ccfe804
chore(linux): Update debian changelog
(cherry picked from commit 0bf30d3ef9)
2024-03-27 17:15:00 +01:00
Eberhard Beilharz
0bf30d3ef9
chore(linux): Update debian changelog 2024-03-27 17:14:55 +01:00
Eberhard Beilharz
b4755c20ac
feat(linux): Add pyxdg as binary pkg dependency and to setup.py 2024-03-22 18:10:30 +01:00
Eberhard Beilharz
aefcfb1849
fix(linux): Fix cleanup of files 2024-03-22 15:42:27 +01:00
Eberhard Beilharz
6b292ae7b7
fix(linux): Don't expect DBUS_SESSION_BUS_PID to be set
`DBUS_SESSION_BUS_PID` gets only set when launching dbus in the process,
but not when it's already running.
2024-03-22 15:41:50 +01:00
Eberhard Beilharz
23a558d88e
feat(linux): Deal with temporary dbus session
When we launch dbus if it is not running, we're probably (un-)installing
keyboards for a different user. This is an unusual environment where not
everything is available, e.g. dconf-service won't be running and can't
be started because DISPLAY variable is not set. This means we can't
write gsettings values through the API. However, we can read them, and we
can write a keyfile and update the database. This is what this change
implements for the cases where we started dbus.
2024-03-22 12:54:50 +01:00
Eberhard Beilharz
27b09fc728
chore(linux): Merge branch 'beta' into feat/linux/9363DBusEnv 2024-03-20 15:48:43 +01:00
Eberhard Beilharz
d7d5c8045b
Merge pull request #10860 from keymanapp/fix/linux/10850_deprecation
fix(linux): Replace deprecated `pkg_resources` module with `packaging.version`
2024-03-20 15:47:34 +01:00
Eberhard Beilharz
2af4a04881
fix(linux): Start ibus if not running
Also need to start as daemon so that it works when run as a different user.
2024-03-20 12:17:57 +01:00
Eberhard Beilharz
b9d116adad
fix(linux): Replace deprecated pkg_resources module in remaining places
Previous commit missed a few places where `pkg_resources` module was
used.
2024-03-20 11:44:00 +01:00
Eberhard Beilharz
01b8016b92
chore(linux): Merge remote-tracking branch 'origin/beta' into feat/linux/9363DBusEnv 2024-03-20 11:24:35 +01:00
Eberhard Beilharz
37024fa832
chore(linux): Change order of initialization
If we want to log messages we need to start DBus after we initialized
logging.
2024-03-20 11:18:28 +01:00
Darcy Wong
39b56b3e9a chore(common): Merge 'origin/master' into chore/beta-to-master-b17s3 2024-03-15 10:57:03 -05:00
Eberhard Beilharz
9d4213bb6a
Merge branch 'beta' into fix/linux/10850_deprecation 2024-03-05 10:47:58 +01:00
Eberhard Beilharz
046c25b3d2
Merge branch 'beta' into fix/linux/postinst
# Conflicts:
#	linux/debian/changelog
2024-03-05 10:42:54 +01:00
Eberhard Beilharz
af7b17f054
Merge branch 'master' into chore/b17s2-merge-beta-to-master 2024-03-05 10:13:36 +01:00
Marc Durdin
f18d9aa6b8
Merge branch 'master' into chore/b17s2-merge-beta-to-master 2024-03-01 13:39:14 +07:00
Eberhard Beilharz
92c3848846
chore(linux): Update debian changelog
(cherry picked from commit 024553dd26)
2024-02-29 19:17:49 +01:00
Eberhard Beilharz
024553dd26
chore(linux): Update debian changelog 2024-02-29 19:17:22 +01:00
Eberhard Beilharz
42fd48c808
fix(linux): Improve error values 2024-02-29 18:54:25 +01:00
Eberhard Beilharz
f899627129
fix(linux): Add packaging Python dependency
It isn't enough to have the package as build dependency, we also have to
list is in the binary package or in the `install_requires` list in
`setup.py`. This change also adds other missing python modules to
`install_requires` so that things work correctly if building/installing
from source.
2024-02-29 18:50:30 +01:00
Eberhard Beilharz
639ac25397
chore(linux): Merge remote-tracking branch 'origin/beta' into feat/linux/9363DBusEnv 2024-02-29 18:10:17 +01:00
Eberhard Beilharz
42e76d4a88
fix(linux): Fix package problem with alpha version
In Keyman 17 Alpha and the first versions of Beta the package name was
`libkeymancore` before we changed it to `libkeymancore1`. If that
version is installed we can't install the new package because it causes
conflicts. This change fixes it.
2024-02-29 15:14:14 +01:00
Eberhard Beilharz
adcca9ae5c
chore(linux): Merge branch 'beta' into fix/linux/postinst 2024-02-29 15:04:13 +01:00
Eberhard Beilharz
973af61495
fix(linux): Fix libkeymancore-dev dependencies
This change adds `libicu-dev` as a dependency for `libkeymancore-dev`.
While it is possible to dynamically build without ICU it is required
when doing a static build.

Closes #10864 and [Debian bug #1064915](
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064915).
2024-02-28 18:58:42 +01:00
Eberhard Beilharz
664b5e0d54
Update linux/help/about/whatsnew.md
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2024-02-28 10:15:45 +01:00
Eberhard Beilharz
196796b67a
feat(linux): Start dbus if not running
This change checks the DBus environment variables when initializing the
`keyman_config` module and starts DBus if the variables are not set.
This particularly happens when trying to install or uninstall a keyboard
for a different user, which will now be possible with this change.

Fixes #9363.
2024-02-27 19:13:02 +01:00
Eberhard Beilharz
b9ef6d7bb5
fix(linux): Replace deprecated pkg_resources module with packaging.version
Fixes #10850.
2024-02-27 17:41:07 +01:00
Eberhard Beilharz
f94650fd6a
docs(linux): Updated whatsnew for Keyman for Linux 17
Closes #10715.
2024-02-27 16:30:30 +01:00
Eberhard Beilharz
753ae80bea
chore(linux): Merge remote-tracking branch 'origin/beta' into fix/linux/postinst 2024-02-27 16:01:36 +01:00
Eberhard Beilharz
c4f612b6c0
Merge pull request #10828 from keymanapp/chore/linux/changelog
chore(linux): Update debian changelog
2024-02-27 10:01:43 +01:00
Eberhard Beilharz
8ff35c8657
fix(linux): fix regex to detect running ibus-daemon
On Ubuntu 20.04 Focal ibus gets started by a shell command so that we
end up with two processes mentioning `ibus-daemon`. This change limits
the search to processes that specify with full path to `ibus-daemon` or
without path, but `ibus-daemon` has to be the command, not a parameter.
2024-02-26 18:40:23 +01:00
Eberhard Beilharz
d396a397e3
chore(linux): Use ibus start if available
IBus around version 1.5.28 introduced the `start` subcommand for `ibus`.
If available we use that because that starts `ibus-daemon` with the
correct arguments. If the available IBus version is too old we use
our previous code where we pass arguments to `ibus-daemon` which might
be different from how ibus gets started on that system otherwise.
2024-02-26 16:34:46 +01:00
Eberhard Beilharz
8e0cb667ca
fix(linux): Remove ibus-keyman.post{inst,rm}
This is no longer needed and might cause problems because not all the
dependencies have been necessarily set up when we try to start Keyman.

Fixes #8996 and #10478.
2024-02-26 16:34:45 +01:00
Eberhard Beilharz
5e661c4196
fix(linux): When starting km-package-install verify that ibus-daemon is running 2024-02-26 16:34:45 +01:00
Eberhard Beilharz
131d4989ec
fix(linux): When starting km-config verify that ibus-daemon is running 2024-02-26 16:34:44 +01:00
Eberhard Beilharz
8c8d339bb1
refactor(linux): Change verify_ibus_daemon to return a state 2024-02-26 16:34:44 +01:00