From 8c41c28b11897d979d433e5e3048380b17868d37c309780a407400b3a83739d6 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Wed, 3 Apr 2013 07:18:50 +0000 Subject: [PATCH] Accepting request 162277 from home:sbrabec:branches:Base:System - Fixed disabling CapsLock and enabling NumLock (bnc#746595, 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch, systemd-numlock-suse.patch). - Explicitly require libgcrypt-devel to fix build failure. OBS-URL: https://build.opensuse.org/request/show/162277 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=360 --- ...aplock-and-compose_table-and-kbd_rat.patch | 22 +++++++++------ systemd-mini.changes | 8 ++++++ systemd-mini.spec | 1 + systemd-numlock-suse.patch | 28 +++++++++---------- systemd.changes | 8 ++++++ systemd.spec | 1 + 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch b/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch index d04cb888..561a47f7 100644 --- a/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch +++ b/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch @@ -158,12 +158,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; -@@ -273,10 +379,15 @@ int main(int argc, char **argv) { - free(vc_keymap); - vc_keymap = t; - } -+ disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; - +@@ -277,6 +383,10 @@ int main(int argc, char **argv) { #elif defined(TARGET_SUSE) r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, "KEYTABLE", &vc_keymap, @@ -174,7 +169,16 @@ Index: systemd-195/src/vconsole/vconsole-setup.c NULL); if (r < 0 && r != -ENOENT) log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r)); -@@ -435,7 +546,11 @@ int main(int argc, char **argv) { +@@ -289,6 +399,8 @@ int main(int argc, char **argv) { + if (r < 0 && r != -ENOENT) + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); + ++ disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; ++ + #elif defined(TARGET_ARCH) + r = parse_env_file("/etc/rc.conf", NEWLINE, + "KEYMAP", &vc_keymap, +@@ -435,7 +547,11 @@ int main(int argc, char **argv) { disable_utf8(fd); @@ -187,7 +191,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) r = EXIT_SUCCESS; -@@ -443,6 +558,14 @@ finish: +@@ -443,6 +559,14 @@ finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); @@ -202,7 +206,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c if (font_pid > 0) wait_for_terminate_and_warn(KBD_SETFONT, font_pid); -@@ -450,6 +573,12 @@ finish: +@@ -450,6 +574,12 @@ finish: free(vc_font); free(vc_font_map); free(vc_font_unimap); diff --git a/systemd-mini.changes b/systemd-mini.changes index bb9a582c..7beeb90a 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 2 22:09:42 CEST 2013 - sbrabec@suse.cz + +- Fixed disabling CapsLock and enabling NumLock (bnc#746595, + 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch, + systemd-numlock-suse.patch). +- Explicitly require libgcrypt-devel to fix build failure. + ------------------------------------------------------------------- Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index a4426a6b..506d62e2 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -62,6 +62,7 @@ BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 BuildRequires: pkgconfig(dbus-1) >= 1.3.2 %if ! 0%{?bootstrap} +BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(glib-2.0) >= 2.22.0 BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2 %endif diff --git a/systemd-numlock-suse.patch b/systemd-numlock-suse.patch index 1e89d398..104aa171 100644 --- a/systemd-numlock-suse.patch +++ b/systemd-numlock-suse.patch @@ -17,9 +17,17 @@ Index: systemd-195/src/vconsole/vconsole-setup.c int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; -@@ -380,6 +382,37 @@ int main(int argc, char **argv) { - vc_keymap = t; - } +@@ -386,6 +388,7 @@ int main(int argc, char **argv) { + "KBD_DELAY", &vc_kbd_delay, + "KBD_RATE", &vc_kbd_rate, + "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, ++ "KBD_NUMLOCK", &vc_kbd_numlock, + "COMPOSETABLE", &vc_compose_table, + NULL); + if (r < 0 && r != -ENOENT) +@@ -400,6 +403,37 @@ int main(int argc, char **argv) { + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); + disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; + if (vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "BIOS") == 0) { + int hwinfo_fd[2]; @@ -53,17 +61,9 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + } else + numlock = vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "YES") == 0; - #elif defined(TARGET_SUSE) - r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, -@@ -387,6 +420,7 @@ int main(int argc, char **argv) { - "KBD_DELAY", &vc_kbd_delay, - "KBD_RATE", &vc_kbd_rate, - "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, -+ "KBD_NUMLOCK", &vc_kbd_numlock, - "COMPOSETABLE", &vc_compose_table, - NULL); - if (r < 0 && r != -ENOENT) -@@ -557,6 +591,10 @@ int main(int argc, char **argv) { + #elif defined(TARGET_ARCH) + r = parse_env_file("/etc/rc.conf", NEWLINE, +@@ -558,6 +592,10 @@ int main(int argc, char **argv) { finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); diff --git a/systemd.changes b/systemd.changes index bb9a582c..7beeb90a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 2 22:09:42 CEST 2013 - sbrabec@suse.cz + +- Fixed disabling CapsLock and enabling NumLock (bnc#746595, + 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch, + systemd-numlock-suse.patch). +- Explicitly require libgcrypt-devel to fix build failure. + ------------------------------------------------------------------- Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 1f84175b..c8c21f9f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -57,6 +57,7 @@ BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 BuildRequires: pkgconfig(dbus-1) >= 1.3.2 %if ! 0%{?bootstrap} +BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(glib-2.0) >= 2.22.0 BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2 %endif