public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] migrate Debian/Ubuntu to pip packages for docs + fix epub and latexpdf targets not finding glob images
@ 2026-02-16 11:26 Quentin Schulz
  2026-02-16 11:26 ` [PATCH v4 1/3] use a venv for installing packages with pip Quentin Schulz
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Quentin Schulz @ 2026-02-16 11:26 UTC (permalink / raw)
  To: docs; +Cc: Quentin Schulz, Antonin Godard

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>



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-03-02  9:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 11:26 [PATCH v4 0/3] migrate Debian/Ubuntu to pip packages for docs + fix epub and latexpdf targets not finding glob images Quentin Schulz
2026-02-16 11:26 ` [PATCH v4 1/3] use a venv for installing packages with pip Quentin Schulz
2026-02-18  8:18   ` [docs] " Antonin Godard
2026-02-23 17:33     ` Quentin Schulz
2026-02-24  8:28       ` Antonin Godard
2026-02-24 12:52         ` Quentin Schulz
2026-02-24 13:55           ` Quentin Schulz
2026-02-24 14:03             ` Antonin Godard
2026-02-16 11:26 ` [PATCH v4 2/3] consistently use pip packages for all distros Quentin Schulz
2026-02-16 11:26 ` [PATCH v4 3/3] convert SVGs to PDF and PNG using sphinxcontrib.rsvgconverter plugin Quentin Schulz
2026-02-16 14:26 ` [PATCH v4 0/3] migrate Debian/Ubuntu to pip packages for docs + fix epub and latexpdf targets not finding glob images Antonin Godard
2026-03-02  9:53 ` Antonin Godard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox