Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-05-15 11:24:55 +0200
committerJiri Kosina <jkosina@suse.cz>2018-05-15 11:24:55 +0200
commita52c3cbca53ac68f12ea4c26a32b8b69c51a2541 (patch)
tree0fd720e86a47e7b57b149176f58f12fb2b02d5e3
parent7c67409e3095a8d3067fba2afd71966d72c02e41 (diff)
parent1a92ee3b7daa6b0df6581f32239ffb908b542d68 (diff)
Merge remote-tracking branch 'origin/users/tiwai/SLE12-SP4/for-next' into SLE12-SP4
Pull kernel-doc generation fix from Takashi Iwai
-rw-r--r--patches.suse/sphinx-1.2-doc-build-fix.patch75
-rw-r--r--rpm/kernel-docs.spec.in5
-rw-r--r--series.conf2
3 files changed, 80 insertions, 2 deletions
diff --git a/patches.suse/sphinx-1.2-doc-build-fix.patch b/patches.suse/sphinx-1.2-doc-build-fix.patch
new file mode 100644
index 0000000000..b8578d4319
--- /dev/null
+++ b/patches.suse/sphinx-1.2-doc-build-fix.patch
@@ -0,0 +1,75 @@
+From: Takashi Iwai <tiwai@suse.de>
+Subject: Fix documents build with old sphinx 1.2
+Patch-mainline: Never, SLE12-SP4 specific fix
+References: bsc#1093117
+
+python-Sphinx included in SLE12-SP4 doesn't seem supporting
+version_info call. Use the fixed version numbers as reverting the
+changes introduced via commit c46988aef2de.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ Documentation/conf.py | 4 +++-
+ Documentation/sphinx/cdomain.py | 4 +++-
+ Documentation/sphinx/kfigure.py | 9 ++++++---
+ 3 files changed, 12 insertions(+), 5 deletions(-)
+
+--- a/Documentation/conf.py
++++ b/Documentation/conf.py
+@@ -17,7 +17,9 @@ import os
+ import sphinx
+
+ # Get Sphinx version
+-major, minor, patch = sphinx.version_info[:3]
++# major, minor, patch = sphinx.version_info[:3]
++# XXX use the fixed versions for SLE12-SP4 due to silly issues
++major, minor, patch = 1, 2, 3
+
+
+ # If extensions (or modules to document with autodoc) are in another directory,
+--- a/Documentation/sphinx/cdomain.py
++++ b/Documentation/sphinx/cdomain.py
+@@ -44,7 +44,9 @@ from sphinx.domains.c import CDomain as
+ __version__ = '1.0'
+
+ # Get Sphinx version
+-major, minor, patch = sphinx.version_info[:3]
++# major, minor, patch = sphinx.version_info[:3]
++# XXX use the fixed versions for SLE12-SP4 due to silly issues
++major, minor, patch = 1, 2, 3
+
+ def setup(app):
+
+--- a/Documentation/sphinx/kfigure.py
++++ b/Documentation/sphinx/kfigure.py
+@@ -68,7 +68,10 @@ else:
+ _unicode = unicode
+
+ # Get Sphinx version
+-major, minor, patch = sphinx.version_info[:3]
++# major, minor, patch = sphinx.version_info[:3]
++# XXX use the fixed versions for SLE12-SP4 due to silly issues
++major, minor, patch = 1, 2, 3
++
+ if major == 1 and minor > 3:
+ # patches.Figure only landed in Sphinx 1.4
+ from sphinx.directives.patches import Figure # pylint: disable=C0413
+@@ -237,7 +240,7 @@ def convert_image(img_node, translator,
+ elif translator.builder.format == 'html':
+ dst_fname = path.join(
+ translator.builder.outdir,
+- translator.builder.imagedir,
++ '_images',
+ fname + '.svg')
+ img_node['uri'] = path.join(
+ translator.builder.imgpath, fname + '.svg')
+@@ -433,7 +436,7 @@ def visit_kernel_render(self, node):
+ fname = path.join('%s-%s' % (srclang, sha1(hashobj).hexdigest()))
+
+ tmp_fname = path.join(
+- self.builder.outdir, self.builder.imagedir, fname + tmp_ext)
++ self.builder.outdir, '_images', fname + tmp_ext)
+
+ if not path.isfile(tmp_fname):
+ mkdir(path.dirname(tmp_fname))
diff --git a/rpm/kernel-docs.spec.in b/rpm/kernel-docs.spec.in
index 73f4e38bb1..d3d80ae2b6 100644
--- a/rpm/kernel-docs.spec.in
+++ b/rpm/kernel-docs.spec.in
@@ -45,10 +45,11 @@ BuildRequires: graphviz
BuildRequires: graphviz-gd
BuildRequires: graphviz-gnome
BuildRequires: ImageMagick
-BuildRequires: python3-Sphinx
+BuildRequires: python-Sphinx
+BuildRequires: python-six
BuildRequires: texlive-anyfontsize
%if %build_pdf
-BuildRequires: python3-Sphinx-latex
+BuildRequires: python-Sphinx-latex
BuildRequires: texlive-adjustbox
BuildRequires: texlive-dejavu
BuildRequires: texlive-dejavu-fonts
diff --git a/series.conf b/series.conf
index 007b7d3cae..48470a3f9f 100644
--- a/series.conf
+++ b/series.conf
@@ -12074,6 +12074,8 @@
# bsc#1056592
patches.suse/ras-cec-disable-cec.patch
+ patches.suse/sphinx-1.2-doc-build-fix.patch
+
########################################################
# ACPI patches
########################################################