[Git][haskell-team/DHG_packages][master] ghc: Fix FTBFS with sphinx 7.1 (Closes: #1042658)

Scott Talbert (@swt2c) gitlab at salsa.debian.org
Tue Aug 1 00:19:29 BST 2023



Scott Talbert pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
d3d5aac4 by Scott Talbert at 2023-07-31T18:48:16-04:00
ghc: Fix FTBFS with sphinx 7.1 (Closes: #1042658)

- - - - -


5 changed files:

- p/ghc/debian/changelog
- p/ghc/debian/control
- + p/ghc/debian/patches/00dc51060881df81258ba3b3bdf447294618a4de.patch
- p/ghc/debian/patches/series
- + p/ghc/debian/patches/use-unbundled-sphinx-rtd-theme


Changes:

=====================================
p/ghc/debian/changelog
=====================================
@@ -1,3 +1,10 @@
+ghc (9.0.2-5) unstable; urgency=medium
+
+  * Team upload.
+  * Fix FTBFS with sphinx 7.1 (Closes: #1042658)
+
+ -- Scott Talbert <swt at techie.net>  Mon, 31 Jul 2023 18:47:27 -0400
+
 ghc (9.0.2-4) unstable; urgency=medium
 
   * Backport patch to fix ABI reproducibility (Closes: #1015733)


=====================================
p/ghc/debian/control
=====================================
@@ -19,6 +19,7 @@ Build-Depends:
   libffi-dev,
   libncurses-dev,
   python3-sphinx <!cross>,
+  python3-sphinx-rtd-theme <!cross>,
   dpkg-dev (>= 1.16.1.1)
 Build-Depends-Indep:
   hscolour,


=====================================
p/ghc/debian/patches/00dc51060881df81258ba3b3bdf447294618a4de.patch
=====================================
@@ -0,0 +1,44 @@
+From 00dc51060881df81258ba3b3bdf447294618a4de Mon Sep 17 00:00:00 2001
+From: Matthew Pickering <matthewtpickering at gmail.com>
+Date: Tue, 3 Jan 2023 15:56:37 +0000
+Subject: [PATCH] sphinx: Use modern syntax for extlinks
+
+This fixes the following build error:
+
+```
+  Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273
+  ===> Command failed with error code: 2
+
+  Exception occurred:
+    File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role
+      title = caption % part
+              ~~~~~~~~^~~~~~
+  TypeError: not all arguments converted during string formatting
+```
+
+I tested on Sphinx-5.1.1 and Sphinx-6.0.0
+
+Thanks for sterni for providing instructions about how to test using
+sphinx-6.0.0.
+
+Fixes #22690
+---
+ docs/users_guide/ghc_config.py.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/docs/users_guide/ghc_config.py.in b/docs/users_guide/ghc_config.py.in
+index dcc7fbaef62..c9888a13adc 100644
+--- a/docs/users_guide/ghc_config.py.in
++++ b/docs/users_guide/ghc_config.py.in
+@@ -1,6 +1,6 @@
+ extlinks = {
+-    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#'),
+-    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#'),
++    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '%s'),
++    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#%s'),
+ }
+ 
+ libs_base_uri = '../libraries'
+-- 
+GitLab
+


=====================================
p/ghc/debian/patches/series
=====================================
@@ -14,3 +14,5 @@ latomic-64bit
 78db231ffdf8385662812781c1d09c630cfad313.patch
 ddd2591c5ca395e39ea36855e5b7e0a3464b7ad8.patch
 separate-docs
+00dc51060881df81258ba3b3bdf447294618a4de.patch
+use-unbundled-sphinx-rtd-theme


=====================================
p/ghc/debian/patches/use-unbundled-sphinx-rtd-theme
=====================================
@@ -0,0 +1,13 @@
+Index: b/docs/users_guide/conf.py
+===================================================================
+--- a/docs/users_guide/conf.py
++++ b/docs/users_guide/conf.py
+@@ -65,7 +65,7 @@ exclude_patterns = ['.build']
+ html_title = "Glasgow Haskell Compiler %s User's Guide" % release
+ html_short_title = "GHC %s User's Guide" % release
+ html_theme_path = ['.']
+-html_theme = 'rtd-theme'
++html_theme = 'sphinx_rtd_theme'
+ html_logo = None
+ html_static_path = ['images']
+ # Convert quotes and dashes to typographically correct entities



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/d3d5aac4b19a4a428f7b8b18b1566707fb5dc6d3

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/d3d5aac4b19a4a428f7b8b18b1566707fb5dc6d3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20230731/dc6491ac/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list