From 35c43fcdbb408a5755efebc13241dd9082360aa1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 8 May 2020 21:43:04 +0200 Subject: gnu: QEMU: Update to 5.0.0. * gnu/packages/patches/qemu-CVE-2020-1711.patch, gnu/packages/patches/qemu-CVE-2020-7039.patch, gnu/packages/patches/qemu-CVE-2020-7211.patch, gnu/packages/patches/qemu-CVE-2020-8608.patch, gnu/packages/patches/qemu-fix-documentation-build-failure.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/virtualization.scm (qemu)[source](patches): Remove. [arguments]: Add phase 'patch-/bin/sh-references'. In the 'configure' phase, add shebang substitutions. Remove phase 'prevent-network-configuration'. [inputs]: Change from LIBCAP to LIBCAP-NG. --- gnu/packages/virtualization.scm | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index b098ef36e0..18b0992dec 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,19 +116,14 @@ (define-public qemu (package (name "qemu") - (version "4.2.0") + (version "5.0.0") (source (origin (method url-fetch) (uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) - (patches (search-patches "qemu-CVE-2020-1711.patch" - "qemu-CVE-2020-7039.patch" - "qemu-CVE-2020-7211.patch" - "qemu-CVE-2020-8608.patch" - "qemu-fix-documentation-build-failure.patch")) (sha256 (base32 - "1w38hzlw7xp05gcq1nhga7hxvndxy6dfcnzi7q2il8ff110isj6k")))) + "1dlcwyshdp94fwd30pddxf9bn2q8dfw5jsvry2gvdj551wmaj4rg")))) (build-system gnu-build-system) (arguments `(;; Running tests in parallel can occasionally lead to failures, like: @@ -169,6 +165,14 @@ '("include") input-directories) #t))) + (add-after 'patch-source-shebangs 'patch-/bin/sh-references + (lambda _ + ;; 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") + (("/bin/sh") (which "sh"))) + #t)) (replace 'configure (lambda* (#:key inputs outputs (configure-flags '()) #:allow-other-keys) @@ -178,8 +182,16 @@ (setenv "SHELL" (which "bash")) ;; While we're at it, patch for tests. - (substitute* "tests/libqtest.c" - (("/bin/sh") (which "sh"))) + (substitute* "tests/qemu-iotests/check" + (("#!/usr/bin/env python3") + (string-append "#!" (which "python3")))) + + ;; 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 configury, and fails. + (substitute* "configure" + (("#!/bin/sh") + (string-append "#!" (which "sh")))) ;; The binaries need to be linked against -lrt. (setenv "LDFLAGS" "-lrt") @@ -218,12 +230,6 @@ exec smbd $@"))) (chmod "samba-wrapper" #o755) (install-file "samba-wrapper" libexec)) #t)) - (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" @@ -245,7 +251,7 @@ exec smbd $@"))) ("libaio" ,libaio) ("libattr" ,attr) ("libcacard" ,libcacard) ; smartcard support - ("libcap" ,libcap) ; virtfs support requires libcap & libattr + ("libcap-ng" ,libcap-ng) ; virtfs support requires libcap-ng & libattr ("libdrm" ,libdrm) ("libepoxy" ,libepoxy) ("libjpeg" ,libjpeg-turbo) -- cgit v1.2.3