qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 00/11] Sphinx patches
@ 2021-11-05 13:32 marcandre.lureau
  2021-11-05 13:32 ` [PULL 01/11] docs/sphinx: add loaded modules to generated depfile marcandre.lureau
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit 18e356a53a2926a15343b914db64324d63748f25:

  Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-6.2-041121-2' into staging (2021-11-04 08:33:46 -0400)

are available in the Git repository at:

  git@gitlab.com:marcandre.lureau/qemu.git tags/sphinx-pull-request

for you to fetch changes up to e6e89422ed6907d14ea67f2b99269e6b5554d6be:

  docs/sphinx: change default role to "any" (2021-11-05 17:22:04 +0400)

----------------------------------------------------------------
Some Sphinx improvements

PR for 2 series:
https://patchew.org/QEMU/20211015105344.152591-1-marcandre.lureau@redhat.com/
https://patchew.org/QEMU/20211004215238.1523082-1-jsnow@redhat.com/

----------------------------------------------------------------

John Snow (3):
  docs: remove non-reference uses of single backticks
  docs: (further) remove non-reference uses of single backticks
  docs/sphinx: change default role to "any"

Marc-André Lureau (8):
  docs/sphinx: add loaded modules to generated depfile
  docs/sphinx: add static files to generated depfile
  docs/sphinx: add templates files to generated depfile
  tests/qapi-schema/meson: add depfile to sphinx doc
  meson: drop sphinx_extn_depends
  meson: drop sphinx_template_files
  docs/sphinx: set navigation_with_keys=True
  docs/sphinx: add 's' keyboard binding to focus search

 docs/conf.py                           | 12 +++++++++++-
 docs/devel/build-system.rst            | 16 ++++++++--------
 docs/devel/fuzzing.rst                 |  9 +++++----
 docs/devel/tcg-plugins.rst             |  2 +-
 docs/interop/live-block-operations.rst |  2 +-
 docs/meson.build                       | 10 ----------
 docs/sphinx-static/custom.js           |  9 +++++++++
 docs/sphinx/depfile.py                 | 19 +++++++++++++++++--
 docs/system/guest-loader.rst           |  2 +-
 docs/system/i386/sgx.rst               |  6 +++---
 qapi/block-core.json                   |  4 ++--
 include/qemu/module.h                  |  6 +++---
 qemu-options.hx                        |  4 ++--
 tests/qapi-schema/meson.build          |  6 ++++--
 14 files changed, 67 insertions(+), 40 deletions(-)
 create mode 100644 docs/sphinx-static/custom.js

-- 
2.33.0.721.g106298f7f9




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PULL 01/11] docs/sphinx: add loaded modules to generated depfile
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 02/11] docs/sphinx: add static files " marcandre.lureau
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/sphinx/depfile.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py
index 277fdf0f5680..b6fb926df11d 100644
--- a/docs/sphinx/depfile.py
+++ b/docs/sphinx/depfile.py
@@ -12,6 +12,7 @@
 
 import os
 import sphinx
+import sys
 
 __version__ = '1.0'
 
@@ -20,8 +21,17 @@ def get_infiles(env):
         yield env.doc2path(x)
         yield from ((os.path.join(env.srcdir, dep)
                     for dep in env.dependencies[x]))
+    for mod in sys.modules.values():
+        if hasattr(mod, '__file__'):
+            if mod.__file__:
+                yield mod.__file__
 
-def write_depfile(app, env):
+
+def write_depfile(app, exception):
+    if exception:
+        return
+
+    env = app.env
     if not env.config.depfile:
         return
 
@@ -42,7 +52,7 @@ def write_depfile(app, env):
 def setup(app):
     app.add_config_value('depfile', None, 'env')
     app.add_config_value('depfile_stamp', None, 'env')
-    app.connect('env-updated', write_depfile)
+    app.connect('build-finished', write_depfile)
 
     return dict(
         version = __version__,
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 02/11] docs/sphinx: add static files to generated depfile
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
  2021-11-05 13:32 ` [PULL 01/11] docs/sphinx: add loaded modules to generated depfile marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 03/11] docs/sphinx: add templates " marcandre.lureau
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/sphinx/depfile.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py
index b6fb926df11d..99539adb4892 100644
--- a/docs/sphinx/depfile.py
+++ b/docs/sphinx/depfile.py
@@ -13,6 +13,7 @@
 import os
 import sphinx
 import sys
