gnu: virt-manager: Update to 5.0.0 and enable tests.

* gnu/packages/virtualization.scm (virt-manager): Update to 5.0.0.
[source]: Update URI.  Delete patches.
[build-system]: Switch to meson-build-system.
[arguments] <#:use-setuptools?, #:tests?, #:imported-modules>: Delete
arguments.
<#:modules>: Add (srfi srfi-1).
<#:phases>: Delete fix-setup phase.  Remove stale Xen comment in
fix-default-uri phase.  Rename and extend wrap-with-GI_TYPELIB_PATH phase to
wrap-more. Delete glib-or-gtk-build-system and glib-or-gtk-wrap phases.  Add
set_SOURCE_DIR phase.  Update check phase.
[native-inputs]: Add cdrtools, cpio, gettext-minimal, pkg-config and
python-pytest.  Remove intltool and perl.
[inputs]: Add python-minimal.
* gnu/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch:
Delete file.
* gnu/local.mk (dist_patch_DATA): De-register it.

Change-Id: Idff7abdcb5b6237e4fcaba40f373866699718cbc
Series-to: 76365@debbugs.gnu.org
Series-postfix: gnome-team
Cover-letter:
 Update virt-manager to 5.0.0.
 This small series updates virt-manager to 5.0.0, along libvirt and
 python-libvirt.
 END
This commit is contained in:
Maxim Cournoyer 2025-02-17 14:46:47 +09:00
parent fa0992555d
commit 3e9f9af5a9
No known key found for this signature in database
GPG key ID: 1260E46482E63562
3 changed files with 70 additions and 120 deletions

View file

@ -2387,7 +2387,6 @@ dist_patch_DATA = \
%D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.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/vsearch-unbundle-cityhash.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \

View file

@ -1,40 +0,0 @@
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.
See the upstream bug report for more information:
https://github.com/virt-manager/virt-manager/issues/479
Patch copied from upstream source repository:
https://github.com/virt-manager/virt-manager/commit/cc4a39ea94f42bc92765eb3bb56e2b7f9198be67
From cc4a39ea94f42bc92765eb3bb56e2b7f9198be67 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@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@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()

View file

