diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-10-08 19:24:34 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-10-08 19:24:34 +0200 |
commit | d1f3b333e6176a7879ab3742bbebb2a99f61a528 (patch) | |
tree | 8bd82ce68bd2534a48bf13c7256997f82dd1b3f4 /gnu/packages/virtualization.scm | |
parent | e01d384efcdaf564bbb221e43b81e087c8e2af06 (diff) | |
parent | 861907f01efb1cae7f260e8cb7b991d5034a486a (diff) | |
download | guix-patches-d1f3b333e6176a7879ab3742bbebb2a99f61a528.tar guix-patches-d1f3b333e6176a7879ab3742bbebb2a99f61a528.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/virtualization.scm')
-rw-r--r-- | gnu/packages/virtualization.scm | 70 |
1 files changed, 46 insertions, 24 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 26477714e4..fd442bde4b 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -62,6 +62,7 @@ #: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) @@ -106,16 +107,14 @@ (define-public qemu (package (name "qemu") - (version "3.1.0") + (version "4.1.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")) (sha256 (base32 - "1z5bd5nfyjvhfi1s95labc82y4hjdjjkdabw931362ls0zghh1ba")))) + "1ih9v6gxgild3m4g80ld4dr3wp9db3bpy203k73fxgc9hqhn0vk5")))) (build-system gnu-build-system) (arguments '(;; Running tests in parallel can occasionally lead to failures, like: @@ -179,13 +178,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) @@ -401,7 +411,10 @@ manage system or application containers.") (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" @@ -414,6 +427,15 @@ 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 @@ -431,27 +453,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) + ("libtirpc" ,libtirpc) ;for <rpc/rpc.h> ("libuuid" ,util-linux) - ("lvm2" ,lvm2) ; for libdevmapper + ("lvm2" ,lvm2) ;for libdevmapper ("curl" ,curl) ("openssl" ,openssl) ("cyrus-sasl" ,cyrus-sasl) @@ -680,7 +693,13 @@ domains, their live performance and resource utilization statistics.") (setenv "C_INCLUDE_PATH" (string-append (assoc-ref inputs "libnl") "/include/libnl3:" - (getenv "C_INCLUDE_PATH"))) + ;; 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")) ;; Prevent xmlto from failing the install phase. (substitute* "Documentation/Makefile" (("XMLTO.*:=.*") @@ -946,7 +965,7 @@ Open Container Initiative (OCI) image layout and its tagged images.") (define-public skopeo (package (name "skopeo") - (version "0.1.28") + (version "0.1.39") (source (origin (method git-fetch) (uri (git-reference @@ -955,7 +974,7 @@ Open Container Initiative (OCI) image layout and its tagged images.") (file-name (git-file-name name version)) (sha256 (base32 - "068nwrr3nr27alravcq1sxyhdd5jjr24213vdgn1dqva3885gbi0")))) + "1jkxmvh079pd9j4aa39ilmclwafnjs0yqdiigwh8cj7yf97x4vsi")))) (build-system go-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -1031,7 +1050,7 @@ virtual machines.") (define-public bubblewrap (package (name "bubblewrap") - (version "0.3.1") + (version "0.3.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/projectatomic/bubblewrap/" @@ -1039,7 +1058,7 @@ virtual machines.") version ".tar.xz")) (sha256 (base32 - "1y2bdlxnlr84xcbf31lzirc292c5ak9bd2wvcvh4ppsliih6pjny")))) + "1zsd6rxryg97dkkhibr0fvq16x3s75qj84rvhdv8p42ag58mz966")))) (build-system gnu-build-system) (arguments `(#:phases @@ -1059,6 +1078,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")))) @@ -1280,7 +1302,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) (native-inputs `(("dev86" ,dev86) ("bison" ,bison) - ("cmake" ,cmake) + ("cmake" ,cmake-minimal) ("figlet" ,figlet) ("flex" ,flex) ("gettext" ,gettext-minimal) |