diff --git a/SOURCES/enable-rebuilding-docs-in-FIPS-mode.patch b/SOURCES/enable-rebuilding-docs-in-FIPS-mode.patch new file mode 100644 index 0000000..0d15d75 --- /dev/null +++ b/SOURCES/enable-rebuilding-docs-in-FIPS-mode.patch @@ -0,0 +1,41 @@ +From a770288c3b2f5688e8769ed7ba206f545bbba9c5 Mon Sep 17 00:00:00 2001 +From: Robert Kuska +Date: Thu, 10 Mar 2016 09:16:50 +0100 +Subject: [PATCH] Enable rebuilding docs in FIPS mode + +--- + sphinx/builders/html.py | 4 ++-- + sphinx/ext/inheritance_diagram.py | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py +index 8184037..0b53160 100644 +--- a/sphinx/builders/html.py ++++ b/sphinx/builders/html.py +@@ -156,8 +156,8 @@ class StandaloneHTMLBuilder(Builder): + cfgdict = dict((name, self.config[name]) + for (name, desc) in self.config.values.iteritems() + if desc[1] == 'html') +- self.config_hash = md5(unicode(cfgdict).encode('utf-8')).hexdigest() +- self.tags_hash = md5(unicode(sorted(self.tags)).encode('utf-8')) \ ++ self.config_hash = md5(unicode(cfgdict).encode('utf-8'), usedforsecurity=False).hexdigest() ++ self.tags_hash = md5(unicode(sorted(self.tags)).encode('utf-8'), usedforsecurity=False) \ + .hexdigest() + old_config_hash = old_tags_hash = '' + try: +diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py +index baaac28..41b2355 100644 +--- a/sphinx/ext/inheritance_diagram.py ++++ b/sphinx/ext/inheritance_diagram.py +@@ -314,7 +314,7 @@ class InheritanceDiagram(Directive): + + + def get_graph_hash(node): +- return md5(node['content'] + str(node['parts'])).hexdigest()[-10:] ++ return md5(node['content'] + str(node['parts']), usedforsecurity=False).hexdigest()[-10:] + + + def html_visit_inheritance_diagram(self, node): +-- +2.5.0 + diff --git a/SOURCES/inline-node-error-fix.patch b/SOURCES/inline-node-error-fix.patch new file mode 100644 index 0000000..994d575 --- /dev/null +++ b/SOURCES/inline-node-error-fix.patch @@ -0,0 +1,30 @@ +From 2beffe94252738fb8eeb1483d2d9d0b67e0aadca Mon Sep 17 00:00:00 2001 +From: Charalampos Stratakis +Date: Wed, 30 Mar 2016 13:58:01 +0200 +Subject: [PATCH] Inline node error fix + +--- + sphinx/writers/manpage.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py +index e074691..0b6ac99 100644 +--- a/sphinx/writers/manpage.py ++++ b/sphinx/writers/manpage.py +@@ -340,5 +340,13 @@ class ManualPageTranslator(BaseTranslator): + self.body.append(node.astext()) + raise nodes.SkipNode + ++ def visit_meta(self, node): ++ raise nodes.SkipNode ++ ++ def visit_inline(self, node): ++ pass ++ def depart_inline(self, node): ++ pass ++ + def unknown_visit(self, node): + raise NotImplementedError('Unknown node: ' + node.__class__.__name__) +-- +2.5.5 + diff --git a/SPECS/python-sphinx.spec b/SPECS/python-sphinx.spec index 3f85c5a..91f449a 100644 --- a/SPECS/python-sphinx.spec +++ b/SPECS/python-sphinx.spec @@ -9,7 +9,7 @@ Name: python-sphinx Version: 1.1.3 -Release: 9%{?dist} +Release: 11%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -21,15 +21,27 @@ Group: Development/Tools License: BSD and Public Domain and Python and (MIT or GPLv2) URL: http://sphinx.pocoo.org/ Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz + # Sent upstream as a fix to work with the next version of docutils # https://bitbucket.org/birkenfeld/sphinx/issue/998/docutils-010-will-break-sphinx-manpage Patch0: sphinx-docutils-0.10.patch + # Fixes quoting issue in inheritance_diagram.py # Already applied upstream as part of https://bitbucket.org/birkenfeld/sphinx/commits/fc1db93d21a5a535d9d62e5a0c9f0a806a8c117a Patch1: Sphinx-1.1.3-fix_quoting_in_inheritance.patch Patch2: fix-container-directive-handling.patch +# Enables rebuilding of docs when RHEL is set to FIPS mode. +# https://bugzilla.redhat.com/show_bug.cgi?id=966954 +Patch3: enable-rebuilding-docs-in-FIPS-mode.patch + +# Add missing "meta" and "inline" node visitors for the manpage writer +# which fixes some exception errors when building docs. +# https://github.com/sphinx-doc/sphinx/commit/0ef7a0a7a36b0c653e535bca77c08027f1a720a8 +# https://bugzilla.redhat.com/show_bug.cgi?id=1291573 +Patch4: inline-node-error-fix.patch + BuildArch: noarch BuildRequires: python2-devel >= 2.4 BuildRequires: python-setuptools @@ -144,6 +156,8 @@ sed '1d' -i sphinx/pycode/pgen2/token.py %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -264,6 +278,14 @@ popd %changelog +* Wed Mar 30 2016 Charalampos Stratakis - 1.1.3-11 +- Added patch to fix inline node exception error when building docs +Resolves: rhbz#1291573 + +* Thu Mar 10 2016 Tomas Orsava - 1.1.3-10 +- Added patch to enable rebuilding docs in FIPS mode +Resolves: rhbz#966954 + * Mon Jun 22 2015 Matej Stuchlik - 1.1.3-9 - Fix "container" directive handling in the text builder Resolves: rhbz#1065137