+from pathlib import Path
 
 __version__ = '1.0'
 
@@ -25,6 +26,10 @@ def get_infiles(env):
         if hasattr(mod, '__file__'):
             if mod.__file__:
                 yield mod.__file__
+    # this is perhaps going to include unused files:
+    for static_path in env.config.html_static_path:
+        for path in Path(static_path).rglob('*'):
+            yield str(path)
 
 
 def write_depfile(app, exception):
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 03/11] docs/sphinx: add templates files to generated depfile
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
  2021-11-05 13:32 ` [PULL 01/11] docs/sphinx: add loaded modules to generated depfile marcandre.lureau
  2021-11-05 13:32 ` [PULL 02/11] docs/sphinx: add static files " marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 04/11] tests/qapi-schema/meson: add depfile to sphinx doc marcandre.lureau
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/conf.py           | 2 +-
 docs/sphinx/depfile.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index ff6e92c6e2e6..edc2bf8fcba7 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -74,7 +74,7 @@
 extensions = ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile', 'qapidoc']
 
 # Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = [os.path.join(qemu_docdir, '_templates')]
 
 # The suffix(es) of source filenames.
 # You can specify multiple suffix as a list of string:
diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py
index 99539adb4892..afdcbcec6e76 100644
--- a/docs/sphinx/depfile.py
+++ b/docs/sphinx/depfile.py
@@ -27,7 +27,7 @@ def get_infiles(env):
             if mod.__file__:
                 yield mod.__file__
     # this is perhaps going to include unused files:
-    for static_path in env.config.html_static_path:
+    for static_path in env.config.html_static_path + env.config.templates_path:
         for path in Path(static_path).rglob('*'):
             yield str(path)
 
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 04/11] tests/qapi-schema/meson: add depfile to sphinx doc
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (2 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 03/11] docs/sphinx: add templates " marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 05/11] meson: drop sphinx_extn_depends marcandre.lureau
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/qapi-schema/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index df5acfd08b6b..3676729fbb06 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -238,10 +238,11 @@ if build_docs
   # fuzzy comparison if future Sphinx versions produce different text,
   # but for now the simple comparison suffices.
   qapi_doc_out = custom_target('QAPI rST doc',
-                               output: ['doc-good.txt'],
+                               output: ['doc-good.txt', 'doc-good.stamp'],
                                input: files('doc-good.json', 'doc-good.rst'),
                                build_by_default: true,
                                depend_files: sphinx_extn_depends,
+                               depfile: 'docs.d',
                                # We use -E to suppress Sphinx's caching, because
                                # we want it to always really run the QAPI doc
                                # generation code. It also means we don't
@@ -250,6 +251,8 @@ if build_docs
                                          '-b', 'text', '-E',
                                          '-c', meson.project_source_root() / 'docs',
                                          '-D', 'master_doc=doc-good',
+                                         '-Ddepfile=@DEPFILE@',
+                                         '-Ddepfile_stamp=@OUTPUT1@',
                                          meson.current_source_dir(),
                                          meson.current_build_dir()])
 
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 05/11] meson: drop sphinx_extn_depends
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (3 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 04/11] tests/qapi-schema/meson: add depfile to sphinx doc marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 06/11] meson: drop sphinx_template_files marcandre.lureau
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Module dependencies is now handled by depfile.py.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/meson.build              | 9 +--------
 tests/qapi-schema/meson.build | 1 -
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/docs/meson.build b/docs/meson.build
index 19cce670a20d..34fda6853d9e 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -37,13 +37,6 @@ endif
 if build_docs
   SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']]
 
