GNU bug report logs - #71825
[PATCH] gnu: Fix virt-manager for systems with no GTK cursor.

Previous Next

Package: guix-patches;

Reported by: Karl Hallsby <karl <at> hallsby.com>

Date: Fri, 28 Jun 2024 17:16:02 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Famulari <leo <at> famulari.name>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#71825: closed ([PATCH] gnu: Fix virt-manager for systems with
 no GTK cursor.)
Date: Wed, 17 Jul 2024 17:12:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 17 Jul 2024 13:11:34 -0400
with message-id <Zpf7Rj5_krE9Nu-T <at> jasmine.lan>
and subject line Re: [bug#71825] [PATCH] gnu: Fix virt-manager for systems with no GTK cursor.
has caused the debbugs.gnu.org bug report #71825,
regarding [PATCH] gnu: Fix virt-manager for systems with no GTK cursor.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
71825: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71825
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Karl Hallsby <karl <at> hallsby.com>
To: guix-patches <at> gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH] gnu: Fix virt-manager for systems with no GTK cursor.
Date: Fri, 28 Jun 2024 12:11:37 -0500
* gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register file.
* gnu/packages/virtualization.scm (virt-manager)[source]: Add patch.

Change-Id: I4db2015a5d4ac3eca3cfa5d3eec20b357c2d3ff9
---
This patch fixes an issue in virt-manager 4.1.0 where it errors and 
returns a stack trace. Namely, Gdk.Cursor.new_from_name yields a
"constructor returned NULL" error, which causes a "'NoneType' object has
no attribute 'conn'" error later. 

 gnu/local.mk                                  |  1 +
 ...anager-fix-gtk-cursor-theme-backtace.patch | 27 +++++++++++++++++++
 gnu/packages/virtualization.scm               |  4 ++-
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e20ed2be7e..7c626cabf1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2214,6 +2214,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/vinagre-newer-freerdp.patch             \
   %D%/packages/patches/vinagre-newer-rdp-parameters.patch      \
   %D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch	\
+  %D%/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch	\
   %D%/packages/patches/vsearch-unbundle-cityhash.patch		\
   %D%/packages/patches/vte-CVE-2012-2738-pt1.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt2.patch			\
diff --git a/gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch b/gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch
new file mode 100644
index 0000000000..f0b34bc4e4
--- /dev/null
+++ b/gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch
@@ -0,0 +1,27 @@
+From cc4a39ea94f42bc92765eb3bb56e2b7f9198be67 Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso <at> redhat.com>
+Date: Thu, 19 Jan 2023 11:13:56 -0500
+Subject: [PATCH] asyncjob: Fix backtrace when no cursor theme installed
+
+Fixes: https://github.com/virt-manager/virt-manager/issues/479
+
+Signed-off-by: Cole Robinson <crobinso <at> redhat.com>
+---
+ virtManager/asyncjob.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/virtManager/asyncjob.py b/virtManager/asyncjob.py
+index 32d9c0a16..46692acea 100644
+--- a/virtManager/asyncjob.py
++++ b/virtManager/asyncjob.py
+@@ -265,9 +265,7 @@ def run(self):
+             self.topwin.present()
+ 
+         if not self.cancel_cb and self.show_progress:
+-            gdk_window = self.topwin.get_window()
+-            gdk_window.set_cursor(
+-                Gdk.Cursor.new_from_name(gdk_window.get_display(), "progress"))
++            self._set_cursor("progress")
+         self._bg_thread.start()
+ 
+ 
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 16c2b75510..3136db33b5 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -33,6 +33,7 @@
 ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2023, 2024 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
 ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2024 Raven Hallsby <karl <at> hallsby.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1663,7 +1664,8 @@ (define-public virt-manager
                                   version ".tar.gz"))
               (sha256
                (base32
-                "18lhlnd3gmyzhbnjc16gdyzhjcd33prlxnca4xlidiidngbq21lm"))))
+                "18lhlnd3gmyzhbnjc16gdyzhjcd33prlxnca4xlidiidngbq21lm"))
+              (patches (search-patches "virt-manager-fix-gtk-cursor-theme-backtace.patch"))))
     (build-system python-build-system)
     (arguments
      (list #:use-setuptools? #f      ; uses custom distutils 'install' command

base-commit: ae55410e0752000268b31c71dddea58e6106522a
-- 
2.45.1



[Message part 3 (message/rfc822, inline)]
From: Leo Famulari <leo <at> famulari.name>
To: Karl Hallsby via Guix-patches via <guix-patches <at> gnu.org>
Cc: 71825-done <at> debbugs.gnu.org, Karl Hallsby <karl <at> hallsby.com>
Subject: Re: [bug#71825] [PATCH] gnu: Fix virt-manager for systems with no
 GTK cursor.
Date: Wed, 17 Jul 2024 13:11:34 -0400
On Fri, Jun 28, 2024 at 12:11:37PM -0500, Karl Hallsby via Guix-patches via wrote:
> * gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register file.
> * gnu/packages/virtualization.scm (virt-manager)[source]: Add patch.

Thanks! I added some annotation to the patch file and pushed as
6cfc88e3be73904fc87443cdd5c7d7961923e848


This bug report was last modified 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.