Skip to content
Snippets Groups Projects
  1. Mar 16, 2023
    • Peter Maydell's avatar
      docs/sphinx/kerneldoc.py: Honour --enable-werror · 36420664
      Peter Maydell authored
      Currently, the kerneldoc Sphinx plugin doesn't honour the
      --enable-werror configure option, so its warnings are never fatal.
      This is because although we do pass sphinx-build the -W switch, the
      warnings from kerneldoc are produced by the scripts/kernel-doc script
      directly and don't go through Sphinx's "emit a warning" function.
      
      When --enable-werror is in effect, pass sphinx-build an extra
      argument -Dkerneldoc_werror=1.  The kerneldoc plugin can then use
      this to determine whether it should be passing the kernel-doc script
      -Werror.
      
      We do this because there is no documented mechanism for
      a Sphinx plugin to determine whether sphinx-build was
      passed -W or not; if one is provided then we can switch to
      that at a later date:
      https://github.com/sphinx-doc/sphinx/issues/11239
      
      
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20230314114431.1096972-1-peter.maydell@linaro.org>
      Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
      36420664
  2. Feb 27, 2023
    • John Snow's avatar
      meson: stop looking for 'sphinx-build-3' · 1b1be8d3
      John Snow authored
      
      Once upon a time, "sphinx-build" on certain RPM platforms invoked
      specifically a Python 2.x version, while "sphinx-build-3" was a distro
      shim for the Python 3.x version.
      
      These days, none of our supported platforms utilize a 2.x version, and
      those that still have 'sphinx-build-3' make it a symbolic link to
      'sphinx-build'.  Not searching for 'sphinx-build-3' will prefer
      pip/venv installed versions of sphinx if they're available.
      
      This adds an extremely convenient ability to test document building
      ability in QEMU across multiple versions of Sphinx for the purposes of
      compatibility testing.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-Id: <20230221012456.2607692-6-jsnow@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      1b1be8d3
  3. Feb 16, 2023
  4. May 07, 2022
  5. Feb 21, 2022
  6. Dec 18, 2021
  7. Nov 08, 2021
  8. Oct 14, 2021
  9. Oct 05, 2021
  10. Aug 25, 2021
  11. Jul 18, 2021
    • Peter Maydell's avatar
      docs: Add license note to the HTML page footer · 13f934e7
      Peter Maydell authored
      
      The standard Sphinx/RTD HTML page footer gives a copyright line
      (based on the 'copyright' variable set in conf.py) and a line "Built
      with Sphinx using a theme provided by Read the Docs" (which can be
      disabled via the html_show_sphinx variable, but we leave it enabled).
      As a free software project, we'd like to also mention the license
      QEMU and its manual are released under.
      
      Add a template footer.html which defines the 'extrafooter' block that
      the RtD theme provides for this purpose.  The new line of text will
      go below the existing copyright and sphinx-acknowledgement lines.
      (Unfortunately the RTD footer template does not permit putting it
      after the copyright but before the sphinx-acknowledgement.)
      
      We use the templating functionality to make the new text also be a
      hyperlink to the about/license.html page of the manual.
      
      Unlike rst files, HTML template files are not reported to our depfile
      plugin, so we maintain a manual list in meson.build.  New template
      files should be rare, so not being able to auto-generate the
      dependency info is not too awkward.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Acked-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20210705095547.15790-7-peter.maydell@linaro.org
      13f934e7
  12. May 14, 2021
    • Marc-André Lureau's avatar
      sphinx: adopt kernel readthedoc theme · 73e6aec6
      Marc-André Lureau authored
      
      The default "alabaster" sphinx theme has a couple shortcomings:
      - the navbar moves along the page
      - the search bar is not always at the same place
      - it lacks some contrast and colours
      
      The "rtd" theme from readthedocs.org is a popular third party theme used
      notably by the kernel, with a custom style sheet. I like it better,
      perhaps others do too. It also simplifies the "Edit on Gitlab" links.
      
      Tweak a bit the custom theme to match qemu.org style, use the
      QEMU logo, and favicon etc.
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Message-Id: <20210323115328.4146052-1-marcandre.lureau@redhat.com>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      73e6aec6
  13. Feb 08, 2021
  14. Jan 19, 2021
    • Peter Maydell's avatar
      docs: Build and install all the docs in a single manual · b93f4fbd
      Peter Maydell authored
      
      When we first converted our documentation to Sphinx, we split it into
      multiple manuals (system, interop, tools, etc), which are all built
      separately.  The primary driver for this was wanting to be able to
      avoid shipping the 'devel' manual to end-users.  However, this is
      working against the grain of the way Sphinx wants to be used and
      causes some annoyances:
       * Cross-references between documents become much harder or
         possibly impossible
       * There is no single index to the whole documentation
       * Within one manual there's no links or table-of-contents info
         that lets you easily navigate to the others
       * The devel manual doesn't get published on the QEMU website
         (it would be nice to able to refer to it there)
      
      Merely hiding our developer documentation from end users seems like
      it's not enough benefit for these costs.  Combine all the
      documentation into a single manual (the same way that the readthedocs
      site builds it) and install the whole thing.  The previous manual
      divisions remain as the new top level sections in the manual.
      
       * The per-manual conf.py files are no longer needed
       * The man_pages[] specifications previously in each per-manual
         conf.py move to the top level conf.py
       * docs/meson.build logic is simplified as we now only need to run
         Sphinx once for the HTML and then once for the manpages5B
       * The old index.html.in that produced the top-level page with
         links to each manual is no longer needed
      
      Unfortunately this means that we now have to build the HTML
      documentation into docs/manual in the build tree rather than directly
      into docs/; otherwise it is too awkward to ensure we install only the
      built manual and not also the dependency info, stamp file, etc.  The
      manual still ends up in the same place in the final installed
      directory, but anybody who was consulting documentation from within
      the build tree will have to adjust where they're looking.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20210115154449.4801-1-peter.maydell@linaro.org
      b93f4fbd
  15. Jan 12, 2021
  16. Dec 18, 2020
    • Stefan Hajnoczi's avatar
      docs: generate qemu-storage-daemon-qmp-ref(7) man page · 23c02ace
      Stefan Hajnoczi authored
      
      Although individual qemu-storage-daemon QMP commands are identical to
      QEMU QMP commands, qemu-storage-daemon only supports a subset of QEMU's
      QMP commands. Generate a manual page of just the commands supported by
      qemu-storage-daemon so that users know exactly what is available in
      qemu-storage-daemon.
      
      Add an h1 heading in storage-daemon/qapi/qapi-schema.json so that
      block-core.json is at the h2 heading level.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <20201209103802.350848-2-stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      23c02ace
  17. Dec 15, 2020
  18. Nov 23, 2020
  19. Nov 03, 2020
  20. Oct 17, 2020
  21. Sep 29, 2020
    • Peter Maydell's avatar
      meson.build: Make manuals depend on source to Sphinx extensions · b3f4830a
      Peter Maydell authored
      
      The automatic dependency handling for Sphinx manuals only makes the output
      depend on the input documentation files. This means that if you edit
      the Python source of an extension then the documentation won't be
      rebuilt.
      
      Create a list of all the source files for the extensions and add
      it to the dependencies for the manuals. This is similar to how we
      handle the qapi_gen_depends list.
      
      Because we don't try to identify which manuals are using which
      Sphinx extensions, a change to the source of one extension will
      always rebuild the entire manual set, not merely the manuals
      which have changed. This is acceptable because we don't change
      the extensions all that often.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-15-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Re rebuilding the enitre manual set being acceptable "because we
      don't change the extensions all that often": we also rebuild it when
      the QAPI generator code the qapidoc extension depends on changes.
      This will inconvenience QAPI developers.  Can't be helped now.]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      b3f4830a
    • Peter Maydell's avatar
      meson.build: Move SPHINX_ARGS to top level meson.build file · eb937365
      Peter Maydell authored
      
      We're going to want to use SPHINX_ARGS in both docs/meson.build
      and tests/qapi-schema/meson.build. Move the definition up to the
      top level file so it is available to both subdirectories.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-14-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      eb937365
    • Peter Maydell's avatar
      docs/interop: Convert qemu-qmp-ref to rST · 4ac2ee19
      Peter Maydell authored
      
      Convert qemu-qmp-ref to rST format. This includes dropping
      the plain-text, pdf and info format outputs for this document;
      as with all our other Sphinx-based documentation, we provide
      HTML and manpage only.
      
      The qemu-qmp-ref.rst is somewhat more stripped down than
      the .texi was, because we do not (currently) attempt to
      generate indexes for the commands, events and data types
      being documented.
      
      Again, we drop the direct link from index.html.in now that
      the QMP ref is part of the interop manual.
      
      This commit removes the code from the root meson.build file that
      handled the various Texinfo-based outputs, because we no longer
      generate any documentation except for the Sphinx HTML manuals and the
      manpages, and the code can't handle having an empty list of files
      to process.. We'll do further cleanup of the remainders of
      Texinfo support in subsequent commits.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-10-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Unicode legacy literal dumbed down to plain string literal, TODO
      comment on displaying QEMU version added, "make html" fixed,
      storage-daemon/qapi/meson.build updated]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      4ac2ee19
    • Peter Maydell's avatar
      docs/interop: Convert qemu-ga-ref to rST · db16115f
      Peter Maydell authored
      
      Convert qemu-ga-ref to rST format. This includes dropping
      the plain-text, pdf and info format outputs for this document;
      as with all our other Sphinx-based documentation, we provide
      HTML and manpage only.
      
      The qemu-ga-ref.rst is somewhat more stripped down than
      the .texi was, because we do not (currently) attempt to
      generate indexes for the commands, events and data types
      being documented.
      
      As the GA ref is now part of the Sphinx 'interop' manual,
      we can delete the direct link from index.html.in.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-9-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Unicode legacy literal dumbed down to plain string literal, TODO
      comment on displaying QEMU version added]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      db16115f
  22. Sep 01, 2020
    • Marc-André Lureau's avatar
      meson: pass docdir option · 491e74c1
      Marc-André Lureau authored
      
      When cross-compiling, by default qemu_docdir is 'c:\Program Files\QEMU\'
      which is not recognized as being an absolute path, and meson will end up
      adding the prefix again.
      
      Add an option to pass docdir location to meson, pre-prefixed like we do
      with other directories, build qemu_docdir with the common suffix and use
      that instead of config_host['qemu_docdir'].
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20200826110419.528931-7-marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      491e74c1
  23. Aug 21, 2020
Loading