-  sphinx_extn_depends = [ meson.current_source_dir() / 'sphinx/depfile.py',
-                          meson.current_source_dir() / 'sphinx/hxtool.py',
-                          meson.current_source_dir() / 'sphinx/kerneldoc.py',
-                          meson.current_source_dir() / 'sphinx/kernellog.py',
-                          meson.current_source_dir() / 'sphinx/qapidoc.py',
-                          meson.current_source_dir() / 'sphinx/qmp_lexer.py',
-                          qapi_gen_depends ]
   sphinx_template_files = [ meson.project_source_root() / 'docs/_templates/footer.html' ]
 
   have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT')
@@ -77,7 +70,7 @@ if build_docs
                 output: 'docs.stamp',
                 input: files('conf.py'),
                 depfile: 'docs.d',
-                depend_files: [ sphinx_extn_depends, sphinx_template_files ],
+                depend_files: [ sphinx_template_files ],
                 command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
                           '-Ddepfile_stamp=@OUTPUT0@',
                           '-b', 'html', '-d', private_dir,
diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index 3676729fbb06..e505bf709ad3 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -241,7 +241,6 @@ if build_docs
                                output: ['doc-good.txt', 'doc-good.stamp'],
                                input: files('doc-good.json', 'doc-good.rst'),
                                build_by_default: true,
-                               depend_files: sphinx_extn_depends,
                                depfile: 'docs.d',
                                # We use -E to suppress Sphinx's caching, because
                                # we want it to always really run the QAPI doc
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 06/11] meson: drop sphinx_template_files
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (4 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 05/11] meson: drop sphinx_extn_depends marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 07/11] docs/sphinx: set navigation_with_keys=True marcandre.lureau
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Static files dependencies is now handled by depfile.py.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/meson.build | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/docs/meson.build b/docs/meson.build
index 34fda6853d9e..27c6e156fff8 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -37,8 +37,6 @@ endif
 if build_docs
   SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']]
 
-  sphinx_template_files = [ meson.project_source_root() / 'docs/_templates/footer.html' ]
-
   have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT')
 
   man_pages = {
@@ -70,7 +68,6 @@ if build_docs
                 output: 'docs.stamp',
                 input: files('conf.py'),
                 depfile: 'docs.d',
-                depend_files: [ sphinx_template_files ],
                 command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
                           '-Ddepfile_stamp=@OUTPUT0@',
                           '-b', 'html', '-d', private_dir,
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 07/11] docs/sphinx: set navigation_with_keys=True
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (5 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 06/11] meson: drop sphinx_template_files marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 08/11] docs/sphinx: add 's' keyboard binding to focus search marcandre.lureau
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Allow navigating to the previous/next page using the keyboard's left and
right arrows. I wish this would be the default, and that the themes
would provide more key navigation, but that doesn't seem on the roadmap.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/conf.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/conf.py b/docs/conf.py
index edc2bf8fcba7..f536483bc3d5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -166,6 +166,7 @@
 if LooseVersion(sphinx_rtd_theme.__version__) >= LooseVersion("0.4.3"):
     html_theme_options = {
         "style_nav_header_background": "#802400",
+        "navigation_with_keys": True,
     }
 
 html_logo = os.path.join(qemu_docdir, "../ui/icons/qemu_128x128.png")
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 08/11] docs/sphinx: add 's' keyboard binding to focus search
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (6 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 07/11] docs/sphinx: set navigation_with_keys=True marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 09/11] docs: remove non-reference uses of single backticks marcandre.lureau
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

This is pretty ubiquitous. ('/' is already taken by some browsers for
quick search)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/conf.py                 | 4 ++++
 docs/sphinx-static/custom.js | 9 +++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 docs/sphinx-static/custom.js

diff --git a/docs/conf.py b/docs/conf.py
index f536483bc3d5..3161b8b127c6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -182,6 +182,10 @@
     'theme_overrides.css',
 ]
 
