typo in some symbol files in xkb-data

Bug #553401 reported by Gilaras Drakeson
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Gilaras Drakeson

Bug Description

Binary package hint: xkb-data

please remove the trailing semicolons from the "include" lines found by:

grep -R "^[[:space:]]*include.*;" /usr/share/X11/xkb/symbols

Revision history for this message
Hassanakevazir (hassanakevazir) wrote :
  • ir Edit (9.3 KiB, text/plain)

I used the get an error in a message box whenever I tried to use the Iranian layout and it caused various problems from not being able to switch layouts with shortcut keys, to an unavailable Farsi layout and finally a non-functioning keyboard.
After removing the "include" semicolons in "/usr/share/X11/xkb/symbols/ir" as reported above, and restarting my X session everything worked fine again. attached is the "ir" symbols file without the syntax errors if you are as lazy as me.

hassan@xxxxxxx:~$ uname -a
Linux xxxxxxx 2.6.32-18-generic #27-Ubuntu SMP Fri Mar 26 19:51:10 UTC 2010 i686 GNU/Linux
======================
Here is the error message:

Error activating XKB configuration.
It can happen under various circumstances:
- a bug in libxklavier library
- a bug in X server (xkbcomp, xmodmap utilities)
- X server with incompatible libxkbfile implementation

X server version data:
The X.Org Foundation
10706000
======================
This was the error reported in my ~/.xsession-errors file:
Error: Error interpreting include file "ir"
                  Exiting
                  Abandoning symbols file "(null)"

** (gnome-settings-daemon:1583): WARNING **: Could not activate the XKB configuration
dpy: 0x9f818d0

Revision history for this message
Sennaista (sennaista) wrote :

Great work Hassanak!

Revision history for this message
Sennaista (sennaista) wrote :

Other layouts affected are "lk", "in" and "sy".

Changed in xkeyboard-config (Ubuntu):
status: New → Confirmed
Revision history for this message
K. Sethu (skhome) wrote :

I started experiencing this bug in Lucid -Beta 1 (most likely after a large number of updates on 31-03-2010 from the repos were taken in) whenever I tried to add any of the Tamil and Sinhala keymaps. The Tamil keymaps are under symbols file "in" with couple of them cross listed in "lk" and the Sinhala keymap is in "lk".

The "include" lines in these from which trailing semicolons have to be removed (as can be found with the grep statement given in bug description) are :

/usr/share/X11/xkb/symbols/lk: include "nbsp(zwnj2nb3s)";
/usr/share/X11/xkb/symbols/in: include "nbsp(zwnj3zwj4)";
/usr/share/X11/xkb/symbols/in: include "nbsp(zwnj3zwj4)";

I confirm that the removal of the trailing semicolons in the above three solves the issue for the Tamil and Sinhala keymaps.

I hope this bugfixing gets into updates quickly since there are users (atleast among Tamil users I know of) who exclusively depend on xkb-extension keymaps for non-english typography.

tags: added: not-happenning-in-debian
Revision history for this message
Bryce Harrington (bryce) wrote :

Gilaras, I notice you added a tag not-happenning-in-debian - can you explain the significance of this? Did you find that Debian was unwilling to carry the patch? Have you discussed this with xkeyboard-config upstream?

Also, if anyone would be willing to post a patch (or even a debdiff) with this change, it'd help in moving forward with this bug.

Revision history for this message
Gilaras Drakeson (gilaras) wrote :

Hi Bryce,

uh, I merely meant that the bug did not appear (yet!) in a debian unstable installation that I tested :)

The above grep shows all the lines that should be fixed (just remove the trailing semicolon). I don't know how to make a debdiff.

The reason for the bug is that the "include" directive includes the contents verbatim, and xkb will not be happy about the extra semicolons.

tags: removed: not-happenning-in-debian
Revision history for this message
Gilaras Drakeson (gilaras) wrote :

I don't know how to generate a debdiff. You can fix the xkb-data package as follows:

# Run this in a temporary directory.

aptitude download xkb-data

dpkg --extract xkb-data*.deb xkb-data-old
dpkg --extract xkb-data*.deb xkb-data

pushd xkb-data/usr/share/X11/xkb/symbols
for x in $(grep -l -R "^[[:space:]]*include.*;" .)
do
    echo "$x"
    sed -i -r -e 's/^([[:space:]]*include.*);/\1/g' $x
done
popd

# see what we have done so far:
diff -r xkb-data-old xkb-data

