Adding debian version 0.5.5-4. debian/0.5.5-4
authorDaniel Baumann <daniel@debian.org>
Fri, 20 Apr 2012 11:49:25 +0000 (13:49 +0200)
committerDaniel Baumann <daniel@debian.org>
Fri, 20 Apr 2012 11:49:25 +0000 (13:49 +0200)
debian/changelog
debian/compat
debian/control
debian/lxpanel.install [new file with mode: 0644]
debian/patches/batt_status.patch [new file with mode: 0644]
debian/patches/kbled.patch [new file with mode: 0644]
debian/patches/libtool-fix.patch [new file with mode: 0644]
debian/patches/panel_draw_label_text.patch [new file with mode: 0644]
debian/patches/series
debian/patches/sort_dirmenu.patch [new file with mode: 0644]
debian/rules

index 706c3ba..68f2275 100644 (file)
@@ -1,3 +1,17 @@
+lxpanel (0.5.5-4) unstable; urgency=high
+
+  * Added some backport patches to close bugs on BTS and fix a potential 
+    buffer overflow problem.
+    - sort_dirmenu.patch - sort directory menu (Closes:#493256)
+    - batt_status.patch - battery status display (Closes:#580509)
+    - kbled.patch - keyboard LDE status (Closes:#563186)
+    - panel_draw_label_text.patch - potential buffer overflow
+  * Use DH7
+  * Apply libtool-fix.patch fix FTBFS with binutils-gold. (Close:#555575)
+  * Set urgency=high for buffer overflow fix
+
+ -- Andrew Lee (李健秋) <ajqlee@debian.org>  Tue, 25 May 2010 23:24:29 +0800
+
 lxpanel (0.5.5-3) unstable; urgency=high
 
   * Applied patch to solve a FTBFS problem. (Closes:#580475)
index 7ed6ff8..7f8f011 100644 (file)
@@ -1 +1 @@
-5
+7
index 3b285e6..4f82320 100644 (file)
@@ -3,7 +3,7 @@ Section: x11
 Priority: optional
 Maintainer: Debian LXDE Packaging Team <pkg-lxde-maintainers@lists.alioth.debian.org>
 Uploaders: Andrew Lee (李健秋) <ajqlee@debian.org>
-Build-Depends: debhelper (>= 5), autotools-dev, intltool, intltool-debian, libgtk2.0-dev (>=2.6), libglib2.0-dev (>=2.10), libxmu-dev, libxpm-dev, libiw-dev [!kfreebsd-i386 !kfreebsd-amd64], libasound2-dev, libmenu-cache1-dev (>=0.3.2), docbook-xml, docbook-xsl, xsltproc, python
+Build-Depends: debhelper (>= 7.0.50~), autotools-dev, intltool, intltool-debian, libgtk2.0-dev (>=2.6), libglib2.0-dev (>=2.10), libxmu-dev, libxpm-dev, libiw-dev [!kfreebsd-i386 !kfreebsd-amd64], libasound2-dev, libmenu-cache1-dev (>=0.3.2), docbook-xml, docbook-xsl, xsltproc, python
 Standards-Version: 3.8.4
 Homepage: http://lxde.org
 Vcs-Git: git://git.debian.org/git/collab-maint/lxpanel.git
diff --git a/debian/lxpanel.install b/debian/lxpanel.install
new file mode 100644 (file)
index 0000000..1a9d198
--- /dev/null
@@ -0,0 +1,3 @@
+debian/lxde-x-terminal-emulator.desktop usr/share/applications
+debian/lxde-x-www-browser.desktop usr/share/applications
+debian/lxpanel.lintian-overrides usr/share/lintian/overrides 
diff --git a/debian/patches/batt_status.patch b/debian/patches/batt_status.patch
new file mode 100644 (file)
index 0000000..20f6e63
--- /dev/null
@@ -0,0 +1,49 @@
+diff -ur lxpanel-0.5.5-orig//src/plugins/batt/batt_sys.c lxpanel-0.5.5//src/plugins/batt/batt_sys.c
+--- lxpanel-0.5.5-orig//src/plugins/batt/batt_sys.c    2010-02-06 20:45:38.000000000 +0100
++++ lxpanel-0.5.5//src/plugins/batt/batt_sys.c 2010-05-06 14:02:29.000000000 +0200
+@@ -38,6 +38,13 @@
+ battery* battery_new() {
+     static int battery_num = 1;
+     battery * b = g_new0 ( battery, 1 );
++    battery_reset(b);
++    b->battery_num = battery_num;
++    battery_num++;
++    return b;
++}
++
++void battery_reset( battery * b) {
+     b->type_battery = TRUE;
+     b->capacity_unit = "mAh";
+     b->last_capacity_unit = -1;
+@@ -49,12 +56,8 @@
+     b->remaining_capacity = -1;
+     b->present_rate = -1;
+     b->state = NULL;
+-    b->battery_num = battery_num;
+-    battery_num++;
+-    return b;
+ }
+-
+ static gchar* parse_info_file(char *filename)
+ {
+     char *buf = NULL;
+@@ -136,6 +139,8 @@
+     };
+     const gchar *sys_file;
++    battery_reset(b);
++
+     while ( (sys_file = sys_list[i]) != NULL ) {
+     
+       gchar *file_content;
+@@ -150,7 +155,7 @@
+                   b->state = "available";
+           }
+           else if ( strcmp("energy_now", sys_file ) == 0 ) {
+-              b->remaining_capacity = get_unit_value((gchar*) file_content) / 1000;
++              b->remaining_energy = get_unit_value((gchar*) file_content) / 1000;
+               if (!b->state)
+                   b->state = "available";
+           }
+
diff --git a/debian/patches/kbled.patch b/debian/patches/kbled.patch
new file mode 100644 (file)
index 0000000..5041ea5
--- /dev/null
@@ -0,0 +1,21 @@
+commit 30932cc7e76cd3f3dcb54867f573a4879befebc0
+Author: Marty Jack <martyj@linux.local>
+Date:   Mon Apr 5 18:23:12 2010 -0400
+
+    Fix handling of "visible" flag in icon_grid_add (Bug2977158)
+    - KBLED is the only place that sometimes passes FALSE here
+
+diff --git a/src/icon-grid.c b/src/icon-grid.c
+index 922057a..23f25d5 100644
+--- a/src/icon-grid.c
++++ b/src/icon-grid.c
+@@ -306,7 +306,8 @@ void icon_grid_add(IconGrid * ig, GtkWidget * child, gboolean visible)
+     }
+     /* Add the widget to the layout container. */
+-    gtk_widget_show(ige->widget);
++    if (visible)
++        gtk_widget_show(ige->widget);
+     gtk_fixed_put(GTK_FIXED(ig->widget), ige->widget, 0, 0);
+     g_signal_connect(G_OBJECT(child), "size-request", G_CALLBACK(icon_grid_element_size_request), (gpointer) ige);
diff --git a/debian/patches/libtool-fix.patch b/debian/patches/libtool-fix.patch
new file mode 100644 (file)
index 0000000..616f1b4
--- /dev/null
@@ -0,0 +1,28 @@
+Description: Add libtool missing check to fix 554821 or similar bugs in the future
+
+Author: Andrew Lee (李健秋) <ajqlee@debian.org>
+Bug-Debian: http://bugs.debian.org/558582
+Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554821
+Reviewed-By: Jonas Smedegaard <dr@jones.dk>, Hector Oron <zumbi@debian.org>
+Last-Update: <2010-02-20>
+
+--- menu-cache-0.3.1.orig/aclocal.m4
++++ menu-cache-0.3.1/aclocal.m4
+@@ -4282,6 +4282,7 @@ dnl Note also adjust exclude_expsyms for
+     fi
+     supports_anon_versioning=no
+     case `$LD -v 2>&1` in
++      *GNU\ gold*) supports_anon_versioning=yes ;;
+       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+--- menu-cache-0.3.1.orig/configure
++++ menu-cache-0.3.1/configure
+@@ -8642,6 +8642,7 @@ $as_echo_n "checking whether the $compil
+     fi
+     supports_anon_versioning=no
+     case `$LD -v 2>&1` in
++      *GNU\ gold*) supports_anon_versioning=yes ;;
+       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/debian/patches/panel_draw_label_text.patch b/debian/patches/panel_draw_label_text.patch
new file mode 100644 (file)
index 0000000..224472e
--- /dev/null
@@ -0,0 +1,58 @@
+commit cd93c810d7c7ac2bafa53950e012f80ddaacf80a
+Author: Marty Jack <martyj@linux.local>
+Date:   Sun May 9 18:12:37 2010 -0400
+
+    Buffer overflow in panel_draw_label_text (Bug2998726)
+
+diff --git a/src/panel.c b/src/panel.c
+index 6ae6baa..d383d61 100644
+--- a/src/panel.c
++++ b/src/panel.c
+@@ -1054,8 +1054,6 @@ void panel_adjust_geometry_terminology(Panel * p)
+ /* Draw text into a label, with the user preference color and optionally bold. */
+ void panel_draw_label_text(Panel * p, GtkWidget * label, char * text, gboolean bold, gboolean custom_color)
+ {
+-    char buffer[512];
+-
+     if (text == NULL)
+     {
+         /* Null string. */
+@@ -1068,7 +1066,7 @@ void panel_draw_label_text(Panel * p, GtkWidget * label, char * text, gboolean b
+         int font_desc;
+         if (p->icon_size < 20) 
+             font_desc = 9;
+-        else if (p->icon_size >= 20 && p->icon_size < 26)
++        else if (p->icon_size >= 20 && p->icon_size < 36)
+             font_desc = 10;
+         else
+             font_desc = 12;
+@@ -1091,23 +1089,25 @@ void panel_draw_label_text(Panel * p, GtkWidget * label, char * text, gboolean b
+         if ((custom_color) && (p->usefontcolor))
+         {
+             /* Color, optionally bold. */
+-            g_snprintf(buffer, sizeof(buffer), "<span font_desc=\"%d\" color=\"#%06x\">%s%s%s</span>",
++            gchar * text = g_strdup_printf("<span font_desc=\"%d\" color=\"#%06x\">%s%s%s</span>",
+                 font_desc,
+                 gcolor2rgb24(&p->gfontcolor),
+                 ((bold) ? "<b>" : ""),
+                 valid_markup,
+                 ((bold) ? "</b>" : ""));
+-            gtk_label_set_markup(GTK_LABEL(label), buffer);
++            gtk_label_set_markup(GTK_LABEL(label), text);
++            g_free(text);
+         }
+         else
+         {
+             /* No color, optionally bold. */
+-            g_snprintf(buffer, sizeof(buffer), "<span font_desc=\"%d\">%s%s%s</span>",
++            gchar * text = g_strdup_printf("<span font_desc=\"%d\">%s%s%s</span>",
+                 font_desc,
+                 ((bold) ? "<b>" : ""),
+                 valid_markup,
+                 ((bold) ? "</b>" : ""));
+-            gtk_label_set_markup(GTK_LABEL(label), buffer);
++            gtk_label_set_markup(GTK_LABEL(label), text);
++            g_free(text);
+         }
+         g_free(escaped_text);
+     }
index 1822d5b..b3fefe1 100644 (file)
@@ -1,3 +1,8 @@
+libtool-fix.patch
+panel_draw_label_text.patch
+kbled.patch
+batt_status.patch
+sort_dirmenu.patch
 missing_glades.patch
 default-config.patch
 g_locale_to_utf8.patch
diff --git a/debian/patches/sort_dirmenu.patch b/debian/patches/sort_dirmenu.patch
new file mode 100644 (file)
index 0000000..ceb5555
--- /dev/null
@@ -0,0 +1,116 @@
+commit 8456e26ac9b583a48d82ea17c196bf8756ed9dd5
+Author: Marty Jack <martyj@linux.local>
+Date:   Sun Apr 18 11:06:47 2010 -0400
+
+    Sort menu items in Directory Menu (Bug2977155)
+
+diff --git a/src/plugins/dirmenu.c b/src/plugins/dirmenu.c
+index cfaa12b..50852a1 100644
+--- a/src/plugins/dirmenu.c
++++ b/src/plugins/dirmenu.c
+@@ -28,6 +28,13 @@
+ #include "plugin.h"
+ #include "dbg.h"
++/* Temporary for sort of directory names. */
++typedef struct _directory_name {
++    struct _directory_name * flink;
++    char * directory_name;
++    char * directory_name_collate_key;
++} DirectoryName;
++
+ /* Private context for directory menu plugin. */
+ typedef struct {
+     Plugin * plugin;                  /* Back pointer to plugin */
+@@ -162,11 +169,12 @@ static GtkWidget * dirmenu_create_menu(Plugin * p, const char * path, gboolean o
+     g_object_set_data_full(G_OBJECT(menu), "path", g_strdup(path), g_free);
+     /* Scan the specified directory to populate the menu with its subdirectories. */
++    DirectoryName * dir_list = NULL;
+     GDir * dir = g_dir_open(path, 0, NULL);
+     if (dir != NULL)
+     {
+         const char * name;
+-        while ((name = g_dir_read_name(dir)) != NULL)
++        while ((name = g_dir_read_name(dir)) != NULL) /* Memory owned by glib */
+         {
+             /* Omit hidden files. */
+             if (name[0] != '.')
+@@ -174,19 +182,33 @@ static GtkWidget * dirmenu_create_menu(Plugin * p, const char * path, gboolean o
+                 char * full = g_build_filename(path, name, NULL);
+                 if (g_file_test(full, G_FILE_TEST_IS_DIR))
+                 {
+-                    char * disp = g_filename_display_name(name);
+-                    GtkWidget * item = gtk_image_menu_item_new_with_label(disp);
+-                    g_free(disp);
+-
+-                    g_object_set_data_full(G_OBJECT(item), "name", g_strdup(name), g_free);
+-                    gtk_image_menu_item_set_image(
+-                        GTK_IMAGE_MENU_ITEM(item),
+-                        gtk_image_new_from_stock(GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU));
+-                    GtkWidget * dummy = gtk_menu_new();
+-                    gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), dummy);
+-                    gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+-                    g_signal_connect(item, "select", G_CALLBACK(dirmenu_menuitem_select), p);
+-                    g_signal_connect(item, "deselect", G_CALLBACK(dirmenu_menuitem_deselect), p);
++                    /* Convert name to UTF-8 and to the collation key. */
++                    char * directory_name = g_filename_display_name(name);
++                    char * directory_name_collate_key = g_utf8_collate_key(directory_name, -1);
++
++                    /* Locate insertion point. */
++                    DirectoryName * dir_pred = NULL;
++                    DirectoryName * dir_cursor;
++                    for (dir_cursor = dir_list; dir_cursor != NULL; dir_pred = dir_cursor, dir_cursor = dir_cursor->flink)
++                    {
++                        if (strcmp(directory_name_collate_key, dir_cursor->directory_name_collate_key) <= 0)
++                            break;
++                    }
++
++                    /* Allocate and initialize sorted directory name entry. */
++                    dir_cursor = g_new0(DirectoryName, 1);
++                    dir_cursor->directory_name = directory_name;
++                    dir_cursor->directory_name_collate_key = directory_name_collate_key;
++                    if (dir_pred == NULL)
++                    {
++                        dir_cursor->flink = dir_list;
++                        dir_list = dir_cursor;
++                    }
++                    else
++                    {
++                        dir_cursor->flink = dir_pred->flink;
++                        dir_pred->flink = dir_cursor;
++                    }
+                 }
+                 g_free(full);
+             }
+@@ -194,6 +216,30 @@ static GtkWidget * dirmenu_create_menu(Plugin * p, const char * path, gboolean o
+         g_dir_close(dir);
+     }
++    /* The sorted directory name list is complete.  Loop to create the menu. */
++    DirectoryName * dir_cursor;
++    while ((dir_cursor = dir_list) != NULL)
++    {
++        /* Create and initialize menu item. */
++        GtkWidget * item = gtk_image_menu_item_new_with_label(dir_cursor->directory_name);
++        gtk_image_menu_item_set_image(
++            GTK_IMAGE_MENU_ITEM(item),
++            gtk_image_new_from_stock(GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU));
++        GtkWidget * dummy = gtk_menu_new();
++        gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), dummy);
++        gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
++
++        /* Unlink and free sorted directory name element, but reuse the directory name string. */
++        dir_list = dir_cursor->flink;
++        g_object_set_data_full(G_OBJECT(item), "name", dir_cursor->directory_name, g_free);
++        g_free(dir_cursor->directory_name_collate_key);
++        g_free(dir_cursor);
++
++        /* Connect signals. */
++        g_signal_connect(G_OBJECT(item), "select", G_CALLBACK(dirmenu_menuitem_select), p);
++        g_signal_connect(G_OBJECT(item), "deselect", G_CALLBACK(dirmenu_menuitem_deselect), p);
++    }
++
+     /* Create "Open" and "Open in Terminal" items. */
+     GtkWidget * item = gtk_image_menu_item_new_from_stock( GTK_STOCK_OPEN, NULL );
+     g_signal_connect(item, "activate", G_CALLBACK(dirmenu_menuitem_open_directory), p);
index b8c3ad3..1fea050 100755 (executable)
 #!/usr/bin/make -f
 # -*- makefile -*-
 # Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-#include /usr/share/dpatch/dpatch.make
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-CFLAGS = -Wall -g
-INSTALL = install
-INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
-INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
-INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
-INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
-
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-    CFLAGS += -O0
-else
-    CFLAGS += -O2
-endif
-ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
-    INSTALL_PROGRAM += -s
-endif
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    MAKEFLAGS += -j$(NUMJOBS)
-endif
-
-config.status: configure
-       dh_testdir
-       # Add here commands to configure the package.
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-       cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-       cp -f /usr/share/misc/config.guess config.guess
-endif
-       ./configure \
-       --host=$(DEB_HOST_GNU_TYPE) \
-       --build=$(DEB_BUILD_GNU_TYPE) \
-       --prefix=/usr \
-       --enable-man \
-       --mandir=\$${prefix}/share/man \
-       --infodir=\$${prefix}/share/info \
-       --sysconfdir=/etc \
-       CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,--as-needed"
-
-
-build: build-stamp
-
-build-stamp:  config.status
-       dh_testdir
-
-       # Add here commands to compile the package.
-       $(MAKE)
-       #docbook-to-man debian/lxpanel.sgml > lxpanel.1
-
-       touch $@
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp 
-
-       # Add here commands to clean up after the build process.
-       [ ! -f Makefile ] || $(MAKE) distclean
-       rm -f config.sub config.guess
-       rm -f intltool-extract \
-             intltool-update \
-             intltool-merge \
-             man/lxpanel.1  \
-             man/lxpanelctl.1 
-
-       dh_clean 
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
-
-       # Add here commands to install the package into debian/lxpanel.
-       $(MAKE) DESTDIR=$(CURDIR)/debian/lxpanel install
-
-       # Install .desktop files
-       install -d $(CURDIR)/debian/lxpanel/usr/share/applications
-       install -m644 $(CURDIR)/debian/lxde-x-www-browser.desktop \
-                       $(CURDIR)/debian/lxpanel/usr/share/applications
-       install -m644 $(CURDIR)/debian/lxde-x-terminal-emulator.desktop \
-                       $(CURDIR)/debian/lxpanel/usr/share/applications
-
-       # Install lintian-overrides
-       install -d $(CURDIR)/debian/lxpanel/usr/share/lintian/overrides
-       install -m644 $(CURDIR)/debian/lxpanel.lintian-overrides \
-                       $(CURDIR)/debian/lxpanel/usr/share/lintian/overrides
+%:
+       dh $@
 
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
+override_dh_auto_configure:
+       dh_auto_configure -- --enable-man 
 
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs
-       dh_installdocs
-       dh_installexamples
-       dh_movefiles --sourcedir=debian/lxpanel
-#      dh_install
-#      dh_installmenu
-#      dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_python
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
-       dh_installman
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-#      dh_perl
-#      dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+override_dh_auto_clean:
+       rm -f man/lxpanel.1 man/lxpanelctl.1
+       dh_auto_clean
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+override_dh_auto_test:
+       :