+html_js_files = [
+    'custom.js',
+]
+
 html_context = {
     "display_gitlab": True,
     "gitlab_user": "qemu-project",
diff --git a/docs/sphinx-static/custom.js b/docs/sphinx-static/custom.js
new file mode 100644
index 000000000000..71a86053051b
--- /dev/null
+++ b/docs/sphinx-static/custom.js
@@ -0,0 +1,9 @@
+document.addEventListener('keydown', (event) => {
+    // find a better way to look it up?
+    let search_input = document.getElementsByName('q')[0];
+
+    if (event.code === 'KeyS' && document.activeElement !== search_input) {
+        event.preventDefault();
+        search_input.focus();
+    }
+});
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 09/11] docs: remove non-reference uses of single backticks
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (7 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 08/11] docs/sphinx: add 's' keyboard binding to focus search marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 10/11] docs: (further) " marcandre.lureau
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Snow, Peter Maydell, Richard Henderson

From: John Snow <jsnow@redhat.com>

The single backtick markup in ReST is the "default role". Currently,
Sphinx's default role is called "content". Sphinx suggests you can use
the "Any" role instead to turn any single-backtick enclosed item into a
cross-reference.

This is useful for things like autodoc for Python docstrings, where it's
often nicer to reference other types with `foo` instead of the more
laborious :py:meth:`foo`. It's also useful in multi-domain cases to
easily reference definitions from other Sphinx domains, such as
referencing C code definitions from outside of kerneldoc comments.

Before we do that, though, we'll need to turn all existing usages of the
"content" role to inline verbatim markup wherever it does not correctly
resolve into a cross-refernece by using double backticks instead.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20211004215238.1523082-2-jsnow@redhat.com>
---
 docs/devel/fuzzing.rst                 | 9 +++++----
 docs/devel/tcg-plugins.rst             | 2 +-
 docs/interop/live-block-operations.rst | 2 +-
 docs/system/guest-loader.rst           | 2 +-
 qapi/block-core.json                   | 4 ++--
 include/qemu/module.h                  | 6 +++---
 qemu-options.hx                        | 4 ++--
 7 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst
index 2749bb9bed36..784ecb99e667 100644
--- a/docs/devel/fuzzing.rst
+++ b/docs/devel/fuzzing.rst
@@ -182,10 +182,11 @@ The output should contain a complete list of matched MemoryRegions.
 
 OSS-Fuzz
 --------
