summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/patches/qemu-build-info-manual.patch201
-rw-r--r--gnu/packages/virtualization.scm51
2 files changed, 120 insertions, 132 deletions
diff --git a/gnu/packages/patches/qemu-build-info-manual.patch b/gnu/packages/patches/qemu-build-info-manual.patch
index d57b26ea00..c837040d45 100644
--- a/gnu/packages/patches/qemu-build-info-manual.patch
+++ b/gnu/packages/patches/qemu-build-info-manual.patch
@@ -1,90 +1,29 @@
-From 07303a0a4daa83a0555ac4abad7a5d65584307ad Mon Sep 17 00:00:00 2001
+From 2793f47c066ed396b38893c10533202fceb1a05f Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 17 Sep 2020 13:28:19 -0400
-Subject: [PATCH] build: Build and install the info manual.
+Subject: [PATCH] build: Build and install a Texinfo version of the manual.
Take advantage of the Sphinx texinfo backend to generate a QEMU info
-manual. The texinfo format allows for more structure and info readers
+manual. The Texinfo format allows for more structure and info readers
provide more advanced navigation capabilities compared to manpages
readers.
-* configure (infodir): Add the --infodir option, which allows
+* configure (infodir): Add an --infodir option, which allows
configuring the directory under which the info manuals are installed.
-* docs/index.rst: Include the top level documents to prevent
-warnings (treated as errors by sphinx-build).
-* Makefile (sphinxdocs-info, $(MANUAL_BUILDDIR)/QEMU.texi)): New targets.
-(info): Depend on sphinxdocs-info.
-(install-doc): Install the info manual.
+* docs/meson.build (texi, info): New targets.
+
+Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
- Makefile | 13 +++++++++++--
- configure | 7 +++++++
- docs/index.rst | 2 ++
- 3 files changed, 20 insertions(+), 2 deletions(-)
+ configure | 7 ++++++-
+ docs/meson.build | 21 +++++++++++++++++++++
+ meson.build | 2 ++
+ 3 files changed, 29 insertions(+), 1 deletion(-)
-diff --git a/Makefile b/Makefile
-index 13dd708c..da78612d 100644
---- a/Makefile
-+++ b/Makefile
-@@ -864,12 +864,14 @@ endef
- # Note that we deliberately do not install the "devel" manual: it is
- # for QEMU developers, and not interesting to our users.
- .PHONY: install-sphinxdocs
--install-sphinxdocs: sphinxdocs
-+install-sphinxdocs: sphinxdocs sphinxdocs-info
- $(call install-manual,interop)
- $(call install-manual,specs)
- $(call install-manual,system)
- $(call install-manual,tools)
- $(call install-manual,user)
-+ $(INSTALL_DIR) "$(DESTDIR)$(infodir)"
-+ $(INSTALL_DATA) $(MANUAL_BUILDDIR)/QEMU.info "$(DESTDIR)$(infodir)"
-
- install-doc: $(DOCS) install-sphinxdocs
- $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
-@@ -1067,6 +1069,13 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
- $(MANUAL_BUILDDIR)/tools/index.html \
- $(MANUAL_BUILDDIR)/user/index.html
-
-+# Build the complete info manual.
-+.PHONE: sphinxdocs-info
-+sphinxdocs-info: $(MANUAL_BUILDDIR)/QEMU.info
-+
-+$(MANUAL_BUILDDIR)/QEMU.texi: $(call manual-deps,*) $(wildcard $(SRC_PATH)/docs/*.rst)
-+ $(call build-manual,,texinfo)
-+
- # Canned command to build a single manual
- # Arguments: $1 = manual name, $2 = Sphinx builder ('html' or 'man')
- # Note the use of different doctree for each (manual, builder) tuple;
-@@ -1126,7 +1135,7 @@ docs/interop/qemu-ga-qapi.texi: qga/qapi-generated/qga-qapi-doc.texi
- @cp -p $< $@
-
- html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs
--info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
-+info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info sphinxdocs-info
- pdf: docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
- txt: docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
-
diff --git a/configure b/configure
-index 2acc4d14..3691bd2e 100755
+index 18c26e0389..d1ab2c19d1 100755
--- a/configure
+++ b/configure
-@@ -415,6 +415,7 @@ LDFLAGS_SHARED="-shared"
- modules="no"
- module_upgrades="no"
- prefix="/usr/local"
-+infodir="\${prefix}/share/info"
- mandir="\${prefix}/share/man"
- datadir="\${prefix}/share"
- firmwarepath="\${prefix}/share/qemu-firmware"
-@@ -987,6 +988,7 @@ if test "$mingw32" = "yes" ; then
- LIBS="-liberty $LIBS"
- fi
- prefix="c:/Program Files/QEMU"
-+ infodir="\${prefix}"
- mandir="\${prefix}"
- datadir="\${prefix}"
- qemu_docdir="\${prefix}"
-@@ -1087,6 +1089,8 @@ for opt do
+@@ -948,6 +948,8 @@ for opt do
static="yes"
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
;;
@@ -93,47 +32,89 @@ index 2acc4d14..3691bd2e 100755
--mandir=*) mandir="$optarg"
;;
--bindir=*) bindir="$optarg"
-@@ -1780,6 +1784,7 @@ Advanced options (experts only):
+@@ -975,7 +977,7 @@ for opt do
+ --host=*|--build=*|\
+ --disable-dependency-tracking|\
+ --sbindir=*|--sharedstatedir=*|\
+- --oldincludedir=*|--datarootdir=*|--infodir=*|\
++ --oldincludedir=*|--datarootdir=*|\
+ --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
+ # These switches are silently ignored, for compatibility with
+ # autoconf-generated configure scripts. This allows QEMU's
+@@ -1540,6 +1542,7 @@ includedir="${includedir:-$prefix/include}"
+ if test "$mingw32" = "yes" ; then
+ mandir="$prefix"
+ datadir="$prefix"
++ infodir="$prefix"
+ docdir="$prefix"
+ bindir="$prefix"
+ sysconfdir="$prefix"
+@@ -1547,6 +1550,7 @@ if test "$mingw32" = "yes" ; then
+ else
+ mandir="${mandir:-$prefix/share/man}"
+ datadir="${datadir:-$prefix/share}"
++ infodir="${infodir:-$datadir/info}"
+ docdir="${docdir:-$prefix/share/doc}"
+ bindir="${bindir:-$prefix/bin}"
+ sysconfdir="${sysconfdir:-$prefix/etc}"
+@@ -1683,6 +1687,7 @@ Advanced options (experts only):
--smbd=SMBD use specified smbd [$smbd]
--with-git=GIT use specified git [$git]
--static enable static build [$static]
+ --infodir=PATH install info manual in PATH
--mandir=PATH install man pages in PATH
- --datadir=PATH install firmware in PATH$confsuffix
- --docdir=PATH install documentation in PATH$confsuffix
-@@ -6836,6 +6841,7 @@ echo "include directory $(eval echo $includedir)"
- echo "config directory $(eval echo $sysconfdir)"
- if test "$mingw32" = "no" ; then
- echo "local state directory $(eval echo $local_statedir)"
-+echo "Info manual directory $(eval echo $infodir)"
- echo "Manual directory $(eval echo $mandir)"
- echo "ELF interp prefix $interp_prefix"
- else
-@@ -7059,6 +7065,7 @@ echo "bindir=$bindir" >> $config_host_mak
- echo "libdir=$libdir" >> $config_host_mak
- echo "libexecdir=$libexecdir" >> $config_host_mak
- echo "includedir=$includedir" >> $config_host_mak
-+echo "infodir=$infodir" >> $config_host_mak
- echo "mandir=$mandir" >> $config_host_mak
- echo "sysconfdir=$sysconfdir" >> $config_host_mak
- echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
-diff --git a/docs/index.rst b/docs/index.rst
-index 763e3d04..4f155b51 100644
---- a/docs/index.rst
-+++ b/docs/index.rst
-@@ -9,6 +9,7 @@ Welcome to QEMU's documentation!
- .. toctree::
- :maxdepth: 2
- :caption: Contents:
-+ :glob:
+ --datadir=PATH install firmware in PATH/$qemu_suffix
+ --localedir=PATH install translation in PATH/$qemu_suffix
+diff --git a/docs/meson.build b/docs/meson.build
+index ebd85d59f9..1243839461 100644
+--- a/docs/meson.build
++++ b/docs/meson.build
+@@ -114,4 +114,25 @@ if build_docs
+ alias_target('sphinxdocs', sphinxdocs)
+ alias_target('html', sphinxdocs)
+ alias_target('man', sphinxmans)
++
++ # Generate a Texinfo version of the QEMU manual.
++ makeinfo = find_program(['texi2any', 'makeinfo'])
++ if makeinfo.found()
++ sphinxtexi = custom_target(
++ 'QEMU manual generated texinfo source',
++ output: ['QEMU.texi', 'sphinxtexi.stamp'],
++ depfile: 'sphinxtexi.d',
++ command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
++ '-Ddepfile_stamp=@OUTPUT1@', '-b', 'texinfo',
++ meson.current_source_dir(), meson.current_build_dir()])
++ sphinxinfo = custom_target(
++ 'QEMU info manual',
++ input: sphinxtexi,
++ output: 'QEMU.info',
++ install: true,
++ install_dir: get_option('infodir'),
++ command: [makeinfo, '@INPUT0@', '--output=@OUTPUT@'])
++ alias_target('texi', sphinxtexi)
++ alias_target('info', sphinxinfo)
++ endif
+ endif
+diff --git a/meson.build b/meson.build
+index e3386196ba..d64a125ad9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -32,6 +32,7 @@ endif
+ qemu_confdir = get_option('sysconfdir') / get_option('qemu_suffix')
+ qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
+ qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
++qemu_infodir = get_option('infodir') / get_option('qemu_suffix')
+ qemu_moddir = get_option('libdir') / get_option('qemu_suffix')
- system/index
- user/index
-@@ -16,3 +17,4 @@ Welcome to QEMU's documentation!
- interop/index
- specs/index
- devel/index
-+ *
+ qemu_desktopdir = get_option('datadir') / 'applications'
+@@ -1995,6 +1996,7 @@ else
+ summary_info += {'local state directory': 'queried at runtime'}
+ endif
+ summary_info += {'Doc directory': get_option('docdir')}
++summary_info += {'Info directory': get_option('infodir')}
+ summary_info += {'Build directory': meson.current_build_dir()}
+ summary_info += {'Source path': meson.current_source_dir()}
+ summary_info += {'GIT binary': config_host['GIT']}
--
-2.28.0
+2.30.1
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 98aca1e301..0558861173 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -80,6 +81,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)
@@ -135,7 +137,7 @@
(define-public qemu
(package
(name "qemu")
- (version "5.1.0")
+ (version "5.2.0")
(source
(origin
(method url-fetch)
@@ -143,9 +145,9 @@
version ".tar.xz"))
(sha256
(base32
- "1rd41wwlvp0vpialjp2czs6i3lsc338xc72l3zkbb7ixjfslw5y9"))
- (patches (search-patches "qemu-build-info-manual.patch"
- "qemu-CVE-2021-20203.patch"))
+ "1g0pvx4qbirpcn9mni704y03n3lvkmw2c0rbcwvydyr8ns4xh66b"))
+ (patches (search-patches "qemu-CVE-2021-20203.patch"
+ "qemu-build-info-manual.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -161,7 +163,7 @@
(("^([[:blank:]]*)target_ifreq_size[[:blank:]]=.*$" _ indent)
(string-append indent "target_ifreq_size = "
"thunk_type_size(ifreq_max_type, 0);")))))))
- (outputs '("out" "static" "doc")) ;4.7 MiB of HTML docs
+ (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs
(build-system gnu-build-system)
(arguments
;; FIXME: Disable tests on i686 to work around
@@ -214,33 +216,37 @@
(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)
(string-append "# " all)))))
- (add-after 'unpack 'patch-test-shebangs
- (lambda _
- (substitute* "tests/qemu-iotests/check"
- (("#!/usr/bin/env python3")
- (string-append "#!" (which "python3"))))))
- (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")))))
+ (("/bin/sh") (which "sh")))
+ (substitute* "Makefile"
+ (("SHELL = /usr/bin/env bash -o pipefail")
+ "SHELL = bash -o pipefail"))
+ (substitute* "tests/qemu-iotests/check"
+ (("#!/usr/bin/env python3")
+ (string-append "#!" (which "python3"))))))
+ (add-before 'configure 'fix-optionrom-makefile
+ (lambda _
+ ;; Work around the inability of the rules defined in this
+ ;; Makefile to locate the firmware files (e.g.: No rule to make
+ ;; target 'multiboot.bin') by extending the VPATH.
+ (substitute* "pc-bios/optionrom/Makefile"
+ (("^VPATH = \\$\\(SRC_DIR\\)")
+ "VPATH = $(SRC_DIR):$(TOPSRC_DIR)/pc-bios"))))
+ ;; XXX ./configure is being re-run at beginning of build phase...
(replace 'configure
(lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
;; The `configure' script doesn't understand some of the
@@ -249,7 +255,7 @@
(setenv "SHELL" (which "bash"))
;; 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"))))
@@ -288,7 +294,7 @@
(bin (string-append static "/bin")))
(with-directory-excursion "../user-static"
(for-each (cut install-file <> bin)
- (append-map (cut find-files <> "^qemu-")
+ (append-map (cut find-files <> "^qemu-" #:stat stat)
(scandir "."
(cut string-suffix?
"-linux-user" <>))))))))
@@ -345,6 +351,7 @@ exec smbd $@")))
("perl" ,perl)
("flex" ,flex)
("bison" ,bison)
+ ("ninja" ,ninja)
("pkg-config" ,pkg-config)
("python-wrapper" ,python-wrapper)
("python-sphinx" ,python-sphinx)