Hello community, here is the log from the commit of package kbd checked in at Thu Jun 5 17:31:51 CEST 2008. -------- --- kbd/kbd.changes 2008-05-19 12:40:19.000000000 +0200 +++ /mounts/work_src_done/STABLE/kbd/kbd.changes 2008-06-04 18:56:12.122747000 +0200 @@ -1,0 +2,6 @@ +Wed Jun 4 18:53:46 CEST 2008 - werner@suse.de + +- Add "-C" option also to dumpkeys to make kbd init script work on + /dev/console and /dev/tty even within e.g. xterm (bnc#337238) + +------------------------------------------------------------------- New: ---- kbd-1.12-dumpkeys-C-opt.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kbd.spec ++++++ --- /var/tmp/diff_new_pack.m22306/_old 2008-06-05 17:30:46.000000000 +0200 +++ /var/tmp/diff_new_pack.m22306/_new 2008-06-05 17:30:46.000000000 +0200 @@ -17,7 +17,7 @@ Group: System/Console AutoReqProv: on Version: 1.12 -Release: 182 +Release: 186 Summary: Keyboard and Font Utilities Source: ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/kbd/%{name}-%{version}.tar.bz2 Source1: kbd_fonts.tar.bz2 @@ -61,6 +61,7 @@ Patch26: kbd-%{version}-setfont-no-cruft.diff Patch27: kbd-%{version}-be-nice-to-kdm.diff Patch28: bnc147581_jp106.diff +Patch29: kbd-%{version}-dumpkeys-C-opt.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq %insserv_prereq BuildRequires: bison flex @@ -117,6 +118,7 @@ %patch26 -p1 # %patch27 -p1 # obsoleted. #302010 %patch28 -p1 +%patch29 -p0 %build for i in `find data/keymaps/mac -type f` ; do @@ -334,6 +336,9 @@ #rm -rf $RPM_BUILD_DIR/kbd-%{version} %changelog +* Wed Jun 04 2008 werner@suse.de +- Add "-C" option also to dumpkeys to make kbd init script work on + /dev/console and /dev/tty even within e.g. xterm (bnc#337238) * Mon May 19 2008 jw@suse.de - added ru1_win-utf.map fixing bnc#337238 * Wed May 07 2008 werner@suse.de ++++++ kbd-1.12-dumpkeys-C-opt.diff ++++++ --- man/man1/dumpkeys.1.in +++ man/man1/dumpkeys.1.in 2008-06-04 18:26:00.885947236 +0200 @@ -4,6 +4,7 @@ dumpkeys \- dump keyboard translation tables .SH SYNOPSIS .B dumpkeys +.RI [ \-C\ '<vc>' | \-\-console='<vc>' ] [ .B \-hilfn .BI \-c charset @@ -197,6 +198,12 @@ This option produces an output line `cha loadkeys how to interpret the keymap. (For example, "division" is 0xf7 in iso-8859-1 but 0xba in iso-8859-8.) .LP +The affected console device can be specified using the +.I -C +(or +.I --console +) option. This option supports exactly one device name. +.LP .SH FILES .PD 0 .TP 20 --- src/dumpkeys.c +++ src/dumpkeys.c 2008-06-04 18:20:51.762445784 +0200 @@ -31,6 +31,7 @@ static int fd; static int verbose; static int nr_keys = 0; /* probably 112, 128, 256 or 512 */ +static char * console; int keymap_index[MAX_NR_KEYMAPS]; /* inverse of good_keymap */ int good_keymap[MAX_NR_KEYMAPS], keymapnr, allocct; @@ -560,6 +561,8 @@ valid options are:\n\ --funcs-only display only the function key strings\n\ --keys-only display only key bindings\n\ --compose-only display only compose key combinations\n\ + -C <vc>\n\ + --console=<vc> Indicate the virtual console device to be used.\n\ -c --charset=")); list_charsets(stderr); fprintf(stderr, _("\ @@ -571,7 +574,7 @@ valid options are:\n\ int main (int argc, char *argv[]) { - const char *short_opts = "hilvsnf1S:c:V"; + const char *short_opts = "hilvsnf1S:c:C:V"; const struct option long_opts[] = { { "help", no_argument, NULL, 'h' }, { "short-info", no_argument, NULL, 'i' }, @@ -584,6 +587,7 @@ main (int argc, char *argv[]) { { "keys-only", no_argument, NULL, 'k' }, { "compose-only",no_argument, NULL, 'd' }, { "charset", required_argument, NULL, 'c' }, + { "console", required_argument, NULL, 'C' }, { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } @@ -642,6 +646,9 @@ main (int argc, char *argv[]) { usage(); printf("charset \"%s\"\n", optarg); break; + case 'C': + console = optarg; + break; case 'V': print_version_and_exit(); case 'h': @@ -653,7 +660,7 @@ main (int argc, char *argv[]) { if (optind < argc) usage(); - fd = getfd(NULL); + fd = getfd(console); find_nr_keys(); ++++++ kbd.init ++++++ --- kbd/kbd.init 2008-05-07 18:31:16.000000000 +0200 +++ /mounts/work_src_done/STABLE/kbd/kbd.init 2008-06-04 18:59:31.531198000 +0200 @@ -95,10 +95,11 @@ test -c /dev/$tty || continue > /dev/$tty &> /dev/null || continue # consider settings in /etc/sysconfig/keyboard:KBD_TTY - if test -n "$KBD_TTY"; then - echo "$KBD_TTY" | grep -q $tty || continue - fi - newkbd="${newkbd:+$newkbd }/dev/$tty" + test -z "$KBD_TTY" && continue + case ":${KBD_TTY// /:}:" in + *:$tty:*) + newkbd="${newkbd:+$newkbd }/dev/$tty" + esac done KBD_TTY="$newkbd" unset newkbd @@ -161,9 +162,16 @@ if test -n "$KBD_DELAY"; then KBDOPT="${KBDOPT:+$KBDOPT }-d $KBD_DELAY" fi - if test -n "$KBDOPT" ; then + if test -n "$KBDOPT" -a -x /bin/kbdrate ; then echo -n "Keyboard: " - /bin/kbdrate $KBDOPT + for tty in $KBD_TTY; do + /bin/kbdrate $KBDOPT < $tty 2> /dev/null + rc_status + case "$KBDOPT" in + *-s*) continue ;; + esac + KBDOPT="${KBDOPT:+$KBDOPT }-s" + done rc_status -v1 fi fi @@ -446,32 +454,39 @@ case "$RUNLEVEL" in S|N|1|\#) true ;; *) + trap "rm -f /dev/shm/defkeymap.map" EXIT SIGTERM + if test -n "$KBD_TTY" ; then + dumpkeys -C ${KBD_TTY%% *} + else + dumpkeys + fi > /dev/shm/defkeymap.map + case $LOCALE_CHARMAP in UTF-8) # Change the keyboard mapping in such a way that the # non-ASCII keys produce UTF-8 encoded multibyte sequences # instead of single bytes >= 0x80 in a legacy 8-bit encoding. - ( dumpkeys | loadkeys -C "$KBD_TTY" --unicode ) > /dev/null 2>&1 + loadkeys -C "$KBD_TTY" --unicode /dev/shm/defkeymap.map > /dev/null 2>&1 ;; *) ;; esac - dumpkeys=yes - if type -p cmp > /dev/null 2>&1 && \ - dumpkeys | cmp -s /etc/defkeymap.map + + if type -p cmp > /dev/null 2>&1 && cmp -s /etc/defkeymap.map /dev/shm/defkeymap.map then - dumpkeys=no + rm -f /dev/shm/defkeymap.map fi - if test "$dumpkeys" = "yes" ; then + if test -s /dev/shm/defkeymap.map ; then # FIXME: this should be done much earlier # to avoid bugzilla# 259694 or similar. - ( dumpkeys > /etc/defkeymap.map ) > /dev/null 2>&1 + mv /dev/shm/defkeymap.map /etc/defkeymap.map if test ! -z "$KEYMAP" && test "$KEYMAP" != "/etc/defkeymap.map" ; then test ! -e "$KEYMAP" && KEYMAP=$K echo $KEYMAP > /etc/defkeymap.name fi fi + trap - EXIT SIGTERM esac ;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de