From b33e23cded7829190f7a5c1c41b830c57c4bde7d Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 20 Sep 2017 13:51:37 +0200 Subject: [PATCH 1/5] Revert "Update to 1.6.3 (rhbz#1426928)" This reverts commit 6fe65c3b4d066db615b324b44fe3591b64f5cf0b. --- .gitignore | 1 - Sphinx-1.2.1-mantarget.patch | 15 ++++++++++ html-parser-HTMLParserError-removed.patch | 21 ++++++++++++++ python-sphinx-xapian.patch | 34 +++++++++++++++++++++++ python-sphinx.spec | 27 ++++-------------- sources | 2 +- xfail-test_latex_remote_images.patch | 13 --------- 7 files changed, 77 insertions(+), 36 deletions(-) create mode 100644 Sphinx-1.2.1-mantarget.patch create mode 100644 html-parser-HTMLParserError-removed.patch create mode 100644 python-sphinx-xapian.patch delete mode 100644 xfail-test_latex_remote_images.patch diff --git a/.gitignore b/.gitignore index 7113428..5a4a63b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ /Sphinx-1.4.9.tar.gz /Sphinx-1.5.1.tar.gz /Sphinx-1.5.2.tar.gz -/Sphinx-1.6.3.tar.gz diff --git a/Sphinx-1.2.1-mantarget.patch b/Sphinx-1.2.1-mantarget.patch new file mode 100644 index 0000000..ad65a28 --- /dev/null +++ b/Sphinx-1.2.1-mantarget.patch @@ -0,0 +1,15 @@ +--- sphinx/doc/Makefile.mantarget 2014-02-13 23:28:58.604797750 +0700 ++++ sphinx/doc/Makefile 2014-02-14 00:00:45.794658764 +0700 +@@ -12,6 +12,12 @@ + help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + ++# Likewise for man, since a man directory exist and make will assume ++# the target is up to date ++.PHONY: man ++man: ++ @$(SPHINXBUILD) -M man "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ++ + # Catch-all target: route all unknown targets to Sphinx using the new + # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). + %: diff --git a/html-parser-HTMLParserError-removed.patch b/html-parser-HTMLParserError-removed.patch new file mode 100644 index 0000000..10b3b5d --- /dev/null +++ b/html-parser-HTMLParserError-removed.patch @@ -0,0 +1,21 @@ +diff --git Sphinx-1.3.1/sphinx/builders/linkcheck.py~ Sphinx-1.3.1/sphinx/builders/linkcheck.py +index 9f5c2131c2..71bec0262d 100644 +--- Sphinx-1.3.1/sphinx/builders/linkcheck.py~ ++++ Sphinx-1.3.1/sphinx/builders/linkcheck.py +@@ -19,9 +19,15 @@ from six.moves import queue + from six.moves.urllib.request import build_opener, Request, HTTPRedirectHandler + from six.moves.urllib.parse import unquote, urlsplit, quote + from six.moves.urllib.error import HTTPError +-from six.moves.html_parser import HTMLParser, HTMLParseError ++from six.moves.html_parser import HTMLParser + from docutils import nodes + ++try: ++ from HTMLParser import HTMLParseError ++except ImportError: ++ class HTMLParseError(Exception): ++ pass ++ + from sphinx.builders import Builder + from sphinx.util.console import purple, red, darkgreen, darkgray, \ + darkred, turquoise diff --git a/python-sphinx-xapian.patch b/python-sphinx-xapian.patch new file mode 100644 index 0000000..d21b807 --- /dev/null +++ b/python-sphinx-xapian.patch @@ -0,0 +1,34 @@ +From cf795894b9290c5ab2035ae21535f0a7f4b7107a Mon Sep 17 00:00:00 2001 +From: Takeshi KOMIYA +Date: Fri, 16 Dec 2016 19:44:27 +0900 +Subject: [PATCH] Fix #3246: xapian search adapter crashes + +--- + CHANGES | 2 ++ + sphinx/websupport/search/xapiansearch.py | 6 +++--- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/sphinx/websupport/search/xapiansearch.py b/sphinx/websupport/search/xapiansearch.py +index 1e43dcb..aa7cff8 100644 +--- a/sphinx/websupport/search/xapiansearch.py ++++ b/sphinx/websupport/search/xapiansearch.py +@@ -39,16 +39,16 @@ def finish_indexing(self): + # Ensure the db lock is removed. + del self.database + +- def add_document(self, path, title, text): ++ def add_document(self, pagename, filename, title, text): + self.database.begin_transaction() + # sphinx_page_path is used to easily retrieve documents by path. +- sphinx_page_path = '"sphinxpagepath%s"' % path.replace('/', '_') ++ sphinx_page_path = '"sphinxpagepath%s"' % pagename.replace('/', '_') + # Delete the old document if it exists. + self.database.delete_document(sphinx_page_path) + + doc = xapian.Document() + doc.set_data(text) +- doc.add_value(self.DOC_PATH, path) ++ doc.add_value(self.DOC_PATH, pagename) + doc.add_value(self.DOC_TITLE, title) + self.indexer.set_document(doc) + self.indexer.index_text(text) diff --git a/python-sphinx.spec b/python-sphinx.spec index 1ae8308..c37da2b 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -14,8 +14,8 @@ %global upstream_name Sphinx Name: python-sphinx -Version: 1.6.3 -Release: 1%{?dist} +Version: 1.5.2 +Release: 2%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -36,11 +36,6 @@ Source5: README.fedora # python-sphinx execuitables is default Source6: default-sphinx-command.in -# Make the test_latex_remote_images an expected failure -# since it requires an active internet connection -# to fetch images, which is not possible in koji or mock. -Patch0: xfail-test_latex_remote_images.patch - BuildArch: noarch BuildRequires: python2-devel >= 2.4 BuildRequires: python2-babel @@ -53,8 +48,6 @@ BuildRequires: python2-sphinx_rtd_theme BuildRequires: python2-sphinx-theme-alabaster BuildRequires: python2-imagesize BuildRequires: python2-requests -BuildRequires: python2-typing -BuildRequires: python2-sphinxcontrib-websupport BuildRequires: environment(modules) # for fixes @@ -74,7 +67,6 @@ BuildRequires: python-html5lib BuildRequires: python-whoosh BuildRequires: python2-snowballstemmer BuildRequires: python-enum34 -BuildRequires: ImageMagick # note: no Python3 xapian binding yet BuildRequires: xapian-bindings-python BuildRequires: texlive-collection-fontsrecommended @@ -109,7 +101,6 @@ BuildRequires: tex(luatex85.sty) BuildRequires: tex(fncychap.sty) BuildRequires: tex(tabulary.sty) BuildRequires: tex(polyglossia.sty) -BuildRequires: tex(ctablestack.sty) BuildRequires: tex(eu1enc.def) %if 0%{?with_python3} @@ -133,7 +124,6 @@ BuildRequires: python3-sphinx_rtd_theme BuildRequires: python3-sphinx-theme-alabaster BuildRequires: python3-imagesize BuildRequires: python3-requests -BuildRequires: python3-sphinxcontrib-websupport %endif # with_python3 @@ -180,14 +170,11 @@ Requires: python2-six Requires: python2-sphinx-theme-alabaster Requires: python2-imagesize Requires: python2-requests -Requires: python2-typing -Requires: python2-sphinxcontrib-websupport Requires: environment(modules) # Needed to get rid of the alternatives config installed in f24 and f25 # versions of the package Requires(pre): /usr/sbin/alternatives Recommends: graphviz -Recommends: ImageMagick Obsoletes: python-sphinx <= 1.2.3 Obsoletes: python-sphinxcontrib-napoleon < 0.5 Provides: python-sphinxcontrib-napoleon = %{version}-%{release} @@ -261,7 +248,6 @@ Requires: tex(luatex85.sty) Requires: tex(fncychap.sty) Requires: tex(tabulary.sty) Requires: tex(polyglossia.sty) -Requires: tex(ctablestack.sty) Requires: tex(eu1enc.def) Obsoletes: python3-sphinx-latex < 1.4.4-2 @@ -293,9 +279,7 @@ Requires: python3-sphinx-theme-alabaster Requires: python3-imagesize Requires: python3-requests Requires: python3-six -Requires: python3-sphinxcontrib-websupport Recommends: graphviz -Recommends: ImageMagick Requires: environment(modules) # Needed to get rid of the alternatives config installed in f24 and f25 # versions of the package @@ -378,6 +362,10 @@ sed '1d' -i sphinx/pycode/pgen2/token.py # fix line encoding of bundled jquery.js dos2unix -k ./sphinx/themes/basic/static/jquery.js +# In 1.5.2, the upstream tarball left this .pyc by mistake. +# Remove it so that it doesn't get included in the python3 build by mistake +rm sphinx/locale/__init__.pyc + %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} @@ -594,9 +582,6 @@ popd %changelog -* Thu Jul 20 2017 Charalampos Stratakis - - 1.6.3-1 -- Update to 1.6.3 (bz#1426928) - * Sat Feb 18 2017 Toshio Kuratomi - - 1.5.2-2 - Cleanup source files that should not be installed - Fix the __init__.pyc that was byte compiled for the wrong python diff --git a/sources b/sources index 6ba2c59..a6650e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Sphinx-1.6.3.tar.gz) = d5aec58e19239db4e61fcd6b103fcc838d97aad5a7aaf9279ff1097791d9cd1ba245989307a2d1049c123058b84ca4e91db192a1672c040d80fafed3907736ae +SHA512 (Sphinx-1.5.2.tar.gz) = 32c8fb98d72e998fcce8c46ceddcbb0a0776d0e9ce75dc96cef48139b8b47ebe9636243fb48b9e04c8e1d5c56e09fc4c60248fbbef810fba9813b83a3e6cbe88 diff --git a/xfail-test_latex_remote_images.patch b/xfail-test_latex_remote_images.patch deleted file mode 100644 index 16e4ddd..0000000 --- a/xfail-test_latex_remote_images.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py -index 55f48cd..78ccecd 100644 ---- a/tests/test_build_latex.py -+++ b/tests/test_build_latex.py -@@ -1009,7 +1009,7 @@ def test_latex_raw_directive(app, status, warning): - assert 'HTML: abc ghi' in result - assert 'LaTeX: abc def ghi' in result - -- -+@pytest.mark.xfail(reason="this test requires internet connection") - @pytest.mark.sphinx('latex', testroot='images') - def test_latex_remote_images(app, status, warning): - app.builder.build_all() From b074ca9c7317866044fde073618a791f860bc889 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 21 Sep 2017 11:01:55 +0200 Subject: [PATCH 2/5] Provide the epoch tag to downgrade to 1.5.2 at F26 as the new version breaks too many packages. --- python-sphinx.spec | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index c37da2b..e18ed13 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -15,7 +15,8 @@ Name: python-sphinx Version: 1.5.2 -Release: 2%{?dist} +Release: 3%{?dist} +Epoch: 1 Summary: Python documentation generator Group: Development/Tools @@ -158,7 +159,7 @@ the Python docs: %package -n python2-sphinx Summary: Python documentation generator -Requires: python-sphinx-locale = %{version}-%{release} +Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release} Requires: python2-babel Requires: python-docutils Requires: python-jinja2 @@ -177,12 +178,12 @@ Requires(pre): /usr/sbin/alternatives Recommends: graphviz Obsoletes: python-sphinx <= 1.2.3 Obsoletes: python-sphinxcontrib-napoleon < 0.5 -Provides: python-sphinxcontrib-napoleon = %{version}-%{release} +Provides: python-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release} Obsoletes: python2-Sphinx <= 1.3.1-4 -Provides: python2-Sphinx = %{version}-%{release} -Provides: python(Sphinx) = %{version}-%{release} +Provides: python2-Sphinx = %{?epoch}:%{version}-%{release} +Provides: python(Sphinx) = %{?epoch}:%{version}-%{release} %{?python_provide:%python_provide python2-sphinx} -Conflicts: python3-sphinx < %{version}-%{release} +Conflicts: python3-sphinx < %{?epoch}:%{version}-%{release} %description -n python2-sphinx Sphinx is a tool that makes it easy to create intelligent and @@ -215,7 +216,7 @@ the Python docs: %package latex Summary: LaTeX builder dependencies for %{name} -Requires: python(Sphinx) = %{version}-%{release} +Requires: python(Sphinx) = %{?epoch}:%{version}-%{release} Requires: texlive-collection-fontsrecommended Requires: texlive-collection-latex Requires: texlive-dvipng @@ -267,7 +268,7 @@ builder. %package -n python3-sphinx Summary: Python documentation generator Group: Development/Tools -Requires: python-sphinx-locale = %{version}-%{release} +Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release} Requires: python3-babel Requires: python3-docutils Requires: python3-jinja2 @@ -285,10 +286,10 @@ Requires: environment(modules) # versions of the package Requires(pre): /usr/sbin/alternatives Obsoletes: python3-sphinxcontrib-napoleon < 0.3.0 -Provides: python3-sphinxcontrib-napoleon = %{version}-%{release} -Provides: python(Sphinx) = %{version}-%{release} +Provides: python3-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release} +Provides: python(Sphinx) = %{?epoch}:%{version}-%{release} %{?python_provide:%python_provide python3-sphinx} -Conflicts: python2-Sphinx < %{version}-%{release} +Conflicts: python2-Sphinx < %{?epoch}:%{version}-%{release} %description -n python3-sphinx Sphinx is a tool that makes it easy to create intelligent and @@ -324,7 +325,7 @@ the Python docs: Summary: Documentation for %{name} Group: Documentation License: BSD -Requires: python(Sphinx) = %{version}-%{release} +Requires: python(Sphinx) = %{?epoch}:%{version}-%{release} %description doc Sphinx is a tool that makes it easy to create intelligent and @@ -582,6 +583,9 @@ popd %changelog +* Wed Sep 20 2017 Charalampos Stratakis - 1:1.5.2-3 +- Provide the epoch tag in order to downgrade at Fedora 26 + * Sat Feb 18 2017 Toshio Kuratomi - - 1.5.2-2 - Cleanup source files that should not be installed - Fix the __init__.pyc that was byte compiled for the wrong python From 7963377f418cb6d9c80e4231fdc0d41df861c97c Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Fri, 22 Sep 2017 13:00:15 +0200 Subject: [PATCH 3/5] Fix a crash on parallel building. (rhbz#1494276) --- fix-crash-on-parallel-build.patch | 12 ++++++++++++ python-sphinx.spec | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 fix-crash-on-parallel-build.patch diff --git a/fix-crash-on-parallel-build.patch b/fix-crash-on-parallel-build.patch new file mode 100644 index 0000000..9bf01c7 --- /dev/null +++ b/fix-crash-on-parallel-build.patch @@ -0,0 +1,12 @@ +diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py +index ce51ac0..64f9bc1 100644 +--- a/sphinx/util/parallel.py ++++ b/sphinx/util/parallel.py +@@ -100,6 +100,7 @@ class ParallelTasks(object): + raise SphinxParallelError(*result) + self._result_funcs.pop(tid)(self._args.pop(tid), result) + self._procs[tid].join() ++ self._precvs.pop(tid) + self._pworking -= 1 + break + else: diff --git a/python-sphinx.spec b/python-sphinx.spec index e18ed13..18972fd 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -15,7 +15,7 @@ Name: python-sphinx Version: 1.5.2 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Summary: Python documentation generator @@ -37,6 +37,13 @@ Source5: README.fedora # python-sphinx execuitables is default Source6: default-sphinx-command.in +# Backport of a bugfix from the 1.6 upstream branch of sphinx +# to address a crash with parallel building. +# https://bugzilla.redhat.com/show_bug.cgi?id=1494276 +# Upstream commit: +# https://github.com/sphinx-doc/sphinx/pull/4039/commits/0cb57f19a099be2809a8fb5dc9274f7411e1caac +Patch0: fix-crash-on-parallel-build.patch + BuildArch: noarch BuildRequires: python2-devel >= 2.4 BuildRequires: python2-babel @@ -583,6 +590,9 @@ popd %changelog +* Fri Sep 22 2017 Charalampos Stratakis - 1:1.5.2-4 +- Fix a crash on parallel build. + * Wed Sep 20 2017 Charalampos Stratakis - 1:1.5.2-3 - Provide the epoch tag in order to downgrade at Fedora 26 From a138fef32e5ede7d62a20a38aee4c78792eefde5 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 6 Nov 2017 15:22:34 +0100 Subject: [PATCH 4/5] Update to 1.5.5 --- .gitignore | 1 + python-sphinx.spec | 11 +++++------ sources | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 5a4a63b..1a1c936 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /Sphinx-1.4.9.tar.gz /Sphinx-1.5.1.tar.gz /Sphinx-1.5.2.tar.gz +/Sphinx-1.5.5.tar.gz diff --git a/python-sphinx.spec b/python-sphinx.spec index 18972fd..6692b23 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -14,8 +14,8 @@ %global upstream_name Sphinx Name: python-sphinx -Version: 1.5.2 -Release: 4%{?dist} +Version: 1.5.5 +Release: 1%{?dist} Epoch: 1 Summary: Python documentation generator @@ -370,10 +370,6 @@ sed '1d' -i sphinx/pycode/pgen2/token.py # fix line encoding of bundled jquery.js dos2unix -k ./sphinx/themes/basic/static/jquery.js -# In 1.5.2, the upstream tarball left this .pyc by mistake. -# Remove it so that it doesn't get included in the python3 build by mistake -rm sphinx/locale/__init__.pyc - %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} @@ -590,6 +586,9 @@ popd %changelog +* Mon Nov 06 2017 Charalampos Stratakis - 1:1.5.5-1 +- Update to 1.5.5 + * Fri Sep 22 2017 Charalampos Stratakis - 1:1.5.2-4 - Fix a crash on parallel build. diff --git a/sources b/sources index a6650e7..d32cac7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Sphinx-1.5.2.tar.gz) = 32c8fb98d72e998fcce8c46ceddcbb0a0776d0e9ce75dc96cef48139b8b47ebe9636243fb48b9e04c8e1d5c56e09fc4c60248fbbef810fba9813b83a3e6cbe88 +SHA512 (Sphinx-1.5.5.tar.gz) = 67bd2800da6886391a852175db52d9f9115eb71fa0c925d49809f3ca15f58deafb55cc4fc42d83b4c9494b38962a61f33de52c21b4b140ec377f696f4fa7bf7e From 2aaf1bf6d4d82b644743a4928bf091311e723c66 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Tue, 9 Jan 2018 12:00:04 +0100 Subject: [PATCH 5/5] Update to 1.5.6 --- .gitignore | 1 + python-sphinx.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1a1c936..be37cb5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /Sphinx-1.5.1.tar.gz /Sphinx-1.5.2.tar.gz /Sphinx-1.5.5.tar.gz +/Sphinx-1.5.6.tar.gz diff --git a/python-sphinx.spec b/python-sphinx.spec index 6692b23..5e0274e 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -14,7 +14,7 @@ %global upstream_name Sphinx Name: python-sphinx -Version: 1.5.5 +Version: 1.5.6 Release: 1%{?dist} Epoch: 1 Summary: Python documentation generator @@ -586,6 +586,9 @@ popd %changelog +* Tue Jan 09 2018 Charalampos Stratakis - 1:1.5.6-1 +- Update to 1.5.6 + * Mon Nov 06 2017 Charalampos Stratakis - 1:1.5.5-1 - Update to 1.5.5 diff --git a/sources b/sources index d32cac7..45146fe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Sphinx-1.5.5.tar.gz) = 67bd2800da6886391a852175db52d9f9115eb71fa0c925d49809f3ca15f58deafb55cc4fc42d83b4c9494b38962a61f33de52c21b4b140ec377f696f4fa7bf7e +SHA512 (Sphinx-1.5.6.tar.gz) = 4190124d093fca3633a40187731d4284fa041c5d1159af1087ceec507eb398f693dcc655cbce779b63c25e4c925a07dfbfaae5f27c36e42df97226d335be951f