-QEMU is continuously fuzzed on `OSS-Fuzz` __(https://github.com/google/oss-fuzz).
-By default, the OSS-Fuzz build will try to fuzz every fuzz-target. Since the
-generic-fuzz target requires additional information provided in environment
-variables, we pre-define some generic-fuzz configs in
+QEMU is continuously fuzzed on `OSS-Fuzz
+<https://github.com/google/oss-fuzz>`_.  By default, the OSS-Fuzz build
+will try to fuzz every fuzz-target. Since the generic-fuzz target
+requires additional information provided in environment variables, we
+pre-define some generic-fuzz configs in
 ``tests/qtest/fuzz/generic_fuzz_configs.h``. Each config must specify:
 
 - ``.name``: To identify the fuzzer config
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index 59a7d838bee3..f93ef4fe52a4 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -211,7 +211,7 @@ The hotpages plugin can be configured using the following arguments:
 
 This is an instruction classifier so can be used to count different
 types of instructions. It has a number of options to refine which get
-counted. You can give a value to the `count` argument for a class of
+counted. You can give a value to the ``count`` argument for a class of
 instructions to break it down fully, so for example to see all the system
 registers accesses::
 
diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-block-operations.rst
index 9e3635b23386..814c29bbe1df 100644
--- a/docs/interop/live-block-operations.rst
+++ b/docs/interop/live-block-operations.rst
@@ -640,7 +640,7 @@ at this point:
         (QEMU) block-job-complete device=job0
 
 In either of the above cases, if you once again run the
-`query-block-jobs` command, there should not be any active block
+``query-block-jobs`` command, there should not be any active block
 operation.
 
 Comparing 'commit' and 'mirror': In both then cases, the overlay images
diff --git a/docs/system/guest-loader.rst b/docs/system/guest-loader.rst
index 4320d1183f73..9ef9776bf07b 100644
--- a/docs/system/guest-loader.rst
+++ b/docs/system/guest-loader.rst
@@ -51,4 +51,4 @@ The full syntax of the guest-loader is::
 
 ``bootargs=<args>``
   This is an optional field for kernel blobs which will pass command
-  like via the `/chosen/module@<addr>/bootargs` node.
+  like via the ``/chosen/module@<addr>/bootargs`` node.
diff --git a/qapi/block-core.json b/qapi/block-core.json
index b290782bf280..33e8507d1035 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -491,11 +491,11 @@
 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
 #
 # @recording: true if the bitmap is recording new writes from the guest.
-#             Replaces `active` and `disabled` statuses. (since 4.0)
+#             Replaces ``active`` and ``disabled`` statuses. (since 4.0)
 #
 # @busy: true if the bitmap is in-use by some operation (NBD or jobs)
 #        and cannot be modified via QMP or used by another operation.
-#        Replaces `locked` and `frozen` statuses. (since 4.0)
+#        Replaces ``locked`` and ``frozen`` statuses. (since 4.0)
 #
 # @persistent: true if the bitmap was stored on disk, is scheduled to be stored
 #              on disk, or both. (since 4.0)
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 3deac0078b9d..5fcc323b2a79 100644
--- a/include/qemu/module.h
+++ b/include/qemu/module.h
@@ -77,14 +77,14 @@ void module_allow_arch(const char *arch);
 /**
  * DOC: module info annotation macros
  *
- * `scripts/modinfo-collect.py` will collect module info,
+ * ``scripts/modinfo-collect.py`` will collect module info,
  * using the preprocessor and -DQEMU_MODINFO.
  *
- * `scripts/modinfo-generate.py` will create a module meta-data database
+ * ``scripts/modinfo-generate.py`` will create a module meta-data database
  * from the collected information so qemu knows about module
  * dependencies and QOM objects implemented by modules.
  *
- * See `*.modinfo` and `modinfo.c` in the build directory to check the
+ * See ``*.modinfo`` and ``modinfo.c`` in the build directory to check the
  * script results.
  */
 #ifdef QEMU_MODINFO
diff --git a/qemu-options.hx b/qemu-options.hx
index f051536b630f..7749f59300b5 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1895,8 +1895,8 @@ SRST
         Valid parameters are:
 
         ``grab-mod=<mods>`` : Used to select the modifier keys for toggling
-        the mouse grabbing in conjunction with the "g" key. `<mods>` can be
-        either `lshift-lctrl-lalt` or `rctrl`.
+        the mouse grabbing in conjunction with the "g" key. ``<mods>`` can be
+        either ``lshift-lctrl-lalt`` or ``rctrl``.
 
         ``alt_grab=on|off`` : Use Control+Alt+Shift-g to toggle mouse grabbing.
         This parameter is deprecated - use ``grab-mod`` instead.
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 10/11] docs: (further) remove non-reference uses of single backticks
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (8 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 09/11] docs: remove non-reference uses of single backticks marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 13:32 ` [PULL 11/11] docs/sphinx: change default role to "any" marcandre.lureau
  2021-11-05 18:07 ` [PULL 00/11] Sphinx patches Richard Henderson
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Peter Maydell, Richard Henderson, Marc-André Lureau

From: John Snow <jsnow@redhat.com>

