summarylogtreecommitdiffstats
path: root/doc-sphinx-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'doc-sphinx-2.patch')
-rw-r--r--doc-sphinx-2.patch188
1 files changed, 0 insertions, 188 deletions
diff --git a/doc-sphinx-2.patch b/doc-sphinx-2.patch
deleted file mode 100644
index fb45d2520b9..00000000000
--- a/doc-sphinx-2.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-diff -Nur a/Documentation/conf.py b/Documentation/conf.py
---- a/Documentation/conf.py 2018-10-22 14:37:37.000000000 +0800
-+++ b/Documentation/conf.py 2019-04-23 21:00:17.000000000 +0800
-@@ -37,7 +37,7 @@
- extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure', 'sphinx.ext.ifconfig']
-
- # The name of the math extension changed on Sphinx 1.4
--if major == 1 and minor > 3:
-+if (major == 1 and minor > 3) or major > 1:
- extensions.append("sphinx.ext.imgmath")
- else:
- extensions.append("sphinx.ext.pngmath")
-diff -Nur a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
---- a/Documentation/sphinx/kerneldoc.py 2018-10-22 14:37:37.000000000 +0800
-+++ b/Documentation/sphinx/kerneldoc.py 2019-04-23 21:16:41.000000000 +0800
-@@ -37,7 +37,10 @@
- from docutils import nodes, statemachine
- from docutils.statemachine import ViewList
- from docutils.parsers.rst import directives, Directive
--from sphinx.ext.autodoc import AutodocReporter
-+from sphinx.util.docutils import switch_source_input
-+
-+from sphinx.util import logging
-+logger = logging.getLogger(__name__)
-
- __version__ = '1.0'
-
-@@ -90,7 +93,7 @@
- cmd += [filename]
-
- try:
-- env.app.verbose('calling kernel-doc \'%s\'' % (" ".join(cmd)))
-+ logger.verbose('calling kernel-doc \'%s\'' % (" ".join(cmd)))
-
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out, err = p.communicate()
-@@ -100,7 +103,7 @@
- if p.returncode != 0:
- sys.stderr.write(err)
-
-- env.app.warn('kernel-doc \'%s\' failed with return code %d' % (" ".join(cmd), p.returncode))
-+ logger.warning('kernel-doc \'%s\' failed with return code %d' % (" ".join(cmd), p.returncode))
- return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
- elif env.config.kerneldoc_verbosity > 0:
- sys.stderr.write(err)
-@@ -122,17 +125,17 @@
-
- node = nodes.section()
- buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
-- self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter)
- self.state.memo.title_styles, self.state.memo.section_level = [], 0
- try:
-- self.state.nested_parse(result, 0, node, match_titles=1)
-+ with switch_source_input(self.state, result):
-+ self.state.nested_parse(result, 0, node, match_titles=1)
- finally:
- self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf
-
- return node.children
-
- except Exception as e: # pylint: disable=W0703
-- env.app.warn('kernel-doc \'%s\' processing failed with: %s' %
-+ logger.warning('kernel-doc \'%s\' processing failed with: %s' %
- (" ".join(cmd), str(e)))
- return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
-
-diff -Nur a/Documentation/sphinx/kfigure.py b/Documentation/sphinx/kfigure.py
---- a/Documentation/sphinx/kfigure.py 2018-10-22 14:37:37.000000000 +0800
-+++ b/Documentation/sphinx/kfigure.py 2019-04-23 21:13:32.000000000 +0800
-@@ -60,6 +60,9 @@
- from sphinx.util.nodes import clean_astext
- from six import iteritems
-
-+from sphinx.util import logging
-+logger = logging.getLogger(__name__)
-+
- PY3 = sys.version_info[0] == 3
-
- if PY3:
-@@ -171,20 +174,20 @@
- This function is called once, when the builder is initiated.
- """
- global dot_cmd, convert_cmd # pylint: disable=W0603
-- app.verbose("kfigure: check installed tools ...")
-+ logger.verbose("kfigure: check installed tools ...")
-
- dot_cmd = which('dot')
- convert_cmd = which('convert')
-
- if dot_cmd:
-- app.verbose("use dot(1) from: " + dot_cmd)
-+ logger.verbose("use dot(1) from: " + dot_cmd)
- else:
-- app.warn("dot(1) not found, for better output quality install "
-+ logger.warning("dot(1) not found, for better output quality install "
- "graphviz from http://www.graphviz.org")
- if convert_cmd:
-- app.verbose("use convert(1) from: " + convert_cmd)
-+ logger.verbose("use convert(1) from: " + convert_cmd)
- else:
-- app.warn(
-+ logger.warning(
- "convert(1) not found, for SVG to PDF conversion install "
- "ImageMagick (https://www.imagemagick.org)")
-
-@@ -220,12 +223,12 @@
-
- # in kernel builds, use 'make SPHINXOPTS=-v' to see verbose messages
-
-- app.verbose('assert best format for: ' + img_node['uri'])
-+ logger.verbose('assert best format for: ' + img_node['uri'])
-
- if in_ext == '.dot':
-
- if not dot_cmd:
-- app.verbose("dot from graphviz not available / include DOT raw.")
-+ logger.verbose("dot from graphviz not available / include DOT raw.")
- img_node.replace_self(file2literal(src_fname))
-
- elif translator.builder.format == 'latex':
-@@ -252,7 +255,7 @@
-
- if translator.builder.format == 'latex':
- if convert_cmd is None:
-- app.verbose("no SVG to PDF conversion available / include SVG raw.")
-+ logger.verbose("no SVG to PDF conversion available / include SVG raw.")
- img_node.replace_self(file2literal(src_fname))
- else:
- dst_fname = path.join(translator.builder.outdir, fname + '.pdf')
-@@ -265,18 +268,18 @@
- _name = dst_fname[len(translator.builder.outdir) + 1:]
-
- if isNewer(dst_fname, src_fname):
-- app.verbose("convert: {out}/%s already exists and is newer" % _name)
-+ logger.verbose("convert: {out}/%s already exists and is newer" % _name)
-
- else:
- ok = False
- mkdir(path.dirname(dst_fname))
-
- if in_ext == '.dot':
-- app.verbose('convert DOT to: {out}/' + _name)
-+ logger.verbose('convert DOT to: {out}/' + _name)
- ok = dot2format(app, src_fname, dst_fname)
-
- elif in_ext == '.svg':
-- app.verbose('convert SVG to: {out}/' + _name)
-+ logger.verbose('convert SVG to: {out}/' + _name)
- ok = svg2pdf(app, src_fname, dst_fname)
-
- if not ok:
-@@ -305,7 +308,7 @@
- with open(out_fname, "w") as out:
- exit_code = subprocess.call(cmd, stdout = out)
- if exit_code != 0:
-- app.warn("Error #%d when calling: %s" % (exit_code, " ".join(cmd)))
-+ logger.warning("Error #%d when calling: %s" % (exit_code, " ".join(cmd)))
- return bool(exit_code == 0)
-
- def svg2pdf(app, svg_fname, pdf_fname):
-@@ -322,7 +325,7 @@
- # use stdout and stderr from parent
- exit_code = subprocess.call(cmd)
- if exit_code != 0:
-- app.warn("Error #%d when calling: %s" % (exit_code, " ".join(cmd)))
-+ logger.warning("Error #%d when calling: %s" % (exit_code, " ".join(cmd)))
- return bool(exit_code == 0)
-
-
-@@ -415,15 +418,15 @@
- app = self.builder.app
- srclang = node.get('srclang')
-
-- app.verbose('visit kernel-render node lang: "%s"' % (srclang))
-+ logger.verbose('visit kernel-render node lang: "%s"' % (srclang))
-
- tmp_ext = RENDER_MARKUP_EXT.get(srclang, None)
- if tmp_ext is None:
-- app.warn('kernel-render: "%s" unknown / include raw.' % (srclang))
-+ logger.warning('kernel-render: "%s" unknown / include raw.' % (srclang))
- return
-
- if not dot_cmd and tmp_ext == '.dot':
-- app.verbose("dot from graphviz not available / include raw.")
-+ logger.verbose("dot from graphviz not available / include raw.")
- return
-
- literal_block = node[0]