unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1
@ 2019-11-02 16:41 Miguel Arruga Vivas
  2019-11-02 16:47 ` [bug#38032] PATCH 1/4] gnu: libvirt: Update to 5.8.0 Miguel Arruga Vivas
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Miguel Arruga Vivas @ 2019-11-02 16:41 UTC (permalink / raw)
  To: 38032

Hi,

Regarding issue http://issues.guix.gnu.org/issue/36634 (upstream bug
report https://bugzilla.redhat.com/show_bug.cgi?id=1760233 where the
patch inside the second patch can be found too) I've updated it to the
latest stable version available.  The last one is a bugfix for the
missing ip binary in the path.  I hope the update to 3.9.0 won't need
the patch, but let's see.

Best regards,
Miguel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#38032] PATCH 1/4] gnu: libvirt: Update to 5.8.0.
  2019-11-02 16:41 [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Miguel Arruga Vivas
@ 2019-11-02 16:47 ` Miguel Arruga Vivas
  2019-11-02 16:48 ` [bug#38032] [PATCH 2/4] gnu: python-libvirt: " Miguel Arruga Vivas
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Miguel Arruga Vivas @ 2019-11-02 16:47 UTC (permalink / raw)
  To: 38032

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

This patch includes the proposed fix to upstream in order to ensure the
creation of the top-level /machine group when cgroup2 is mounted.  It
updates libvirt to the latest stable version available at the moment of
writing: 5.8.0.
----

* gnu/local.mk (dist_patch_DATA): Add new patch file.
* gnu/packages/patches/libvirt-create-machine-cgroup.patch: New patch,
submitted to upstream for upstream bug 1760233.
* gnu/packages/virtualization.scm (libvirt): Update version to 5.8.0.
Include patch.  Avoid execution of failing tests qemuxml2argvtest and
qemuhotplugtest.  Replace python by python-wrapper to avoid warnings on
patch-shebangs phase.
---
 gnu/local.mk                                  |  1 +
 .../libvirt-create-machine-cgroup.patch       | 48 +++++++++++++++++++
 gnu/packages/virtualization.scm               | 10 ++--
 3 files changed, 56 insertions(+), 3 deletions(-)
 create mode 100644
  gnu/packages/patches/libvirt-create-machine-cgroup.patch


[-- Attachment #2: 0001-gnu-libvirt-Update-to-5.8.0.patch --]
[-- Type: text/x-patch, Size: 5153 bytes --]

From 45af2ebed6641d0464f438868a25966693391e36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
Date: Sat, 2 Nov 2019 00:31:44 +0100
Subject: [PATCH 1/4] gnu: libvirt: Update to 5.8.0.

* gnu/local.mk (dist_patch_DATA): Add new patch file.
* gnu/packages/patches/libvirt-create-machine-cgroup.patch: New patch,
submitted to upstream for upstream bug 1760233.
* gnu/packages/virtualization.scm (libvirt): Update version to 5.8.0.
Include patch.  Avoid execution of failing tests qemuxml2argvtest and
qemuhotplugtest.  Replace python by python-wrapper to avoid warnings on
patch-shebangs phase.
---
 gnu/local.mk                                  |  1 +
 .../libvirt-create-machine-cgroup.patch       | 48 +++++++++++++++++++
 gnu/packages/virtualization.scm               | 10 ++--
 3 files changed, 56 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/libvirt-create-machine-cgroup.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 96b570a759..c6c8bf59aa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1003,6 +1003,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/java-xerces-xjavac_taskdef.patch	\
   %D%/packages/patches/jbig2dec-ignore-testtest.patch		\
   %D%/packages/patches/kdbusaddons-kinit-file-name.patch	\
+  %D%/packages/patches/libvirt-create-machine-cgroup.patch	\
   %D%/packages/patches/libziparchive-add-includes.patch		\
   %D%/packages/patches/localed-xorg-keyboard.patch		\
   %D%/packages/patches/kiki-level-selection-crash.patch		\
diff --git a/gnu/packages/patches/libvirt-create-machine-cgroup.patch b/gnu/packages/patches/libvirt-create-machine-cgroup.patch
new file mode 100644
index 0000000000..585ac237e1
--- /dev/null
+++ b/gnu/packages/patches/libvirt-create-machine-cgroup.patch
@@ -0,0 +1,48 @@
+From 9ca0b2955edea162b255b428e493cd8ffac52167 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
+ <rosen644835@gmail.com>
+Date: Fri, 1 Nov 2019 17:29:00 +0100
+Subject: [PATCH] vircgroup: Ensure /machine group is associated with its
+ parent.
+
+Call first virCgroupNew on the parent group virCgroupNewPartition if
+it is available on before the creation of the child group.  This
+ensures that the creation of a first level group on the unified
+architecture, as the check at virCgroupV2ParseControllersFile as the
+parent file is there.
+
+Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1760233
+---
+ src/util/vircgroup.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
+index b46f20abfd..33c61f2d45 100644
+--- a/src/util/vircgroup.c
++++ b/src/util/vircgroup.c
+@@ -855,9 +855,6 @@ virCgroupNewPartition(const char *path,
+     if (virCgroupSetPartitionSuffix(path, &newPath) < 0)
+         goto cleanup;
+ 
+-    if (virCgroupNew(-1, newPath, NULL, controllers, group) < 0)
+-        goto cleanup;
+-
+     if (STRNEQ(newPath, "/")) {
+         char *tmp;
+         parentPath = g_strdup(newPath);
+@@ -868,7 +865,12 @@ virCgroupNewPartition(const char *path,
+ 
+         if (virCgroupNew(-1, parentPath, NULL, controllers, &parent) < 0)
+             goto cleanup;
++    }
+ 
++    if (virCgroupNew(-1, newPath, parent, controllers, group) < 0)
++        goto cleanup;
++
++    if (parent) {
+         if (virCgroupMakeGroup(parent, *group, create, VIR_CGROUP_NONE) < 0)
+             goto cleanup;
+     }
+-- 
+2.23.0
+
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index c2f46985f0..7266f6606d 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -400,14 +400,16 @@ manage system or application containers.")
 (define-public libvirt
   (package
     (name "libvirt")
-    (version "5.6.0")
+    (version "5.8.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://libvirt.org/sources/libvirt-"
                            version ".tar.xz"))
        (sha256
-        (base32 "1d5rmcx5fgb024hw8chbiv886n3jal5wp2yajjk5l4qh9s9gkx35"))))
+        (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2"))
+       (patches
+        (search-patches "libvirt-create-machine-cgroup.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -439,6 +441,8 @@ manage system or application containers.")
          (add-before 'configure 'disable-broken-tests
            (lambda _
              (let ((tests (list "commandtest"      ; hangs idly
+				"qemuxml2argvtest" ; fails
+				"qemuhotplugtest"  ; fails
                                 "virnetsockettest" ; tries to network
                                 "virshtest")))     ; fails
                (substitute* "tests/Makefile.in"
@@ -480,7 +484,7 @@ manage system or application containers.")
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("polkit" ,polkit)
-       ("python" ,python)))
+       ("python" ,python-wrapper)))
     (home-page "https://libvirt.org")
     (synopsis "Simple API for virtualization")
     (description "Libvirt is a C toolkit to interact with the virtualization
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#38032] [PATCH 2/4] gnu: python-libvirt: Update to 5.8.0.
  2019-11-02 16:41 [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Miguel Arruga Vivas
  2019-11-02 16:47 ` [bug#38032] PATCH 1/4] gnu: libvirt: Update to 5.8.0 Miguel Arruga Vivas
@ 2019-11-02 16:48 ` Miguel Arruga Vivas
  2019-11-02 16:48 ` [bug#38032] [PATCH 3/4] gnu: virt-manager: Update to 2.2.1 Miguel Arruga Vivas
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Miguel Arruga Vivas @ 2019-11-02 16:48 UTC (permalink / raw)
  To: 38032

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

Only update and remove the comment.
----

* gnu/packages/virtualization.scm (python-libvirt): Update version to
5.8.0, update hash and remove obsolete comment.
---
 gnu/packages/virtualization.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

[-- Attachment #2: 0002-gnu-python-libvirt-Update-to-5.8.0.patch --]
[-- Type: text/x-patch, Size: 1325 bytes --]

From 7ec4e7b07f745540f6193797f95d65525760d67b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
Date: Sat, 2 Nov 2019 00:44:09 +0100
Subject: [PATCH 2/4] gnu: python-libvirt: Update to 5.8.0.

* gnu/packages/virtualization.scm (python-libvirt): Update version to
5.8.0, update hash and remove obsolete comment.
---
 gnu/packages/virtualization.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 7266f6606d..19614b0ac3 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -538,15 +538,14 @@ three libraries:
 (define-public python-libvirt
   (package
     (name "python-libvirt")
-    (version "5.6.0")
+    (version "5.8.0")
     (source
      (origin
        (method url-fetch)
-       ;; The latest version hosted on PyPI at 5.6.0 release time was 5.5.0.
        (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
                            version ".tar.gz"))
        (sha256
-        (base32 "11i440aibykxw22fzyavmrvn67s8rmnijw5bag0yx9r8jpnkzwad"))))
+        (base32 "0kyz3lx49d8p75mvbzinxc1zgs8g7adn77y9bm15b8b4ad9zl5s6"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#38032] [PATCH 3/4] gnu: virt-manager: Update to 2.2.1.
  2019-11-02 16:41 [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Miguel Arruga Vivas
  2019-11-02 16:47 ` [bug#38032] PATCH 1/4] gnu: libvirt: Update to 5.8.0 Miguel Arruga Vivas
  2019-11-02 16:48 ` [bug#38032] [PATCH 2/4] gnu: python-libvirt: " Miguel Arruga Vivas
@ 2019-11-02 16:48 ` Miguel Arruga Vivas
  2019-11-02 16:48 ` [bug#38032] [PATCH 4/4] services: libvirtd: Provide ip binary at runtime Miguel Arruga Vivas
  2019-11-05 14:14 ` bug#38032: [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Ludovic Courtès
  4 siblings, 0 replies; 6+ messages in thread
From: Miguel Arruga Vivas @ 2019-11-02 16:48 UTC (permalink / raw)
  To: 38032

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Gtksourceview is a new dependency of virt-manager.  The phase
fix-qemu-img-reference replaces an absolute reference
to /usr/bin/qemu-img and the other phases have been fixed to the new
file names.
---

* gnu/packages/virtualization.scm (virt-manager): Update to version
2.2.1.  Point to the correct file in fix-setup and fix-default-uri
phases.  Add fix-qemu-img-reference phase.  Add gtksourceview as an
input.
---
 gnu/packages/virtualization.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

[-- Attachment #2: 0003-gnu-virt-manager-Update-to-2.2.1.patch --]
[-- Type: text/x-patch, Size: 2812 bytes --]

From e6a50f3353f685a77da1be643bc88b79df9d6d9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
Date: Sat, 2 Nov 2019 00:45:48 +0100
Subject: [PATCH 3/4] gnu: virt-manager: Update to 2.2.1.

* gnu/packages/virtualization.scm (virt-manager): Update to version
2.2.1.  Point to the correct file in fix-setup and fix-default-uri
phases.  Add fix-qemu-img-reference phase.  Add gtksourceview as an
input.
---
 gnu/packages/virtualization.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 19614b0ac3..f113eee5f7 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -577,7 +577,7 @@ virtualization library.")
 (define-public virt-manager
   (package
     (name "virt-manager")
-    (version "2.1.0")
+    (version "2.2.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://virt-manager.org/download/sources"
@@ -585,7 +585,7 @@ virtualization library.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1m038kyngmxlgz91c7z8g73lb2wy0ajyah871a3g3wb5cnd0dsil"))))
+                "06ws0agxlip6p6n3n43knsnjyd91gqhh2dadgc33wl9lx1k8vn6g"))))
     (build-system python-build-system)
     (arguments
      `(#:use-setuptools? #f          ; uses custom distutils 'install' command
@@ -603,13 +603,19 @@ virtualization library.")
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-setup
            (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "virtcli/cliconfig.py"
+             (substitute* "virtinst/buildconfig.py"
                (("/usr") (assoc-ref outputs "out")))
              #t))
+         (add-after 'unpack 'fix-qemu-img-reference
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "virtconv/formats.py"
+	       (("/usr(/bin/qemu-img)" _ suffix)
+		(string-append (assoc-ref inputs "qemu") suffix)))
+             #t))
          (add-after 'unpack 'fix-default-uri
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Xen is not available for now - so only patch qemu.
-             (substitute* "virtManager/connect.py"
+             (substitute* "virtManager/createconn.py"
                (("/usr(/bin/qemu-system)" _ suffix)
                 (string-append (assoc-ref inputs "qemu") suffix)))
              #t))
@@ -640,6 +646,7 @@ virtualization library.")
      `(("dconf" ,dconf)
        ("gtk+" ,gtk+)
        ("gtk-vnc" ,gtk-vnc)
+       ("gtksourceview" ,gtksourceview)
        ("libvirt" ,libvirt)
        ("libvirt-glib" ,libvirt-glib)
        ("libosinfo" ,libosinfo)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#38032] [PATCH 4/4] services: libvirtd: Provide ip binary at runtime.
  2019-11-02 16:41 [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Miguel Arruga Vivas
                   ` (2 preceding siblings ...)
  2019-11-02 16:48 ` [bug#38032] [PATCH 3/4] gnu: virt-manager: Update to 2.2.1 Miguel Arruga Vivas
@ 2019-11-02 16:48 ` Miguel Arruga Vivas
  2019-11-05 14:14 ` bug#38032: [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Ludovic Courtès
  4 siblings, 0 replies; 6+ messages in thread
From: Miguel Arruga Vivas @ 2019-11-02 16:48 UTC (permalink / raw)
  To: 38032

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

The log shows an error telling that the ip binary cannot be found, which
is located in /sbin, not /bin.
----

* gnu/services/virtualization.scm (libvirt-shepherd-service): Add sbin
  to the PATH variable, as ip binary is installed there.
---
 gnu/services/virtualization.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

[-- Attachment #2: 0004-services-libvirtd-Provide-ip-binary-at-runtime.patch --]
[-- Type: text/x-patch, Size: 1405 bytes --]

From c799150bb0e86baf4e0df51b780dc9c9141ec926 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
Date: Sun, 27 Oct 2019 03:59:23 +0100
Subject: [PATCH 4/4] services: libvirtd: Provide ip binary at runtime.

* gnu/services/virtualization.scm (libvirt-shepherd-service): Add sbin to
the PATH variable, as ip binary is installed there.
---
 gnu/services/virtualization.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index bc8ac9b40a..2cd4e5e89c 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -433,9 +433,11 @@ potential infinite waits blocking libvirt."))
            (start #~(make-forkexec-constructor
                      (list (string-append #$libvirt "/sbin/libvirtd")
                            "-f" #$config-file)
+                     ;; For finding qemu and ip binaries.
                      #:environment-variables
-                     ;; For finding qemu binaries.
-                     '("PATH=/run/current-system/profile/bin")))
+                     (list (string-append
+                            "PATH=/run/current-system/profile/bin:"
+                            "/run/current-system/profile/sbin"))))
            (stop #~(make-kill-destructor))))))
 
 (define libvirt-service-type
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#38032: [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1
  2019-11-02 16:41 [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Miguel Arruga Vivas
                   ` (3 preceding siblings ...)
  2019-11-02 16:48 ` [bug#38032] [PATCH 4/4] services: libvirtd: Provide ip binary at runtime Miguel Arruga Vivas
@ 2019-11-05 14:14 ` Ludovic Courtès
  4 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2019-11-05 14:14 UTC (permalink / raw)
  To: Miguel Arruga Vivas; +Cc: 38032-done

Hi Miguel,

Miguel Arruga Vivas <rosen644835@gmail.com> skribis:

> Regarding issue http://issues.guix.gnu.org/issue/36634 (upstream bug
> report https://bugzilla.redhat.com/show_bug.cgi?id=1760233 where the
> patch inside the second patch can be found too) I've updated it to the
> latest stable version available.  The last one is a bugfix for the
> missing ip binary in the path.  I hope the update to 3.9.0 won't need
> the patch, but let's see.

Good.  I’ve applied and pushed the whole patch series.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-05 14:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-02 16:41 [bug#38032] [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Miguel Arruga Vivas
2019-11-02 16:47 ` [bug#38032] PATCH 1/4] gnu: libvirt: Update to 5.8.0 Miguel Arruga Vivas
2019-11-02 16:48 ` [bug#38032] [PATCH 2/4] gnu: python-libvirt: " Miguel Arruga Vivas
2019-11-02 16:48 ` [bug#38032] [PATCH 3/4] gnu: virt-manager: Update to 2.2.1 Miguel Arruga Vivas
2019-11-02 16:48 ` [bug#38032] [PATCH 4/4] services: libvirtd: Provide ip binary at runtime Miguel Arruga Vivas
2019-11-05 14:14 ` bug#38032: [PATCH 0/4] Update libvirt 5.8.0/virt-manager 2.2.1 Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).