Hello community, here is the log from the commit of package xdm for openSUSE:Factory checked in at 2014-03-11 09:23:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xdm (Old) and /work/SRC/openSUSE:Factory/.xdm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "xdm" Changes: -------- --- /work/SRC/openSUSE:Factory/xdm/xdm.changes 2014-02-15 17:24:21.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.xdm.new/xdm.changes 2014-03-11 09:23:57.000000000 +0100 @@ -1,0 +2,19 @@ +Wed Mar 5 08:36:01 UTC 2014 - cxiong@suse.com + +- fix two array iteration bug + + 1. "${#argv[@]}" is just the size of the array instead of all the elements, i.e. + "${argv[@]}", no sharp "#" sign. + + 2. index of array starting from 0, so "argc" should be increased at the end of + iteration loop. + +------------------------------------------------------------------- +Wed Feb 19 10:33:21 UTC 2014 - sndirsch@suse.com + +- /etc/X11/xdm/keytable: make use of systemd's localectl to + generate Xserver's configuration snippet for keyboard layout; + rely on systemd's kbd --> X keyboard mapping; the old mapping + table originating from SaX2 is no longer being used (bnc#861819) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xdm.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/Xsession new/etc/X11/xdm/Xsession --- old/etc/X11/xdm/Xsession 2014-02-13 07:56:23.000000000 +0100 +++ new/etc/X11/xdm/Xsession 2014-03-05 09:34:38.000000000 +0100 @@ -194,13 +194,15 @@ WINDOWMANAGER=${argv[0]} ;; esac typeset -i argc=0 - for l in ${#argv[@]} ; do - let argc++ || : + for l in ${argv[@]} ; do case "$l" in [a-z][a-z]_[A-Z][A-Z]*) GDM_LANG=$l break esac + + # argv is an array with index starting from 0 + let argc++ || : done unset argv[$argc] unset l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/keytable new/etc/X11/xdm/keytable --- old/etc/X11/xdm/keytable 2010-06-19 14:36:24.000000000 +0200 +++ new/etc/X11/xdm/keytable 2014-02-19 11:32:35.000000000 +0100 @@ -1,68 +1,61 @@ -#!/bin/sh +#! /bin/bash if [ $UID -ne 0 ]; then echo "You need to be root to run this program" exit 0 fi -configfile=/etc/sysconfig/keyboard -cachedir=/var/cache/xdm -cachefile=keyboard.last -conffile=/etc/X11/xorg.conf.d/90-keytable.conf -mapfile=/etc/X11/xdm/Keyboard.map - -. ${configfile} - -if [ -e $cachedir/$cachefile -a -e $conffile ] -then - . $cachedir/$cachefile - [ "$KEYTABLE" = "$cache_keytable" ] && exit 1; -fi - -# layout is mandatory - but $keytable may be bogus -layout=us -variant=x -options=x - -keytable=$(basename $KEYTABLE .map.gz) - -# if no mapping is available, fall back to "us" (bnc #606063) -if ! grep -q "^$keytable *:" $mapfile; then - mkdir -p $(dirname $conffile) - cat > $conffile << EOF -Section "InputClass" - Identifier "LocalKeyboard" - MatchIsKeyboard "on" - Option "XkbLayout" "us" -EndSection -EOF +vconsole_conf_file=/etc/vconsole.conf +sysconfig_file=/etc/sysconfig/keyboard +previous_x11conf_file=/etc/X11/xorg.conf.d/90-keytable.conf +systemd_x11conf_file=/etc/X11/xorg.conf.d/00-keyboard.conf + +function setkeyboard { + echo "Command: localectl set-keymap $1" + # xorg.conf.d snippet is only written if a valid snippet is already + # available, so create an us sample if neccessary + if [ ! -f $systemd_x11conf_file ]; then + localectl set-x11-keymap us + fi + localectl set-keymap $1 + if [ -f $systemd_x11conf_file ]; then + if [ $systemd_x11conf_file -nt $previous_x11conf_file ]; then + rm -f $previous_x11conf_file + fi exit 0 + else + echo "$systemd_x11conf_file has not been created!" + fi +} + +if [ -f $vconsole_conf_file ]; then + echo "$vconsole_conf_file available" + . $vconsole_conf_file + if [ ! -z $KEYMAP ]; then + echo "KEYMAP: $KEYMAP" + options="$KEYMAP $KEYMAP_TOGGLE" + setkeyboard "$options" + else + echo "KEYMAP not set" + fi +else + echo "$vconsole_conf_file not available" fi -layout=$(grep "^$keytable *:" $mapfile | cut -d ":" -f 3|sed 's/ //g') -variant=$(grep "^$keytable *:" $mapfile | cut -d ":" -f 4|sed 's/ //g') -options=$(grep "^$keytable *:" $mapfile | cut -d ":" -f 10-12|sed 's/ //g') - -mkdir -p $(dirname $conffile) -cat > $conffile << EOF -Section "InputClass" - Identifier "LocalKeyboard" - MatchIsKeyboard "on" - Option "XkbLayout" "$layout" -EOF - -if [ "$variant" != "x" ]; then - echo " Option \"XkbVariant\" \"$variant\"" >> $conffile +if [ -f $sysconfig_file ]; then + echo "$sysconfig_file available" + . $sysconfig_file + if [ ! -z $KEYTABLE ]; then + KEYTABLE=${KEYTABLE%%.*} + echo "KEYTABLE: $KEYTABLE" + options="$KEYTABLE" + setkeyboard "$options" + else + echo "KEYTABLE not set" + fi +else + echo "$sysconfig_file not available" fi -if [ "$options" != "x" ]; then - echo " Option \"XkbOptions\" \"$options\"" >> $conffile -fi - -cat >> $conffile << EOF -EndSection -EOF - -mkdir -p $cachedir 2>/dev/null -echo cache_keytable=$KEYTABLE > $cachedir/$cachefile 2>/dev/null -exit 0 +echo "Keyboard layout could not be set" +exit 1 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org