The series rotted already. Here's the new changes.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
[ extra backticks fixes ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20211004215238.1523082-3-jsnow@redhat.com>
---
 docs/devel/build-system.rst | 16 ++++++++--------
 docs/system/i386/sgx.rst    |  6 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst
index 7f106d2f1c2f..ae536ef75db4 100644
--- a/docs/devel/build-system.rst
+++ b/docs/devel/build-system.rst
@@ -47,14 +47,14 @@ command line options for which a same-named Meson option exists;
 dashes in the command line are replaced with underscores.
 
 Many checks on the compilation environment are still found in configure
-rather than `meson.build`, but new checks should be added directly to
-`meson.build`.
+rather than ``meson.build``, but new checks should be added directly to
+``meson.build``.
 
 Patches are also welcome to move existing checks from the configure
-phase to `meson.build`.  When doing so, ensure that `meson.build` does
-not use anymore the keys that you have removed from `config-host.mak`.
-Typically these will be replaced in `meson.build` by boolean variables,
-``get_option('optname')`` invocations, or `dep.found()` expressions.
+phase to ``meson.build``.  When doing so, ensure that ``meson.build`` does
+not use anymore the keys that you have removed from ``config-host.mak``.
+Typically these will be replaced in ``meson.build`` by boolean variables,
+``get_option('optname')`` invocations, or ``dep.found()`` expressions.
 In general, the remaining checks have little or no interdependencies,
 so they can be moved one by one.
 
@@ -298,7 +298,7 @@ comprises the following tasks:
 
  - Add code to perform the actual feature check.
 
- - Add code to include the feature status in `config-host.h`
+ - Add code to include the feature status in ``config-host.h``
 
  - Add code to print out the feature status in the configure summary
    upon completion.
@@ -334,7 +334,7 @@ The other supporting code is generally simple::
 
 For the configure script to parse the new option, the
 ``scripts/meson-buildoptions.sh`` file must be up-to-date; ``make
-update-buildoptions`` (or just `make`) will take care of updating it.
+update-buildoptions`` (or just ``make``) will take care of updating it.
 
 
 Support scripts
diff --git a/docs/system/i386/sgx.rst b/docs/system/i386/sgx.rst
index f103ae2a2fdd..9aa161af1a13 100644
--- a/docs/system/i386/sgx.rst
+++ b/docs/system/i386/sgx.rst
@@ -77,9 +77,9 @@ CPUID
 
 Due to its myriad dependencies, SGX is currently not listed as supported
 in any of Qemu's built-in CPU configuration. To expose SGX (and SGX Launch
-Control) to a guest, you must either use `-cpu host` to pass-through the
+Control) to a guest, you must either use ``-cpu host`` to pass-through the
 host CPU model, or explicitly enable SGX when using a built-in CPU model,
-e.g. via `-cpu <model>,+sgx` or `-cpu <model>,+sgx,+sgxlc`.
+e.g. via ``-cpu <model>,+sgx`` or ``-cpu <model>,+sgx,+sgxlc``.
 
 All SGX sub-features enumerated through CPUID, e.g. SGX2, MISCSELECT,
 ATTRIBUTES, etc... can be restricted via CPUID flags. Be aware that enforcing
@@ -126,7 +126,7 @@ creating VM with SGX.
 Feature Control
 ~~~~~~~~~~~~~~~
 
-Qemu SGX updates the `etc/msr_feature_control` fw_cfg entry to set the SGX
+Qemu SGX updates the ``etc/msr_feature_control`` fw_cfg entry to set the SGX
 (bit 18) and SGX LC (bit 17) flags based on their respective CPUID support,
 i.e. existing guest firmware will automatically set SGX and SGX LC accordingly,
 assuming said firmware supports fw_cfg.msr_feature_control.
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 11/11] docs/sphinx: change default role to "any"
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (9 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 10/11] docs: (further) " marcandre.lureau
@ 2021-11-05 13:32 ` marcandre.lureau
  2021-11-05 18:07 ` [PULL 00/11] Sphinx patches Richard Henderson
  11 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2021-11-05 13:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Snow, Peter Maydell, Richard Henderson

From: John Snow <jsnow@redhat.com>

This interprets single-backtick syntax in all of our Sphinx docs as a
cross-reference to *something*, including Python symbols.

From here on out, new uses of `backticks` will cause a build failure if
the target cannot be referenced.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20211004215238.1523082-4-jsnow@redhat.com>
---
 docs/conf.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index 3161b8b127c6..763e7d243448 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -85,6 +85,11 @@
 # The master toctree document.
 master_doc = 'index'
 
+# Interpret `single-backticks` to be a cross-reference to any kind of
+# referenceable object. Unresolvable or ambiguous references will emit a
+# warning at build time.
+default_role = 'any'
+
 # General information about the project.
 project = u'QEMU'
 copyright = u'2021, The QEMU Project Developers'
-- 
2.33.0.721.g106298f7f9



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PULL 00/11] Sphinx patches
  2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
                   ` (10 preceding siblings ...)
  2021-11-05 13:32 ` [PULL 11/11] docs/sphinx: change default role to "any" marcandre.lureau
