From 988eeb491086548127d0a5b22c7116f8a49deb23f1bd41e2db3fba023e5cc979 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 20 Dec 2022 15:34:06 +0000 Subject: [PATCH] Accepting request 1042310 from home:favogt:branches:Base:System - Add patch to fix Caps_Lock mapping for us.map and others (bsc#1202853): * 0001-ckbcomp-Fix-check-for-non-ascii.patch OBS-URL: https://build.opensuse.org/request/show/1042310 OBS-URL: https://build.opensuse.org/package/show/Base:System/console-setup?expand=0&rev=13 --- 0001-ckbcomp-Fix-check-for-non-ascii.patch | 34 ++++++++++++++++++++++ console-setup.changes | 6 ++++ console-setup.spec | 11 ++++--- 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 0001-ckbcomp-Fix-check-for-non-ascii.patch diff --git a/0001-ckbcomp-Fix-check-for-non-ascii.patch b/0001-ckbcomp-Fix-check-for-non-ascii.patch new file mode 100644 index 0000000..5262420 --- /dev/null +++ b/0001-ckbcomp-Fix-check-for-non-ascii.patch @@ -0,0 +1,34 @@ +From c73920250a124b9c6a73ed7211af74df993d449b Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Mon, 12 Dec 2022 09:54:11 +0100 +Subject: [PATCH] ckbcomp: Fix check for non-ascii + +It did a string comparision with "127" (0x7f converted to string) which is +true also for characters below 100, like '1' (51) or 'Q' (81) because the +first letter of the string representation of their ASCII value is > '1'. + +This bug meant that even maps which didn't need it had $broken_caps = 1, +leading to Caps_Lock getting replaced by CtrlL_Lock. With this patch, maps +like 'us' use Caps_Lock again. + +Signed-off-by: Fabian Vogt +--- + Keyboard/ckbcomp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Keyboard/ckbcomp b/Keyboard/ckbcomp +index adbcd79..6108fff 100755 +--- a/Keyboard/ckbcomp ++++ b/Keyboard/ckbcomp +@@ -4376,7 +4376,7 @@ sub print_vector { + my $u = ord (uc (pack ("U", $v))); + my $c = ($v == $l ? $u : $l); + $capsvector[$mask] = $1 ."U+". sprintf ("%04x", $c); +- if ($v != $c && $v gt 0x7f) { ++ if ($v != $c && $v > 0x7f) { + $broken_caps = 1; + } + } +-- +2.38.1 + diff --git a/console-setup.changes b/console-setup.changes index 55cb861..749d05d 100644 --- a/console-setup.changes +++ b/console-setup.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 12 09:54:28 UTC 2022 - Fabian Vogt + +- Add patch to fix Caps_Lock mapping for us.map and others (bsc#1202853): + * 0001-ckbcomp-Fix-check-for-non-ascii.patch + ------------------------------------------------------------------- Thu Jan 24 13:39:33 UTC 2019 - sndirsch@suse.com diff --git a/console-setup.spec b/console-setup.spec index 2686290..0783525 100644 --- a/console-setup.spec +++ b/console-setup.spec @@ -1,7 +1,7 @@ # # spec file for package console-setup # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -21,8 +21,8 @@ Version: 1.134 Release: 0 Summary: Tools for configuring the console using X Window System key maps License: GPL-2.0-or-later AND MIT AND SUSE-Public-Domain -Group: Applications/System -Url: http://packages.debian.org/cs/sid/console-setup +Group: Applications/System +URL: http://packages.debian.org/cs/sid/console-setup Source: http://ftp.de.debian.org/debian/pool/main/c/%{name}/%{name}_%{version}.tar.xz # Fixes installing paths to Fedora style Patch0: console-setup-1.76-paths.patch @@ -34,6 +34,8 @@ Patch2: console-setup-1.134-perl526.patch Patch3: console-setup-1.134-reproducible.patch # Fix Shift-Tab mapping (bsc#1122361) Patch4: u_fix-iso-left-tab.patch +# Fix using Caps_Lock where possible (bsc#1202853). Sent upstream. +Patch5: 0001-ckbcomp-Fix-check-for-non-ascii.patch BuildRequires: perl BuildRequires: perl(encoding) @@ -55,6 +57,7 @@ supports several languages that would be otherwise unsupported on the console %patch2 -p1 -b .perl526 %patch3 -p1 -b .reproducible %patch4 -p1 -b .shift-tab +%patch5 -p1 -b .nonascii %build make build-linux