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

Bug#999359: buster-pu: package libayatana-indicator/0.8.4-1+deb11u2



Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu

This buster-pu request is for two recent uploads of libayatana-indicator
(+deb11u1 and +deb11u2). The +deb11u1 upload has already been flagged for
acceptance if I interpreted some recent mail in my Debian INBOX correctly.

[ Reason ]
In +deb11u1, some icon scaling (when read from filepath) has been fixed.

Andrew Shadura reported weekly crashes in mate-indicator-applet and
nailed down the origin to a missing is_null check in
libayatana-indicator. This has been resolved in +deb11u2.

[ Impact ]
MATE indicator applet in MATE panel crashes and needs to be reload
frequently. Icon scaling can be wrong for some appindicator based panel
indicator icons.

[ Tests ]
Manual.

[ Risks ]
Virtually none.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]

Quoting myself from d/changelog:

-> +deb11u2:

+  * debian/patches:
+    + Add 0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch.
+      Prevent regular crashes in indicator applets. (Closes: #992499).

-> +deb11u1: (already accepted)

+  [ Martin Wimpress ]
+  * debian/patches:
+    + Add 0001_scale-icons-when-loading-from-filename.patch (LP: #1733301)
+
+  [ Mike Gabriel ]
+  * debian/patches:
+    + Fix file path in 0001_scale-icons-when-loading-from-filename.patch.

When loading an icon from a filename, not a stock icon name, we need to
scale the pixbuf manually because gtk_image_set_pixel_size only works on
named icons from the theme that have multiple sizes available. The
downscaling has been added with the above patch.

[ Other info ]
diff -Nru libayatana-indicator-0.8.4/debian/changelog libayatana-indicator-0.8.4/debian/changelog
--- libayatana-indicator-0.8.4/debian/changelog	2021-02-03 16:20:46.000000000 +0100
+++ libayatana-indicator-0.8.4/debian/changelog	2021-11-10 13:45:53.000000000 +0100
@@ -1,3 +1,23 @@
+libayatana-indicator (0.8.4-1+deb11u2) bullseye; urgency=medium
+
+  * debian/patches:
+    + Add 0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch.
+      Prevent regular crashes in indicator applets. (Closes: #992499).
+
+ -- Mike Gabriel <sunweaver@debian.org>  Wed, 10 Nov 2021 13:45:53 +0100
+
+libayatana-indicator (0.8.4-1+deb11u1) bullseye; urgency=medium
+
+  [ Martin Wimpress ]
+  * debian/patches:
+    + Add 0001_scale-icons-when-loading-from-filename.patch (LP: #1733301)
+
+  [ Mike Gabriel ]
+  * debian/patches:
+    + Fix file path in 0001_scale-icons-when-loading-from-filename.patch.
+
+ -- Mike Gabriel <sunweaver@debian.org>  Tue, 19 Oct 2021 10:26:27 +0200
+
 libayatana-indicator (0.8.4-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru libayatana-indicator-0.8.4/debian/patches/0001_scale-icons-when-loading-from-filename.patch libayatana-indicator-0.8.4/debian/patches/0001_scale-icons-when-loading-from-filename.patch
--- libayatana-indicator-0.8.4/debian/patches/0001_scale-icons-when-loading-from-filename.patch	1970-01-01 01:00:00.000000000 +0100
+++ libayatana-indicator-0.8.4/debian/patches/0001_scale-icons-when-loading-from-filename.patch	2021-10-19 11:59:32.000000000 +0200
@@ -0,0 +1,27 @@
+diff --git a/src/indicator-image-helper.c b/src/indicator-image-helper.c
+index 2c0e244..4a22539 100644
+--- a/libayatana-indicator/indicator-image-helper.c
++++ b/libayatana-indicator/indicator-image-helper.c
+@@ -79,13 +79,15 @@ refresh_image (GtkImage * image)
+ 		}
+ 		g_object_unref (pixbuf);
+ 	} else if (icon_filename != NULL) {
+-		gtk_image_set_from_file(image, icon_filename);
+-
+-		gint height;
+-		gdk_pixbuf_get_file_info(icon_filename, NULL, &height);
+-
+-		if (height > ICON_SIZE) {
+-			gtk_image_set_pixel_size(image, ICON_SIZE);
++		GError* error = NULL;
++		GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file_at_scale(icon_filename, ICON_SIZE, ICON_SIZE, TRUE, &error);
++		if (pixbuf != NULL) {
++			/* Put the pixbuf on the image */
++			gtk_image_set_from_pixbuf(image, pixbuf);
++			g_object_unref(G_OBJECT(pixbuf));
++		} else {
++			g_error_free(error);
++			gtk_image_set_from_icon_name(image, "image-missing", ICON_SIZE);
+ 		}
+ 	} else if (G_IS_LOADABLE_ICON(icon_names)) {
+ 		/* Build a pixbuf if needed */
diff -Nru libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch
--- libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch	1970-01-01 01:00:00.000000000 +0100
+++ libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch	2021-11-10 13:45:40.000000000 +0100
@@ -0,0 +1,44 @@
+From 40e310ba6872a0ddc29f5ff3ba9cc805c60ed4a9 Mon Sep 17 00:00:00 2001
+From: Robert Tari <robert@tari.in>
+Date: Fri, 5 Nov 2021 10:26:24 +0100
+Subject: [PATCH] src/indicator-ng.c: Make sure old menu item name is not NULL
+ before comparison
+
+ Fixes https://github.com/AyatanaIndicators/libayatana-indicator/issues/60
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ libayatana-indicator/indicator-ng.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/indicator-ng.c b/src/indicator-ng.c
+index f057600..6739584 100644
+--- a/libayatana-indicator/indicator-ng.c
++++ b/libayatana-indicator/indicator-ng.c
+@@ -1,5 +1,6 @@
+ /*
+  * Copyright 2013 Canonical Ltd.
++ * Copyright 2021 Robert tari
+  *
+  * This program is free software: you can redistribute it and/or modify it
+  * under the terms of the GNU General Public License version 3, as published
+@@ -15,6 +16,7 @@
+  *
+  * Authors:
+  *     Lars Uebernickel <lars.uebernickel@canonical.com>
++ *     Robert Tari <robert@tari.in>
+  */
+ 
+ #include "indicator-ng.h"
+@@ -244,7 +246,7 @@ static gboolean indicator_ng_menu_insert_idos(IndicatorNg *self, GMenuModel *pSe
+         GtkWidget *pMenuItemOld = GTK_WIDGET(g_list_nth_data(lMenuItems, nMenuItem));
+         const gchar *sName = gtk_widget_get_name(pMenuItemOld);
+ 
+-        if (!g_str_equal(sName, sType))
++        if (sName != NULL && !g_str_equal(sName, sType))
+         {
+             GActionGroup *pActionGroup = (GActionGroup*)g_object_get_qdata(G_OBJECT(self->entry.menu), m_pActionMuxer);
+             GMenuItem *pMenuModelItem = g_menu_item_new_from_model(pSection, nModelItem);
+-- 
+2.30.2
+
diff -Nru libayatana-indicator-0.8.4/debian/patches/series libayatana-indicator-0.8.4/debian/patches/series
--- libayatana-indicator-0.8.4/debian/patches/series	2021-02-03 16:07:44.000000000 +0100
+++ libayatana-indicator-0.8.4/debian/patches/series	2021-11-10 13:45:40.000000000 +0100
@@ -1 +1,3 @@
 1001_build-tests-without-Werror.patch
+0001_scale-icons-when-loading-from-filename.patch
+0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch
diff -Nru libayatana-indicator-0.8.4/debian/changelog libayatana-indicator-0.8.4/debian/changelog
--- libayatana-indicator-0.8.4/debian/changelog	2021-10-19 10:26:27.000000000 +0200
+++ libayatana-indicator-0.8.4/debian/changelog	2021-11-10 13:45:53.000000000 +0100
@@ -1,3 +1,11 @@
+libayatana-indicator (0.8.4-1+deb11u2) bullseye; urgency=medium
+
+  * debian/patches:
+    + Add 0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch.
+      Prevent regular crashes in indicator applets. (Closes: #992499).
+
+ -- Mike Gabriel <sunweaver@debian.org>  Wed, 10 Nov 2021 13:45:53 +0100
+
 libayatana-indicator (0.8.4-1+deb11u1) bullseye; urgency=medium
 
   [ Martin Wimpress ]
diff -Nru libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch
--- libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch	1970-01-01 01:00:00.000000000 +0100
+++ libayatana-indicator-0.8.4/debian/patches/0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch	2021-11-10 13:45:40.000000000 +0100
@@ -0,0 +1,44 @@
+From 40e310ba6872a0ddc29f5ff3ba9cc805c60ed4a9 Mon Sep 17 00:00:00 2001
+From: Robert Tari <robert@tari.in>
+Date: Fri, 5 Nov 2021 10:26:24 +0100
+Subject: [PATCH] src/indicator-ng.c: Make sure old menu item name is not NULL
+ before comparison
+
+ Fixes https://github.com/AyatanaIndicators/libayatana-indicator/issues/60
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ libayatana-indicator/indicator-ng.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/indicator-ng.c b/src/indicator-ng.c
+index f057600..6739584 100644
+--- a/libayatana-indicator/indicator-ng.c
++++ b/libayatana-indicator/indicator-ng.c
+@@ -1,5 +1,6 @@
+ /*
+  * Copyright 2013 Canonical Ltd.
++ * Copyright 2021 Robert tari
+  *
+  * This program is free software: you can redistribute it and/or modify it
+  * under the terms of the GNU General Public License version 3, as published
+@@ -15,6 +16,7 @@
+  *
+  * Authors:
+  *     Lars Uebernickel <lars.uebernickel@canonical.com>
++ *     Robert Tari <robert@tari.in>
+  */
+ 
+ #include "indicator-ng.h"
+@@ -244,7 +246,7 @@ static gboolean indicator_ng_menu_insert_idos(IndicatorNg *self, GMenuModel *pSe
+         GtkWidget *pMenuItemOld = GTK_WIDGET(g_list_nth_data(lMenuItems, nMenuItem));
+         const gchar *sName = gtk_widget_get_name(pMenuItemOld);
+ 
+-        if (!g_str_equal(sName, sType))
++        if (sName != NULL && !g_str_equal(sName, sType))
+         {
+             GActionGroup *pActionGroup = (GActionGroup*)g_object_get_qdata(G_OBJECT(self->entry.menu), m_pActionMuxer);
+             GMenuItem *pMenuModelItem = g_menu_item_new_from_model(pSection, nModelItem);
+-- 
+2.30.2
+
diff -Nru libayatana-indicator-0.8.4/debian/patches/series libayatana-indicator-0.8.4/debian/patches/series
--- libayatana-indicator-0.8.4/debian/patches/series	2021-10-19 10:26:27.000000000 +0200
+++ libayatana-indicator-0.8.4/debian/patches/series	2021-11-10 13:45:40.000000000 +0100
@@ -1,2 +1,3 @@
 1001_build-tests-without-Werror.patch
 0001_scale-icons-when-loading-from-filename.patch
+0002_src-indicator-ng.c-Make-sure-old-menu-item-name-is-n.patch

Reply to: