1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
7 ;;; Copyright © 2017 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
9 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
11 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages virtualization)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages admin)
31 #:use-module (gnu packages attr)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages curl)
36 #:use-module (gnu packages cyrus-sasl)
37 #:use-module (gnu packages disk)
38 #:use-module (gnu packages dns)
39 #:use-module (gnu packages docbook)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages gl)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gnome)
46 #:use-module (gnu packages golang)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages libusb)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages networking)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages polkit)
56 #:use-module (gnu packages protobuf)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-web)
59 #:use-module (gnu packages pulseaudio)
60 #:use-module (gnu packages selinux)
61 #:use-module (gnu packages sdl)
62 #:use-module (gnu packages spice)
63 #:use-module (gnu packages texinfo)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages web)
66 #:use-module (gnu packages xdisorg)
67 #:use-module (gnu packages xml)
68 #:use-module (guix build-system gnu)
69 #:use-module (guix build-system go)
70 #:use-module (guix build-system python)
71 #:use-module (guix download)
72 #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+
74 #:use-module (guix packages)
75 #:use-module (guix utils)
76 #:use-module (srfi srfi-1))
78 (define (qemu-patch commit file-name sha256)
79 "Return an origin for COMMIT."
83 "http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h="
86 (file-name file-name)))
94 (uri (string-append "https://download.qemu.org/qemu-"
98 "1z66spkm1prvhbq7h5mfnp0i6mmamsb938fqmdfvyrgzc7rh34z6"))))
99 (build-system gnu-build-system)
101 '(;; Running tests in parallel can occasionally lead to failures, like:
102 ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
104 #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
105 (string-append "--smbd="
106 (assoc-ref %outputs "out")
107 "/libexec/samba-wrapper")
108 "--audio-drv-list=alsa,pa,sdl")
110 (modify-phases %standard-phases
112 (lambda* (#:key inputs outputs (configure-flags '())
114 ;; The `configure' script doesn't understand some of the
115 ;; GNU options. Thus, add a new phase that's compatible.
116 (let ((out (assoc-ref outputs "out")))
117 (setenv "SHELL" (which "bash"))
119 ;; While we're at it, patch for tests.
120 (substitute* "tests/libqtest.c"
121 (("/bin/sh") (which "sh")))
123 ;; The binaries need to be linked against -lrt.
124 (setenv "LDFLAGS" "-lrt")
128 ,(string-append "--cc=" (which "gcc"))
129 ;; Some architectures insist on using HOST_CC
130 ,(string-append "--host-cc=" (which "gcc"))
131 "--disable-debug-info" ; save build space
132 "--enable-virtfs" ; just to be sure
133 ,(string-append "--prefix=" out)
134 ,(string-append "--sysconfdir=/etc")
135 ,@configure-flags))))))
136 (add-after 'install 'install-info
137 (lambda* (#:key inputs outputs #:allow-other-keys)
138 ;; Install the Info manual, unless Texinfo is missing.
139 (or (not (assoc-ref inputs "texinfo"))
140 (let ((out (assoc-ref outputs "out")))
141 (and (zero? (system* "make" "info"))
142 (let ((infodir (string-append out "/share/info")))
143 (for-each (lambda (info)
144 (install-file info infodir))
145 (find-files "." "\\.info"))
147 ;; Create a wrapper for Samba. This allows QEMU to use Samba without
148 ;; pulling it in as an input. Note that you need to explicitly install
149 ;; Samba in your Guix profile for Samba support.
150 (add-after 'install-info 'create-samba-wrapper
151 (lambda* (#:key inputs outputs #:allow-other-keys)
152 (let* ((out (assoc-ref %outputs "out"))
153 (libexec (string-append out "/libexec")))
154 (call-with-output-file "samba-wrapper"
156 (format port "#!/bin/sh
158 (chmod "samba-wrapper" #o755)
159 (install-file "samba-wrapper" libexec))
161 (add-before 'check 'make-gtester-verbose
163 ;; Make GTester verbose to facilitate investigation upon failure.
164 (setenv "V" "1") #t))
165 (add-before 'check 'disable-test-qga
167 (substitute* "tests/Makefile.include"
168 ;; Comment out the test-qga test, which needs /sys and
169 ;; fails within the build environment.
170 (("check-unit-.* tests/test-qga" all)
171 (string-append "# " all)))
173 (inputs ; TODO: Add optional inputs.
174 `(("alsa-lib" ,alsa-lib)
180 ("libcap" ,libcap) ; virtfs support requires libcap & libattr
182 ("libepoxy" ,libepoxy)
183 ("libjpeg" ,libjpeg-turbo)
185 ("libseccomp" ,libseccomp)
186 ("libusb" ,libusb) ;USB pass-through support
189 ;; ("pciutils" ,pciutils)
191 ("pulseaudio" ,pulseaudio)
194 ("usbredir" ,usbredir)
195 ("util-linux" ,util-linux)
197 ("virglrenderer" ,virglrenderer)
199 (native-inputs `(("gettext" ,gettext-minimal)
200 ("glib:bin" ,glib "bin") ; gtester, etc.
202 ("pkg-config" ,pkg-config)
203 ("python-wrapper" ,python-wrapper)
204 ("texinfo" ,texinfo)))
205 (home-page "https://www.qemu.org")
206 (synopsis "Machine emulator and virtualizer")
208 "QEMU is a generic machine emulator and virtualizer.
210 When used as a machine emulator, QEMU can run OSes and programs made for one
211 machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
212 using dynamic translation, it achieves very good performance.
214 When used as a virtualizer, QEMU achieves near native performances by
215 executing the guest code directly on the host CPU. QEMU supports
216 virtualization when executing under the Xen hypervisor or using
217 the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
218 server and embedded PowerPC, and S390 guests.")
220 ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
223 ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
224 (supported-systems (delete "mips64el-linux" %supported-systems))))
226 (define-public qemu-minimal
227 ;; QEMU without GUI support.
228 (package (inherit qemu)
229 (name "qemu-minimal")
230 (synopsis "Machine emulator and virtualizer (without GUI)")
232 (substitute-keyword-arguments (package-arguments qemu)
233 ((#:configure-flags _ '(list))
234 ;; Restrict to the targets supported by Guix.
235 ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu"))))
237 ;; Remove dependencies on optional libraries, notably GUI libraries.
238 (native-inputs (fold alist-delete (package-native-inputs qemu)
240 (inputs (fold alist-delete (package-inputs qemu)
241 '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
242 "usbredir" "libdrm" "libepoxy" "pulseaudio")))))
244 ;; The GRUB test suite fails with later versions of Qemu, so we
245 ;; keep it at 2.10 for now. See
246 ;; <https://lists.gnu.org/archive/html/bug-grub/2018-02/msg00004.html>.
247 ;; This package is hidden since we do not backport updates to it.
248 (define-public qemu-minimal-2.10
251 (inherit qemu-minimal)
255 (uri (string-append "https://download.qemu.org/qemu-"
259 "17w21spvaxaidi2am5lpsln8yjpyp2zi3s3gc6nsxj5arlgamzgw"))))
260 ;; qemu-minimal-2.10 needs Python 2. Remove below once no longer necessary.
261 (native-inputs `(("python-2" ,python-2)
262 ,@(fold alist-delete (package-native-inputs qemu)
263 '("python-wrapper")))))))
265 (define-public libosinfo
272 (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
276 "0srrs2m6irqd4f867g8ls6jp2dq3ql0l9d0fh80d55sivvn2bd7p"))))
277 (build-system gnu-build-system)
280 (list (string-append "--with-usb-ids-path="
281 (assoc-ref %build-inputs "usb.ids"))
282 (string-append "--with-pci-ids-path="
283 (assoc-ref %build-inputs "pci.ids")))
285 (modify-phases %standard-phases
286 ;; This odd test fails for unknown reasons.
287 (add-after 'unpack 'disable-broken-test
289 (substitute* "test/Makefile.in"
290 (("test-isodetect\\$\\(EXEEXT\\)") ""))
293 `(("libsoup" ,libsoup)
296 ("gobject-introspection" ,gobject-introspection)))
299 ("glib" ,glib "bin") ; glib-mkenums, etc.
302 ("intltool" ,intltool)
303 ("pkg-config" ,pkg-config)
307 (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids")
310 "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw"))))
314 (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681")
315 (file-name "usb.ids")
318 "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r"))))))
319 (home-page "https://libosinfo.org/")
320 (synopsis "Operating system information database")
321 (description "libosinfo is a GObject based library API for managing
322 information about operating systems, hypervisors and the (virtual) hardware
323 devices they can support. It includes a database containing device metadata
324 and provides APIs to match/identify optimal devices for deploying an operating
325 system on a hypervisor. Via GObject Introspection, the API is available in
326 all common programming languages. Vala bindings are also provided.")
327 ;; The library files are released under LGPLv2.1 or later; the source
328 ;; files in the "tools" directory are released under GPLv2+.
329 (license (list lgpl2.1+ gpl2+))))
338 "https://linuxcontainers.org/downloads/lxc/lxc-"
342 "1xpghrinxhm2072fwmn42pxhjwh7qx6cbsipw4s6g38a8mkklrk8"))))
343 (build-system gnu-build-system)
345 `(("pkg-config" ,pkg-config)))
349 ("libseccomp" ,libseccomp)
350 ("libselinux" ,libselinux)))
353 '("--sysconfdir=/etc"
354 "--localstatedir=/var")
356 (modify-phases %standard-phases
358 (lambda* (#:key outputs #:allow-other-keys)
359 (let* ((out (assoc-ref outputs "out"))
360 (bashcompdir (string-append out "/etc/bash_completion.d")))
363 (string-append "bashcompdir=" bashcompdir)
364 ;; Don't install files into /var and /etc.
365 "LXCPATH=/tmp/var/lib/lxc"
366 "localstatedir=/tmp/var"
367 "sysconfdir=/tmp/etc"
368 "sysconfigdir=/tmp/etc/default"))))))))
369 (synopsis "Linux container tools")
370 (home-page "https://linuxcontainers.org/")
372 "LXC is a userspace interface for the Linux kernel containment features.
373 Through a powerful API and simple tools, it lets Linux users easily create and
374 manage system or application containers.")
377 (define-public libvirt
383 (uri (string-append "https://libvirt.org/sources/libvirt-"
387 "0nq1iz5iic466qahp0i8dlvyd6li0b0pdrvvrz9286l12x2fm61s"))))
388 (build-system gnu-build-system)
391 ;; FAIL: virfirewalltest
393 ;; FAIL: virnetsockettest
394 ;; FAIL: networkxml2firewalltest
395 ;; FAIL: nwfilterebiptablestest
396 ;; FAIL: nwfilterxml2firewalltest
397 ;; Time-out while running commandtest.
400 (list "--with-polkit"
402 "--localstatedir=/var")
404 (modify-phases %standard-phases
405 (add-after 'unpack 'fix-tests
407 (substitute* '("tests/commandtest.c"
408 "gnulib/tests/test-posix_spawn1.c"
409 "gnulib/tests/test-posix_spawn2.c")
410 (("/bin/sh") (which "sh")))
413 ;; Since the sysconfdir and localstatedir should be /etc and /var
414 ;; at runtime, we must prevent writing to them at installation
417 (invoke "make" "install"
418 "sysconfdir=/tmp/etc"
419 "localstatedir=/tmp/var")))
420 (add-after 'install 'wrap-libvirtd
421 (lambda* (#:key inputs outputs #:allow-other-keys)
422 (let ((out (assoc-ref outputs "out")))
423 (wrap-program (string-append out "/sbin/libvirtd")
424 `("PATH" = (,(string-append (assoc-ref inputs "iproute")
426 ,(string-append (assoc-ref inputs "qemu")
430 `(("libxml2" ,libxml2)
436 ("libuuid" ,util-linux)
437 ("lvm2" ,lvm2) ; for libdevmapper
440 ("cyrus-sasl" ,cyrus-sasl)
443 ("dmidecode" ,dmidecode)
445 ("ebtables" ,ebtables)
447 ("iptables" ,iptables)))
449 `(("xsltproc" ,libxslt)
451 ("pkg-config" ,pkg-config)
454 (home-page "https://libvirt.org")
455 (synopsis "Simple API for virtualization")
456 (description "Libvirt is a C toolkit to interact with the virtualization
457 capabilities of recent versions of Linux. The library aims at providing long
458 term stable C API initially for the Xen paravirtualization but should be able
459 to integrate other virtualization mechanisms if needed.")
462 (define-public libvirt-glib
464 (name "libvirt-glib")
468 (uri (string-append "ftp://libvirt.org/libvirt/glib/"
469 "libvirt-glib-" version ".tar.gz"))
472 "0iwa5sdbii52pjpdm5j37f67sdmf0kpcky4liwhy1nf43k85i4fa"))))
473 (build-system gnu-build-system)
476 (modify-phases %standard-phases
477 (add-after 'unpack 'fix-tests
479 (substitute* "tests/test-events.c"
480 (("/bin/true") (which "true")))
483 `(("libxml2" ,libxml2)
485 ("gobject-introspection" ,gobject-introspection)
488 ("cyrus-sasl" ,cyrus-sasl)
489 ("lvm2" ,lvm2) ; for libdevmapper
490 ("libyajl" ,libyajl)))
492 `(("pkg-config" ,pkg-config)
493 ("intltool" ,intltool)
496 (home-page "https://libvirt.org")
497 (synopsis "GLib wrapper around libvirt")
498 (description "libvirt-glib wraps the libvirt library to provide a
499 high-level object-oriented API better suited for glib-based applications, via
503 @item libvirt-glib - GLib main loop integration & misc helper APIs
504 @item libvirt-gconfig - GObjects for manipulating libvirt XML documents
505 @item libvirt-gobject - GObjects for managing libvirt objects
510 (define-public python-libvirt
512 (name "python-libvirt")
516 (uri (pypi-uri "libvirt-python" version))
519 "1ixqhxjkczl8vk9wjx4cknw4374cw5nnsacbd2s755kpd0ys7hny"))))
520 (build-system python-build-system)
523 (modify-phases %standard-phases
524 (add-after 'unpack 'patch-nosetests-path
525 (lambda* (#:key inputs #:allow-other-keys)
526 (substitute* "setup.py"
527 (("\"/usr/bin/nosetests\"")
528 (string-append "\"" (which "nosetests") "\""))
529 (("self\\.spawn\\(\\[sys\\.executable, nose\\]\\)")
530 (format #f "self.spawn([\"~a\", nose])" (which "bash"))))
533 `(("libvirt" ,libvirt)))
535 `(("python-lxml" ,python-lxml)))
537 `(("pkg-config" ,pkg-config)
538 ("python-nose" ,python-nose)))
539 (home-page "https://libvirt.org")
540 (synopsis "Python bindings to libvirt")
541 (description "This package provides Python bindings to the libvirt
542 virtualization library.")
545 (define-public python2-libvirt
546 (package-with-python2 python-libvirt))
548 (define-public virt-manager
550 (name "virt-manager")
554 (uri (string-append "https://virt-manager.org/download/sources"
555 "/virt-manager/virt-manager-"
559 "1ardmd4sxdmd57y7qpka44gf09c1yq2g0xs074d3k1h925crv27f"))))
560 (build-system python-build-system)
563 #:use-setuptools? #f ; Uses custom distutils 'install' command.
564 ;; Some of the tests seem to require network access to install virtual
567 #:imported-modules ((guix build glib-or-gtk-build-system)
568 ,@%python-build-system-modules)
569 #:modules ((ice-9 match)
571 (guix build python-build-system)
572 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
575 (modify-phases %standard-phases
576 (add-after 'unpack 'fix-setup
577 (lambda* (#:key outputs #:allow-other-keys)
578 (substitute* "virtcli/cliconfig.py"
579 (("/usr") (assoc-ref outputs "out")))
581 (add-after 'unpack 'fix-default-uri
582 (lambda* (#:key inputs #:allow-other-keys)
583 ;; xen is not available for now - so only patch qemu
584 (substitute* "virtManager/connect.py"
585 (("/usr(/bin/qemu-system)" _ suffix)
586 (string-append (assoc-ref inputs "qemu") suffix)))
588 (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
589 (lambda* (#:key inputs outputs #:allow-other-keys)
590 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
591 (bin-files (find-files bin ".*"))
592 (paths (map (match-lambda
593 ((output . directory)
594 (let* ((girepodir (string-append
596 "/lib/girepository-1.0")))
597 (if (file-exists? girepodir)
600 (for-each (lambda (file)
601 (format #t "wrapping ~a\n" file)
603 `("GI_TYPELIB_PATH" ":" prefix
604 ,(filter identity paths))))
607 (add-after 'install 'glib-or-gtk-compile-schemas
608 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
609 (add-after 'install 'glib-or-gtk-wrap
610 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
616 ("libvirt-glib" ,libvirt-glib)
617 ("libosinfo" ,libosinfo)
619 ("gobject-introspection" ,gobject-introspection)
620 ("python2-libvirt" ,python2-libvirt)
621 ("python2-requests" ,python2-requests)
622 ("python2-ipaddr" ,python2-ipaddr)
623 ("python2-pycairo" ,python2-pycairo)
624 ("python2-pygobject" ,python2-pygobject)
625 ("python2-libxml2" ,python2-libxml2)
626 ("spice-gtk" ,spice-gtk)))
627 ;; virt-manager searches for qemu-img or kvm-img in the PATH.
631 `(("glib" ,glib "bin") ; glib-compile-schemas.
632 ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache
633 ("perl" ,perl) ; pod2man
634 ("intltool" ,intltool)))
635 (home-page "https://virt-manager.org/")
636 (synopsis "Manage virtual machines")
638 "The virt-manager application is a desktop user interface for managing
639 virtual machines through libvirt. It primarily targets KVM VMs, but also
640 manages Xen and LXC (Linux containers). It presents a summary view of running
641 domains, their live performance and resource utilization statistics.")
650 (uri (string-append "http://download.openvz.org/criu/criu-"
654 "0qrpz7pvnks34v7d8lb73flz3mb7qwnib94pdwaxh0mskn8470fq"))))
655 (build-system gnu-build-system)
657 `(#:test-target "test"
658 #:tests? #f ; tests require mounting as root
660 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
661 (string-append "LIBDIR=" (assoc-ref %outputs "out")
664 (modify-phases %standard-phases
666 (lambda* (#:key inputs #:allow-other-keys)
667 ;; The includes for libnl are located in a sub-directory.
668 (setenv "C_INCLUDE_PATH"
669 (string-append (assoc-ref inputs "libnl")
671 (getenv "C_INCLUDE_PATH")))
672 ;; Prevent xmlto from failing the install phase.
673 (substitute* "Documentation/Makefile"
675 (string-append "XMLTO:="
676 (assoc-ref inputs "xmlto")
678 " --skip-validation "
680 (assoc-ref inputs "docbook-xsl")
681 "/xml/xsl/docbook-xsl-"
682 ,(package-version docbook-xsl)
683 "/manpages/docbook.xsl")))
685 (add-before 'build 'fix-symlink
686 (lambda* (#:key inputs #:allow-other-keys)
687 ;; The file 'images/google/protobuf/descriptor.proto' points to
688 ;; /usr/include/..., which obviously does not exist.
689 (let* ((file "google/protobuf/descriptor.proto")
690 (target (string-append "images/" file))
691 (source (string-append (assoc-ref inputs "protobuf")
694 (symlink source target)
696 (add-after 'install 'wrap
697 (lambda* (#:key inputs outputs #:allow-other-keys)
698 ;; Make sure 'crit' runs with the correct PYTHONPATH.
699 (let* ((out (assoc-ref outputs "out"))
700 (path (string-append out
702 (string-take (string-take-right
703 (assoc-ref inputs "python") 5) 3)
705 (getenv "PYTHONPATH"))))
706 (wrap-program (string-append out "/bin/crit")
707 `("PYTHONPATH" ":" prefix (,path))))
710 `(("protobuf" ,protobuf)
712 ("python2-protobuf" ,python2-protobuf)
713 ("python2-ipaddr" ,python2-ipaddr)
720 `(("pkg-config" ,pkg-config)
722 ("protobuf-c" ,protobuf-c)
723 ("asciidoc" ,asciidoc)
725 ("docbook-xml" ,docbook-xml)
726 ("docbook-xsl" ,docbook-xsl)))
727 (home-page "https://criu.org")
728 (synopsis "Checkpoint and restore in user space")
729 (description "Using this tool, you can freeze a running application (or
730 part of it) and checkpoint it to a hard drive as a collection of files. You
731 can then use the files to restore and run the application from the point it
732 was frozen at. The distinctive feature of the CRIU project is that it is
733 mainly implemented in user space.")
734 ;; The project is licensed under GPLv2; files in the lib/ directory are
736 (license (list gpl2 lgpl2.1))))
738 (define-public qmpbackup
744 (uri (string-append "https://github.com/abbbi/qmpbackup/archive/"
748 "10k9mnb1yrg4gw1rvz4kw4dxc4aajl8gnjrpm3axqkg63qmxj3qn"))
749 (file-name (string-append name "-" version ".tar.gz"))))
750 (build-system python-build-system)
752 `(#:python ,python-2))
753 (home-page "https://github.com/abbbi/qmpbackup")
754 (synopsis "Backup and restore QEMU machines")
755 (description "qmpbackup is designed to create and restore full and
756 incremental backups of running QEMU virtual machines via QMP, the QEMU
760 (define-public lookingglass
762 (name "lookingglass")
767 (uri (string-append "https://github.com/gnif/LookingGlass/archive/"
769 (file-name (string-append name "-" version))
772 "0zlxg9ibzr0a598wr5nl1pb4l7mzsqn8ip72v4frph0vwsm5il6c"))))
773 (build-system gnu-build-system)
774 (inputs `(("fontconfig" ,fontconfig)
779 ("sdl2-ttf" ,sdl2-ttf)
780 ("spice-protocol" ,spice-protocol)))
781 (native-inputs `(("pkg-config" ,pkg-config)))
783 `(#:tests? #f ;; No tests are available.
784 #:phases (modify-phases %standard-phases
786 (lambda* (#:key outputs #:allow-other-keys)
790 (lambda* (#:key outputs #:allow-other-keys)
791 (install-file "bin/looking-glass-client"
792 (string-append (assoc-ref outputs "out")
795 (home-page "https://looking-glass.hostfission.com")
796 (synopsis "KVM Frame Relay (KVMFR) implementation")
797 (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
798 Machine) configured for VGA PCI Pass-through without an attached physical
799 monitor, keyboard or mouse. It displays the VM's rendered contents on your main
801 ;; This package requires SSE instructions.
802 (supported-systems '("i686-linux" "x86_64-linux"))
808 (version "1.0.0-rc5")
812 "https://github.com/opencontainers/runc/releases/"
813 "download/v" version "/runc.tar.xz"))
816 "081avdzwnqpk368wbaihlzsypaxpj42d7699h7jgp0fks14x4103"))))
817 (build-system go-build-system)
819 '(#:import-path "github.com/opencontainers/runc"
821 ;; XXX: 20/139 tests fail due to missing /var, cgroups and apparmor in
822 ;; the build environment.
825 (modify-phases %standard-phases
827 (lambda* (#:key source import-path #:allow-other-keys)
828 ;; Unpack the tarball into 'runc' instead of 'runc-1.0.0-rc5'.
829 (let ((dest (string-append "src/" import-path)))
831 (invoke "tar" "-C" (string-append "src/" import-path)
832 "--strip-components=1"
835 (lambda* (#:key import-path #:allow-other-keys)
836 (chdir (string-append "src/" import-path))
837 ;; XXX: requires 'go-md2man'.
838 ;; (invoke "make" "man")
842 ;; (invoke "make" "localunittest")))
844 (lambda* (#:key outputs #:allow-other-keys)
845 (let ((out (assoc-ref outputs "out")))
846 (invoke "make" "install" "install-bash"
847 (string-append "PREFIX=" out))))))))
849 `(("pkg-config" ,pkg-config)))
851 `(("libseccomp" ,libseccomp)))
852 (synopsis "Open container initiative runtime")
853 (home-page "https://www.opencontainers.org/")
855 "@command{runc} is a command line client for running applications
856 packaged according to the
857 @uref{https://github.com/opencontainers/runtime-spec/blob/master/spec.md, Open
858 Container Initiative (OCI) format} and is a compliant implementation of the
859 Open Container Initiative specification.")