SHA256
1
0
forked from pool/systemd

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
This commit is contained in:
Robert Milasan 2013-04-03 07:18:50 +00:00 committed by Git OBS Bridge
parent ba1450f318
commit 1494fb1124
6 changed files with 45 additions and 23 deletions

View File

@ -158,12 +158,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c
int r = EXIT_FAILURE; int r = EXIT_FAILURE;
pid_t font_pid = 0, keymap_pid = 0; pid_t font_pid = 0, keymap_pid = 0;
@@ -273,10 +379,15 @@ int main(int argc, char **argv) { @@ -277,6 +383,10 @@ 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;
#elif defined(TARGET_SUSE) #elif defined(TARGET_SUSE)
r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
"KEYTABLE", &vc_keymap, "KEYTABLE", &vc_keymap,
@ -174,7 +169,16 @@ Index: systemd-195/src/vconsole/vconsole-setup.c
NULL); NULL);
if (r < 0 && r != -ENOENT) if (r < 0 && r != -ENOENT)
log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r)); 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); 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) load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)
r = EXIT_SUCCESS; r = EXIT_SUCCESS;
@@ -443,6 +558,14 @@ finish: @@ -443,6 +559,14 @@ finish:
if (keymap_pid > 0) if (keymap_pid > 0)
wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); 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) if (font_pid > 0)
wait_for_terminate_and_warn(KBD_SETFONT, font_pid); 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);
free(vc_font_map); free(vc_font_map);
free(vc_font_unimap); free(vc_font_unimap);

View File

@ -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 Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com

View File

@ -62,6 +62,7 @@ BuildRequires: xz
BuildRequires: pkgconfig(blkid) >= 2.20 BuildRequires: pkgconfig(blkid) >= 2.20
BuildRequires: pkgconfig(dbus-1) >= 1.3.2 BuildRequires: pkgconfig(dbus-1) >= 1.3.2
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
BuildRequires: libgcrypt-devel
BuildRequires: pkgconfig(glib-2.0) >= 2.22.0 BuildRequires: pkgconfig(glib-2.0) >= 2.22.0
BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2 BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2
%endif %endif

View File

@ -17,9 +17,17 @@ Index: systemd-195/src/vconsole/vconsole-setup.c
int r = EXIT_FAILURE; int r = EXIT_FAILURE;
pid_t font_pid = 0, keymap_pid = 0; pid_t font_pid = 0, keymap_pid = 0;
@@ -380,6 +382,37 @@ int main(int argc, char **argv) { @@ -386,6 +388,7 @@ int main(int argc, char **argv) {
vc_keymap = t; "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; 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) { + if (vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "BIOS") == 0) {
+ int hwinfo_fd[2]; + int hwinfo_fd[2];
@ -53,17 +61,9 @@ Index: systemd-195/src/vconsole/vconsole-setup.c
+ } else + } else
+ numlock = vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "YES") == 0; + numlock = vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "YES") == 0;
#elif defined(TARGET_SUSE) #elif defined(TARGET_ARCH)
r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, r = parse_env_file("/etc/rc.conf", NEWLINE,
@@ -387,6 +420,7 @@ int main(int argc, char **argv) { @@ -558,6 +592,10 @@ 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) {
finish: finish:
if (keymap_pid > 0) if (keymap_pid > 0)
wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);

View File

@ -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 Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com

View File

@ -57,6 +57,7 @@ BuildRequires: xz
BuildRequires: pkgconfig(blkid) >= 2.20 BuildRequires: pkgconfig(blkid) >= 2.20
BuildRequires: pkgconfig(dbus-1) >= 1.3.2 BuildRequires: pkgconfig(dbus-1) >= 1.3.2
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
BuildRequires: libgcrypt-devel
BuildRequires: pkgconfig(glib-2.0) >= 2.22.0 BuildRequires: pkgconfig(glib-2.0) >= 2.22.0
BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2 BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2
%endif %endif