From 39645ee18ee52e2748f28d1b5ad907e7d304b40b Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Mon, 24 Oct 2011 13:59:45 +0200 Subject: [PATCH] Fix loadkeys -d option (patch by Jaroslav Skarvada) --- kbd-1.15.3-loadkeys-d.patch | 20 ++++++++++++++++++++ kbd.spec | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 kbd-1.15.3-loadkeys-d.patch diff --git a/kbd-1.15.3-loadkeys-d.patch b/kbd-1.15.3-loadkeys-d.patch new file mode 100644 index 0000000..73bb7c4 --- /dev/null +++ b/kbd-1.15.3-loadkeys-d.patch @@ -0,0 +1,20 @@ +diff -up kbd-1.15.3/src/loadkeys.c.orig kbd-1.15.3/src/loadkeys.c +--- kbd-1.15.3/src/loadkeys.c.orig 2011-10-24 13:44:52.222401546 +0200 ++++ kbd-1.15.3/src/loadkeys.c 2011-10-24 13:47:52.413389029 +0200 +@@ -2958,7 +2958,7 @@ int main(int argc, char *argv[]) + close(fd); + } + +- for (i = optind; argv[i]; i++) { ++ for (i = optind; argv[i] || optd; i++) { + FILE *f; + char *ev; + +@@ -2974,6 +2974,7 @@ int main(int argc, char *argv[]) + if (optd) { + /* first read default map - search starts in . */ + optd = 0; ++ i--; + if ((f = findfile(DEFMAP, dirpath, suffixes)) == NULL) { + fprintf(stderr, _("Cannot find %s\n"), DEFMAP); + exit(EXIT_FAILURE); diff --git a/kbd.spec b/kbd.spec index 82a307e..014b170 100644 --- a/kbd.spec +++ b/kbd.spec @@ -1,6 +1,6 @@ Name: kbd Version: 1.15.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tools for configuring the console (keyboard, virtual terminals, etc.) Group: System Environment/Base @@ -26,6 +26,8 @@ Patch4: kbd-1.15-defkeymap.patch Patch5: kbd-1.15.3-fix-es-translation.patch # Patch6: add missing dumpkeys option to man page Patch6: kbd-1.15.3-dumpkeys-man.patch +# Patch7: already accepted by upstream +Patch7: kbd-1.15.3-loadkeys-d.patch BuildRequires: bison, flex, gettext Conflicts: util-linux < 2.11r-9 @@ -54,6 +56,7 @@ keymaps etc. Please note that %{name}-misc is not helpful without kbd. %patch4 -p1 -b .defkeymap %patch5 -p1 -b .fix-es-fixtranslation %patch6 -p1 -b .dumpkeys-man +%patch7 -p1 -b .loadkeys-d # 7-bit maps are obsolete; so are non-euro maps pushd data/keymaps/i386 @@ -136,6 +139,10 @@ rm -rf $RPM_BUILD_ROOT /lib/kbd %changelog +* Mon Oct 24 2011 Vitezslav Crhonek - 1.15.3-3 +* Fix loadkeys -d option (patch by Jaroslav Skarvada) + Resolves: #744567 + * Tue Aug 23 2011 Vitezlsav Crhonek - 1.15.3-2 - Add missing dumpkeys option to man page Resolves: #732121