gnu: Add wlgreet.
[jackhill/guix/guix.git] / gnu / packages / virtualization.scm
index bd29797..e14549d 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2017, 2020-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2017, 2018. 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020, 2021 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2021, 2022 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2021 Dion Mendel <guix@dm9.info>
 ;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
 ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
@@ -26,6 +26,8 @@
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
 ;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
+;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +61,7 @@
   #:use-module (gnu packages cluster)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages containers)
   #:use-module (gnu packages cross-base)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
 (define-public qemu
   (package
     (name "qemu")
-    (version "6.2.0")
+    (version "7.1.0")
     (source
      (origin
        (method url-fetch)
                            version ".tar.xz"))
        (sha256
         (base32
-         "0iavlsy9hin8k38230j8lfmyipx3965zljls1dp34mmc8n75vqb8"))
+         "1rmvrgqjhrvcmchnz170dxvrrf14n6nm39y8ivrprmfydd9lwqx0"))
        (patches (search-patches "qemu-build-info-manual.patch"
+                                "qemu-disable-aarch64-migration-test.patch"
                                 "qemu-fix-agent-paths.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
-           ;; Delete the bundled meson copy.
-           (delete-file-recursively "meson")))))
+           ;; Delete bundled code that we provide externally.
+           ;; TODO: Unbundle SeaBIOS!
+           (for-each delete-file-recursively
+                     '("dtc" "meson" "slirp"))))))
     (outputs '("out" "static" "doc"))   ;5.3 MiB of HTML docs
     (build-system gnu-build-system)
     (arguments
-     ;; FIXME: Disable tests on i686 to work around
-     ;; <https://bugs.gnu.org/40527>.
-     `(#:tests? ,(or (%current-target-system)
-                     (not (string=? "i686-linux" (%current-system))))
-       #:configure-flags
-       (let ((gcc (search-input-file %build-inputs "/bin/gcc"))
-             (out (assoc-ref %outputs "out")))
-         (list (string-append "--cc=" gcc)
-               ;; Some architectures insist on using HOST_CC.
-               (string-append "--host-cc=" gcc)
-               (string-append "--prefix=" out)
-               "--sysconfdir=/etc"
-               (string-append "--smbd=" out "/libexec/samba-wrapper")
-               "--disable-debug-info"   ;for space considerations
-               ;; The binaries need to be linked against -lrt.
-               (string-append "--extra-ldflags=-lrt")))
-       ;; Make build and test output verbose to facilitate investigation upon failure.
-       #:make-flags '("V=1")
-       #:modules ((srfi srfi-1)
+     (list
+      ;; FIXME: Disable tests on i686 to work around
+      ;; <https://bugs.gnu.org/40527>.
+      #:tests? (or (%current-target-system)
+                   (not (string=? "i686-linux" (%current-system))))
+      #:configure-flags
+      #~(let ((gcc (search-input-file %build-inputs "/bin/gcc"))
+              (out #$output))
+          (list (string-append "--cc=" gcc)
+                ;; Some architectures insist on using HOST_CC.
+                (string-append "--host-cc=" gcc)
+                (string-append "--prefix=" out)
+                "--sysconfdir=/etc"
+                "--enable-slirp=system"
+                "--enable-fdt=system"
+                (string-append "--smbd=" out "/libexec/samba-wrapper")
+                "--disable-debug-info"  ;for space considerations
+                ;; The binaries need to be linked against -lrt.
+                (string-append "--extra-ldflags=-lrt")))
+      ;; Make build and test output verbose to facilitate investigation upon failure.
+      #:make-flags #~'("V=1")
+      #:modules `((srfi srfi-1)
                   (srfi srfi-26)
                   (ice-9 ftw)
                   (ice-9 match)
                   ,@%gnu-build-system-modules)
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'extend-test-time-outs
-           (lambda _
-             ;; These tests can time out on heavily-loaded and/or slow storage.
-             (substitute* (cons* "tests/qemu-iotests/common.qemu"
-                                 (find-files "tests/qemu-iotests" "^[0-9]+$"))
-               (("QEMU_COMM_TIMEOUT=[0-9]+" match)
-                (string-append match "9")))))
-         (add-after 'unpack 'disable-unusable-tests
-           (lambda _
-             (substitute* "tests/unit/meson.build"
-               ;; Comment out the test-qga test, which needs /sys and
-               ;; fails within the build environment.
-               (("tests.*test-qga.*$" all)
-                (string-append "# " all))
-               ;; Comment out the test-char test, which needs networking and
-               ;; fails within the build environment.
-               ((".*'test-char':.*" all)
-                (string-append "# " all)))))
-         ,@(if (target-riscv64?)
-             `((add-after 'unpack 'disable-some-tests
-                 (lambda _
-                   ;; qemu.qmp.QMPConnectError: Unexpected empty reply from server
-                   (delete-file "tests/qemu-iotests/040")
-                   (delete-file "tests/qemu-iotests/041")
-                   (delete-file "tests/qemu-iotests/256")
-
-                   ;; No 'PCI' bus found for device 'virtio-scsi-pci'
-                   (delete-file "tests/qemu-iotests/127")
-                   (delete-file "tests/qemu-iotests/267"))))
-             '())
-         (add-after 'patch-source-shebangs 'patch-embedded-shebangs
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             ;; Ensure the executables created by these source files reference
-             ;; /bin/sh from the store so they work inside the build container.
-             (substitute* '("block/cloop.c" "migration/exec.c"
-                            "net/tap.c" "tests/qtest/libqtest.c"
-                            "tests/qtest/vhost-user-blk-test.c")
-               (("/bin/sh") (search-input-file inputs "/bin/sh")))
-             (substitute* "tests/qemu-iotests/testenv.py"
-               (("#!/usr/bin/env python3")
-                (string-append "#!" (search-input-file (or native-inputs inputs)
-                                                       "/bin/python3"))))))
-         (add-before 'configure 'fix-optionrom-makefile
-           (lambda _
-             ;; Work around the inability of the rules defined in this
-             ;; Makefile to locate the firmware files (e.g.: No rule to make
-             ;; target 'multiboot.bin') by extending the VPATH.
-             (substitute* "pc-bios/optionrom/Makefile"
-               (("^VPATH = \\$\\(SRC_DIR\\)")
-                "VPATH = $(SRC_DIR):$(TOPSRC_DIR)/pc-bios"))))
-         ;; XXX ./configure is being re-run at beginning of build phase...
-         (replace 'configure
-           (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
-             ;; The `configure' script doesn't understand some of the
-             ;; GNU options.  Thus, add a new phase that's compatible.
-             (let ((out (assoc-ref outputs "out")))
-               (setenv "SHELL" (which "bash"))
-               ;; Ensure config.status gets the correct shebang off the bat.
-               ;; The build system gets confused if we change it later and
-               ;; attempts to re-run the whole configuration, and fails.
-               (substitute* "configure"
-                 (("#!/bin/sh")
-                  (string-append "#!" (which "sh"))))
-               (mkdir-p "b/qemu")
-               (chdir "b/qemu")
-               (apply invoke "../../configure" configure-flags))))
-         ;; Configure, build and install QEMU user-emulation static binaries.
-         (add-after 'configure 'configure-user-static
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((gcc (search-input-file inputs "/bin/gcc"))
-                    (static (assoc-ref outputs "static"))
-                    ;; This is the common set of configure flags; it is
-                    ;; duplicated here to isolate this phase from manipulations
-                    ;; to the #:configure-flags build argument, as done in
-                    ;; derived packages such as qemu-minimal.
-                    (configure-flags (list (string-append "--cc=" gcc)
-                                           (string-append "--host-cc=" gcc)
-                                           "--sysconfdir=/etc"
-                                           "--disable-debug-info")))
-               (mkdir-p "../user-static")
-               (with-directory-excursion "../user-static"
-                 (apply invoke "../../configure"
-                        "--static"
-                        "--disable-docs" ;already built
-                        "--disable-system"
-                        "--enable-linux-user"
-                        (string-append "--prefix=" static)
-                        configure-flags)))))
-         (add-after 'build 'build-user-static
-           (lambda args
-             (with-directory-excursion "../user-static"
-               (apply (assoc-ref %standard-phases 'build) args))))
-         (add-after 'install 'install-user-static
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((static (assoc-ref outputs "static"))
-                    (bin (string-append static "/bin")))
-               (with-directory-excursion "../user-static"
-                 (for-each (cut install-file <> bin)
-                           (append-map (cut find-files <> "^qemu-" #:stat stat)
-                                       (scandir "."
-                                                (cut string-suffix?
-                                                     "-linux-user" <>))))))))
-         ;; Create a wrapper for Samba. This allows QEMU to use Samba without
-         ;; pulling it in as an input. Note that you need to explicitly install
-         ;; Samba in your Guix profile for Samba support.
-         (add-after 'install 'create-samba-wrapper
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out    (assoc-ref outputs "out"))
-                    (libexec (string-append out "/libexec")))
-               (call-with-output-file "samba-wrapper"
-                 (lambda (port)
-                   (format port "#!/bin/sh
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'extend-test-time-outs
+            (lambda _
+              ;; These tests can time out on heavily-loaded and/or slow storage.
+              (substitute* (cons* "tests/qemu-iotests/common.qemu"
+                                  (find-files "tests/qemu-iotests" "^[0-9]+$"))
+                (("QEMU_COMM_TIMEOUT=[0-9]+" match)
+                 (string-append match "9")))))
+          (add-after 'unpack 'disable-unusable-tests
+            (lambda _
+              (substitute* "tests/unit/meson.build"
+                ;; Comment out the test-qga test, which needs /sys and
+                ;; fails within the build environment.
+                (("tests.*test-qga.*$" all)
+                 (string-append "# " all))
+                ;; Comment out the test-char test, which needs networking and
+                ;; fails within the build environment.
+                ((".*'test-char':.*" all)
+                 (string-append "# " all)))))
+          #$@(if (target-riscv64?)
+                 '((add-after 'unpack 'disable-some-tests
+                     (lambda _
+                       ;; qemu.qmp.QMPConnectError:
+                       ;; Unexpected empty reply from server
+                       (delete-file "tests/qemu-iotests/040")
+                       (delete-file "tests/qemu-iotests/041")
+                       (delete-file "tests/qemu-iotests/256")
+
+                       ;; No 'PCI' bus found for device 'virtio-scsi-pci'
+                       (delete-file "tests/qemu-iotests/127")
+                       (delete-file "tests/qemu-iotests/267"))))
+                 '())
+          (add-after 'patch-source-shebangs 'patch-embedded-shebangs
+            (lambda* (#:key native-inputs inputs #:allow-other-keys)
+              ;; Ensure the executables created by these source files reference
+              ;; /bin/sh from the store so they work inside the build container.
+              (substitute* '("block/cloop.c" "migration/exec.c"
+                             "net/tap.c" "tests/qtest/libqtest.c"
+                             "tests/qtest/vhost-user-blk-test.c")
+                (("/bin/sh") (search-input-file inputs "/bin/sh")))
+              (substitute* "tests/qemu-iotests/testenv.py"
+                (("#!/usr/bin/env python3")
+                 (string-append "#!" (search-input-file (or native-inputs inputs)
+                                                        "/bin/python3"))))))
+          (add-before 'configure 'fix-optionrom-makefile
+            (lambda _
+              ;; Work around the inability of the rules defined in this
+              ;; Makefile to locate the firmware files (e.g.: No rule to make
+              ;; target 'multiboot.bin') by extending the VPATH.
+              (substitute* "pc-bios/optionrom/Makefile"
+                (("^VPATH = \\$\\(SRC_DIR\\)")
+                 "VPATH = $(SRC_DIR):$(TOPSRC_DIR)/pc-bios"))))
+          ;; XXX ./configure is being re-run at beginning of build phase...
+          (replace 'configure
+            (lambda* (#:key inputs configure-flags #:allow-other-keys)
+              ;; The `configure' script doesn't understand some of the
+              ;; GNU options.  Thus, add a new phase that's compatible.
+              (setenv "SHELL" (which "bash"))
+              ;; Ensure config.status gets the correct shebang off the bat.
+              ;; The build system gets confused if we change it later and
+              ;; attempts to re-run the whole configuration, and fails.
+              (substitute* "configure"
+                (("#!/bin/sh")
+                 (string-append "#!" (which "sh"))))
+              (mkdir-p "b/qemu")
+              (chdir "b/qemu")
+              (apply invoke "../../configure" configure-flags)))
+          ;; Configure, build and install QEMU user-emulation static binaries.
+          (add-after 'configure 'configure-user-static
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((static (assoc-ref outputs "static"))
+                     (gcc (search-input-file inputs "/bin/gcc"))
+                     ;; This is the common set of configure flags; it is
+                     ;; duplicated here to isolate this phase from manipulations
+                     ;; to the #:configure-flags build argument, as done in
+                     ;; derived packages such as qemu-minimal.
+                     (configure-flags (list (string-append "--cc=" gcc)
+                                            (string-append "--host-cc=" gcc)
+                                            "--sysconfdir=/etc"
+                                            "--disable-debug-info")))
+              (mkdir-p "../user-static")
+              (with-directory-excursion "../user-static"
+                (apply invoke "../../configure"
+                       "--static"
+                       "--disable-docs" ;already built
+                       "--disable-system"
+                       "--enable-linux-user"
+                       (string-append "--prefix=" static)
+                       configure-flags)))))
+          (add-after 'build 'build-user-static
+            (lambda args
+              (with-directory-excursion "../user-static"
+                (apply (assoc-ref %standard-phases 'build) args))))
+          (add-after 'install 'install-user-static
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((static (assoc-ref outputs "static"))
+                     (bin (string-append static "/bin")))
+                (with-directory-excursion "../user-static"
+                  (for-each (cut install-file <> bin)
+                            (append-map (cut find-files <> "^qemu-" #:stat stat)
+                                        (scandir "."
+                                                 (cut string-suffix?
+                                                      "-linux-user" <>))))))))
+          ;; Create a wrapper for Samba. This allows QEMU to use Samba without
+          ;; pulling it in as an input. Note that you need to explicitly install
+          ;; Samba in your Guix profile for Samba support.
+          (add-after 'install 'create-samba-wrapper
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((libexec (string-append #$output "/libexec")))
+                (call-with-output-file "samba-wrapper"
+                  (lambda (port)
+                    (format port "#!/bin/sh
 exec smbd $@")))
-               (chmod "samba-wrapper" #o755)
-               (install-file "samba-wrapper" libexec))))
-         (add-after 'install 'move-html-doc
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (assoc-ref outputs "doc"))
-                    (qemu-doc (string-append doc "/share/doc/qemu-" ,version)))
-               (mkdir-p qemu-doc)
-               (rename-file (string-append out "/share/doc/qemu")
-                            (string-append qemu-doc "/html"))))))))
+                (chmod "samba-wrapper" #o755)
+                (install-file "samba-wrapper" libexec))))
+          (add-after 'install 'move-html-doc
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((out #$output)
+                     (doc #$output:doc)
+                     (qemu-doc (string-append doc "/share/doc/qemu-"
+                                              #$(package-version this-package))))
+                (mkdir-p qemu-doc)
+                (rename-file (string-append out "/share/doc/qemu")
+                             (string-append qemu-doc "/html"))))))))
     (inputs
      (list alsa-lib
            bash-minimal
+           dtc
            glib
            gtk+
            libaio
@@ -336,6 +346,7 @@ exec smbd $@")))
            libjpeg-turbo
            libpng
            libseccomp
+           libslirp
            liburing
            libusb                       ;USB pass-through support
            mesa
@@ -403,7 +414,7 @@ server and embedded PowerPC, and S390 guests.")
      "Machine emulator and virtualizer (without GUI) for the host architecture")
     (arguments
      (substitute-keyword-arguments (package-arguments qemu)
-       ((#:configure-flags configure-flags '(list))
+       ((#:configure-flags configure-flags #~'())
         ;; Restrict to the host's architecture.
         (let* ((system (or (%current-target-system)
                            (%current-system)))
@@ -434,12 +445,12 @@ server and embedded PowerPC, and S390 guests.")
                    "--target-list=riscv32-softmmu,riscv64-softmmu")
                   (else       ; An empty list actually builds all the targets.
                    '()))))
-          `(cons ,target-list-arg ,configure-flags)))
+          #~(cons #$target-list-arg #$configure-flags)))
        ((#:phases phases)
-        `(modify-phases ,phases
-           (delete 'configure-user-static)
-           (delete 'build-user-static)
-           (delete 'install-user-static)))))
+        #~(modify-phases #$phases
+            (delete 'configure-user-static)
+            (delete 'build-user-static)
+            (delete 'install-user-static)))))
 
     ;; Remove dependencies on optional libraries, notably GUI libraries.
     (native-inputs (filter (lambda (input)
@@ -546,20 +557,19 @@ firmware blobs.  You can
 (define-public ganeti
   (package
     (name "ganeti")
-    (version "3.0.1")
+    (version "3.0.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/ganeti/ganeti")
                     (commit (string-append "v" version))))
               (sha256
-               (base32 "1i7gx0sdx9316fnldbv738s0ihym1370nhc1chk0biandkl8vvq0"))
+               (base32 "1xw7rm0k411aj0a4hrxz9drn7827bihp6bwizbapfx8k4c3125k4"))
               (file-name (git-file-name name version))
               (patches (search-patches "ganeti-shepherd-support.patch"
                                        "ganeti-shepherd-master-failover.patch"
-                                       "ganeti-sphinx-compat.patch"
-                                       "ganeti-haskell-compat.patch"
                                        "ganeti-haskell-pythondir.patch"
+                                       "ganeti-pyyaml-compat.patch"
                                        "ganeti-disable-version-symlinks.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -610,20 +620,6 @@ firmware blobs.  You can
                             ,(system->qemu-target (%current-system))))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-version-constraints
-           (lambda _
-             ;; Loosen version constraints for compatibility with Stackage 18.10.
-             (substitute* "cabal/ganeti.template.cabal"
-               (("(.*base64-bytestring.*) < 1\\.1" _ match)
-                (string-append match " < 1.2"))
-               (("(.*QuickCheck.*) < 2\\.14" _ match)
-                (string-append match " < 2.15")))))
-         (add-after 'unpack 'pyparsing-compat
-           (lambda _
-             ;; Adjust for Pyparsing 3.0.  Remove for Ganeti 3.0.2+.
-             (substitute* "lib/qlang.py"
-               (("operatorPrecedence")
-                "infixNotation"))))
          (add-after 'unpack 'create-vcs-version
            (lambda _
              ;; If we are building from a git checkout, we need to create a
@@ -715,6 +711,7 @@ firmware blobs.  You can
                (("test/py/ganeti\\.asyncnotifier_unittest\\.py") "")
                (("test/py/ganeti\\.backend_unittest\\.py") "")
                (("test/py/ganeti\\.daemon_unittest\\.py") "")
+               (("test/py/ganeti\\.hypervisor\\.hv_kvm_unittest\\.py") "")
                (("test/py/ganeti\\.tools\\.ensure_dirs_unittest\\.py") "")
                (("test/py/ganeti\\.utils\\.io_unittest-runasroot\\.py") "")
                ;; Disable the bash_completion test, as it requires the full
@@ -1037,15 +1034,12 @@ Debian or a derivative using @command{debootstrap}.")
      (list
        #:phases
        #~(modify-phases %standard-phases
-           (add-after 'install 'wrap-binary
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (for-each
-                   (lambda (file)
-                     (wrap-program file
-                       `("PATH" ":" prefix
-                         (,(dirname (search-input-file inputs "/bin/dtc"))))))
-                   (find-files (string-append out "/bin")))))))))
+           (add-before 'configure 'configure-dtc-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; Reference dtc by its absolute store path.
+               (substitute* "riscv/dts.cc"
+                 (("DTC")
+                  (string-append "\"" (search-input-file inputs "/bin/dtc") "\""))))))))
     (inputs
      (list bash-minimal dtc))
     (native-inputs
@@ -1112,7 +1106,7 @@ all common programming languages.  Vala bindings are also provided.")
 (define-public lxc
   (package
     (name "lxc")
-    (version "4.0.11")
+    (version "4.0.12")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1120,7 +1114,7 @@ all common programming languages.  Vala bindings are also provided.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "0b7hv4n8b3lndhr0jf9j1gkbzxm8897a1myjsfgwzad9gkhq395g"))))
+                "1vyk2j5w9gfyh23w3ar09cycyws16mxh3clbb33yhqzwcs1jy96v"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config docbook2x))
@@ -1181,7 +1175,7 @@ It started as a side project of LXC but can be used by any run-time.")
 (define-public lxd
   (package
     (name "lxd")
-    (version "4.22")
+    (version "4.24")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1189,7 +1183,7 @@ It started as a side project of LXC but can be used by any run-time.")
                     "lxd-" version "/lxd-" version ".tar.gz"))
               (sha256
                (base32
-                "119345936fcm1vv06k82k9hvj5yjf9jdrwqm9ccphhl5mswf8xq9"))))
+                "0lmjmvm98m6yjxcqlfw690i71nazfzgrm3mzbjj77g1631df3ylp"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/lxc/lxd"
@@ -1228,15 +1222,17 @@ It started as a side project of LXC but can be used by any run-time.")
                  (wrap-program (string-append bin-dir "lxd")
                    `("PATH" ":" prefix
                      ,(fold (lambda (input paths)
+                              ;; TODO: Use 'search-input-directory' rather
+                              ;; than look up inputs by name.
                               (let* ((in (assoc-ref inputs input))
                                      (bin (string-append in "/bin"))
                                      (sbin (string-append in "/sbin")))
                                 (append (filter file-exists?
                                                 (list bin sbin)) paths)))
                             '()
-                            '("bash" "acl" "rsync" "tar" "xz" "btrfs-progs"
+                            '("bash-minimal" "acl" "rsync" "tar" "xz" "btrfs-progs"
                               "gzip" "dnsmasq" "squashfs-tools" "iproute2"
-                              "criu" "iptables"))))
+                              "criu" "iptables" "attr"))))
                  ;; Remove unwanted binaries.
                  (for-each (lambda (prog)
                              (delete-file (string-append bin-dir prog)))
@@ -1255,24 +1251,25 @@ It started as a side project of LXC but can be used by any run-time.")
            ;; ("go-golang-org-x-lint" ,go-golang-org-x-lint)
            pkg-config))
     (inputs
-     `(("acl" ,acl)
-       ("eudev" ,eudev)
-       ("libdqlite" ,libdqlite)
-       ("libraft" ,libraft)
-       ("libcap" ,libcap)
-       ("lxc" ,lxc)
-       ;; Run-time dependencies.
-       ("bash" ,bash-minimal)
-       ("rsync" ,rsync)
-       ("tar" ,tar)
-       ("xz" ,xz)
-       ("btrfs-progs" ,btrfs-progs)
-       ("gzip" ,gzip)
-       ("dnsmasq" ,dnsmasq)
-       ("squashfs-tools" ,squashfs-tools)
-       ("iproute2" ,iproute)
-       ("criu" ,criu)
-       ("iptables" ,iptables)))
+     (list acl
+           eudev
+           libdqlite
+           libraft
+           libcap
+           lxc
+           ;; Run-time dependencies.
+           attr
+           bash-minimal
+           rsync
+           tar
+           xz
+           btrfs-progs
+           gzip
+           dnsmasq
+           squashfs-tools
+           iproute
+           criu
+           iptables))
     (synopsis "Daemon based on liblxc offering a REST API to manage containers")
     (home-page "https://linuxcontainers.org/lxd/")
     (description "LXD is a next generation system container manager.  It
@@ -1285,87 +1282,96 @@ pretty simple, REST API.")
 (define-public libvirt
   (package
     (name "libvirt")
-    (version "7.9.0")
+    (version "8.6.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://libvirt.org/sources/libvirt-"
                            version ".tar.xz"))
        (sha256
-        (base32 "131fyxb05rrcr9ih4mhhjyw3cgsxh5l12vj4y109q9vlynsz5742"))
+        (base32 "1qisvbshbcd5305mrb4vni559k52id7c8iw4dwdydbf97b24f658"))
        (patches (search-patches "libvirt-add-install-prefix.patch"))))
     (build-system meson-build-system)
     (arguments
-     `(#:configure-flags
-       (list "-Ddriver_qemu=enabled"
-             "-Dqemu_user=nobody"
-             "-Dqemu_group=kvm"
-             "-Dstorage_disk=enabled"
-             "-Dstorage_dir=enabled"
-             "-Dpolkit=enabled"
-             ;; XXX The default, but required to make -Dsasl ‘stick’.
-             ;; See <https://gitlab.com/libvirt/libvirt/-/issues/185>
-             "-Ddriver_remote=enabled"
-             "-Dnls=enabled"            ;translations
-             (string-append "-Ddocdir=" (assoc-ref %outputs "out") "/share/doc/"
-                            ,name "-" ,version)
-             "-Dbash_completion=enabled"
-             (string-append "-Dinstall_prefix=" (assoc-ref %outputs "out"))
-             "--sysconfdir=/etc"
-             "--localstatedir=/var")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'skip-directory-confusion
-           (lambda _
-             ;; Don't try to install an (unused) /var outside of the store.
-             (substitute* "scripts/meson-install-dirs.py"
-               (("destdir = .*")
-                "destdir = '/tmp'"))))
-         (add-before 'configure 'disable-broken-tests
-           (lambda _
-             (let ((tests (list "commandtest"           ; hangs idly
-                                "qemuxml2argvtest"      ; fails
-                                "virnetsockettest")))   ; tries to network
-               (substitute* "tests/meson.build"
-                 (((format #f ".*'name': '(~a)'.*" (string-join tests "|")))
-                  ""))))))))
+     (list
+      #:configure-flags
+      #~(list "-Ddriver_qemu=enabled"
+              "-Dqemu_user=nobody"
+              "-Dqemu_group=kvm"
+              "-Dstorage_disk=enabled"
+              "-Dstorage_dir=enabled"
+              "-Dpolkit=enabled"
+              ;; XXX The default, but required to make -Dsasl ‘stick’.
+              ;; See <https://gitlab.com/libvirt/libvirt/-/issues/185>
+              "-Ddriver_remote=enabled"
+              "-Dnls=enabled"           ;translations
+              (string-append "-Ddocdir=" #$output "/share/doc/"
+                             #$(package-name this-package) "-"
+                             #$(package-version this-package))
+              "-Dbash_completion=enabled"
+              (string-append "-Dinstall_prefix=" #$output)
+              "--sysconfdir=/etc"
+              "--localstatedir=/var")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'skip-directory-confusion
+            (lambda _
+              ;; Don't try to install an (unused) /var outside of the store.
+              (substitute* "scripts/meson-install-dirs.py"
+                (("destdir = .*")
+                 "destdir = '/tmp'"))))
+          (add-after 'unpack 'use-absolute-dnsmasq
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((dnsmasq (search-input-file inputs "sbin/dnsmasq")))
+                (substitute* "src/util/virdnsmasq.c"
+                  (("#define DNSMASQ \"dnsmasq\"")
+                   (string-append "#define DNSMASQ \"" dnsmasq "\""))))))
+          (add-before 'configure 'disable-broken-tests
+            (lambda _
+              (let ((tests (list "commandtest"         ; hangs idly
+                                 "networkxml2conftest" ; fails with absolute dnsmasq
+                                 "qemuxml2argvtest"    ; fails
+                                 "virnetsockettest"))) ; tries to network
+                (substitute* "tests/meson.build"
+                  (((format #f ".*'name': '(~a)'.*" (string-join tests "|")))
+                   ""))))))))
     (inputs
-     `(("acl" ,acl)
-       ("attr" ,attr)
-       ("fuse" ,fuse)
-       ("libxml2" ,libxml2)
-       ("eudev" ,eudev)
-       ("libpciaccess" ,libpciaccess)
-       ("gnutls" ,gnutls)
-       ("dbus" ,dbus)
-       ("libpcap" ,libpcap)
-       ("libnl" ,libnl)
-       ("libssh2" ,libssh2)             ;optional
-       ("libtirpc" ,libtirpc)           ;for <rpc/rpc.h>
-       ("libuuid" ,util-linux "lib")
-       ("lvm2" ,lvm2)                   ;for libdevmapper
-       ("curl" ,curl)
-       ("openssl" ,openssl)
-       ("readline" ,readline)
-       ("cyrus-sasl" ,cyrus-sasl)
-       ("libyajl" ,libyajl)
-       ("audit" ,audit)
-       ("dmidecode" ,dmidecode)
-       ("dnsmasq" ,dnsmasq)
-       ("ebtables" ,ebtables)
-       ("parted" ,parted)
-       ("iproute" ,iproute)
-       ("iptables" ,iptables)))
+     (list acl
+           attr
+           fuse
+           libxml2
+           eudev
+           libpciaccess
+           gnutls
+           dbus
+           libpcap
+           libnl
+           libssh2                      ;optional
+           libtirpc                     ;for <rpc/rpc.h>
+           `(,util-linux "lib")
+           lvm2                         ;for libdevmapper
+           curl
+           openssl
+           readline
+           cyrus-sasl
+           libyajl
+           audit
+           dmidecode
+           dnsmasq
+           ebtables
+           parted
+           iproute
+           iptables))
     (native-inputs
-     `(("bash-completion" ,bash-completion)
-       ("gettext" ,gettext-minimal)
-       ("xsltproc" ,libxslt)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("polkit" ,polkit)
-       ("python" ,python-wrapper)
-       ("python-docutils" ,python-docutils) ;for rst2html
-       ("rpcsvc-proto" ,rpcsvc-proto)))     ;for rpcgen
+     (list bash-completion
+           gettext-minimal
+           libxslt
+           perl
+           pkg-config
+           polkit
+           python-wrapper
+           python-docutils              ;for rst2html
+           rpcsvc-proto))               ;for rpcgen
     (home-page "https://libvirt.org")
     (synopsis "Simple API for virtualization")
     (description "Libvirt is a C toolkit to interact with the virtualization
@@ -1412,27 +1418,15 @@ three libraries:
 (define-public python-libvirt
   (package
     (name "python-libvirt")
-    (version "7.9.0")
+    (version "8.6.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
                            version ".tar.gz"))
        (sha256
-        (base32 "0nakisj2ady5a41k4zc95k0kp749f4ppmxgr91b1h1dzbzxcydc5"))))
+        (base32 "0wa86jliq71x60dd4vyzsj4lcrb82i5qsgxz9azvwgsgi9j9mx41"))))
     (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
-             (when tests?
-               ;; No reason to explicity invoke Python on a wrapped pytest.
-               (substitute* "setup.py"
-                 (("sys\\.executable, pytest") "pytest"))
-               (add-installed-pythonpath inputs outputs)
-               (setenv "LIBVIRT_API_COVERAGE" "whynot")
-               (invoke "python" "setup.py" "test")))))))
     (inputs
      (list libvirt))
     (propagated-inputs
@@ -1443,6 +1437,8 @@ three libraries:
     (synopsis "Python bindings to libvirt")
     (description "This package provides Python bindings to the libvirt
 virtualization library.")
+    (properties
+     '((upstream-name . "libvirt-python")))
     (license license:lgpl2.1+)))
 
 (define-public virt-manager
@@ -1522,7 +1518,7 @@ virtualization library.")
      (list dconf
            gtk+
            gtk-vnc
-           gtksourceview
+           gtksourceview-4
            libvirt
            libvirt-glib
            libosinfo
@@ -1563,7 +1559,7 @@ domains, their live performance and resource utilization statistics.")
 (define-public criu
   (package
     (name "criu")
-    (version "3.16.1")
+    (version "3.17")
     (source
      (origin
        (method git-fetch)
@@ -1572,15 +1568,17 @@ domains, their live performance and resource utilization statistics.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1riw15197fnrs254jl7wks9x8bdml76kf1vnqkkgyypr13dnq55g"))))
+        (base32 "1qql1xp2zkkd7z50vp0nylx3rqrp8xa3c6x25c886d5i1j9pak5x"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
        #:tests? #f ; tests require mounting as root
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
-             (string-append "LIBDIR=" (assoc-ref %outputs "out")
-                            "/lib")
+             (string-append "LIBDIR=$(PREFIX)/lib")
+             ;; Upstream mistakenly puts binaries in /var.  Now, in practice no
+             ;; plugins are built, but the build system still fails otherwise.
+             (string-append "PLUGINDIR=$(LIBDIR)/criu")
              (string-append "ASCIIDOC="
                             (search-input-file %build-inputs
                                                "/bin/asciidoc"))
@@ -1602,10 +1600,14 @@ domains, their live performance and resource utilization statistics.")
                  ,(package-version docbook-xsl)
                  "/manpages/docbook.xsl")))))
          (add-after 'unpack 'hardcode-variables
-           (lambda* (#:key inputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Hardcode arm version detection
              (substitute* "Makefile"
-               (("ARMV.*:=.*") "ARMV := 7\n"))))
+               (("ARMV.*:=.*") "ARMV := 7\n"))
+             ;; Hard-code the correct PLUGINDIR above.
+             (substitute* "criu/include/plugin.h"
+               (("/var") (string-append (assoc-ref outputs "out"))))
+             ))
          (add-before 'build 'fix-symlink
            (lambda* (#:key inputs #:allow-other-keys)
              ;; The file 'images/google/protobuf/descriptor.proto' points to
@@ -1665,26 +1667,71 @@ mainly implemented in user space.")
     ;; LGPLv2.1.
     (license (list license:gpl2 license:lgpl2.1))))
 
+(define-public python-qemu-qmp
+  (package
+    (name "python-qemu-qmp")
+    (version "0.0.0a0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "qemu.qmp" version))
+       (sha256
+        (base32 "1rpsbiwvngij6fjcc5cx1azcc4dxmm080crr31wc7jrm7i61p7c2"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; The Avocado test runner insists on writing stuff to HOME.
+                (setenv "HOME" "/tmp")
+                ;; The mypy tests fail (see:
+                ;; https://gitlab.com/jsnow/qemu.qmp/-/issues/1).
+                (delete-file "tests/mypy.sh")
+                (invoke "avocado" "--show=all" "run" "tests")))))))
+    (native-inputs
+     (list python-avocado-framework
+           python-setuptools-scm
+           python-flake8
+           python-isort
+           python-pylint))
+    (propagated-inputs
+     (list python-pygments
+           python-urwid
+           python-urwid-readline))
+    (home-page "https://gitlab.com/jsnow/qemu.qmp")
+    (synopsis "QEMU Monitor Protocol Python library")
+    (description "@code{emu.qmp} is a
+@url{https://gitlab.com/qemu-project/qemu/-/blob/master/docs/interop/qmp-intro.txt,
+QEMU Monitor Protocol (QMP)} library written in Python.  It is used to send
+QMP messages to running QEMU emulators.  It can be used to communicate with
+QEMU emulators, the QEMU Guest Agent (QGA), the QEMU Storage Daemon (QSD), or
+any other utility or application that speaks QMP.")
+    (license license:gpl2+)))
+
 (define-public qmpbackup
   (package
     (name "qmpbackup")
-    (version "0.2")
+    (version "0.23")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/abbbi/qmpbackup")
-                     (commit version)))
+                    (url "https://github.com/abbbi/qmpbackup")
+                    (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0swhp5byz44brhyis1a39p11fyn9q84xz5q6v2fah29r7d71kmmx"))))
+                "0x9v81z0b2qr2y6m46rfnl4kl5jnixsdrl1c790iwl6pq9kzzvzg"))))
     (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2))
