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

Freeze exception request for directfb 1.0.1-11



Hi,

Could you please unfreeze libdirectfb 1.0.1-11 ?

It fixes 2 bugs:
- unicode key handling (bug #401296) usefull for Debian graphical installer.
- DirectFb fails to start in usual case (RC bug #493899).

You can found attached the full diff between 1.0.1-9 and 1.0.1-11.

cheers,

Fathi

+directfb (1.0.1-11) unstable; urgency=low
+
+  * Remove 92_reopen_console.patch: it fails in the usual case,
+    but works when run through strace. (Closes: #493899)
+
+ -- Fathi Boudra <fabo@debian.org>  Sun, 17 Aug 2008 16:42:54 +0200
+
+directfb (1.0.1-10) unstable; urgency=low
+
+  * Add 93_fix_unicode_key_handling.patch: when the library asks the kernel
+    for the key symbols, the result are truncated for unicode symbols if the
+    keyboard is not in K_UNICODE mode. So, a temporary switch is needed,
+    as well as applying the right bitmask in order to retrieve the full
+    unicode symbol. Thanks to Jérémy Bobbio. (Closes: #401296)
+  * Now using Standards-Version 3.8.0 (no changes needed).
+
+ -- Fathi Boudra <fabo@debian.org>  Tue, 22 Jul 2008 18:49:17 +0200
diff -Nur --exclude=.svn 1.0.1-9/debian/changelog 1.0.1-11/debian/changelog
--- 1.0.1-9/debian/changelog	2008-07-22 18:48:31.000000000 +0200
+++ 1.0.1-11/debian/changelog	2008-08-18 14:21:43.000000000 +0200
@@ -1,3 +1,21 @@
+directfb (1.0.1-11) unstable; urgency=low
+
+  * Remove 92_reopen_console.patch: it fails in the usual case,
+    but works when run through strace. (Closes: #493899)
+
+ -- Fathi Boudra <fabo@debian.org>  Sun, 17 Aug 2008 16:42:54 +0200
+
+directfb (1.0.1-10) unstable; urgency=low
+
+  * Add 93_fix_unicode_key_handling.patch: when the library asks the kernel
+    for the key symbols, the result are truncated for unicode symbols if the
+    keyboard is not in K_UNICODE mode. So, a temporary switch is needed,
+    as well as applying the right bitmask in order to retrieve the full
+    unicode symbol. Thanks to Jérémy Bobbio. (Closes: #401296)
+  * Now using Standards-Version 3.8.0 (no changes needed).
+
+ -- Fathi Boudra <fabo@debian.org>  Tue, 22 Jul 2008 18:49:17 +0200
+
 directfb (1.0.1-9) unstable; urgency=low
 
   * Add cross build support. Thanks to Neil Williams. (Closes: #480933)
diff -Nur --exclude=.svn 1.0.1-9/debian/control 1.0.1-11/debian/control
--- 1.0.1-9/debian/control	2008-07-22 18:48:31.000000000 +0200
+++ 1.0.1-11/debian/control	2008-08-18 14:21:43.000000000 +0200
@@ -11,7 +11,7 @@
  libts-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
  libmpeg3-dev, zlib1g-dev, x11proto-core-dev, libx11-dev, libxext-dev,
  libsysfs-dev [alpha amd64 arm armel hppa i386 ia64 m68k mips mipsel powerpc ppc64 s390]
-Standards-Version: 3.7.3
+Standards-Version: 3.8.0
 
 Package: libdirectfb-1.0-0
 Section: libs
diff -Nur --exclude=.svn 1.0.1-9/debian/patches/92_reopen_console.patch 1.0.1-11/debian/patches/92_reopen_console.patch
--- 1.0.1-9/debian/patches/92_reopen_console.patch	2008-07-22 18:48:31.000000000 +0200
+++ 1.0.1-11/debian/patches/92_reopen_console.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,167 +0,0 @@
-author: John Hughes <john@calva.com>
-
-when libdirectfb detects zero length reads,
-it attempts to reopen the console
-(possibly from a newly mounted root tree)
-See Debian bug #462626
-
---- a/systems/fbdev/vt.h
-+++ b/systems/fbdev/vt.h
-@@ -34,7 +34,7 @@
- 
- #include <directfb.h>
- 
--typedef struct {
-+typedef struct VirtualTerminal {
-      int fd0;                      /* file descriptor of /dev/tty0 */
-      int fd;                       /* file descriptor of /dev/ttyN
-                                       where N is the number of the allocated VT,
-@@ -56,6 +56,8 @@
-      pthread_cond_t   wait;
- 
-      int              vt_sig;
-+
-+     DFBResult	     (*method_open) (struct VirtualTerminal *);
- } VirtualTerminal;
- 
- /*
---- a/systems/fbdev/vt.c
-+++ b/systems/fbdev/vt.c
-@@ -96,6 +96,8 @@
- static void      vt_set_fb( int vt, int fb );
- static void     *vt_thread( DirectThread *thread, void *arg );
- 
-+static DFBResult vt_open (VirtualTerminal *vt);
-+
- DFBResult
- dfb_vt_initialize()
- {
-@@ -219,6 +221,8 @@
-           return ret;
-      }
- 
-+     dfb_vt->method_open = &vt_open;
-+
-      dfb_fbdev->vt = dfb_vt;
- 
-      return DFB_OK;
-@@ -439,27 +443,23 @@
- }
- 
- static DFBResult
--vt_init_switching()
--{
--     const char cursoroff_str[] = "\033[?1;0;0c";
--     const char blankoff_str[] = "\033[9;0]";
-+vt_open (VirtualTerminal *vt) {
-+
-      char buf[32];
- 
-      D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ );
- 
--     /* FIXME: Opening the device should be moved out of this function. */
--
--     snprintf(buf, 32, "/dev/tty%d", dfb_vt->num);
--     dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY );
--     if (dfb_vt->fd < 0) {
-+     snprintf(buf, 32, "/dev/tty%d", vt->num);
-+     vt->fd = open( buf, O_RDWR | O_NOCTTY );
-+     if (vt->fd < 0) {
-           if (errno == ENOENT) {
--               snprintf(buf, 32, "/dev/vc/%d", dfb_vt->num);
--               dfb_vt->fd = open( buf, O_RDWR | O_NOCTTY );
--               if (dfb_vt->fd < 0) {
-+               snprintf(buf, 32, "/dev/vc/%d", vt->num);
-+               vt->fd = open( buf, O_RDWR | O_NOCTTY );
-+               if (vt->fd < 0) {
-                     if (errno == ENOENT) {
-                          D_PERROR( "DirectFB/core/vt: Couldn't open "
-                                     "neither `/dev/tty%d' nor `/dev/vc/%d'!\n",
--                                    dfb_vt->num, dfb_vt->num );
-+                                    vt->num, vt->num );
-                     }
-                     else {
-                          D_PERROR( "DirectFB/core/vt: "
-@@ -477,7 +477,24 @@
- 
-      /* attach to the new TTY before doing anything like KDSETMODE with it,
-         otherwise we'd get access denied error: */
--     ioctl( dfb_vt->fd, TIOCSCTTY, 0 );
-+     if (ioctl( vt->fd, TIOCSCTTY, 0 ) == -1) {
-+	  return errno2result (errno);
-+     }
-+
-+     return DFB_OK;
-+}
-+
-+    
-+static DFBResult
-+vt_init_switching()
-+{
-+     const char cursoroff_str[] = "\033[?1;0;0c";
-+     const char blankoff_str[] = "\033[9;0]";
-+     DFBResult res;
-+
-+     D_DEBUG_AT( VT, "%s()\n", __FUNCTION__ );
-+
-+     if ((res = vt_open (dfb_vt)) != DFB_OK) return res;
- 
-      write( dfb_vt->fd, cursoroff_str, sizeof(cursoroff_str) );
-      if (dfb_config->kd_graphics) {
---- a/inputdrivers/keyboard/keyboard.c
-+++ b/inputdrivers/keyboard/keyboard.c
-@@ -287,6 +287,18 @@
-      ioctl( data->vt->fd, KDSKBLED, locks );
- }
- 
-+static void
-+keyboard_set_input (KeyboardData *data)
-+{
-+     struct termios  ts;
-+     ts = data->old_ts;
-+     ts.c_cc[VTIME] = 0;
-+     ts.c_cc[VMIN] = 1;
-+     ts.c_lflag &= ~(ICANON|ECHO|ISIG);
-+     ts.c_iflag = 0;
-+     tcsetattr( data->vt->fd, TCSAFLUSH, &ts );
-+}
-+
- static void*
- keyboardEventThread( DirectThread *thread, void *driver_data )
- {
-@@ -300,6 +312,13 @@
- 
-           direct_thread_testcancel( thread );
- 
-+	  if (readlen == 0) {
-+	       /* Maybe our controlling terminal has been stolen by init */
-+	       close (data->vt->fd);
-+	       if (data->vt->method_open (data->vt) != DFB_OK) break;
-+	       keyboard_set_input (data);
-+	  }
-+
-           for (i = 0; i < readlen; i++) {
-                DFBInputEvent evt;
- 
-@@ -351,7 +370,6 @@
-                     InputDeviceInfo  *info,
-                     void            **driver_data )
- {
--     struct termios  ts;
-      KeyboardData   *data;
-      FBDev          *dfb_fbdev = dfb_system_data();
- 
-@@ -369,12 +387,7 @@
- 
-      tcgetattr( data->vt->fd, &data->old_ts );
- 
--     ts = data->old_ts;
--     ts.c_cc[VTIME] = 0;
--     ts.c_cc[VMIN] = 1;
--     ts.c_lflag &= ~(ICANON|ECHO|ISIG);
--     ts.c_iflag = 0;
--     tcsetattr( data->vt->fd, TCSAFLUSH, &ts );
-+     keyboard_set_input (data);
- 
-      tcsetpgrp( data->vt->fd, getpgrp() );
- 
diff -Nur --exclude=.svn 1.0.1-9/debian/patches/93_fix_unicode_key_handling.patch 1.0.1-11/debian/patches/93_fix_unicode_key_handling.patch
--- 1.0.1-9/debian/patches/93_fix_unicode_key_handling.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.0.1-11/debian/patches/93_fix_unicode_key_handling.patch	2008-08-18 14:21:43.000000000 +0200
@@ -0,0 +1,94 @@
+--- a/inputdrivers/keyboard/keyboard.c
++++ b/inputdrivers/keyboard/keyboard.c
+@@ -85,6 +85,10 @@
+      unsigned char index = KVAL(value);
+      int           base  = (level == DIKSI_BASE);
+ 
++     /* Handle unicode characters directly */
++     if (type >= 0x0f) {
++          return DFB_KEY( UNICODE, value ^ 0xf000 );
++     }
+      switch (type) {
+           case KT_FN:
+                if (index < 20)
+@@ -426,10 +430,17 @@
+                          void                      *driver_data,
+                          DFBInputDeviceKeymapEntry *entry )
+ {
++     KeyboardData               *data = (KeyboardData*) driver_data;
+      int                         code = entry->code;
+      unsigned short              value;
+      DFBInputDeviceKeyIdentifier identifier;
+ 
++     /* switch to unicode mode to get the full keymap */
++     if (ioctl( data->vt->fd, KDSKBMODE, K_UNICODE ) < 0) {
++          D_PERROR( "DirectFB/Keyboard: K_UNICODE failed!\n" );
++          return DFB_INIT;
++     }
++
+      /* fetch the base level */
+      value = keyboard_read_value( driver_data, K_NORMTAB, code );
+ 
+@@ -473,6 +484,12 @@
+      entry->symbols[DIKSI_ALT_SHIFT] = keyboard_get_symbol( code, value,
+                                                             DIKSI_ALT_SHIFT );
+ 
++     /* switch back to medium raw mode */
++     if (ioctl( data->vt->fd, KDSKBMODE, K_MEDIUMRAW ) < 0) {
++          D_PERROR( "DirectFB/Keyboard: K_MEDIUMRAW failed!\n" );
++          return DFB_INIT;
++     }
++
+      return DFB_OK;
+ }
+ 
+--- a/inputdrivers/linux_input/linux_input.c
++++ b/inputdrivers/linux_input/linux_input.c
+@@ -374,6 +374,10 @@
+      unsigned char index = KVAL(value);
+      int           base  = (level == DIKSI_BASE);
+ 
++     /* Handle unicode characters directly */
++     if (type >= 0x0f) {
++          return DFB_KEY( UNICODE, value ^ 0xf000 );
++     }
+      switch (type) {
+           case KT_FN:
+                if (index < 20)
+@@ -1201,10 +1205,23 @@
+      int                         code = entry->code;
+      unsigned short              value;
+      DFBInputDeviceKeyIdentifier identifier;
++     int                         orig_mode;
+ 
+      if (!data->vt)
+           return DFB_UNSUPPORTED;
+ 
++     /* save keyboard mode in order to restore it later */
++     if (ioctl( data->vt->fd, KDGKBMODE, &orig_mode ) < 0) {
++          D_PERROR( "DirectFB/Keyboard: KDGKBMODE failed!\n" );
++          return DFB_INIT;
++     }
++
++     /* switch to unicode mode to get the full keymap */
++     if (ioctl( data->vt->fd, KDSKBMODE, K_UNICODE ) < 0) {
++          D_PERROR( "DirectFB/Keyboard: K_UNICODE failed!\n" );
++          return DFB_INIT;
++     }
++
+      /* fetch the base level */
+      value = keyboard_read_value( driver_data, K_NORMTAB, code );
+ 
+@@ -1248,6 +1265,12 @@
+      entry->symbols[DIKSI_ALT_SHIFT] = keyboard_get_symbol( code, value,
+                                                             DIKSI_ALT_SHIFT );
+ 
++     /* switch back to original mode */
++     if (ioctl( data->vt->fd, KDSKBMODE, orig_mode ) < 0) {
++          D_PERROR( "DirectFB/Keyboard: KDSKBMODE failed!\n" );
++          return DFB_INIT;
++     }
++
+      return DFB_OK;
+ #else
+      return DFB_UNSUPPORTED;
diff -Nur --exclude=.svn 1.0.1-9/debian/patches/series 1.0.1-11/debian/patches/series
--- 1.0.1-9/debian/patches/series	2008-07-22 18:48:31.000000000 +0200
+++ 1.0.1-11/debian/patches/series	2008-08-18 14:21:43.000000000 +0200
@@ -9,4 +9,4 @@
 70_linux_fusion.patch
 90_linux_config.h.patch
 91_linux_types_cruft.patch
-92_reopen_console.patch
+93_fix_unicode_key_handling.patch

Reply to: