File: localectl-disable-keymap-support.patch

package info (click to toggle)
systemd 254.26-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 88,636 kB
  • sloc: ansic: 582,679; xml: 100,173; python: 31,414; sh: 24,999; makefile: 244; awk: 99; lisp: 13; sed: 1
file content (49 lines) | stat: -rw-r--r-- 2,974 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Luca Boccassi <bluca@debian.org>
Date: Wed, 8 Feb 2023 20:34:38 +0000
Subject: localectl-disable-keymap-support

We no longer support old debianisms such as /etc/default/keyboard,
so disable the keymap interface in localectl until a definitive
solution is found.
---
 src/locale/localectl.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index d8db9d9..cd1d6cd 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -386,6 +386,10 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
         return 0;
 }
 
+static int not_supported(int argc, char **argv, void *userdata) {
+        return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Setting X11 and console keymaps is not supported in Debian.");
+}
+
 static int help(void) {
         _cleanup_free_ char *link = NULL;
         int r;
@@ -400,10 +404,7 @@ static int help(void) {
                "  status                   Show current locale settings\n"
                "  set-locale LOCALE...     Set system locale\n"
                "  list-locales             Show known locales\n"
-               "  set-keymap MAP [MAP]     Set console and X11 keyboard mappings\n"
                "  list-keymaps             Show known virtual console keyboard mappings\n"
-               "  set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]\n"
-               "                           Set X11 and console keyboard mappings\n"
                "  list-x11-keymap-models   Show known X11 keyboard mapping models\n"
                "  list-x11-keymap-layouts  Show known X11 keyboard mapping layouts\n"
                "  list-x11-keymap-variants [LAYOUT]\n"
@@ -503,9 +504,9 @@ static int localectl_main(sd_bus *bus, int argc, char *argv[]) {
                 { "status",                   VERB_ANY, 1,        VERB_DEFAULT, show_status           },
                 { "set-locale",               2,        VERB_ANY, 0,            set_locale            },
                 { "list-locales",             VERB_ANY, 1,        0,            list_locales          },
-                { "set-keymap",               2,        3,        0,            set_vconsole_keymap   },
+                { "set-keymap",               2,        3,        0,            not_supported         },
                 { "list-keymaps",             VERB_ANY, 1,        0,            list_vconsole_keymaps },
-                { "set-x11-keymap",           2,        5,        0,            set_x11_keymap        },
+                { "set-x11-keymap",           2,        5,        0,            not_supported         },
                 { "list-x11-keymap-models",   VERB_ANY, 1,        0,            list_x11_keymaps      },
                 { "list-x11-keymap-layouts",  VERB_ANY, 1,        0,            list_x11_keymaps      },
                 { "list-x11-keymap-variants", VERB_ANY, 2,        0,            list_x11_keymaps      },