Hi Drew! On Fri, Dec 29, 2023 at 01:59:53PM +0100, Drew Parsons wrote: > Package: sphinx-common > Version: 7.2.6-3 > Severity: normal > > I'm trying to run dh_sphinxdoc on new docs generated for lammps. > But dh_sphinxdoc fails: > > $ dh_sphinxdoc > dh_sphinxdoc: error: debian/lammps-doc/usr/share/doc/lammps/html/search.html > does not load searchindex.js > > with exit code 255. > > Well no kidding, search.html really does not reference searchindex.js. > Why is this causing dh_sphinxdoc to fail? dh_sphinxdoc should be > replacing existing .js references in the html files, not complaining > about ones which are not there. > > Adding an -Xsearch.html option does not fix the problem.
dh_sphinxdoc not only symlinks .js files, but also performs some sanity checks. In particular, it checks stuff related to searchindex, search page and _sources files. In lammps case, it looks like the search page is very unusual and relies on Google's Custom Search Engine. So, in fact, it searches not in the local documentation, but on docs.lammps.org website. This is exactly what Lintian warning privacy-breach-google-cse is about. I would recommend replacing upstream search.html with pristine version from sphinx-rtd-theme [1] (that lammps theme is based on). Sphinx's default search relies on source RST files (_sources), so you will also need to stop removing them in doc/Makefile. If you don't want to do that, then disabling dh_sphinxdoc is probably fine, because you don't need all of the Sphinx' JS functionality anyway. [1]: https://sources.debian.org/src/sphinx-rtd-theme/2.0.0%2Bdfsg-1/sphinx_rtd_theme/search.html/ -- Dmitry Shachnev
signature.asc
Description: PGP signature