+    ;; The test suite requires to download a 241 MiB QEMU image; skip it.
+    (arguments (list #:tests? #f))
+    (inputs (list python-qemu-qmp))
     (home-page "https://github.com/abbbi/qmpbackup")
     (synopsis "Backup and restore QEMU machines")
-    (description "qmpbackup is designed to create and restore full and
-incremental backups of running QEMU virtual machines via QMP, the QEMU
+    (description "@command{qmpbackup} is designed to create and restore full
+and incremental backups of running QEMU virtual machines via QMP, the QEMU
 Machine Protocol.")
     (license license:gpl3+)))
 
@@ -1778,7 +1825,7 @@ main monitor/GPU.")
 (define-public runc
   (package
     (name "runc")
-    (version "1.0.0-rc93")
+    (version "1.1.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1787,7 +1834,7 @@ main monitor/GPU.")
               (file-name (string-append name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0b90r1bkvlqli53ca1yc1l488dba0isd3i6l7nlhszxi8p7hzvkh"))))
+                "0jx56x49dgkygdbrfb3pmxycy1n37arj97jra8n422dj36xz1hbm"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/opencontainers/runc"
@@ -1812,8 +1859,7 @@ main monitor/GPU.")
                  (invoke "make" "install" "install-bash" "install-man"
                          (string-append "PREFIX=" out)))))))))
     (native-inputs
-     `(("go-md2man" ,go-github-com-go-md2man)
-       ("pkg-config" ,pkg-config)))
+     (list go-github-com-go-md2man pkg-config))
     (inputs
      (list libseccomp))
     (synopsis "Open container initiative runtime")
@@ -1966,7 +2012,7 @@ virtual machines.")
 (define-public bubblewrap
   (package
     (name "bubblewrap")
-    (version "0.5.0")
+    (version "0.6.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/containers/bubblewrap/"
@@ -1974,7 +2020,7 @@ virtual machines.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0608l2sjwhnb1c0mslah1h6yjvqr17wk60by6i710qwxg4rszz8n"))
+                "10ij62jg7p2scwdx0pm141ss7p2gjdkbbymb56y8miib2vfcf2cn"))
                (patches (search-patches "bubblewrap-fix-locale-in-tests.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -2296,14 +2342,14 @@ administrators and developers in managing the database.")
 (define-public osinfo-db
   (package
     (name "osinfo-db")
-    (version "20211216")
+    (version "20220516")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "10hhpciqk4lzsj66zkdvghd1i5zh6hg1fn9as4qhwcr1wnqfgv09"))))
+                "0vfsdk3c6n6y04c5rf92m31zvl969kaniyx2fqywbp69mzc6j3yn"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -2367,3 +2413,42 @@ use with virtualization provisioning tools")
      "@code{transient} is a wrapper for QEMU allowing the creation of virtual
 machines with shared folder, ssh, and disk creation support.")
     (license license:expat)))
+
+(define-public riscv-pk
+  (package
+    (name "riscv-pk")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/riscv-software-src/riscv-pk")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1cc0rz4q3a1zw8756b8yysw8lb5g4xbjajh5lvqbjix41hbdx6xz"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:out-of-source? #t
+           ;; riscv-pk can only be built for riscv64.
+           #:target "riscv64-linux-gnu"
+           #:make-flags #~(list (string-append "INSTALLDIR=" #$output))
+           ;; Add flags to keep symbols fromhost and tohost. These symbols are
+           ;; required for the correct functioning of pk.
+           #:strip-flags #~(list "--strip-unneeded"
+                                 "--keep-symbol=fromhost"
+                                 "--keep-symbol=tohost"
+                                 "--enable-deterministic-archives")))
+    (home-page "https://github.com/riscv-software-src/riscv-pk")
+    (synopsis "RISC-V Proxy Kernel")
+    (description "The RISC-V Proxy Kernel, @command{pk}, is a lightweight
+application execution environment that can host statically-linked RISC-V ELF
+binaries.  It is designed to support tethered RISC-V implementations with
+limited I/O capability and thus handles I/O-related system calls by proxying
+them to a host computer.
+
+This package also contains the Berkeley Boot Loader, @command{bbl}, which is a
+supervisor execution environment for tethered RISC-V systems.  It is designed
+to host the RISC-V Linux port.")
+    (license license:bsd-3)))