aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests/virtualization.scm
blob: fbdec208050398bddfe8ec8a311b3af4f9fad908 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu tests virtualization)
  #:use-module (gnu tests)
  #:use-module (gnu system)
  #:use-module (gnu system file-systems)
  #:use-module (gnu system vm)
  #:use-module (gnu services)
  #:use-module (gnu services dbus)
  #:use-module (gnu services networking)
  #:use-module (gnu services virtualization)
  #:use-module (gnu packages virtualization)
  #:use-module (guix gexp)
  #:use-module (guix store)
  #:export (%test-libvirt))

(define %libvirt-os
  (simple-operating-system
   (service dhcp-client-service-type)
   (dbus-service)
   (polkit-service)
   (service libvirt-service-type)))

(define (run-libvirt-test)
  "Run tests in %LIBVIRT-OS."
  (define os
    (marionette-operating-system
     %libvirt-os
     #:imported-modules '((gnu services herd)
                          (guix combinators))))

  (define vm
    (virtual-machine
     (operating-system os)
     (port-forwardings '())))

  (define test
    (with-imported-modules '((gnu build marionette))
      #~(begin
          (use-modules (srfi srfi-11) (srfi srfi-64)
                       (gnu build marionette))

          (define marionette
            (make-marionette (list #$vm)))

          (mkdir #$output)
          (chdir #$output)

          (test-begin "libvirt")

          (test-assert "service running"
            (marionette-eval
             '(begin
                (use-modules (gnu services herd))
                (match (start-service 'libvirtd)
                  (#f #f)
                  (('service response-parts ...)
                   (match (assq-ref response-parts 'running)
                     ((pid) (number? pid))))))
             marionette))

          (test-eq "fetch version"
            0
            (marionette-eval
             `(begin
                (system* ,(string-append #$libvirt "/bin/virsh")
                         "-c" "qemu:///system" "version"))
             marionette))

          (test-end)
          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))

  (gexp->derivation "libvirt-test" test))

(define %test-libvirt
  (system-test
   (name "libvirt")
   (description "Connect to the running LIBVIRT service.")
   (value (run-libvirt-test))))
VE-2017-258[67].Tobias Geerinckx-Rice * gnu/packages/netpbm.scm (netpbm)[source]: Add patches. * gnu/packages/patches/netpbm-CVE-2017-2586.patch, gnu/packages/patches/netpbm-CVE-2017-2587.patch: New files. * gnu/local.mk: Fix missing copyright year. (dist_patch_DATA): Add them. 2019-02-28gnu: wpa_supplicant: Update to 2.7.Marius Bakke * gnu/packages/patches/wpa-supplicant-CVE-2017-13082.patch, gnu/packages/patches/wpa-supplicant-CVE-2018-14526.patch, gnu/packages/patches/wpa-supplicant-fix-key-reuse.patch, gnu/packages/patches/wpa-supplicant-fix-nonce-reuse.patch, gnu/packages/patches/wpa-supplicant-fix-zeroed-keys.patch, gnu/packages/patches/wpa-supplicant-krack-followups.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/admin.scm (wpa-supplicant-minimal): Update to 2.7. [source](patches): Remove. 2019-02-28gnu: Add toot.Efraim Flashner * gnu/packages/mastodon.scm (toot): New variable. * gnu/local.mk (GNU_SYSTSEM_MODULES): Register it. 2019-02-27gnu: wesnoth: Update to 1.14.6.Tobias Geerinckx-Rice * gnu/packages/games.scm (wesnoth): Update to 1.14.6. [source]: Remove upstreamed patch. * packages/patches/wesnoth-newer-boost.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-27gnu: musescore: Update to 3.0.3.Nicolas Goaziou * gnu/packages/music.scm (musescore): Update to 3.0.3. [source]: Remove now obsolete patch. [arguments]: Do not use bundled (as a submodule) libcrashreporter-qt. * gnu/packages/patches/musescore-fix-use_webengine.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Apply file removal. 2019-02-24gnu: Add libtommath.Efraim Flashner * gnu/packages/multiprecision.scm (libtommath): New variable. * gnu/packages/patches/libtommath.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. 2019-02-20gnu: xmodmap: Update to 1.0.10.Marius Bakke * gnu/packages/patches/xmodmap-asprintf.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/xorg.scm (xmodmap): Update to 1.0.10. [source](patches): Remove. [home-page]: Set to source repository. 2019-02-19gnu: libgd: Fix CVE-2019-{6977,6978}.Leo Famulari * gnu/packages/gd.scm (gd)[replacement]: New field. (gd/fixed): New variable. * gnu/packages/patches/gd-CVE-2019-6977.patch, gnu/packages/patches/gd-CVE-2019-6978.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. 2019-02-19gnu: Add magic-wormhole-mailbox-server.Leo Famulari * gnu/packages/magic-wormhole.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. 2019-02-18gnu: Add ungoogled-chromium.Marius Bakke * gnu/packages/aux-files/chromium/master-preferences.json, gnu/packages/chromium.scm: New files. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. 2019-02-18gnu: tomsfastmath: Update to 0.13.1.Tobias Geerinckx-Rice * gnu/packages/multiprecision.scm (tomsfastmath): Update to 0.13.1. [source]: Remove patch. * gnu/packages/patches/tomsfastmath-constness.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-17gnu: xf86-video-i128: Update to 1.4.0.Marius Bakke * gnu/packages/patches/xf86-video-i128-remove-mibstore.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/xorg.scm (xf86-video-i128): Update to 1.4.0. [source](patches): Remove. 2019-02-17gnu: pius: Update to 2.2.7.Tobias Geerinckx-Rice * gnu/packages/gnupg.scm (pius): Update to 2.2.7. [source]: Remove upstreamed patch. * gnu/packages/patches/pius.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-15gnu: Add genimage.Danny Milosavljevic * gnu/packages/genimage.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. 2019-02-15gnu: LLVM, Clang: Update to 7.0.1.Marius Bakke * gnu/packages/patches/clang-7.0-libc-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/llvm.scm (llvm, clang-runtime, clang): Update to 7.0.1. (llvm-7.0.1): Remove variable. (clang-from-llvm)[arguments]: Adjust phase to match Clang 7. (llvm-6, clang-runtime-6, clang-6): New public variables. * gnu/packages/dlang.scm (ldc)[native-inputs]: Change LLVM and CLANG to LLVM-6.0 and CLANG-6.0. * gnu/packages/gl.scm (mesa)[inputs]: Change from LLVM to LLVM-6. 2019-02-15gnu: allegro@4: Update to 4.4.3.Tobias Geerinckx-Rice * gnu/packages/game-development.scm (allegro-4): Update to 4.4.3. [source]: Remove upstreamed patch. * gnu/packages/patches/allegro4-mesa-18.2.5-and-later.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-14gnu: ruby-safe-yaml: Add missing require 'time'.Christopher Baines Patch ruby-safe-yaml to fix an issue that would lead to an error like this: uninitialized constant SafeYAML::Parse::Date::DateTime It's been reported upstream [1], and this patch was taken from the upstream Git repository. 1: https://github.com/dtao/safe_yaml/issues/80 * gnu/packages/ruby.scm (ruby-safe-yaml)[source]: Switch to the Git repository so that applying patches works and add a patch. [arguments]: Enable tests and add a phase to set the TZ environment variable, as one of the tests depends on a certian timezone. * gnu/packages/patches/ruby-safe-yaml-add-require-time.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch file. 2019-02-13gnu: dealii: Upgrade to 9.0.1.Eric Bavier * gnu/packages/patches/dealii-mpi-deprecations.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (dealii)[source]: Upgrade to 9.0.1. Use patch. [arguments]: Use new MPI configuration flags. 2019-02-14gnu: qtbase: Restore compilation on linux kernels < 4.11.Andreas Enge Fixes <https://bugs.gnu.org/34431>. * gnu/packages/patches/qtbase-old-kernel.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/qt.scm (qtbase): Add patch. 2019-02-13gnu: scalapack: Remove use of deprecated MPI1 symbols.Eric Bavier * gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (scalapack)[source]: Use it. 2019-02-13gnu: ledger: Update to 3.1.2 [security fixes].Ricardo Wurmus * gnu/packages/finance.scm (ledger): Update to 3.1.2. [arguments]: Remove #:modules; remove obsolete configure flags; remove make flags; remove phase "boost-compat"; remove custom check phase; remove "relocate-elisp" phase; disable broken test in "check-setup" phase. [native-inputs]: Remove emacs-minimal. [license]: Remove gpl2+. * gnu/packages/patches/ledger-revert-boost-python-fix.patch: Remove patch. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-13gnu: red-eclipse: Fix build.Christopher Baines Add a patch from the upstream repository [1] that resolves some errors that prevent the package from building [2]. 1: https://github.com/red-eclipse/base/commit/b16b4963c1ad81bb9ef784bc49 2: error: ‘____gammal_r_finite’ was not declared in this scope * gnu/packages/games.scm (red-eclipse)[source] Add patch. * gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch: New file * gnu/local.mk (dist_patch_DATA): Add new patch. 2019-02-12gnu: Move KDE Plasma components to separate module.Marius Bakke * gnu/packages/kde.scm (libkscreen, libksysguard): Move from here ... * gnu/packages/kde-plasma.scm: ... to here. New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. 2019-02-12gnu: runc: Update to 1.0.0-rc6 [fixes CVE-2019-5736].Leo Famulari * gnu/packages/virtualization.scm (runc): Update to 1.0.0-rc6. [source]: Use a descriptive file-name. Add 'runc-CVE-2019-5736.patch' * gnu/packages/patches/runc-CVE-2019-5736.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. 2019-02-12gnu: glibc@2.27: fix CVE-2018-11236, CVE-2018-11237.Efraim Flashner * gnu/packages/base.scm (glibc@2.27)[sources]: Add patches. [properties]: New field, mark CVE-2017-18269 fixed. * gnu/packages/patches/glibc-CVE-2018-11236.patch, gnu/packages/patches/glibc-CVE-2018-11237.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. 2019-02-10gnu: gnome-shell: Customize the GDM log-in screen.Ludovic Courtès * gnu/packages/patches/gnome-shell-theme.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (gnome-shell)[source](patches, modules) (snippet): New fields. [arguments]: Add 'rebuild-css' phase. [native-inputs]: Add RUBY-SASS. 2019-02-09gnu: emacs-pdf-tools: Update to 0.90.Nicolas Goaziou * gnu/packages/emacs-xyz.scm (emacs-pdf-tools): Update to 0.90. [source]: Remove patch. * gnu/packages/patches/emacs-pdf-tools-poppler.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove reference to deleted file. 2019-02-09gnu: libvpx: Update to 1.8.0.Marius Bakke * gnu/packages/patches/gst-plugins-good-libvpx-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/video.scm (libvpx): Update to 1.8.0. [source](patches): Remove obsolete patch. (libvpx-1.7): New public variable. * gnu/packages/gnuzilla.scm (icecat)[inputs]: Use LIBVPX-1.7 instead of LIBVPX. * gnu/packages/gstreamer.scm (gst-plugins-good)[source](patches): New field. [arguments]: Add #:make-flags. 2019-02-09Merge branch 'staging'Ludovic Courtès 2019-02-09gnu: cool-retro-term: Upgrade to 1.1.1.Eric Bavier * gnu/packages/terminals.scm (cool-retro-term)[source]: Upgrade to 1.1.1. Remove patches. Adjust filtering in snippet for added/removed fonts. [arguments]: Return #t in 'add-alternate-name' phase. * gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch, gnu/packages/patches/cool-retro-term-fix-array-size.patch, gnu/packages/patches/cool-retro-term-memory-leak-1.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. 2019-02-07gnu: hdf5: Remove use of deprecated MPI1 symbols.Eric Bavier * gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch, gnu/packages/patches/hdf5-mpi-deprecations.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/maths.scm (hdf5, hdf5-1.10)[source]: Use them. 2019-02-07gnu: superlu-dist: Remove use of deprecated MPI1 symbols.Eric Bavier * gnu/packages/patches/superlu-dist-fix-mpi-deprecations.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (superlu-dist)[source]: Use it. 2019-02-05gnu: musescore: Update to 3.0.2.Nicolas Goaziou * gnu/packages/music.scm (musescore): Update to 3.0.2. [source]: Add patch. * gnu/packages/patches/musescore-fix-use_webengine.patch: New file. * gnu/local.mk (dist_patch_DATA): Reference patch. 2019-02-05gnu: nyx: Update to 2.1.0.Tobias Geerinckx-Rice * gnu/packages/tor.scm (nyx): Update to 2.1.0. [source]: Remove patch. * gnu/packages/patches/nyx-show-header-stats-with-python3.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-05gnu: Remove unused patch 'mcron-install.patch'.Leo Famulari This is a followup to commit cfbf6de18cc70d2e385feb5f61f9363f18e78ddf. * gnu/packages/patches/mcron-install.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-05gnu: Remove unused patch 'ocaml-graph-honor-source-date-epoch.patch'.Leo Famulari This is a followup to commit 564cf93f2aca60171b4b97559ffc6c952e73e8ed. * gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-05gnu: Remove unused patch 'ocaml-findlib-make-install.patch'.Leo Famulari This is a followup to commit bff6739d5ea513417bb491a61aa276c4fb7ddd43. * gnu/packages/patches/ocaml-findlib-make-install.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. 2019-02-05gnu: Remove unused patch 'python2-rdflib-drop-sparqlwrapper.patch'.Leo Famulari * gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it.