gnu: qemu-minimal: Fix build.
[jackhill/guix/guix.git] / gnu / packages / virtualization.scm
index a640a64..225b5dd 100644 (file)
@@ -6,11 +6,14 @@
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +36,7 @@
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages golang)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages networking)
+  #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -73,6 +79,7 @@
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages spice)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages textutils)
@@ -85,7 +92,9 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
 (define-public qemu
   (package
     (name "qemu")
-    (version "3.1.0")
+    (version "4.2.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qemu.org/qemu-"
                                  version ".tar.xz"))
-             (patches (search-patches "qemu-CVE-2018-16872.patch"
-                                      "qemu-CVE-2019-6778.patch"))
+             (patches (search-patches "qemu-CVE-2020-1711.patch"
+                                      "qemu-CVE-2020-7039.patch"
+                                      "qemu-CVE-2020-7211.patch"
+                                      "qemu-fix-documentation-build-failure.patch"))
              (sha256
               (base32
-               "1z5bd5nfyjvhfi1s95labc82y4hjdjjkdabw931362ls0zghh1ba"))))
+               "1w38hzlw7xp05gcq1nhga7hxvndxy6dfcnzi7q2il8ff110isj6k"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Running tests in parallel can occasionally lead to failures, like:
+     `(;; Running tests in parallel can occasionally lead to failures, like:
        ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
        #:parallel-tests? #f
        #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
+                               "--enable-docs"
                                (string-append "--smbd="
                                               (assoc-ref %outputs "out")
                                               "/libexec/samba-wrapper")
                                "--audio-drv-list=alsa,pa,sdl")
        ;; Make build and test output verbose to facilitate investigation upon failure.
        #:make-flags '("V=1")
+       #:modules ((srfi srfi-1)
+                  (ice-9 match)
+                  ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
+         (add-after 'set-paths 'hide-glibc
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Work around https://issues.guix.info/issue/36882.  We need to
+             ;; remove glibc from C_INCLUDE_PATH so that the one hardcoded in GCC,
+             ;; at the bottom of GCC include search-path is used.
+             (let* ((filters '("libc"))
+                    (input-directories
+                     (filter-map (lambda (input)
+                                   (match input
+                                     ((name . dir)
+                                      (and (not (member name filters))
+                                           dir))))
+                                 inputs)))
+               (set-path-environment-variable "C_INCLUDE_PATH"
+                                              '("include")
+                                              input-directories)
+               #t)))
          (replace 'configure
            (lambda* (#:key inputs outputs (configure-flags '())
                            #:allow-other-keys)
@@ -179,13 +211,24 @@ exec smbd $@")))
                (chmod "samba-wrapper" #o755)
                (install-file "samba-wrapper" libexec))
              #t))
-         (add-before 'check 'disable-test-qga
+         (add-before 'configure 'prevent-network-configuration
            (lambda _
+             ;; Prevent the build from trying to use git to fetch from the net.
+             (substitute* "Makefile"
+               (("@./config.status")
+                "")) #t))
+         (add-before 'check 'disable-unusable-tests
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "tests/Makefile.include"
                ;; Comment out the test-qga test, which needs /sys and
                ;; fails within the build environment.
                (("check-unit-.* tests/test-qga" all)
                 (string-append "# " all)))
+             (substitute* "tests/Makefile.include"
+               ;; Comment out the test-char test, which needs networking and
+               ;; fails within the build environment.
+               (("check-unit-.* tests/test-char" all)
+                (string-append "# " all)))
              #t)))))
     (inputs                                       ; TODO: Add optional inputs.
      `(("alsa-lib" ,alsa-lib)
@@ -210,7 +253,7 @@ exec smbd $@")))
        ("spice" ,spice)
        ("usbredir" ,usbredir)
        ("util-linux" ,util-linux)
-       ;; ("vde2" ,vde2)
+       ("vde2" ,vde2)
        ("virglrenderer" ,virglrenderer)
        ("zlib" ,zlib)))
     (native-inputs `(("gettext" ,gettext-minimal)
@@ -220,6 +263,7 @@ exec smbd $@")))
                      ("bison" ,bison)
                      ("pkg-config" ,pkg-config)
                      ("python-wrapper" ,python-wrapper)
+                     ("python-sphinx" ,python-sphinx)
                      ("texinfo" ,texinfo)))
     (home-page "https://www.qemu.org")
     (synopsis "Machine emulator and virtualizer")
@@ -258,7 +302,7 @@ server and embedded PowerPC, and S390 guests.")
                   '("gettext")))
     (inputs (fold alist-delete (package-inputs qemu)
                   '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
-                    "usbredir" "libdrm" "libepoxy" "pulseaudio")))))
+                    "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2")))))
 
 ;; The GRUB test suite fails with later versions of Qemu, so we
 ;; keep it at 2.10 for now.  See
@@ -280,44 +324,50 @@ server and embedded PowerPC, and S390 guests.")
               (search-patches "qemu-glibc-2.27.patch"))))
     ;; qemu-minimal-2.10 needs Python 2. Remove below once no longer necessary.
     (native-inputs `(("python-2" ,python-2)
-                     ,@(fold alist-delete (package-native-inputs qemu)
-                             '("python-wrapper")))))))
+                     ,@(fold alist-delete (package-native-inputs qemu-minimal)
+                             '("python-wrapper" "python-sphinx"))))
+    (inputs
+     (fold alist-delete (package-inputs qemu-minimal)
+           ;; Disable seccomp support, because it's not required for the GRUB
+           ;; test suite, and because it fails with libseccomp 2.4.2 and later.
+           '("libseccomp"))))))
 
 (define-public libosinfo
   (package
     (name "libosinfo")
-    (version "1.0.0")
+    (version "1.7.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
-                           version ".tar.gz"))
+                           version ".tar.xz"))
        (sha256
         (base32
-         "0srrs2m6irqd4f867g8ls6jp2dq3ql0l9d0fh80d55sivvn2bd7p"))))
-    (build-system gnu-build-system)
+         "1s97sv24bybggjx6hgqba2qdqz3ivfpd4cmkh4zm5y59sim109mv"))))
+    (build-system meson-build-system)
     (arguments
      `(#:configure-flags
-       (list (string-append "--with-usb-ids-path="
+       (list (string-append "-Dwith-usb-ids-path="
                             (assoc-ref %build-inputs "usb.ids"))
-             (string-append "--with-pci-ids-path="
+             (string-append "-Dwith-pci-ids-path="
                             (assoc-ref %build-inputs "pci.ids")))
        #:phases
        (modify-phases %standard-phases
-         ;; This odd test fails for unknown reasons.
-         (add-after 'unpack 'disable-broken-test
-           (lambda _
-             (substitute* "test/Makefile.in"
-               (("test-isodetect\\$\\(EXEEXT\\)") ""))
+         (add-after 'unpack 'patch-osinfo-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "osinfo/osinfo_loader.c"
+               (("path = DATA_DIR.*")
+                (string-append "path = \"" (assoc-ref inputs "osinfo-db")
+                               "/share/osinfo\";")))
              #t)))))
     (inputs
      `(("libsoup" ,libsoup)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
-       ("gobject-introspection" ,gobject-introspection)))
+       ("osinfo-db" ,osinfo-db)))
     (native-inputs
-     `(("check" ,check)
-       ("glib" ,glib "bin")  ; glib-mkenums, etc.
+     `(("glib" ,glib "bin")  ; glib-mkenums, etc.
+       ("gobject-introspection" ,gobject-introspection)
        ("gtk-doc" ,gtk-doc)
        ("vala" ,vala)
        ("intltool" ,intltool)
@@ -375,6 +425,12 @@ all common programming languages.  Vala bindings are also provided.")
                             "/share/doc/" ,name "-" ,version)
              "--sysconfdir=/etc"
              "--localstatedir=/var")
