[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#363147: libxklavier10: Debian patch xorg_xkb_path.patch breaks libxklavier



Package: libxklavier10
Version: 2.2-2
Severity: grave
Justification: renders package unusable
Tags: patch

 This fixes a bug that has been bothering a rather large ammount of
 people.  AFAICS libxklavier can't do zilch without this fix.

 The patch:

--- libxklavier-2.2.orig/libxklavier/xklavier_config_xkb.c
+++ libxklavier-2.2/libxklavier/xklavier_config_xkb.c
@@ -22,9 +22,9 @@
 #endif
 
 /* For "bad" X servers we hold our own copy */
-#define XML_CFG_FALLBACK_PATH ( DATA_DIR "/xfree86.xml" )
+#define XML_CFG_FALLBACK_PATH ( DATA_DIR "/xorg.xml" )
 
-#define XKBCOMP ( XKB_BIN_BASE "/xkbcomp" )
+#define XKBCOMP "xkbcomp"
 
 #define XK_XKB_KEYS
 #include <X11/keysymdef.h>

 ignores this code in the library (libxklavier/xklavier_config_xkb.c):

        case 0:
          /* child */
          XklDebug( 160, "Executing %s\n", XKBCOMP );
          XklDebug( 160, "%s %s %s %s %s %s %s\n",
            XKBCOMP, XKBCOMP, "-I", "-I" XKB_BASE, "-xkm", xkbFN, xkmFN );
          execl( XKBCOMP, XKBCOMP, "-I", "-I" XKB_BASE, "-xkm", xkbFN, xkmFN, NULL );
          XklDebug( 0, "Could not exec %s: %d\n", XKBCOMP, errno );
          exit( 1 );

 by "fixing" the program not to use a hardcoded path you have broken it,
 since execl(3) will not search the user's path for the executable
 (please read the manpage).  Replace execl(3) by execlp(3).

 I'm really amazed that noone has spotted this since 2.2-2 was uploaded
 and I'm even more amazed by the fact that neither the patch author nor
 the package maintainer noticed this, since the library tests (in the
 tests directory) fail with a rather clear error message.

 The problem was introduced by the fact that xkb-data does not ship that
 /usr/share/X11/xkb/xkbcomp -> /usr/bin/xkbcomp symlink anymore.  This
 was removed more than a month ago... are you guys using current sid to
 build and test your packages?

 Cat the attached patch to the current one and that should do the trick.

 Marcelo
diff -Nur libxklavier-2.2/libxklavier/xklavier_config_xkb.c libxklavier-2.2.new/libxklavier/xklavier_config_xkb.c
--- libxklavier-2.2/libxklavier/xklavier_config_xkb.c	2006-04-17 14:42:37.000000000 -0600
+++ libxklavier-2.2.new/libxklavier/xklavier_config_xkb.c	2006-04-17 14:43:22.000000000 -0600
@@ -220,7 +220,7 @@
           XklDebug( 160, "Executing %s\n", XKBCOMP );
           XklDebug( 160, "%s %s %s %s %s %s %s\n",
             XKBCOMP, XKBCOMP, "-I", "-I" XKB_BASE, "-xkm", xkbFN, xkmFN );
-          execl( XKBCOMP, XKBCOMP, "-I", "-I" XKB_BASE, "-xkm", xkbFN, xkmFN, NULL );
+          execlp( XKBCOMP, XKBCOMP, "-I", "-I" XKB_BASE, "-xkm", xkbFN, xkmFN, NULL );
           XklDebug( 0, "Could not exec %s: %d\n", XKBCOMP, errno );
           exit( 1 );
         default:

Reply to: