From 88e71afeeb5f5f2c65c2b1ebb1553bca4c0b4305 Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 13 Feb 2024 19:30:11 +0300 Subject: [PATCH] Fix keyboard layout order --- ...ackport-bugfixes-for-keyboard-layout.patch | 44 +++++++++++++++++++ SPECS/anaconda.spec | 6 ++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0012-Backport-bugfixes-for-keyboard-layout.patch diff --git a/SOURCES/0012-Backport-bugfixes-for-keyboard-layout.patch b/SOURCES/0012-Backport-bugfixes-for-keyboard-layout.patch new file mode 100644 index 0000000..1a6ec82 --- /dev/null +++ b/SOURCES/0012-Backport-bugfixes-for-keyboard-layout.patch @@ -0,0 +1,44 @@ +From d6795301a2adecb99e94e0d5a91dbe5404b370f5 Mon Sep 17 00:00:00 2001 +From: Anton Volkov +Date: Thu, 8 Feb 2024 20:59:29 +0300 +Subject: [PATCH] Backport bugfixes for keyboard layout: + https://bugzilla.redhat.com/show_bug.cgi?id=1039185 + https://bugzilla.redhat.com/show_bug.cgi?id=1912609 + +--- + pyanaconda/keyboard.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py +index 2c3226c..3ab47bc 100644 +--- a/pyanaconda/keyboard.py ++++ b/pyanaconda/keyboard.py +@@ -171,8 +171,10 @@ def set_x_keyboard_defaults(localization_proxy, xkl_wrapper): + # store it normalized + new_layouts = [normalize_layout_variant(layouts[0])] + if not langtable.supports_ascii(layouts[0]): +- # does not support typing ASCII chars, append the default layout +- new_layouts.append(DEFAULT_KEYBOARD) ++ # The default keymap setting should have "us" before the native layout ++ # which does not support ascii, ++ # refer: https://bugzilla.redhat.com/show_bug.cgi?id=1039185 ++ new_layouts.insert(0, DEFAULT_KEYBOARD) + else: + log.error("Failed to get layout for chosen locale '%s'", locale) + new_layouts = [DEFAULT_KEYBOARD] +@@ -181,6 +183,12 @@ def set_x_keyboard_defaults(localization_proxy, xkl_wrapper): + if conf.system.can_configure_keyboard: + xkl_wrapper.replace_layouts(new_layouts) + ++ # the console layout configured should be "native" by default, ++ # setting that explicitly for non-ascii layouts where we prepend "us" ++ # refer: https://bugzilla.redhat.com/show_bug.cgi?id=1912609 ++ if len(new_layouts) >= 2 and not langtable.supports_ascii(new_layouts[1]): ++ localization_proxy.SetVirtualConsoleKeymap(new_layouts[1]) ++ + if len(new_layouts) >= 2 and not localization_proxy.LayoutSwitchOptions: + # initialize layout switching if needed + localization_proxy.SetLayoutSwitchOptions(["grp:alt_shift_toggle"]) +-- +2.39.3 + diff --git a/SPECS/anaconda.spec b/SPECS/anaconda.spec index 2246ab6..c838d0e 100644 --- a/SPECS/anaconda.spec +++ b/SPECS/anaconda.spec @@ -1,7 +1,7 @@ Summary: Graphical system installer Name: anaconda Version: 33.16.9.4 -Release: 1%{?dist}.inferit.3 +Release: 1%{?dist}.inferit.4 License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -22,6 +22,7 @@ Patch8: 0008-Set-Russian-as-default-language-for-new-regions.patch Patch9: 0009-MSVSphere-Adaptation-Patch.patch Patch10: 0010-Fix-smt-url.patch Patch11: 0011-Enable-administrator-by-default.patch +Patch12: 0012-Backport-bugfixes-for-keyboard-layout.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -383,6 +384,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d %{_prefix}/libexec/anaconda/dd_* %changelog +* Tue Feb 13 2024 Arkady L. Shane - 33.16.9.4-1.inferit.4 +- Fix keyboard layout order + * Tue Jan 23 2024 Arkady L. Shane - 33.16.9.4-1.inferit.3 - Fix typo