Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
suricata: fix build breakage due to rtd_theme
To:
ports@openbsd.org
Cc:
gonzalo@openbsd.org
Date:
Wed, 20 Aug 2025 17:51:19 +0200

Download raw body.

Thread
  • Theo Buehler:

    suricata: fix build breakage due to rtd_theme

In my last bulk suricata failed to build because py3-sphinx_rtd_theme
was present, so conf.py picked it up, emitted a deprecation warning
and errored out since warnings are treated as errors.

The patch doesn't change the package since the port removes the docs
at the end. I added the rtd_theme BDEP to avoid issues with DPB junking
(the window is small, but those are always nasty to hunt down)

A better fix would probably involve disabling "-Werror" for sphinx.
I leave that as an exercise for the maintainer.

h/t sthen for the hint re rtd_theme.

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/suricata/Makefile,v
diff -u -p -r1.74 Makefile
--- Makefile	21 Dec 2024 11:38:47 -0000	1.74
+++ Makefile	20 Aug 2025 15:45:35 -0000
@@ -30,6 +30,7 @@ MODULES =	lang/python \
 
 BUILD_DEPENDS =	devel/py-setuptools \
 		textproc/py-sphinx \
+		textproc/py-sphinx_rtd_theme \
 		textproc/py-yaml
 
 RUN_DEPENDS =	textproc/py-yaml
Index: patches/patch-doc_userguide_conf_py
===================================================================
RCS file: patches/patch-doc_userguide_conf_py
diff -N patches/patch-doc_userguide_conf_py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_userguide_conf_py	20 Aug 2025 15:43:08 -0000
@@ -0,0 +1,15 @@
+WARNING: Calling get_html_theme_path is deprecated. If you are calling it to define html_theme_path, you are safe to remove that code.
+[...]
+build finished with problems, 1 warning (with warnings treated as errors).
+
+Index: doc/userguide/conf.py
+--- doc/userguide/conf.py.orig
++++ doc/userguide/conf.py
+@@ -138,7 +138,6 @@ if not on_rtd:
+     try:
+         import sphinx_rtd_theme
+         html_theme = 'sphinx_rtd_theme'
+-        html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+     except:
+         html_theme = 'default'
+ else: