diff --git a/kbd.changes b/kbd.changes index ae314cd..f344c38 100644 --- a/kbd.changes +++ b/kbd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue May 19 16:25:37 CEST 2009 - mmarek@suse.cz + +- remove testutf8 (replace with a script that returns 2 in any + terminal), it's a hack that has a number of problems (bnc#436378, + bnc#334889). Users who don't want utf8 should adjust their locale + setting accordingly. + +------------------------------------------------------------------- +Tue May 19 14:40:11 CEST 2009 - mmarek@suse.cz + +- do not load any usb drivers, udev takes care of this (bnc#482316). + ------------------------------------------------------------------- Mon Nov 10 12:10:09 CET 2008 - mmarek@suse.cz diff --git a/kbd.init b/kbd.init index dab23fb..e762ebf 100644 --- a/kbd.init +++ b/kbd.init @@ -101,37 +101,6 @@ done KBD_TTY="$newkbd" unset newkbd -# -# load usb drivers in runlevel S -# -case "${PREVLEVEL}${RUNLEVEL}" in - N1|NS) - test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null - -# [bugzilla #46113] -# we come here although heading for runlevel 5. -# I'll comment out diabling hotplug for now. jw. -# test -f /proc/sys/kernel/hotplug && echo /bin/true > /proc/sys/kernel/hotplug 2>/dev/null - test -d /proc/bus/usb || modprobe usbcore >/dev/null 2>&1 - mount -n -t usbfs usbfs /proc/bus/usb >/dev/null 2>&1 - for mod in ehci-hcd ohci-hcd uhci-hcd usb-ohci usb-uhci ; do - echo -n $mod" " - modprobe $mod >/dev/null 2>&1 - done - -# [bugzilla #284348] -# sleep is no longer needed. horay! -# -# echo -# echo "wait 3 seconds for USB initialisation ..." -# sleep 3 - - for mod in usbhid input hid keybdev ; do - modprobe $mod >/dev/null 2>&1 - done - ;; -esac - KEYMAP=() if test -e /$KEYTABLE ; then KEYMAP=($KEYTABLE) diff --git a/kbd.spec b/kbd.spec index 7b24757..b8d7df9 100644 --- a/kbd.spec +++ b/kbd.spec @@ -1,7 +1,7 @@ # # spec file for package kbd (Version 1.14.1) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Console AutoReqProv: on Version: 1.14.1 -Release: 16 +Release: 17 Summary: Keyboard and Font Utilities Source: kbd-%{version}.tar.bz2 Source1: kbd_fonts.tar.bz2 @@ -35,7 +35,7 @@ Source5: kbd.fillup Source6: kbd.fillup.nonpc Source8: sysconfig.console Source9: sysconfig.keyboard -Source10: testutf8.c +Source10: testutf8 Source11: fbtest.c Source12: fbtest.8 Source42: convert-kbd-mac.sed @@ -105,7 +105,6 @@ popd --enable-nls \ --localedir=/usr/share/locale make CFLAGS="$RPM_OPT_FLAGS -Os" -gcc $RPM_OPT_FLAGS -o testutf8 $RPM_SOURCE_DIR/testutf8.c gcc $RPM_OPT_FLAGS -o fbtest $RPM_SOURCE_DIR/fbtest.c # fix lat2-16.psfu (bnc#340579) font=data/consolefonts/lat2a-16.psfu @@ -227,7 +226,7 @@ cat %SOURCE6 >> $FILLUP_DIR/sysconfig.keyboard rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/getkeycodes.8* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setkeycodes.8* %endif -install -m 755 testutf8 $RPM_BUILD_ROOT/bin/ +install -m 755 %_sourcedir/testutf8 $RPM_BUILD_ROOT/bin/ install -m 755 fbtest $RPM_BUILD_ROOT/sbin/ install -m 644 %SOURCE12 $RPM_BUILD_ROOT/%{_mandir}/man8/ %find_lang %{name} @@ -308,6 +307,13 @@ install -m 644 %SOURCE12 $RPM_BUILD_ROOT/%{_mandir}/man8/ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 19 2009 mmarek@suse.cz +- remove testutf8 (replace with a script that returns 2 in any + terminal), it's a hack that has a number of problems (bnc#436378, + bnc#334889). Users who don't want utf8 should adjust their locale + setting accordingly. +* Tue May 19 2009 mmarek@suse.cz +- do not load any usb drivers, udev takes care of this (bnc#482316). * Mon Nov 10 2008 mmarek@suse.cz - rename Spanish keymap for olpc to es-olpc to avoid ambiguity (bnc#435121) @@ -640,7 +646,7 @@ rm -rf $RPM_BUILD_ROOT * Thu Aug 15 2002 olh@suse.de - fix some keys with kbd-1.06-mac-dk.diff do the symlinks in mac/all instead of mac/ -* Sun Aug 04 2002 olh@suse.de +* Mon Aug 05 2002 olh@suse.de - merge boot.setup into rckbd (#16476) * Fri Jul 26 2002 garloff@suse.de - Don't wait infinitely long for bit 1 of port 0x64 being 0. @@ -674,11 +680,11 @@ rm -rf $RPM_BUILD_ROOT * Thu Jun 06 2002 garloff@suse.de - Add kbd rate and delay report (#16050). - Move fbset to X-SuSE-Should-Start. -* Sun Mar 17 2002 garloff@suse.de +* Mon Mar 18 2002 garloff@suse.de - Fixed all i386 keymaps with 99(PtrScr) = Control_backslash to VoidSymbol (but keeping the old meaning with Control) Fixes bug #8380. -* Sun Mar 17 2002 garloff@suse.de +* Mon Mar 18 2002 garloff@suse.de - Changed init script to accept a keymap that is specified by absolute path. (Bug #14997) * Sun Mar 17 2002 garloff@suse.de @@ -751,7 +757,7 @@ rm -rf $RPM_BUILD_ROOT - handle the ppc64 in machine detection * Mon Sep 17 2001 garloff@suse.de - Add loadkezs->loadkeys symlink (#10752) -* Fri Aug 31 2001 olh@suse.de +* Sat Sep 01 2001 olh@suse.de - no keyboard on iSeries available * Wed Aug 29 2001 olh@suse.de - allow querty/us.map.gz as KEYTABLE, fix mac-dk map @@ -852,7 +858,7 @@ rm -rf $RPM_BUILD_ROOT problems with some keytables (bug #4275). * Tue Dec 05 2000 olh@suse.de - add mac-fr_CH.map -* Mon Dec 04 2000 garloff@suse.de +* Tue Dec 05 2000 garloff@suse.de - New startup script: Separate KEYMAP from COMPOSE maps. Add new rc.config variable COMPOSEMAP to allow setting of compose combi- nations defaulting to "latin1 latin1.add" diff --git a/testutf8 b/testutf8 new file mode 100644 index 0000000..ef2a0c2 --- /dev/null +++ b/testutf8 @@ -0,0 +1,10 @@ +#!/bin/sh + +# testutf8 will be soon removed completely, it's kept only not to break +# /etc/profile currently +if tty -s; then + exit 2 +else + exit 0 +fi + diff --git a/testutf8.c b/testutf8.c deleted file mode 100644 index bc6466a..0000000 --- a/testutf8.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright Gerd Knorr , 2003 - * - * small tool to figure whenever a tty runs in utf8 mode or not. - * writes a utf-8 multibyte sequence and then checks how far the - * cursor has been moved. - * - * return codes: - * 0 - don't know (stdin isn't a terminal, timeout, some error, ...) - * 1 - not in utf8 - * 2 - utf-8 - * - */ - -#include -#include -#include -#include -#include -#include -struct termios saved_attributes; -int saved_fl; -void -tty_raw() -{ - struct termios tattr; - fcntl(0,F_GETFL,&saved_fl); - tcgetattr (0, &saved_attributes); - fcntl(0,F_SETFL,O_NONBLOCK); - memcpy(&tattr,&saved_attributes,sizeof(struct termios)); - tattr.c_lflag &= ~(ICANON|ECHO); - tattr.c_cc[VMIN] = 1; - tattr.c_cc[VTIME] = 0; - tcsetattr (0, TCSAFLUSH, &tattr); -} -void -tty_restore() -{ - fcntl(0,F_SETFL,saved_fl); - tcsetattr (0, TCSANOW, &saved_attributes); -} -int -select_wait() -{ - struct timeval tv; - fd_set se; - FD_ZERO(&se); - FD_SET(0,&se); - tv.tv_sec = 3; - tv.tv_usec = 0; - return select(1,&se,NULL,NULL,&tv); -} -int -main(int argc, char **argv) -{ - static char *teststr = "\r\xc3\xb6"; - static char *cleanup = "\r \r"; - static char *getpos = "\033[6n"; - char retstr[16]; - int pos,rc,row,col,verbose; - verbose = 0; - if (argc > 1 && 0 == strcmp(argv[1],"-v")) - verbose = 1; - if (!isatty(0) || !isatty(1)) { - if (verbose) - fprintf(stderr,"Not a tty.\n"); - exit(0); - } - tty_raw(); - write(1,teststr,strlen(teststr)); - write(1,getpos,strlen(getpos)); - for (pos = 0; pos < sizeof(retstr)-1;) { - if (0 == select_wait()) - break; - if (-1 == (rc = read(0,retstr+pos,sizeof(retstr)-1-pos))) { - perror("read"); - exit(0); - } - pos += rc; - if (retstr[pos-1] == 'R') - break; - } - retstr[pos] = 0; - write(1,cleanup,strlen(cleanup)); - tty_restore(); - rc = sscanf(retstr,"\033[%d;%dR",&row,&col); - if (2 == rc && 2 == col) { - if (verbose) - fprintf(stderr,"Terminal is in UTF-8 mode.\n"); - exit(2); - } else { - if (verbose) - fprintf(stderr,"Terminal is in byte mode.\n"); - exit(1); - } -}