mbox series

[v4,0/3] migrate Debian/Ubuntu to pip packages for docs + fix epub and latexpdf targets not finding glob images

Message ID 20260216-fix-make-multi-target-v4-0-749e588cb7f5@cherry.de
Headers show
Series migrate Debian/Ubuntu to pip packages for docs + fix epub and latexpdf targets not finding glob images | expand

Message

Quentin Schulz Feb. 16, 2026, 11:26 a.m. UTC
This fixes images being improperly handled by our Make targets by
switching to a sphinx extension that generates a PNG or PDF of an SVG
upon request by Sphinx itself.

To do that, we need sphinxcontrib-svg2pdfconverter>=2.0.0 which is not
available for all supported distros, including Debian/Ubuntu which only
used packages from their official package feeds until now. This migrates
both distros to use pip packages for building the docs such that the
same instructions are used for all supported distros.
This however required to use a virtualenv to install packages, since
Debian doesn't allow using pip outside of a virtualenv since Bookworm
(12). So this migrates the pip package installation to use a virtualenv
as well. Since sourcing scripts in RUN commands to make variables
accessible in later container layers is not possible in Containerfile,
we do the same logic as in the venv bin/activate script manually in the
Containerfile.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Changes in v4:
- migrate all distros to use virtualenv for installing packages via pip,
- migrate Debian and Ubuntu to use pip installation steps for building
  the docs,
- tested all distros build correctly by running the `html epub` make
  targets (`all` doesn't work for almalinux, rockylinux and centos
  stream at the moment),
- Link to v3: https://patch.msgid.link/20260211-fix-make-multi-target-v3-1-1168a6f1525f@cherry.de

Changes in v3:
- rebased on top of master, rebuilt with `make all` no build error to be
  seen,
- Link to v2: https://patch.msgid.link/20251202-fix-make-multi-target-v2-1-7eea1d64cf6b@cherry.de

Changes in v2:
- switched to upstream sphinxcontrib-svg2pdfconverter since the
  necessary MR got merged and a new release made,
- removed IMAGEDIRS Make variable as it is now unused,
- added sphinxcontrib-svg2pdfconverter to Pipfile (not tested) and pip
  installation script,
- Link to v1: https://patch.msgid.link/20251030-fix-make-multi-target-v1-0-213616ed1f0a@cherry.de

---
Quentin Schulz (3):
      use a venv for installing packages with pip
      consistently use pip packages for all distros
      convert SVGs to PDF and PNG using sphinxcontrib.rsvgconverter plugin

 documentation/Makefile                             | 27 +++-------------------
 documentation/Pipfile                              |  2 ++
 documentation/conf.py                              |  1 +
 documentation/ref-manual/system-requirements.rst   |  3 +++
 documentation/tools/build-docs-container           |  4 +++-
 .../tools/containerfiles/Containerfile.apt         | 10 ++++++++
 .../tools/containerfiles/Containerfile.dnf         |  6 +++++
 .../tools/containerfiles/Containerfile.zypper      |  7 ++++++
 .../tools/host_packages_scripts/pip3_docs.sh       |  4 +++-
 .../tools/host_packages_scripts/ubuntu_docs.sh     |  2 +-
 10 files changed, 39 insertions(+), 27 deletions(-)
---
base-commit: 095981c08b9d63905472df5d1d60c07af96f0250
change-id: 20251029-fix-make-multi-target-d2de9d4ff7ec

Best regards,
--  
Quentin Schulz <quentin.schulz@cherry.de>

Comments

Antonin Godard Feb. 16, 2026, 2:26 p.m. UTC | #1
Hi,

I have an issue after applying the series:

  $ ./documentation/tools/build-docs-container almalinux:9 latexpdf
  [...]
  latexmk -pdf -dvi- -ps-  'theyoctoproject.tex'
  make[1]: latexmk: No such file or directory
  make[1]: *** [Makefile:28: theyoctoproject.pdf] Error 127
  make[1]: Leaving directory '/docs/documentation/_build/latex'
  make: *** [Makefile:53: latexpdf] Error 2
  make: Leaving directory '/docs/documentation'

You reported an error with latexpdf on IRC, was that it?

Antonin