Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL-10: Backport localed patchset #6000

Open
wants to merge 6 commits into
base: rhel-10
Choose a base branch
from

Conversation

jkonecny12
Copy link
Member

@jkonecny12 jkonecny12 commented Nov 15, 2024

Backport patches related to localed from #5829 to RHEL-10.

Resolves: RHEL-58181

@jkonecny12
Copy link
Member Author

jkonecny12 commented Nov 15, 2024

I wonder, this patchset technically contains two parts:

  • localed patches
  • RDP improvements and fixes

I guess we want to split this into two but I guess we also want another RDP bug for these tweaks. Splitting shouldn't be hard to do when I was looking on the code.

Also, I will fix RHEL-58834 separately (with backports of #5962 and #5979). We might add the RDP fixes into this maybe? WDYT @jstodola?

RESOLVED by splitting this PR into two

@jkonecny12 jkonecny12 marked this pull request as draft November 15, 2024 17:21
@jkonecny12
Copy link
Member Author

Converting to draft as this PR will most likely get split into two.

The plan is to use systemd-localed to control compositor keyboard and
replace current `gk_keyboard_manager`. Most of the code is in place
already but we need to add a few missing ones.

The most problematic is missing support for next layout. The issue is
that localed service don't have support for selection, to resolve this
issue we will set the first in the list as selected.

However, it means that we have to keep what user has set from Anaconda
so we can find next candidate when switch to next layout is requested.
Keep the information when user set the layouts to the compositor.

(cherry picked from commit d9ed3f7)

Related: RHEL-58181
with this patch when compositor will change keyboard layout we will be
able to react to that in Anaconda.

This is mostly useful for Live ISO images.

We have two signals currently to resolve that something has changed, one
of the signals is that selected layout has changed in the compositor.
The issue is that localed service doesn't have information about
selected (first is taken as selected). To resolve that we need to keep
values from our last query or last signal about the change so we are
able to detect the change in selection.

(cherry picked from commit 1b6b2c6)

Resolves: RHEL-58181
Because of the switch to Wayland Anaconda has to change compositor
keyboard manager because libxklavier doesn't work on Wayland.

To fix that we migrated to Gnome Kiosk DBus API in RHEL-10, however,
this solution can't be used outside of Gnome Kiosk. For that reason,
we are switching to Localed which we set as the default to enable
Anaconda to control keyboard switching.

(cherry picked from commit 4dcdcf6)

Resolves: RHEL-58181
This logic was used to disable keyboard switching for given system.
However, we we support even Wayland systems with the new solution, so
let's remove this.

(cherry picked from commit cc9ad83)

Related: RHEL-58181
If Anaconda will set keyboard layouts to compositor but options are
missed then we shouldn't change the compositor options but rather use
what is already set.

This will avoid problematic behavior of changing what user has defined
in the system or similar cases. Also we have this tested in
kickstart-tests, so this commit is fixing these tests.

Also fix existing tests and cover this functionality by tests.

(cherry picked from commit e810bba)

Related: RHEL-58181
@jkonecny12 jkonecny12 force-pushed the rhel-10-backport-wayland-patchset branch from 72acf9a to d1f442f Compare November 18, 2024 11:06
@jkonecny12
Copy link
Member Author

I've separated part of this change set into #6004

@jkonecny12 jkonecny12 marked this pull request as ready for review November 18, 2024 11:07
@jkonecny12
Copy link
Member Author

/kickstart-test --testtype smoke

@jkonecny12
Copy link
Member Author

/kickstart-test --testtype coverage

@jkonecny12
Copy link
Member Author

/kickstart-test --testtype keyboard

@jkonecny12
Copy link
Member Author

Local testing done and passed.

Copy link
Contributor

@M4rtinK M4rtinK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good as well. :)

@jkonecny12 jkonecny12 added the ready to merge The PR can be merged. It should have all BZ flags required for releasing set (usually release+). label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation ready to merge The PR can be merged. It should have all BZ flags required for releasing set (usually release+). rhel-10
Development

Successfully merging this pull request may close these issues.

2 participants