@ 2021-11-05 18:07 ` Richard Henderson
  2021-11-08  8:49   ` Marc-André Lureau
  11 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2021-11-05 18:07 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel; +Cc: Peter Maydell, John Snow

On 11/5/21 9:32 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The following changes since commit 18e356a53a2926a15343b914db64324d63748f25:
> 
>    Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-6.2-041121-2' into staging (2021-11-04 08:33:46 -0400)
> 
> are available in the Git repository at:
> 
>    git@gitlab.com:marcandre.lureau/qemu.git tags/sphinx-pull-request
> 
> for you to fetch changes up to e6e89422ed6907d14ea67f2b99269e6b5554d6be:
> 
>    docs/sphinx: change default role to "any" (2021-11-05 17:22:04 +0400)
> 
> ----------------------------------------------------------------
> Some Sphinx improvements
> 
> PR for 2 series:
> https://patchew.org/QEMU/20211015105344.152591-1-marcandre.lureau@redhat.com/
> https://patchew.org/QEMU/20211004215238.1523082-1-jsnow@redhat.com/
> 
> ----------------------------------------------------------------
> 
> John Snow (3):
>    docs: remove non-reference uses of single backticks
>    docs: (further) remove non-reference uses of single backticks
>    docs/sphinx: change default role to "any"
> 
> Marc-André Lureau (8):
>    docs/sphinx: add loaded modules to generated depfile
>    docs/sphinx: add static files to generated depfile
>    docs/sphinx: add templates files to generated depfile
>    tests/qapi-schema/meson: add depfile to sphinx doc
>    meson: drop sphinx_extn_depends
>    meson: drop sphinx_template_files
>    docs/sphinx: set navigation_with_keys=True
>    docs/sphinx: add 's' keyboard binding to focus search
> 
>   docs/conf.py                           | 12 +++++++++++-
>   docs/devel/build-system.rst            | 16 ++++++++--------
>   docs/devel/fuzzing.rst                 |  9 +++++----
>   docs/devel/tcg-plugins.rst             |  2 +-
>   docs/interop/live-block-operations.rst |  2 +-
>   docs/meson.build                       | 10 ----------
>   docs/sphinx-static/custom.js           |  9 +++++++++
>   docs/sphinx/depfile.py                 | 19 +++++++++++++++++--
>   docs/system/guest-loader.rst           |  2 +-
>   docs/system/i386/sgx.rst               |  6 +++---
>   qapi/block-core.json                   |  4 ++--
>   include/qemu/module.h                  |  6 +++---
>   qemu-options.hx                        |  4 ++--
>   tests/qapi-schema/meson.build          |  6 ++++--
>   14 files changed, 67 insertions(+), 40 deletions(-)
>   create mode 100644 docs/sphinx-static/custom.js

One of the meson.build changes creates something that ninja does not like:

ninja: error: build.ninja:47298: multiple outputs aren't (yet?) supported by depslog; 
bring this up on the mailing list if it affects you

Makefile:162: recipe for target 'run-ninja' failed
make: *** [run-ninja] Error 1

which fails across multiple CI jobs:

https://gitlab.com/qemu-project/qemu/-/pipelines/403133805/failures


