Le dimanche 23 juin 2013 16:21:22, Thomas Preud'homme a écrit : > Package: im-config > Version: 0.22-2 > Severity: normal > Tags: patch upstream > > It seems that 20_ibus.rc is ultimately sourced by the user's shell. I > couldn't find what script seems to source Xsession but the behavior of: > > ls /usr/lib/*/gtk-2.0/*/immodules/im-ibus.so \ > /usr/lib/gtk-2.0/*/immodules/im-ibus.so 2>/dev/null || true > > is to not run ls at all because the second line doesn't match any path > on my system. This is the normal behavior of zsh but dash (which /bin/sh > is linked too on my system) would output > /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so on my > system.
So it seems that: 1) 20_bus.rc is read both by /bin/sh and by zsh on my system. It's probably executed at some point and sourced by my shell later. 2) my patch doesn't work for dash since I couldn't boot with it. > > The attached patch makes the sourcing work when the shell is zsh and > should work too for other shell (at least bourne shells). Find an updated patch which work with both /bin/sh and zsh. Best regards, Thomas
diff -Nru im-config-0.22/debian/changelog im-config-0.22/debian/changelog --- im-config-0.22/debian/changelog 2013-06-04 16:36:39.000000000 +0200 +++ im-config-0.22/debian/changelog 2013-06-23 15:52:21.000000000 +0200 @@ -1,3 +1,10 @@ +im-config (0.22-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix sourcing of data/20_ibus.rc in zsh shell. Closes: #713885 + + -- Thomas Preud'homme <[email protected]> Sun, 23 Jun 2013 15:51:15 +0200 + im-config (0.22-3) unstable; urgency=low * Fix typo regression in 0.22-2. Closes: #710969 diff -Nru im-config-0.22/debian/patches/fix_sourcing_ibus.rc_from_zsh.diff im-config-0.22/debian/patches/fix_sourcing_ibus.rc_from_zsh.diff --- im-config-0.22/debian/patches/fix_sourcing_ibus.rc_from_zsh.diff 1970-01-01 01:00:00.000000000 +0100 +++ im-config-0.22/debian/patches/fix_sourcing_ibus.rc_from_zsh.diff 2013-06-23 16:06:00.000000000 +0200 @@ -0,0 +1,69 @@ +Description: Fix sourcing 20_ibus.rc from zsh + When a user starts an X session, 20_ibus.rc is sourced ultimately by + XSession script which runs with the user's shell (probably because it's + itself sourced instead of being executed). But when the user's shell is zsh, + the ls /usr/lib/*/foo/* /usr/lib/foo/* does not output anything because in zsh + when a wildcard does not match any path the command is not executed. + Therefore, the markers are not exported and (GTK|QT4)_IM_MODULE is not + exported which leads to dead letters not functionning because ibus is running + but not used. +Author: Thomas Preud'homme <[email protected]> +Bug-Debian: http://bugs.debian.org/713885 + +--- +Origin: vendor +Bug-Debian: http://bugs.debian.org/713885 +Forwarded: no +Last-Update: 2013-06-23 + +--- im-config-0.22.orig/data/20_ibus.rc ++++ im-config-0.22/data/20_ibus.rc +@@ -13,8 +13,8 @@ XMODIFIERS=@im=ibus + GTK_IM_MODULE=xim + # use immodule only when available for both GTK 2.0 and 3.0 + IM_CONFIG_MARKER2=0 +-for IM_CONFIG_MARKER in $(ls /usr/lib/*/gtk-2.0/*/immodules/im-ibus.so \ +- /usr/lib/gtk-2.0/*/immodules/im-ibus.so 2>/dev/null || true); do ++for IM_CONFIG_MARKER in $( (ls /usr/lib/*/gtk-2.0/*/immodules/im-ibus.so; \ ++ ls /usr/lib/gtk-2.0/*/immodules/im-ibus.so) 2>/dev/null || true); do + if [ -e $IM_CONFIG_MARKER ]; then + IM_CONFIG_MARKER2=1 + break +@@ -22,21 +22,22 @@ for IM_CONFIG_MARKER in $(ls /usr/lib/*/ + done + + IM_CONFIG_MARKER3=0 +-for IM_CONFIG_MARKER in $(ls /usr/lib/*/gtk-3.0/*/immodules/im-ibus.so \ +- /usr/lib/gtk-3.0/*/immodules/im-ibus.so 2>/dev/null||true); do ++for IM_CONFIG_MARKER in $( (ls /usr/lib/*/gtk-3.0/*/immodules/im-ibus.so; \ ++ ls /usr/lib/gtk-3.0/*/immodules/im-ibus.so) 2>/dev/null || true); do + if [ -e $IM_CONFIG_MARKER ]; then + IM_CONFIG_MARKER3=1 + break + fi + done ++ + if [ $IM_CONFIG_MARKER2 = 1 ] && [ $IM_CONFIG_MARKER3 = 1 ] ; then + GTK_IM_MODULE=ibus + fi + + QT4_IM_MODULE=xim + # use immodule when available for Qt4 (Qt3 has been long dead) +-for IM_CONFIG_MARKER in $(ls /usr/lib/*/qt4/plugins/inputmethods/libqtim-ibus.so\ +- /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so 2>/dev/null||true) ; do ++for IM_CONFIG_MARKER in $( (ls /usr/lib/*/qt4/plugins/inputmethods/libqtim-ibus.so; \ ++ ls /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so) 2>/dev/null || true) ; do + if [ -e $IM_CONFIG_MARKER ]; then + QT4_IM_MODULE=ibus + break +@@ -45,8 +46,8 @@ done + + CLUTTER_IM_MODULE=xim + # use immodule when available for clutter +-for IM_CONFIG_MARKER in $(ls /usr/lib/*/clutter-imcontext/immodules/im-ibus.so \ +- /usr/lib/clutter-imcontext/immodules/im-ibus.so 2>/dev/null||true); do ++for IM_CONFIG_MARKER in $( (ls /usr/lib/*/clutter-imcontext/immodules/im-ibus.so; \ ++ ls /usr/lib/clutter-imcontext/immodules/im-ibus.so) 2>/dev/null || true); do + if [ -e $IM_CONFIG_MARKER ]; then + CLUTTER_IM_MODULE=ibus + break diff -Nru im-config-0.22/debian/patches/series im-config-0.22/debian/patches/series --- im-config-0.22/debian/patches/series 2013-05-29 14:37:33.000000000 +0200 +++ im-config-0.22/debian/patches/series 2013-06-23 15:53:08.000000000 +0200 @@ -1 +1,2 @@ 0001-BUG709921.patch +fix_sourcing_ibus.rc_from_zsh.diff
signature.asc
Description: This is a digitally signed message part.

