Skip to content
Snippets Groups Projects
  1. Feb 16, 2023
  2. Feb 02, 2023
  3. Jun 27, 2022
  4. Jan 28, 2022
  5. Dec 21, 2021
  6. Nov 08, 2021
  7. Jul 18, 2021
  8. Jun 03, 2021
  9. 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
  10. 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
  11. Nov 10, 2020
  12. Oct 17, 2020
  13. Oct 02, 2020
  14. Sep 29, 2020
    • Peter Maydell's avatar
      docs/sphinx: Add new qapi-doc Sphinx extension · 4078ee54
      Peter Maydell authored
      
      Some of our documentation is auto-generated from documentation
      comments in the JSON schema.
      
      For Sphinx, rather than creating a file to include, the most natural
      way to handle this is to have a small custom Sphinx extension which
      processes the JSON file and inserts documentation into the rST
      file being processed.
      
      This is the same approach that kerneldoc and hxtool use.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20200925162316.21205-8-peter.maydell@linaro.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Comment and doc string formatting tweaked, unused method dropped,
      a few line breaks tweaked to follow PEP 8 more closely, MAINTAINERS
      section QAPI updated]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      4078ee54
  15. Aug 21, 2020
  16. Apr 14, 2020
    • Peter Maydell's avatar
      docs: Require Sphinx 1.6 or better · bf3f8573
      Peter Maydell authored
      Versions of Sphinx older than 1.6 can't build all of our documentation,
      because they are too picky about the syntax of the argument to the
      option:: directive; see Sphinx bugs #646, #3366:
      
        https://github.com/sphinx-doc/sphinx/issues/646
        https://github.com/sphinx-doc/sphinx/issues/3366
      
      
      
      Trying to build with a 1.4.x Sphinx fails with
       docs/system/images.rst:4: SEVERE: Duplicate ID: "cmdoption-qcow2-arg-encrypt"
      and a 1.5.x Sphinx fails with
       docs/system/invocation.rst:544: WARNING: Malformed option description '[enable=]PATTERN', should look like "opt", "-opt
      args", "--opt args", "/opt args" or "+opt args"
      
      Update our needs_sphinx setting to indicate that we require at least
      1.6.  This will allow configure to fall back to "don't build the
      docs" rather than causing the build to fail entirely, which is
      probably what most users building on a host old enough to have such
      an old Sphinx would want; if they do want the docs then they'll have
      a useful indication of what they need to do (upgrade Sphinx!) rather
      than a confusing error message.
      
      In theory our distro support policy would suggest that we should
      support building on the Sphinx shipped in those distros, but:
       * EPEL7 has Sphinx 1.2.3 (which we've never supported!)
       * Debian Stretch has Sphinx 1.4.8
      
      Trying to get our docs to work with Sphinx 1.4 is not tractable
      for the 5.0 release and I'm not sure it's worthwhile effort anyway;
      at least with this change the build as a whole now succeeds.
      
      Thanks to John Snow for doing the investigation and testing to
      confirm what Sphinx versions fail in what ways and what distros
      shipped what.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      bf3f8573
  17. Mar 30, 2020
  18. Mar 22, 2020
  19. Mar 06, 2020
  20. Feb 15, 2020
    • Peter Maydell's avatar
      configure: Check that sphinx-build is using Python 3 · 758b617a
      Peter Maydell authored
      
      Currently configure's has_sphinx_build() check simply runs a dummy
      sphinx-build and either passes or fails.  This means that "no
      sphinx-build at all" and "sphinx-build exists but is too old" are
      both reported the same way.
      
      Further, we want to assume that all the Python we write is running
      with at least Python 3.5; configure checks that for our scripts, but
      Sphinx extensions run with whatever Python version sphinx-build
      itself is using.
      
      Add a check to our conf.py which makes sphinx-build fail if it would
      be running our extensions with an old Python, and handle this
      in configure so we can report failure helpfully to the user.
      This will mean that configure --enable-docs will fail like this
      if the sphinx-build provided is not suitable:
      
      Warning: sphinx-build exists but it is either too old or uses too old a Python version
      
      ERROR: User requested feature docs
             configure was not able to find it.
             Install texinfo, Perl/perl-podlators and a Python 3 version of python-sphinx
      
      (As usual, the default is to simply not build the docs, as we would
      if sphinx-build wasn't present at all.)
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarWainer dos Santos Moschetta <wainersm@redhat.com>
      Message-Id: <20200213175647.17628-3-peter.maydell@linaro.org>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      758b617a
  21. Feb 03, 2020
    • Peter Maydell's avatar
      docs/sphinx: Add new hxtool Sphinx extension · 6803d6e9
      Peter Maydell authored
      
      Some of our documentation includes sections which are created
      by assembling fragments of texinfo from a .hx source file into
      a .texi file, which is then included from qemu-doc.texi or
      qemu-img.texi.
      
      For Sphinx, rather than creating a file to include, the most natural
      way to handle this is to have a small custom Sphinx extension which
      reads the .hx file and process it.  So instead of:
       * makefile produces foo.texi from foo.hx
       * qemu-doc.texi says '@include foo.texi'
      we have:
       * qemu-doc.rst says 'hxtool-doc:: foo.hx'
       * the Sphinx extension for hxtool has code that runs to handle that
         Sphinx directive which reads the .hx file and emits the appropriate
         documentation contents
      
      This is pretty much the same way the kerneldoc extension works right
      now. It also has the advantage that it should work for third-party
      services like readthedocs that expect to build the docs directly with
      sphinx rather than by invoking our makefiles.
      
      In this commit we implement the hxtool extension.
      
      Note that syntax errors in the rST fragments will be correctly
      reported to the user with the filename and line number within the
      hx file.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Tested-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20200124162606.8787-4-peter.maydell@linaro.org
      6803d6e9
  22. Dec 17, 2019
  23. Sep 13, 2019
  24. Jul 10, 2019
  25. Mar 07, 2019
Loading