r~


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PULL 00/11] Sphinx patches
  2021-11-05 18:07 ` [PULL 00/11] Sphinx patches Richard Henderson
@ 2021-11-08  8:49   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2021-11-08  8:49 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Peter Maydell, John Snow, qemu-devel

Hi

On Fri, Nov 5, 2021 at 10:07 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 11/5/21 9:32 AM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > The following changes since commit 18e356a53a2926a15343b914db64324d63748f25:
> >
> >    Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-6.2-041121-2' into staging (2021-11-04 08:33:46 -0400)
> >
> > are available in the Git repository at:
> >
> >    git@gitlab.com:marcandre.lureau/qemu.git tags/sphinx-pull-request
> >
> > for you to fetch changes up to e6e89422ed6907d14ea67f2b99269e6b5554d6be:
> >
> >    docs/sphinx: change default role to "any" (2021-11-05 17:22:04 +0400)
> >
> > ----------------------------------------------------------------
> > Some Sphinx improvements
> >
> > PR for 2 series:
> > https://patchew.org/QEMU/20211015105344.152591-1-marcandre.lureau@redhat.com/
> > https://patchew.org/QEMU/20211004215238.1523082-1-jsnow@redhat.com/
> >
> > ----------------------------------------------------------------
> >
> > John Snow (3):
> >    docs: remove non-reference uses of single backticks
> >    docs: (further) remove non-reference uses of single backticks
> >    docs/sphinx: change default role to "any"
> >
> > Marc-André Lureau (8):
> >    docs/sphinx: add loaded modules to generated depfile
> >    docs/sphinx: add static files to generated depfile
> >    docs/sphinx: add templates files to generated depfile
> >    tests/qapi-schema/meson: add depfile to sphinx doc
> >    meson: drop sphinx_extn_depends
> >    meson: drop sphinx_template_files
> >    docs/sphinx: set navigation_with_keys=True
> >    docs/sphinx: add 's' keyboard binding to focus search
> >
> >   docs/conf.py                           | 12 +++++++++++-
> >   docs/devel/build-system.rst            | 16 ++++++++--------
> >   docs/devel/fuzzing.rst                 |  9 +++++----
> >   docs/devel/tcg-plugins.rst             |  2 +-
> >   docs/interop/live-block-operations.rst |  2 +-
> >   docs/meson.build                       | 10 ----------
> >   docs/sphinx-static/custom.js           |  9 +++++++++
> >   docs/sphinx/depfile.py                 | 19 +++++++++++++++++--
> >   docs/system/guest-loader.rst           |  2 +-
> >   docs/system/i386/sgx.rst               |  6 +++---
> >   qapi/block-core.json                   |  4 ++--
> >   include/qemu/module.h                  |  6 +++---
> >   qemu-options.hx                        |  4 ++--
> >   tests/qapi-schema/meson.build          |  6 ++++--
> >   14 files changed, 67 insertions(+), 40 deletions(-)
> >   create mode 100644 docs/sphinx-static/custom.js
>
> One of the meson.build changes creates something that ninja does not like:
>
> ninja: error: build.ninja:47298: multiple outputs aren't (yet?) supported by depslog;
> bring this up on the mailing list if it affects you
>
> Makefile:162: recipe for target 'run-ninja' failed
> make: *** [run-ninja] Error 1
>
> which fails across multiple CI jobs:
>
> https://gitlab.com/qemu-project/qemu/-/pipelines/403133805/failures

A workaround is to keep a single output: in "tests/qapi-schema/meson:
add depfile to sphinx doc", and inline the doc-good.stamp argument.
I'll send v2.
thanks



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-08  8:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 13:32 [PULL 00/11] Sphinx patches marcandre.lureau
2021-11-05 13:32 ` [PULL 01/11] docs/sphinx: add loaded modules to generated depfile marcandre.lureau
2021-11-05 13:32 ` [PULL 02/11] docs/sphinx: add static files " marcandre.lureau
2021-11-05 13:32 ` [PULL 03/11] docs/sphinx: add templates " marcandre.lureau
2021-11-05 13:32 ` [PULL 04/11] tests/qapi-schema/meson: add depfile to sphinx doc marcandre.lureau
2021-11-05 13:32 ` [PULL 05/11] meson: drop sphinx_extn_depends marcandre.lureau
2021-11-05 13:32 ` [PULL 06/11] meson: drop sphinx_template_files marcandre.lureau
2021-11-05 13:32 ` [PULL 07/11] docs/sphinx: set navigation_with_keys=True marcandre.lureau
2021-11-05 13:32 ` [PULL 08/11] docs/sphinx: add 's' keyboard binding to focus search marcandre.lureau
2021-11-05 13:32 ` [PULL 09/11] docs: remove non-reference uses of single backticks marcandre.lureau
2021-11-05 13:32 ` [PULL 10/11] docs: (further) " marcandre.lureau
2021-11-05 13:32 ` [PULL 11/11] docs/sphinx: change default role to "any" marcandre.lureau
2021-11-05 18:07 ` [PULL 00/11] Sphinx patches Richard Henderson
2021-11-08  8:49   ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).