Hello community, here is the log from the commit of package kbd for openSUSE:Factory checked in at Fri Jan 14 15:37:28 CET 2011. -------- --- kbd/kbd.changes 2010-09-07 14:49:04.000000000 +0200 +++ kbd/kbd.changes 2011-01-12 15:25:15.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Jan 12 14:22:09 UTC 2011 - lnussel@suse.de + +- use /etc/defkeymap.name if possible to avoid find call +- move some code that is only needed for start to actual start section + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kbd.spec ++++++ --- /var/tmp/diff_new_pack.KE4CP2/_old 2011-01-14 15:36:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KE4CP2/_new 2011-01-14 15:36:08.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package kbd (Version 1.15.2) +# spec file for package kbd # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 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 @@ Group: System/Console AutoReqProv: on Version: 1.15.2 -Release: 1 +Release: 2 Summary: Keyboard and Font Utilities Source: kbd-%{version}.tar.bz2 Source1: kbd_fonts.tar.bz2 ++++++ kbd.init ++++++ --- /var/tmp/diff_new_pack.KE4CP2/_old 2011-01-14 15:36:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KE4CP2/_new 2011-01-14 15:36:08.000000000 +0100 @@ -37,77 +37,15 @@ test -n "$KBD_VERBOSE" && set -x +# XXX: is this really needed just for LOCALE_CHARMAP? test -e /etc/SuSEconfig/profile && . /etc/SuSEconfig/profile test -e /etc/profile.d/lang.sh && . /etc/profile.d/lang.sh LOCALE_CHARMAP=`locale charmap` LC_ALL=POSIX -MACHINE=`/bin/uname -m 2> /dev/null` -if test "$MACHINE" = "sparc" -o "$MACHINE" = "sparc64" ; then - # Test if we have a serial console. - (test -c /dev/tty1 && > /dev/tty1 ) > /dev/null 2>&1 || exit 0 -fi -# iSeries machines also exit, just a little further down... - -# The variable NON_SUSE_KERNEL determines whether we need to chvt -# to a console before some console settings apply. -# We have no magic to find out about this (at boot time), so we -# leave it to the user to read this comment and put NON_SUSE_KERNEL="yes" -# into /etc/sysconfig/console - -test "$NON_SUSE_KERNEL" = "yes" && FGCONS=`/bin/fgconsole` - KBDBASE="/usr/share/kbd" # -# first search the wanted keytable. -# -if test $MACHINE = ppc -o $MACHINE = ppc64 ; then - test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null - while read line; do - case "$line" in - *MacRISC*) MACHINE="mac" - test -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes && \ - echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes - ;; - *CHRP*) MACHINE="chrp";; - *PReP*) MACHINE="prep" ;; - *PS3*) MACHINE="ps3" ;; - *iSeries*) exit 0 ;; - esac - done < /proc/cpuinfo -fi - -# -# Calculate KBD_TTY array only once -# - -KBD_TTY_DEFAULT="${KBD_TTY:-tty1 tty2 tty3 tty4 tty5 tty6}" - -newkbd="" -for tty in $KBD_TTY_DEFAULT; do - # >=tty7 left out intentionaly (Bug #302010) - test ${tty#tty} -ge 7 2>/dev/null && continue - test -w /dev/$tty || continue - test -c /dev/$tty || continue - > /dev/$tty &> /dev/null || continue - newkbd="${newkbd:+$newkbd }/dev/$tty" -done -KBD_TTY="$newkbd" -unset newkbd - -KEYMAP=() -if test -e /$KEYTABLE ; then - KEYMAP=($KEYTABLE) -else - case "$KEYTABLE" in - *.gz) KBDPATH="*/${KEYTABLE}" ;; - *.map) KBDPATH="*/${KEYTABLE} */${KEYTABLE}.gz" ;; - *) KBDPATH="*/${KEYTABLE} */${KEYTABLE}.gz */${KEYTABLE}.map.gz */${KEYTABLE}.map" ;; - esac - KEYMAP=($(find ${KBDBASE}/keymaps -type f \( -path ${KBDPATH// / -o -path } \) | sort)) -fi -# # setup kbdrate and led status # function set_kbdrate () @@ -228,6 +166,80 @@ test -s /var/run/keymap && exit 0 ;; esac + + MACHINE=`/bin/uname -m 2> /dev/null` + if test "$MACHINE" = "sparc" -o "$MACHINE" = "sparc64" ; then + # Test if we have a serial console. + (test -c /dev/tty1 && > /dev/tty1 ) > /dev/null 2>&1 || exit 0 + fi + # iSeries machines also exit, just a little further down... + + # The variable NON_SUSE_KERNEL determines whether we need to chvt + # to a console before some console settings apply. + # We have no magic to find out about this (at boot time), so we + # leave it to the user to read this comment and put NON_SUSE_KERNEL="yes" + # into /etc/sysconfig/console + + test "$NON_SUSE_KERNEL" = "yes" && FGCONS=`/bin/fgconsole` + + # + # first search the wanted keytable. + # + if test $MACHINE = ppc -o $MACHINE = ppc64 ; then + test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null + while read line; do + case "$line" in + *MacRISC*) MACHINE="mac" + test -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes && \ + echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes + ;; + *CHRP*) MACHINE="chrp";; + *PReP*) MACHINE="prep" ;; + *PS3*) MACHINE="ps3" ;; + *iSeries*) exit 0 ;; + esac + done < /proc/cpuinfo + fi + + KBD_TTY_DEFAULT="${KBD_TTY:-tty1 tty2 tty3 tty4 tty5 tty6}" + + newkbd="" + for tty in $KBD_TTY_DEFAULT; do + # >=tty7 left out intentionaly (Bug #302010) + test ${tty#tty} -ge 7 2>/dev/null && continue + test -w /dev/$tty || continue + test -c /dev/$tty || continue + > /dev/$tty &> /dev/null || continue + newkbd="${newkbd:+$newkbd }/dev/$tty" + done + KBD_TTY="$newkbd" + unset newkbd + + KEYMAP=() + if test -r /etc/defkeymap.name; then + read cached < /etc/defkeymap.name + a="${cached##*/}" + a="${a%.gz}" + a="${a%.map}" + b="${KEYTABLE%.gz}" + b="${b%.map}" + if [ -n "$a" -a "$a" = "$b" ]; then + KEYMAP=("$cached") + fi + unset a b + fi + if test -z "$KEYMAP"; then + if test -e /$KEYTABLE ; then + KEYMAP=($KEYTABLE) + else + case "$KEYTABLE" in + *.gz) KBDPATH="*/${KEYTABLE}" ;; + *.map) KBDPATH="*/${KEYTABLE} */${KEYTABLE}.gz" ;; + *) KBDPATH="*/${KEYTABLE} */${KEYTABLE}.gz */${KEYTABLE}.map.gz */${KEYTABLE}.map" ;; + esac + KEYMAP=($(find ${KBDBASE}/keymaps -type f \( -path ${KBDPATH// / -o -path } \) | sort)) + fi + fi if test "$MACHINE" = "ps3" ; then # do not mess up console @@ -283,7 +295,6 @@ fi fi - if test -z "$KEYTABLE"; then echo "No keyboard map to load" else @@ -413,27 +424,29 @@ case "$RUNLEVEL" in S|N|1|\#) true ;; *) - trap "rm -f /dev/shm/defkeymap.map" EXIT SIGTERM + map=`mktemp --tmpdir keymap.XXXXXX` && { + trap "rm -f $map" EXIT SIGTERM if test -n "$KBD_TTY" ; then dumpkeys -C ${KBD_TTY%% *} else dumpkeys - fi > /dev/shm/defkeymap.map + fi > $map - if type -p cmp > /dev/null 2>&1 && cmp -s /etc/defkeymap.map /dev/shm/defkeymap.map + if type -p cmp > /dev/null 2>&1 && cmp -s /etc/defkeymap.map $map then - rm -f /dev/shm/defkeymap.map + rm -f $map fi - if test -s /dev/shm/defkeymap.map ; then + if test -s $map; then # FIXME: this should be done much earlier # to avoid bugzilla# 259694 or similar. - mv /dev/shm/defkeymap.map /etc/defkeymap.map + mv $map /etc/defkeymap.map if test "${#KEYMAP[@]}" -gt 0 -a "$KEYMAP" != "/etc/defkeymap.map" ; then echo $KEYMAP > /etc/defkeymap.name fi fi trap - EXIT SIGTERM + } esac ;; ++++++ sysconfig.keyboard ++++++ --- /var/tmp/diff_new_pack.KE4CP2/_old 2011-01-14 15:36:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KE4CP2/_new 2011-01-14 15:36:08.000000000 +0100 @@ -54,11 +54,11 @@ KBD_DISABLE_CAPS_LOCK="no" ## Type: string -## Default: "tty1 tty2 tty3 tty4 tty5 tty6" +## Default: # # ttys for the above settings # Example: "tty1 tty2" -# "" for all tty's +# "" for tty's 1-6 # -KBD_TTY="tty1 tty2 tty3 tty4 tty5 tty6" +KBD_TTY="" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org