# generate symbols.dir
pushd xkb-data/usr/share/X11/xkb/symbols
xkbcomp -lfhlpR '*' -o ../symbols.dir
popd

# TEST the difference between the generated files:
A="xkb-data-old/usr/share/X11/xkb/symbols.dir"
B="xkb-data/usr/share/X11/xkb/symbols.dir"

sort "$A" > old-symbols.dir
sort "$B" > new-symbols.dir

diff old-symbols.dir new-symbols.dir

Revision history for this message
K. Sethu (skhome) wrote :
Download full text (4.4 KiB)

With [ grep -R "^[[:space:]]*include.*;" ] command either on /usr/share/X11/xkb/symbols or on the same in the xkb-data directory in teh deb pacakge (as in comment #7) we find the bug causing trailing semi colons are in 12 lines. Searching in the source package which is xkeyboard-config-1.8 I found that this set of bugs are all caused from the patch file :

xkeyboard-config-1.8/debian/patches/112_zero-with-spacing.patch

The following grep from the relevant current directory confirmed this :

/xkb-data-bld/xkeyboard-config-1.8/debian/patches$ grep -e "include" ./* |grep ";"
./112_zero-with-spacing.patch:+ include "nbsp(zwnj3zwj4)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj3zwj4)";
./112_zero-with-spacing.patch:+ include "ir(pes_part_basic)";
./112_zero-with-spacing.patch:+ include "ir(pes_part_ext)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj2nb3nnb4)";
./112_zero-with-spacing.patch:+ include "level3(ralt_switch)";
./112_zero-with-spacing.patch:+ include "ir(pes_part_basic)";
./112_zero-with-spacing.patch:+ include "ir(pes_part_keypad)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj2nb3nnb4)";
./112_zero-with-spacing.patch:+ include "level3(ralt_switch)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj2nb3s)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj2)";

So I edited that patch file to remove those 12 trailing semi-colons and with the addition of my signature to Debian changelog and version number change for my PPA, I used "debuild" for building source changes for uploading to PPA's build farm.

The PPA build-farm built deb packages for xkb-data for Ubuntu Lucid are available from my PPA :

https://launchpad.net/~skhome/+archive/xkb-data-bugfix

(Instructions for adding apt line address of a PPA to an user's source lists are given in that page - under topic :
 "Adding this PPA to your system" )

The user can update xkb-data from buggy 1.8-1ubuntu4 version to bug removed 1.8-1ubuntu4ppakse1~lucid1 version with the above PPA added to the system

 I have added as attachment the debdiff file I made ( as per usage guide for debdiff command in : https://wiki.edubuntu.org/PackagingGuide/Recipes/Debdiff ) . Hopefully it is useful for moving forward.

~Sethu
?field.comment=With [ grep -R "^[[:space:]]*include.*;" ] command either on /usr/share/X11/xkb/symbols or on the same in the xkb-data directory in teh deb pacakge (as in comment #7) we find the bug causing trailing semi colons are in 12 lines. Searching in the source package which is xkeyboard-config-1.8 I found that this set of bugs are all caused from the patch file :

xkeyboard-config-1.8/debian/patches/112_zero-with-spacing.patch

The following grep from the relevant current directory confirmed this :

/xkb-data-bld/xkeyboard-config-1.8/debian/patches$ grep -e "include" ./* |grep ";"
./112_zero-with-spacing.patch:+ include "nbsp(zwnj3zwj4)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj3zwj4)";
./112_zero-with-spacing.patch:+ include "ir(pes_part_basic)";
./112_zero-with-spacing.patch:+ include "ir(pes_part_ext)";
./112_zero-with-spacing.patch:+ include "nbsp(zwnj2nb3nnb4)";
./112_zero-with-spacing.patch:+ ...

Read more...

Revision history for this message
K. Sethu (skhome) wrote :

In Comment #8 which I posted some minutes back, it appears that my posting has duplicated once. The posting should have ended with the first occurrence of "~Sethu" which is way I sign. But for some reason the entire posting has got repeated after that. Request any with editing rights to edit and remove the duplication, please.

Thanks

~Sethu

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xkeyboard-config - 1.8-1ubuntu6

---------------
xkeyboard-config (1.8-1ubuntu6) lucid; urgency=low

  * Removed unwanted semicolons in 112_zero-with-spacing.patch
    to quell error messages when using certain keyboard layouts.
    (LP: #553401)
 -- Bryce Harrington <email address hidden> Tue, 13 Apr 2010 13:36:32 -0700

Changed in xkeyboard-config (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.