Bug 221116 - textproc/py-sphinx: Backport fix for issue #3212 (HTML document build failure)
Summary: textproc/py-sphinx: Backport fix for issue #3212 (HTML document build failure)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gabor Pali
URL: https://github.com/sphinx-doc/sphinx/...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-07-31 10:01 UTC by Gabor Pali
Modified: 2017-08-20 02:50 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (araujo)
koobs: merge-quarterly+


Attachments
A patch file for the textproc/py-sphinx port that would fix the problem (1.05 KB, text/x-python)
2017-07-31 10:01 UTC, Gabor Pali
no flags Details
Actual change to the ports tree (1.05 KB, patch)
2017-08-01 10:09 UTC, Gabor Pali
no flags Details | Diff
Actual change to the ports tree (1.73 KB, patch)
2017-08-01 10:12 UTC, Gabor Pali
no flags Details | Diff
Actual change to the ports tree (2.08 KB, patch)
2017-08-01 10:48 UTC, Gabor Pali
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Pali freebsd_committer 2017-07-31 10:01:18 UTC
Created attachment 184865 [details]
A patch file for the textproc/py-sphinx port that would fix the problem

When building the Glasgow Haskell Compiler version 8.x that now uses Sphinx to generate its HTML documentation, the following error is got:

~~~~~
[output trimmed to show the end of the build log]
writing output... [ 40%] gone_wrong
writing output... [ 42%] index
writing output... [ 45%] intro
writing output... [ 48%] lang
writing output... [ 51%] license
writing output... [ 54%] packages
/tmp/ghc-8.0.2/docs/users_guide/packages.rst:839: WARNING: Could not lex literal_block as "haskell". Highlighting skipped.
writing output... [ 57%] parallel
writing output... [ 60%] phases
writing output... [ 62%] profiling

Exception occurred:
  File "/usr/local/lib/python2.7/site-packages/docutils/writers/_html_base.py", line 671, in depart_document
    assert not self.context, 'len(context) = %s' % len(self.context)
AssertionError: len(context) = 1
The full traceback has been saved in /tmp/ghc-8.0.2/tmp/sphinx-err-4JgATb.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
gmake[2]: *** [docs/users_guide/ghc.mk:18: docs/users_guide/build-html/users_guide/index.html] Error 1
gmake[2]: *** Deleting file 'docs/users_guide/build-html/users_guide/index.html'
gmake[1]: *** [Makefile:134: all] Error 2
gmake[1]: Leaving directory '/tmp/ghc-8.0.2'
*** Error code 1
~~~~

Apparently that is due to some problems with the interaction between Sphinx and docutils 0.13.1, which was then reported and resolved as #3212 [1].  Unfortunately, the FreeBSD port does not have the fix for this problem, which could then break the planned update of the lang/ghc port to its version 8.0.2.

I am attaching a patch file that would bring the fix to this issue and make the build of lang/ghc possible.

[1] https://github.com/sphinx-doc/sphinx/issues/3212
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2017-08-01 09:24:01 UTC
Thank you Gabor. Could you update the patch to a diff of the port produced after generating the files/patch-file via make makepatch?

This should also be MFH'd
Comment 2 Gabor Pali freebsd_committer 2017-08-01 10:09:55 UTC
Created attachment 184889 [details]
Actual change to the ports tree

All right, there you go.
Comment 3 Gabor Pali freebsd_committer 2017-08-01 10:12:15 UTC
Created attachment 184891 [details]
Actual change to the ports tree

Sorry, I uploaded an incorrect version of the patch.  That should be fine now.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2017-08-01 10:44:37 UTC
Thank you!

Note: PORTREVISION ought to be bumped too
Comment 5 Gabor Pali freebsd_committer 2017-08-01 10:48:11 UTC
Created attachment 184892 [details]
Actual change to the ports tree

Yes, apparently I forgot to do that.  Now I am updating the patch.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2017-08-02 03:58:53 UTC
Comment on attachment 184892 [details]
Actual change to the ports tree

Approved by: portmgr (blanket, build/run fix)
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2017-08-02 04:03:02 UTC
@Gabor Attachment 184892 [details] is a blanket approval candidate (@bugmeister/triage)

Please confirm this change passes QA (poudriere in particular) prior to commit/merge and if you don't mind, add a comment to the header of the patch with upstream description, issue/commit links, etc.

Reporter is committer, assign accordingly
Comment 8 Marcelo Araujo freebsd_committer 2017-08-02 15:39:09 UTC
I'm ok with the patch, you can go ahead and commit it, approved by myself.
Comment 9 commit-hook freebsd_committer 2017-08-03 18:50:14 UTC
A commit references this bug:

Author: pgj
Date: Thu Aug  3 18:49:46 UTC 2017
New revision: 447275
URL: https://svnweb.freebsd.org/changeset/ports/447275

Log:
  Backport fix for issue #3212

  PR:		221116
  Submitted by:	pgj
  Approved by:	araujo (maintainer)
  Obtained from:	https://github.com/sphinx-doc/sphinx/issues/3212
  MFH:		2017Q3

Changes:
  head/textproc/py-sphinx/Makefile
  head/textproc/py-sphinx/files/patch-sphinx_writers_html.py
Comment 10 commit-hook freebsd_committer 2017-08-17 12:51:52 UTC
A commit references this bug:

Author: feld
Date: Thu Aug 17 12:50:58 UTC 2017
New revision: 448092
URL: https://svnweb.freebsd.org/changeset/ports/448092

Log:
  MFH: r447275

  Backport fix for issue #3212

  PR:		221116
  Submitted by:	pgj
  Approved by:	araujo (maintainer)
  Obtained from:	https://github.com/sphinx-doc/sphinx/issues/3212

  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2017Q3/
  branches/2017Q3/textproc/py-sphinx/Makefile
  branches/2017Q3/textproc/py-sphinx/files/patch-sphinx_writers_html.py
Comment 11 Gabor Pali freebsd_committer 2017-08-19 21:52:11 UTC
This could be closed now.