+       #:make-flags
+       ;; Treat the kernel headers as system headers to silence
+       ;; compiler warnings from those.
+       (list (string-append "C_INCLUDE_PATH="
+                            (assoc-ref %build-inputs "kernel-headers")
+                            "/include"))
        #:phases
        (modify-phases %standard-phases
          (replace 'install
@@ -399,18 +455,23 @@ manage system or application containers.")
 (define-public libvirt
   (package
     (name "libvirt")
-    (version "5.5.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://libvirt.org/sources/libvirt-"
-                                  version ".tar.xz"))
-              (sha256
-               (base32
-                "1s1mzw4cmkcfivs1kphpgy4lpddx0w1qnjysr4ggk5558w4yy1i3"))))
+    (version "5.8.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://libvirt.org/sources/libvirt-"
+                           version ".tar.xz"))
+       (sha256
+        (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2"))
+       (patches
+        (search-patches "libvirt-create-machine-cgroup.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
-       (list "--with-polkit"
+       (list "--with-qemu"
+             "--with-qemu-user=nobody"
+             "--with-qemu-group=kvm"
+             "--with-polkit"
              (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
                             ,name "-" ,version)
              "--sysconfdir=/etc"
@@ -423,9 +484,20 @@ manage system or application containers.")
              (substitute* "config.h.in"
                (("/bin/sh") (which "sh")))
              #t))
+         (add-before 'configure 'patch-libtirpc-file-names
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; libvirt uses an m4 macro instead of pkg-config to determine where
+             ;; the RPC headers are located.  Tell it to look in the right place.
+             (substitute* "configure"
+               (("/usr/include/tirpc")  ;defined in m4/virt-xdr.m4
+                (string-append (assoc-ref inputs "libtirpc")
+                               "/include/tirpc")))
+             #t))
          (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"
@@ -440,27 +512,18 @@ manage system or application containers.")
              (apply invoke "make" "install"
                     "sysconfdir=/tmp/etc"
                     "localstatedir=/tmp/var"
-                    make-flags)))
-         (add-after 'install 'wrap-libvirtd
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (wrap-program (string-append out "/sbin/libvirtd")
-                 `("PATH" = (,(string-append (assoc-ref inputs "iproute")
-                                             "/sbin")
-                             ,(string-append (assoc-ref inputs "qemu")
-                                             "/bin"))))
-               #t))))))
+                    make-flags))))))
     (inputs
      `(("libxml2" ,libxml2)
        ("eudev" ,eudev)
        ("libpciaccess" ,libpciaccess)
        ("gnutls" ,gnutls)
        ("dbus" ,dbus)
-       ("qemu" ,qemu)
        ("libpcap" ,libpcap)
        ("libnl" ,libnl)
-       ("libuuid" ,util-linux)
-       ("lvm2" ,lvm2)                   ; for libdevmapper
+       ("libtirpc" ,libtirpc)           ;for <rpc/rpc.h>
+       ("libuuid" ,util-linux "lib")
+       ("lvm2" ,lvm2)                   ;for libdevmapper
        ("curl" ,curl)
        ("openssl" ,openssl)
        ("cyrus-sasl" ,cyrus-sasl)
@@ -476,7 +539,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
@@ -488,37 +551,31 @@ to integrate other virtualization mechanisms if needed.")
 (define-public libvirt-glib
   (package
     (name "libvirt-glib")
-    (version "1.0.0")
+    (version "2.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "ftp://libvirt.org/libvirt/glib/"
                                   "libvirt-glib-" version ".tar.gz"))
               (sha256
                (base32
-                "0iwa5sdbii52pjpdm5j37f67sdmf0kpcky4liwhy1nf43k85i4fa"))))
+                "0six9ckmvlwwyavyjkgc262qkpvfqgi8rjij7cyk00bmqq8c9s4l"))))
     (build-system gnu-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-tests
-           (lambda _
-             (substitute* "tests/test-events.c"
-               (("/bin/true") (which "true")))
-             #t)))))
     (inputs
-     `(("libxml2" ,libxml2)
-       ("libvirt" ,libvirt)
-       ("gobject-introspection" ,gobject-introspection)
-       ("glib" ,glib)
-       ("openssl" ,openssl)
+     `(("openssl" ,openssl)
        ("cyrus-sasl" ,cyrus-sasl)
-       ("lvm2" ,lvm2) ; for libdevmapper
+       ("lvm2" ,lvm2)                   ; for libdevmapper
        ("libyajl" ,libyajl)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("intltool" ,intltool)
        ("glib" ,glib "bin")
        ("vala" ,vala)))
+    (propagated-inputs
+     ;; ‘Required:’ by the installed .pc files.
+     `(("glib" ,glib)
+       ("libvirt" ,libvirt)
+       ("libxml2" ,libxml2)
+       ("gobject-introspection" ,gobject-introspection)))
     (home-page "https://libvirt.org")
     (synopsis "GLib wrapper around libvirt")
     (description "libvirt-glib wraps the libvirt library to provide a
@@ -536,15 +593,14 @@ three libraries:
 (define-public python-libvirt
   (package
     (name "python-libvirt")
-    (version "5.5.0")
+    (version "5.8.0")
     (source
      (origin
        (method url-fetch)
-       ;; The latest version hosted on PyPI at 5.5.0 release time was 5.3.0.
        (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
                            version ".tar.gz"))
        (sha256
-        (base32 "00x6idyw9xrrr21vrnsyw37q2sd8yh4n6pwh0l28hh9yp3nsy72n"))))
+        (base32 "0kyz3lx49d8p75mvbzinxc1zgs8g7adn77y9bm15b8b4ad9zl5s6"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -576,7 +632,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"
@@ -584,7 +640,7 @@ virtualization library.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1m038kyngmxlgz91c7z8g73lb2wy0ajyah871a3g3wb5cnd0dsil"))))
+                "06ws0agxlip6p6n3n43knsnjyd91gqhh2dadgc33wl9lx1k8vn6g"))))
     (build-system python-build-system)
     (arguments
      `(#:use-setuptools? #f          ; uses custom distutils 'install' command
@@ -602,13 +658,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))
@@ -639,11 +701,11 @@ virtualization library.")
      `(("dconf" ,dconf)
        ("gtk+" ,gtk+)
        ("gtk-vnc" ,gtk-vnc)
+       ("gtksourceview" ,gtksourceview)
        ("libvirt" ,libvirt)
        ("libvirt-glib" ,libvirt-glib)
        ("libosinfo" ,libosinfo)
        ("vte" ,vte)
-       ("gobject-introspection" ,gobject-introspection)
        ("python-libvirt" ,python-libvirt)
        ("python-requests" ,python-requests)
        ("python-ipaddress" ,python-ipaddress)
@@ -656,6 +718,7 @@ virtualization library.")
      `(("qemu" ,qemu)))
     (native-inputs
      `(("glib" ,glib "bin")             ; glib-compile-schemas
+       ("gobject-introspection" ,gobject-introspection)
        ("gtk+" ,gtk+ "bin")             ; gtk-update-icon-cache
        ("perl" ,perl)                   ; pod2man
        ("intltool" ,intltool)))
@@ -671,14 +734,14 @@ domains, their live performance and resource utilization statistics.")
 (define-public criu
   (package
     (name "criu")
-    (version "3.11")
+    (version "3.13")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.openvz.org/criu/criu-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "03nimyn3wy5mlw30gq7bvlzvvprqjv8f25240yj5arzlld8mhsw8"))))
+                "1yn9ix9lqvqvjrs3a3g6g1wqfniyf9n7giy0mr3jvijmrcm7y0pa"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -686,7 +749,11 @@ domains, their live performance and resource utilization statistics.")
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
              (string-append "LIBDIR=" (assoc-ref %outputs "out")
-                            "/lib"))
+                            "/lib")
+             (string-append "ASCIIDOC=" (assoc-ref %build-inputs "asciidoc")
+                            "/bin/asciidoc")
+             (string-append "XMLTO=" (assoc-ref %build-inputs "xmlto")
+                            "/bin/xmlto"))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -695,22 +762,24 @@ domains, their live performance and resource utilization statistics.")
              (setenv "C_INCLUDE_PATH"
                      (string-append (assoc-ref inputs "libnl")
                                     "/include/libnl3:"
-                                    (getenv "C_INCLUDE_PATH")))
-             ;; Prevent xmlto from failing the install phase.
+                                    ;; Also add the kernel headers here so that GCC
+                                    ;; treats them as "system headers".  Otherwise
+                                    ;; the build fails with -Werror because parasite.c
+                                    ;; includes both <linux/fs.h> and <sys/mount.h>,
+                                    ;; which define some of the same constants.
+                                    (assoc-ref inputs "kernel-headers")
+                                    "/include"))
+             #t))
+         (add-after 'configure 'fix-documentation
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "Documentation/Makefile"
-               (("XMLTO.*:=.*")
-                (string-append "XMLTO:="
-                               (assoc-ref inputs "xmlto")
-                               "/bin/xmlto"
-                               " --skip-validation "
-                               " -x "
-                               (assoc-ref inputs "docbook-xsl")
-                               "/xml/xsl/docbook-xsl-"
-                               ,(package-version docbook-xsl)
-                               "/manpages/docbook.xsl"))
-               (("\\$\\(XMLTO\\);")
-                (string-append (assoc-ref inputs "xmlto")
-                               "/bin/xmlto;")))
+               (("-m custom.xsl")
+                (string-append
+                 "-m custom.xsl --skip-validation -x "
+                 (assoc-ref inputs "docbook-xsl") "/xml/xsl/"
+                 ,(package-name docbook-xsl) "-"
+                 ,(package-version docbook-xsl)
+                 "/manpages/docbook.xsl")))
              #t))
          (add-after 'unpack 'hardcode-variables
            (lambda* (#:key inputs #:allow-other-keys)
@@ -758,7 +827,8 @@ domains, their live performance and resource utilization statistics.")
        ("libaio" ,libaio)
        ("libcap" ,libcap)
        ("libnet" ,libnet)
-       ("libnl" ,libnl)))
+       ("libnl" ,libnl)
+       ("libbsd" ,libbsd)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("perl" ,perl)
@@ -783,13 +853,14 @@ mainly implemented in user space.")
     (name "qmpbackup")
     (version "0.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/abbbi/qmpbackup/archive/"
-                                  version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/abbbi/qmpbackup.git")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "10k9mnb1yrg4gw1rvz4kw4dxc4aajl8gnjrpm3axqkg63qmxj3qn"))
-              (file-name (string-append name "-" version ".tar.gz"))))
+                "0swhp5byz44brhyis1a39p11fyn9q84xz5q6v2fah29r7d71kmmx"))))
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2))
@@ -813,7 +884,17 @@ Machine Protocol.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "02bq46ndmzq9cihazzn7xq1x7q5nzm7iw4l9lqzihxcxp9famkhw"))))
+         "02bq46ndmzq9cihazzn7xq1x7q5nzm7iw4l9lqzihxcxp9famkhw"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Do not create binaries optimized for the CPU of the build machine,
+           ;; for reproducibility and compatibility.  TODO: in the next version
+           ;; of looking glass, this is exposed as a CMake configure option.
+           (substitute* "client/CMakeLists.txt"
+             (("-march=native")
+              ""))
+           #t))))
      (build-system cmake-build-system)
      (inputs `(("fontconfig" ,fontconfig)
                ("glu" ,glu)
@@ -834,13 +915,20 @@ Machine Protocol.")
                      (lambda* (#:key outputs #:allow-other-keys)
                        (chdir "client")
                        #t))
+                   (add-after 'chdir-to-client 'add-missing-include
+                     (lambda _
+                       ;; Mimic upstream commit b9797529893, required since the
+                       ;; update to Mesa 19.2.
+                       (substitute* "renderers/egl/shader.h"
+                         (("#include <stdbool\\.h>")
+                          "#include <stdbool.h>\n#include <stddef.h>"))
+                       #t))
                    (replace 'install
                      (lambda* (#:key outputs #:allow-other-keys)
                        (install-file "looking-glass-client"
                                      (string-append (assoc-ref outputs "out")
                                                     "/bin"))
-                       #t))
-                   )))
+                       #t)))))
      (home-page "https://looking-glass.hostfission.com")
      (synopsis "KVM Frame Relay (KVMFR) implementation")
      (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
@@ -916,7 +1004,7 @@ Open Container Initiative specification.")
 (define-public umoci
   (package
     (name "umoci")
-    (version "0.4.4")
+    (version "0.4.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -925,7 +1013,7 @@ Open Container Initiative specification.")
               (file-name (string-append "umoci-" version ".tar.xz"))
               (sha256
                (base32
-                "1wchmha5k2f370jfijmx9fqp0cp99zfa9ajmfbq3j24qc8p5k8lk"))))
+                "0x1yyvpllz6fyy9xip6f7b6c94v984n3faf8p50fr9y4ygkgi15a"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/openSUSE/umoci"
@@ -961,7 +1049,7 @@ Open Container Initiative (OCI) image layout and its tagged images.")
 (define-public skopeo
   (package
     (name "skopeo")
-    (version "0.1.28")
+    (version "0.1.40")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -970,7 +1058,7 @@ Open Container Initiative (OCI) image layout and its tagged images.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "068nwrr3nr27alravcq1sxyhdd5jjr24213vdgn1dqva3885gbi0"))))
+                "1bagirzdzjhicn5dr691092ac3q6lhz3xngjzgqiqkxnvpz7p6cn"))))
     (build-system go-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -1046,15 +1134,15 @@ virtual machines.")
 (define-public bubblewrap
   (package
     (name "bubblewrap")
-    (version "0.3.1")
+    (version "0.4.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://github.com/projectatomic/bubblewrap/"
+              (uri (string-append "https://github.com/containers/bubblewrap/"
                                   "releases/download/v" version "/bubblewrap-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1y2bdlxnlr84xcbf31lzirc292c5ak9bd2wvcvh4ppsliih6pjny"))))
+                "08r0f4c3fjkb4zjrb4kkax1zfcgcgic702vb62sjjw5xfhppvzp5"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -1074,6 +1162,9 @@ virtual machines.")
                  ;; Some tests try to access /usr, but that doesn't exist.
                  ;; Give them /gnu instead.
                  (("/usr") "/gnu")
+                 (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
+                 (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
+                 (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
                  (("  */bin/bash") (which "bash"))
                  (("/bin/sh") (which "sh"))
                  (("findmnt") (which "findmnt"))))
@@ -1088,7 +1179,7 @@ virtual machines.")
     (native-inputs
      `(("python-2" ,python-2)
        ("util-linux" ,util-linux)))
-    (home-page "https://github.com/projectatomic/bubblewrap")
+    (home-page "https://github.com/containers/bubblewrap")
     (synopsis "Unprivileged sandboxing tool")
     (description "Bubblewrap is aimed at running applications in a sandbox,
 restricting their access to parts of the operating system or user data such as
@@ -1101,18 +1192,17 @@ by default and can be made read-only.")
 (define-public bochs
   (package
     (name "bochs")
-    (version "2.6.9")
+    (version "2.6.11")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://sourceforge.net/projects/bochs/files/bochs/"
                            version "/bochs-" version ".tar.gz"))
        (sha256
-        (base32
-         "1379cq4cnfprhw8mgh60i0q9j8fz8d7n3d5fnn2g9fdiv5znfnzf"))))
+        (base32 "0ql8q6y1k356li1g9gbvl21448mlxphxxi6kjb2b3pxvzd0pp2b3"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f)) ; No tests exist
+     `(#:tests? #f))                    ; no tests exist
     (inputs
      `(("libxrandr" ,libxrandr)))
     (home-page "http://bochs.sourceforge.net/")
@@ -1288,7 +1378,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc"))
        ("pixman" ,pixman)
        ("qemu" ,qemu-minimal)
        ("seabios" ,seabios)
-       ("util-linux" ,util-linux) ; uuid
+       ("util-linux" ,util-linux "lib") ; uuid
        ; TODO: ocaml-findlib, ocaml-nox.
        ("xz" ,xz) ; for liblzma
        ("zlib" ,zlib)))
@@ -1327,3 +1417,73 @@ which is a hypervisor.")
     ;; TODO: Some files are licensed differently.  List those.
     (license license:gpl2)
     (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
+
+(define-public osinfo-db-tools
+  (package
+    (name "osinfo-db-tools")
+    (version "1.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
+                                  version ".tar.xz"))
+
+              (sha256
+               (base32
+                "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
+    (build-system meson-build-system)
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("json-glib" ,json-glib)
+       ("libarchive" ,libarchive)))
+    (native-inputs
+     `(("perl" ,perl)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)
+       ;; Tests
+       ("python" ,python)
+       ("pytest" ,python-pytest)
+       ("requests" ,python-requests)))
+    (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
+    (synopsis "Tools for managing the osinfo database")
+    (description "This package contains a set of tools to assist
+administrators and developers in managing the database.")
+    (license license:lgpl2.0+)))
+
+(define-public osinfo-db
+  (package
+    (name "osinfo-db")
+    (version "20200203")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((out (assoc-ref %outputs "out"))
+                (osinfo-dir (string-append out "/share/osinfo"))
+                (source (assoc-ref %build-inputs "source"))
+                (osinfo-db-import
+                 (string-append (assoc-ref %build-inputs "osinfo-db-tools")
+                                "/bin/osinfo-db-import")))
+           (mkdir-p osinfo-dir)
+           (invoke osinfo-db-import "--dir" osinfo-dir source)
+           #t))))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("osinfo-db-tools" ,osinfo-db-tools)))
+    (home-page "https://gitlab.com/libosinfo/osinfo-db")
+    (synopsis "Database of information about operating systems")
+    (description "Osinfo-db provides the database files for use with the
+libosinfo library.  It provides information about guest operating systems for
+use with virtualization provisioning tools")
+    (license license:lgpl2.0+)))