From 37e261512f5b3a3e7544c31d2b001d71c547d08c Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 28 Nov 2020 00:33:13 -0500 Subject: [PATCH] WIP: QEMU: Update to 5.2.0-rc4. * gnu/packages/virtualization.scm (qemu): Update to 5.2.0-rc4. [source]: TODO Update patch building the info manual. [arguments]: Adjust the 'disable-unusable-tests' for the new Meson build system. Generalize the 'patch-/bin/sh-references' into a 'patch-paths' phase, and move an instance of path patching into it from the 'configure' phase. [native-inputs]: Add ninja. * gnu/packages/patches/qemu-build-info-manual.patch: Adjust to 5.2.0-rc4. --- gnu/packages/virtualization.scm | 34 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 466e9d1ac5..e2b2508efa 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -80,6 +80,7 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) + #:use-module (gnu packages ninja) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) #:use-module (gnu packages perl) @@ -132,15 +133,16 @@ (define-public qemu (package (name "qemu") - (version "5.1.0") + (version "5.2.0-rc4") (source (origin (method url-fetch) (uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) (sha256 (base32 - "1rd41wwlvp0vpialjp2czs6i3lsc338xc72l3zkbb7ixjfslw5y9")) - (patches (search-patches "qemu-build-info-manual.patch")))) + "10xsnw9sscknb6abd4h45k6gjzhqpdrvk9h8djbh7y1vh1zg76i9")) +; (patches (search-patches "qemu-build-info-manual.patch")) +)) (outputs '("out" "doc")) ;4.7 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -188,30 +190,28 @@ (string-append match "9"))))) (add-after 'unpack 'disable-unusable-tests (lambda _ - (substitute* "tests/Makefile.include" + (substitute* "tests/meson.build" ;; Comment out the test-qga test, which needs /sys and ;; fails within the build environment. - (("check-unit-.* tests/test-qga" all) + (("tests.*test-qga.*$" all) (string-append "# " all)) ;; Comment out the test-char test, which needs networking and ;; fails within the build environment. - (("check-unit-.* tests/test-char" all) - (string-append "# " all))) - (substitute* "tests/qtest/Makefile.include" - ;; Disable the following test, which triggers a crash on some - ;; x86 CPUs (see https://issues.guix.info/43048 and - ;; https://bugs.launchpad.net/qemu/+bug/1896263). - (("check-qtest-i386-y \\+= bios-tables-test" all) + (("'test-char':.*$" all) (string-append "# " all))) #t)) - (add-after 'patch-source-shebangs 'patch-/bin/sh-references + (add-after 'patch-source-shebangs 'patch-embedded-shebangs (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"))) + (substitute* "tests/qemu-iotests/check" + (("#!/usr/bin/env python3") + (string-append "#!" (which "python3")))) #t)) + ;; XXX ./configure is being re-run at beginning of build phase... (replace 'configure (lambda* (#:key inputs outputs (configure-flags '()) #:allow-other-keys) @@ -220,14 +220,9 @@ (let ((out (assoc-ref outputs "out"))) (setenv "SHELL" (which "bash")) - ;; While we're at it, patch for tests. - (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. + ;; attempts to re-run the whole configuration, and fails. (substitute* "configure" (("#!/bin/sh") (string-append "#!" (which "sh")))) @@ -302,6 +297,7 @@ exec smbd $@"))) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper) ("python-sphinx" ,python-sphinx) + ("ninja" ,ninja) ("texinfo" ,texinfo))) (home-page "https://www.qemu.org") (synopsis "Machine emulator and virtualizer") -- 2.29.2