@ -1702,74 +1702,79 @@ virtualization library.")
(define-public virt-manager (define-public virt-manager
(package (package
(name "virt-manager") (name "virt-manager")
(version "4.1.0") (version "5.0.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://virt-manager.org/download/sources" (uri (string-append "https://releases.pagure.org/" name
"/virt-manager/virt-manager-" "/" name "-" version ".tar.xz"))
version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"18lhlnd3gmyzhbnjc16gdyzhjcd33prlxnca4xlidiidngbq21lm")) "0jpqhc02ya55rr8bin734znasslwlff42ann9rsvv5y9w13ax2dw"))))
(patches (search-patches "virt-manager-fix-gtk-cursor-theme-backtace.patch")))) (build-system meson-build-system)
(build-system python-build-system)
(arguments (arguments
(list #:use-setuptools? #f ; uses custom distutils 'install' command (list
#:tests? #f ; TODO: The tests currently fail #:modules
; RuntimeError: Loop condition wasn't met '((ice-9 match)
#:imported-modules (srfi srfi-1)
`((guix build glib-or-gtk-build-system) (srfi srfi-26)
,@%python-build-system-modules) (guix build meson-build-system)
#:modules (guix build utils))
'((ice-9 match) #:glib-or-gtk? #t
(srfi srfi-26) #:phases
(guix build python-build-system) #~(modify-phases %standard-phases
((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) (add-after 'unpack 'set-SOURCE_DIR
(guix build utils)) (lambda _
#:phases (setenv "SOURCE_DIR" (getcwd))))
#~(modify-phases %standard-phases (add-after 'unpack 'fix-default-uri
(add-after 'unpack 'fix-setup (lambda* (#:key inputs #:allow-other-keys)
(lambda _ (substitute* "virtManager/createconn.py"
(substitute* "virtinst/buildconfig.py" (("/usr(/bin/qemu-system-\\*)" _ suffix)
(("/usr") #$output)))) (string-append #$(this-package-input "qemu") suffix)))))
(add-after 'unpack 'fix-default-uri (add-before 'glib-or-gtk-wrap 'wrap-more
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Xen is not available for now - so only patch qemu. (let* ((paths (filter-map
(substitute* "virtManager/createconn.py" (match-lambda
(("/usr(/bin/qemu-system-\\*)" _ suffix) ((output . directory)
(string-append #$(this-package-input "qemu") suffix))))) (let* ((girepodir (string-append
(add-before 'wrap 'wrap-with-GI_TYPELIB_PATH directory
(lambda* (#:key inputs #:allow-other-keys) "/lib/girepository-1.0")))
(let* ((bin (string-append #$output "/bin")) (and (file-exists? girepodir)
(bin-files (find-files bin ".*")) girepodir))))
(paths (map (match-lambda inputs)))
((output . directory) (for-each (lambda (file)
(let* ((girepodir (string-append (format #t "wrapping ~a~%" file)
directory (wrap-program file
"/lib/girepository-1.0"))) `("GI_TYPELIB_PATH" prefix ,paths)
(if (file-exists? girepodir) `("GUIX_PYTHONPATH" prefix
girepodir #f)))) ;; FIXME: This wraps too much (see: bug#25235).
inputs))) (,(getenv "GUIX_PYTHONPATH")))))
(for-each (lambda (file) (find-files (string-append #$output "/bin"))))))
(format #t "wrapping ~a\n" file) (replace 'check
(wrap-program file (lambda* (#:key tests? #:allow-other-keys)
`("GI_TYPELIB_PATH" ":" prefix (with-directory-excursion (getenv "SOURCE_DIR")
,(filter identity paths)))) (invoke "pytest" "-vvv"
bin-files)))) "-k" (string-append
(replace 'check ;; The cdrom_url and CLI0062 tests cause
(lambda* (#:key tests? #:allow-other-keys) ;; some crash, also outside the build container.
(when tests? "not install_cdrom_url and "
(setenv "HOME" "/tmp") "not testCLI0062virt_install and "
(setenv "XDG_CACHE_HOME" "/tmp") ;; These tests fail only inside the
(system "Xvfb :1 &") ;; build container, perhaps due to
(setenv "DISPLAY" ":1") ;; missing /dev nodes.
;; Dogtail requires that Assistive Technology support be enabled "not install_s390x_cdrom and "
(setenv "GTK_MODULES" "gail:atk-bridge") "not install_many_devices and "
(invoke "dbus-run-session" "--" "pytest" "--uitests")))) "not test_disk and "
(add-after 'install 'glib-or-gtk-compile-schemas "not virt_clone"))))))))
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) (native-inputs
(add-after 'wrap 'glib-or-gtk-wrap (list cdrtools
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) cpio
gettext-minimal
`(,glib "bin") ;glib-compile-schemas
gobject-introspection
`(,gtk+ "bin") ;gtk-update-icon-cache
pkg-config
python-docutils ;rst2ma
python-pytest))
(inputs (inputs
(list bash-minimal (list bash-minimal
dconf dconf
@ -1779,29 +1784,15 @@ virtualization library.")
libosinfo libosinfo
libvirt libvirt
libvirt-glib libvirt-glib
python-libvirt python-minimal
python-libxml2 python-libxml2
python-libvirt
python-pycairo python-pycairo
python-pygobject python-pygobject
python-requests python-requests
qemu qemu
spice-gtk spice-gtk
vte/gtk+-3)) vte/gtk+-3))
(native-inputs
(list `(,glib "bin") ; glib-compile-schemas
gobject-introspection
`(,gtk+ "bin") ; gtk-update-icon-cache
intltool
perl ; pod2man
python-docutils ; rst2man
;; The following are required for running the tests
;; at-spi2-core
;; dbus
;; gsettings-desktop-schemas
;; python-dogtail
;; python-pytest
;; xorg-server-for-tests ; xvfb
))
(home-page "https://virt-manager.org/") (home-page "https://virt-manager.org/")
(synopsis "Manage virtual machines") (synopsis "Manage virtual machines")
(description (description