* [PATCH 00/15] Translate sphinx-pre-install to Python
@ 2025-06-30 21:34 Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 01/15] scripts: sphinx-pre-install: fix version check for Fedora Mauro Carvalho Chehab
` (16 more replies)
0 siblings, 17 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-kernel,
Akira Yokosawa, Sai Vishnu M
Hi Jon,
This series port scripts/sphinx-pre-install to Python. It started as
a bug-compatible version with the old logic.
Yet, while testing it with lxc and some Docker images, I opted
to also drop legacy logic from it and to add support for some
additional variants compatible with existing detection logic.
It also fixes some issues that were present at the proposed
install procedures that don't work anymore with new distro
versions.
I ended writing some scripts I used internally to test it.
Such scripts compare the diff output of both the .pl and
.py version. The differences were only blank lines for
gentoo and some warning reorder.
The test script also ran the install procedure for system,
venv and native Sphinx install.
Since there are distros which has a default Python 3.6
(like openSuse and RHEL8), I opted to make the script
compatible with it. Yet, internally it requires at least
Python 3.7(*) to support the build.
The tests were done with those containers, obtained from
lxc download templates or via podman run:
+--------------------|------------------------------|----------------+
| Name | release | container type |
+--------------------+------------------------------+----------------+
| debian | bookworm | lxc |
| ubuntu | plucky | lxc |
| ubuntu-lts | noble | lxc |
| almalinux | 9 | lxc |
| archlinux | current | lxc |
| gentoo | current | lxc |
| opensuse | tumbleweed | lxc |
| devuan | daedalus | lxc |
| kali | current | lxc |
| mint | wilma | lxc |
| fedora | 42 | lxc |
| centos | 9-Stream | lxc |
| rockylinux | 9 | lxc |
| oracle | 9 | lxc |
| amazonlinux | 2023 | lxc |
| openeuler | 25.03 | lxc |
| springdalelinux | 9 | lxc |
+--------------------+------------------------------+----------------+
| mageia | mageia:latest | docker |
| openmandriva | openmandriva/4.0 | docker |
| scientificlinux | eurolinux/scientific-linux-7 | docker |
| rhel | redhat/ubi8 | docker |
| opensuse-leap | opensuse/leap:15.6 | docker |
+--------------------+------------------------------+----------------+
It succeeded to install either with venv or system package (most
for both) for all those OSes:
Detected OS : AlmaLinux release 9.6 (Sage Margay).
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 7.4.7
Installing package_install : PASSED: Sphinx 3.4.3
Detected OS : Amazon Linux release 2023 (Amazon Linux).
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 7.4.7
Installing package_install : PASSED: Sphinx 3.4.3
Detected OS : Arch Linux.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.2.3
Detected OS : CentOS Stream release 9.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 7.4.7
Installing package_install : PASSED: Sphinx 3.4.3
Detected OS : Debian GNU/Linux 12.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 5.3.0
Detected OS : Devuan GNU/Linux 5.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 5.3.0
Detected OS : Fedora release 42 (Adams).
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.1.3
Detected OS : Gentoo Base System release 2.17.
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.2.3
Detected OS : Kali GNU/Linux 2025.2.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.1.3
Detected OS : Mageia 9.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.1.3
Installing package_install : PASSED: Sphinx 6.1.3
Detected OS : Linux Mint 22.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.1.3
Installing package_install : PASSED: Sphinx 4.3.2
Detected OS : openEuler release 25.03.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.1.3
Detected OS : OpenMandriva Lx 4.0.
Installing venv : WARNING: No such file or directory: 'sphinx-build'
Installing package_install : PASSED: Sphinx 8.2.3
Detected OS : openSUSE Leap 15.6.
Installing venv : WARNING: No such file or directory: 'sphinx-build'
Installing package_install : PASSED: Sphinx 7.2.6
Detected OS : openSUSE Tumbleweed.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.2.3
Detected OS : Oracle Linux Server release 9.6.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 7.4.7
Installing package_install : WARNING: No such file or directory: 'sphinx-build'
Detected OS : Rocky Linux release 9.6 (Blue Onyx).
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 7.4.7
Installing package_install : PASSED: Sphinx 3.4.3
Detected OS : Springdale Open Enterprise Linux release 9.2 (Parma).
Installing venv : PASSED: Sphinx 7.4.7
Installing package_install : PASSED: Sphinx 3.4.3
Detected OS : Ubuntu 24.04.2 LTS.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 7.2.6
Detected OS : Ubuntu 25.04.
Installing system_install : PASSED
Installing venv : PASSED: Sphinx 8.2.3
Installing package_install : PASSED: Sphinx 8.1.3
It also properly detected RHEL 8 string:
Detected OS : Red Hat Enterprise Linux release 8.10 (Ootpa).
Installing venv : WARNING: No such file or directory: 'sphinx-build'
Installing package_install : WARNING: No such file or directory: 'sphinx-build'
But, at this particular docker container, no repositories had
python3-sphinx nor python3-virtualenv, but I suspect that this
is a problem on this particular image, as I'm almost sure we
tested RHEL 8 in the past, so, I have hopes that this could
still work with real RHEL, if it has Python >= 3.7.
Yet, our goal is to support the latest LTS version, so
RHEL 8 is out of scope.
(*) Officially, the minimal Python version we endorse is
3.9, as several Python scripts at the Kernel won't run
with previous releases, but what we have for doc builds
is currently compatible with 3.7. We may later increase
it if you think it is a good idea. Yet, if you see the
Sphinx version above, you'll notice that some venv installed
7.4.7 as the latest version. It means that such distros
still have Python <= 3.9.
Mauro Carvalho Chehab (15):
scripts: sphinx-pre-install: fix version check for Fedora
scripts: sphinx-pre-install: rename it to
scripts/sphinx-pre-install.pl
scripts: sphinx-pre-install: Convert script to Python
scripts: sphinx-pre-install: Make it compatible with Python 3.6
scripts: sphinx-pre-install: run on a supported version
scripts: sphinx-pre-install: drop obsolete routines
scripts: sphinx-pre-install: drop support for old virtualenv
scripts: sphinx-pre-install: Address issues with OpenSUSE Leap 15.x
scripts: sphinx-pre-install.py fix opensuse hints
scripts: sphinx-pre-install.py: fix support for gentoo
scripts: sphinx-pre-install: Address issues with OpenSUSE Tumbleweed
scripts: sphinx-pre-install.py: only show portage hints once
scripts: sphinx-pre-install.py: cleanup rhel support
docs: Makefile: switch to the new scripts/sphinx-pre-install.py
scripts: sphinx-pre-install.pl: get rid of the old script
scripts/sphinx-pre-install | 2218 +++++++++++++++++++-----------------
1 file changed, 1164 insertions(+), 1054 deletions(-)
--
2.50.0
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 01/15] scripts: sphinx-pre-install: fix version check for Fedora
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 02/15] scripts: sphinx-pre-install: rename it to scripts/sphinx-pre-install.pl Mauro Carvalho Chehab
` (15 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
The script is now picking the wrong version. Fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 3f8d6925e896..07234d482fa8 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -413,7 +413,7 @@ sub give_redhat_hints()
my $old = 0;
my $rel;
my $noto_sans_redhat = "google-noto-sans-cjk-ttc-fonts";
- $rel = $1 if ($system_release =~ /(release|Linux)\s+(\d+)/);
+ $rel = $2 if ($system_release =~ /(release|Linux)\s+(\d+)/);
if (!($system_release =~ /Fedora/)) {
$map{"virtualenv"} = "python-virtualenv";
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 02/15] scripts: sphinx-pre-install: rename it to scripts/sphinx-pre-install.pl
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 01/15] scripts: sphinx-pre-install: fix version check for Fedora Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 03/15] scripts: sphinx-pre-install: Convert script to Python Mauro Carvalho Chehab
` (14 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
That helps us to later replace the scripts.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
Documentation/Makefile | 14 +++++++-------
.../{sphinx-pre-install => sphinx-pre-install.pl} | 0
2 files changed, 7 insertions(+), 7 deletions(-)
rename scripts/{sphinx-pre-install => sphinx-pre-install.pl} (100%)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index b98477df5ddf..c486fe3cc5e1 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -46,7 +46,7 @@ ifeq ($(HAVE_SPHINX),0)
.DEFAULT:
$(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)
@echo
- @$(srctree)/scripts/sphinx-pre-install
+ @$(srctree)/scripts/sphinx-pre-install.pl
@echo " SKIP Sphinx $@ target."
else # HAVE_SPHINX
@@ -121,7 +121,7 @@ $(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml $(YNL_TOOL)
htmldocs texinfodocs latexdocs epubdocs xmldocs: $(YNL_INDEX)
htmldocs:
- @$(srctree)/scripts/sphinx-pre-install --version-check
+ @$(srctree)/scripts/sphinx-pre-install.pl --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
# If Rust support is available and .config exists, add rustdoc generated contents.
@@ -135,7 +135,7 @@ endif
endif
texinfodocs:
- @$(srctree)/scripts/sphinx-pre-install --version-check
+ @$(srctree)/scripts/sphinx-pre-install.pl --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
# Note: the 'info' Make target is generated by sphinx itself when
@@ -147,7 +147,7 @@ linkcheckdocs:
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
latexdocs:
- @$(srctree)/scripts/sphinx-pre-install --version-check
+ @$(srctree)/scripts/sphinx-pre-install.pl --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
ifeq ($(HAVE_PDFLATEX),0)
@@ -160,7 +160,7 @@ else # HAVE_PDFLATEX
pdfdocs: DENY_VF = XDG_CONFIG_HOME=$(FONTS_CONF_DENY_VF)
pdfdocs: latexdocs
- @$(srctree)/scripts/sphinx-pre-install --version-check
+ @$(srctree)/scripts/sphinx-pre-install.pl --version-check
$(foreach var,$(SPHINXDIRS), \
$(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" $(DENY_VF) -C $(BUILDDIR)/$(var)/latex || sh $(srctree)/scripts/check-variable-fonts.sh || exit; \
mkdir -p $(BUILDDIR)/$(var)/pdf; \
@@ -170,11 +170,11 @@ pdfdocs: latexdocs
endif # HAVE_PDFLATEX
epubdocs:
- @$(srctree)/scripts/sphinx-pre-install --version-check
+ @$(srctree)/scripts/sphinx-pre-install.pl --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
xmldocs:
- @$(srctree)/scripts/sphinx-pre-install --version-check
+ @$(srctree)/scripts/sphinx-pre-install.pl --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
endif # HAVE_SPHINX
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install.pl
similarity index 100%
rename from scripts/sphinx-pre-install
rename to scripts/sphinx-pre-install.pl
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 03/15] scripts: sphinx-pre-install: Convert script to Python
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 01/15] scripts: sphinx-pre-install: fix version check for Fedora Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 02/15] scripts: sphinx-pre-install: rename it to scripts/sphinx-pre-install.pl Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 04/15] scripts: sphinx-pre-install: Make it compatible with Python 3.6 Mauro Carvalho Chehab
` (13 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
Port scripts/sphinx-pre-install to Python. That allows
a better maintainance of the file.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 1102 +++++++++++++++++++++++++++++++++
1 file changed, 1102 insertions(+)
create mode 100755 scripts/sphinx-pre-install.py
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
new file mode 100755
index 000000000000..dcee2181b72f
--- /dev/null
+++ b/scripts/sphinx-pre-install.py
@@ -0,0 +1,1102 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2017-2025 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+#
+# pylint: disable=C0103,C0114,C0115,C0116,C0301
+# pylint: disable=R0902,R0904,R0912,R0915,R1705,R1710,E1121
+
+
+import argparse
+import os
+import re
+import subprocess
+import sys
+from glob import glob
+
+
+def parse_version(version):
+ """Convert a major.minor.patch version into a tuple"""
+#
+ return tuple(int(x) for x in version.split("."))
+
+
+def ver_str(version):
+ """Returns a version tuple as major.minor.patch"""
+
+ return ".".join([str(x) for x in version])
+
+
+RECOMMENDED_VERSION = parse_version("3.4.3")
+
+
+class SphinxDependencyChecker:
+ # List of required texlive packages on Fedora and OpenSuse
+ texlive = {
+ "amsfonts.sty": "texlive-amsfonts",
+ "amsmath.sty": "texlive-amsmath",
+ "amssymb.sty": "texlive-amsfonts",
+ "amsthm.sty": "texlive-amscls",
+ "anyfontsize.sty": "texlive-anyfontsize",
+ "atbegshi.sty": "texlive-oberdiek",
+ "bm.sty": "texlive-tools",
+ "capt-of.sty": "texlive-capt-of",
+ "cmap.sty": "texlive-cmap",
+ "ctexhook.sty": "texlive-ctex",
+ "ecrm1000.tfm": "texlive-ec",
+ "eqparbox.sty": "texlive-eqparbox",
+ "eu1enc.def": "texlive-euenc",
+ "fancybox.sty": "texlive-fancybox",
+ "fancyvrb.sty": "texlive-fancyvrb",
+ "float.sty": "texlive-float",
+ "fncychap.sty": "texlive-fncychap",
+ "footnote.sty": "texlive-mdwtools",
+ "framed.sty": "texlive-framed",
+ "luatex85.sty": "texlive-luatex85",
+ "multirow.sty": "texlive-multirow",
+ "needspace.sty": "texlive-needspace",
+ "palatino.sty": "texlive-psnfss",
+ "parskip.sty": "texlive-parskip",
+ "polyglossia.sty": "texlive-polyglossia",
+ "tabulary.sty": "texlive-tabulary",
+ "threeparttable.sty": "texlive-threeparttable",
+ "titlesec.sty": "texlive-titlesec",
+ "ucs.sty": "texlive-ucs",
+ "upquote.sty": "texlive-upquote",
+ "wrapfig.sty": "texlive-wrapfig",
+ }
+
+ def __init__(self, args):
+ self.pdf = args.pdf
+ self.virtualenv = args.virtualenv
+ self.version_check = args.version_check
+
+ self.missing = {}
+
+ self.need = 0
+ self.optional = 0
+ self.need_symlink = 0
+ self.need_sphinx = 0
+ self.need_pip = 0
+ self.need_virtualenv = 0
+ self.rec_sphinx_upgrade = 0
+ self.verbose_warn_install = 1
+
+ self.system_release = ""
+ self.install = ""
+ self.virtenv_dir = ""
+ self.python_cmd = ""
+ self.activate_cmd = ""
+
+ self.min_version = (0, 0, 0)
+ self.cur_version = (0, 0, 0)
+ self.latest_avail_ver = (0, 0, 0)
+ self.venv_ver = (0, 0, 0)
+
+ prefix = os.environ.get("srctree", ".") + "/"
+
+ self.conf = prefix + "Documentation/conf.py"
+ self.requirement_file = prefix + "Documentation/sphinx/requirements.txt"
+ self.virtenv_prefix = ["sphinx_", "Sphinx_" ]
+
+ #
+ # Ancillary methods that don't depend on self
+ #
+
+ @staticmethod
+ def which(prog):
+ for path in os.environ.get("PATH", "").split(":"):
+ full_path = os.path.join(path, prog)
+ if os.access(full_path, os.X_OK):
+ return full_path
+
+ return None
+
+ @staticmethod
+ def find_python_no_venv():
+ # FIXME: does it makes sense now that this script is in Python?
+
+ result = subprocess.run(["pwd"], capture_output=True, text=True)
+ cur_dir = result.stdout.strip()
+
+ python_names = ["python3", "python"]
+
+ for d in os.environ.get("PATH", "").split(":"):
+ if f"{cur_dir}/sphinx" in d:
+ continue
+
+ for p in python_names:
+ if os.access(os.path.join(d, p), os.X_OK):
+ return os.path.join(d, p)
+
+ # Python not found at the PATH
+ return python_names[-1]
+
+ @staticmethod
+ def run(*args, **kwargs):
+ """Excecute a command, hiding its output by default"""
+
+ if not kwargs.get('capture_output', False):
+ if 'stdout' not in kwargs:
+ kwargs['stdout'] = subprocess.DEVNULL
+ if 'stderr' not in kwargs:
+ kwargs['stderr'] = subprocess.DEVNULL
+
+ return subprocess.run(*args, **kwargs)
+
+ #
+ # Methods to check if a feature exists
+ #
+
+ # Note: is_optional has 3 states:
+ # - 0: mandatory
+ # - 1: optional, but nice to have
+ # - 2: LaTeX optional - pdf builds without it, but may have visual impact
+
+ def check_missing(self, progs):
+ for prog, is_optional in sorted(self.missing.items()):
+ # At least on some LTS distros like CentOS 7, texlive doesn't
+ # provide all packages we need. When such distros are
+ # detected, we have to disable PDF output.
+ #
+ # So, we need to ignore the packages that distros would
+ # need for LaTeX to work
+ if is_optional == 2 and not self.pdf:
+ self.optional -= 1
+ continue
+
+ if self.verbose_warn_install:
+ if is_optional:
+ print(f'Warning: better to also install "{prog}".')
+ else:
+ print(f'ERROR: please install "{prog}", otherwise, build won\'t work.')
+
+ self.install += " " + progs.get(prog, prog)
+
+ self.install = self.install.lstrip()
+
+ def add_package(self, package, is_optional):
+ self.missing[package] = is_optional
+ if is_optional:
+ self.optional += 1
+ else:
+ self.need += 1
+
+ def check_missing_file(self, files, package, is_optional):
+ for f in files:
+ if os.path.exists(f):
+ return
+ self.add_package(package, is_optional)
+
+ def check_program(self, prog, is_optional):
+ found = self.which(prog)
+ if found:
+ return found
+
+ self.add_package(prog, is_optional)
+
+ return None
+
+ def check_perl_module(self, prog, is_optional):
+ # While testing with lxc download template, one of the
+ # distros (Oracle) didn't have perl - nor even an option to install
+ # before installing oraclelinux-release-el9 package.
+ #
+ # Check it before running an error. If perl is not there,
+ # add it as a mandatory package, as some parts of the doc builder
+ # needs it.
+ if not self.which("perl"):
+ self.add_package("perl", 0)
+ self.add_package(prog, is_optional)
+ return
+
+ try:
+ self.run(["perl", f"-M{prog}", "-e", "1"], check=True)
+ except subprocess.CalledProcessError:
+ self.add_package(prog, is_optional)
+
+ def check_python_module(self, module, is_optional):
+ # FIXME: is it needed at the Python version? Maybe due to venv?
+ if not self.python_cmd:
+ return
+
+ try:
+ self.run([self.python_cmd, "-c", f"import {module}"], check=True)
+ except subprocess.CalledProcessError:
+ self.add_package(module, is_optional)
+
+ def check_rpm_missing(self, pkgs, is_optional):
+ for prog in pkgs:
+ try:
+ self.run(["rpm", "-q", prog], check=True)
+ except subprocess.CalledProcessError:
+ self.add_package(prog, is_optional)
+
+ def check_pacman_missing(self, pkgs, is_optional):
+ for prog in pkgs:
+ try:
+ self.run(["pacman", "-Q", prog], check=True)
+ except subprocess.CalledProcessError:
+ self.add_package(prog, is_optional)
+
+ def check_missing_tex(self, is_optional):
+ kpsewhich = self.which("kpsewhich")
+ for prog, package in self.texlive.items():
+
+ # If kpsewhich is not there, just add it to deps
+ if not kpsewhich:
+ self.add_package(package, is_optional)
+ continue
+
+ # Check if the package is needed
+ try:
+ result = self.run(
+ [kpsewhich, prog], stdout=subprocess.PIPE, text=True, check=True
+ )
+
+ # Didn't find. Add it
+ if not result.stdout.strip():
+ self.add_package(package, is_optional)
+
+ except subprocess.CalledProcessError:
+ # kpsewhich returned an error. Add it, just in case
+ self.add_package(package, is_optional)
+
+ def get_sphinx_fname(self):
+ if "SPHINXBUILD" in os.environ:
+ return os.environ["SPHINXBUILD"]
+
+ fname = "sphinx-build"
+ if self.which(fname):
+ return fname
+
+ fname = "sphinx-build-3"
+ if self.which(fname):
+ self.need_symlink = 1
+ return fname
+
+ return ""
+
+ def get_sphinx_version(self, cmd):
+ try:
+ result = self.run([cmd, "--version"],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ text=True, check=True)
+ except (subprocess.CalledProcessError, FileNotFoundError):
+ return None
+
+ for line in result.stdout.split("\n"):
+ match = re.match(r"^sphinx-build\s+([\d\.]+)(?:\+(?:/[\da-f]+)|b\d+)?\s*$", line)
+ if match:
+ return parse_version(match.group(1))
+
+ match = re.match(r"^Sphinx.*\s+([\d\.]+)\s*$", line)
+ if match:
+ return parse_version(match.group(1))
+
+ def check_sphinx(self):
+ try:
+ with open(self.conf, "r", encoding="utf-8") as f:
+ for line in f:
+ match = re.match(r"^\s*needs_sphinx\s*=\s*[\'\"]([\d\.]+)[\'\"]", line)
+ if match:
+ self.min_version = parse_version(match.group(1))
+ break
+ except IOError:
+ sys.exit(f"Can't open {self.conf}")
+
+ if not self.min_version:
+ sys.exit(f"Can't get needs_sphinx version from {self.conf}")
+
+ self.virtenv_dir = self.virtenv_prefix[0] + "latest"
+
+ sphinx = self.get_sphinx_fname()
+ if not sphinx:
+ self.need_sphinx = 1
+ return
+
+ self.cur_version = self.get_sphinx_version(sphinx)
+ if not self.cur_version:
+ sys.exit(f"{sphinx} didn't return its version")
+
+ if self.cur_version < self.min_version:
+ curver = ver_str(self.cur_version)
+ minver = ver_str(self.min_version)
+
+ print(f"ERROR: Sphinx version is {curver}. It should be >= {minver}")
+ self.need_sphinx = 1
+ return
+
+ # On version check mode, just assume Sphinx has all mandatory deps
+ if self.version_check and self.cur_version >= RECOMMENDED_VERSION:
+ sys.exit(0)
+
+ def catcheck(self, filename):
+ if os.path.exists(filename):
+ with open(filename, "r", encoding="utf-8") as f:
+ return f.read().strip()
+ return ""
+
+ #
+ # Distro-specific hints methods
+ #
+
+ def give_debian_hints(self):
+ progs = {
+ "Pod::Usage": "perl-modules",
+ "convert": "imagemagick",
+ "dot": "graphviz",
+ "ensurepip": "python3-venv",
+ "python-sphinx": "python3-sphinx",
+ "rsvg-convert": "librsvg2-bin",
+ "virtualenv": "virtualenv",
+ "xelatex": "texlive-xetex",
+ "yaml": "python3-yaml",
+ }
+
+ if self.pdf:
+ pdf_pkgs = {
+ "texlive-lang-chinese": [
+ "/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty",
+ ],
+ "fonts-dejavu": [
+ "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
+ ],
+ "fonts-noto-cjk": [
+ "/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
+ "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
+ "/usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc",
+ ],
+ }
+
+ for package, files in pdf_pkgs.items():
+ self.check_missing_file(files, package, 2)
+
+ self.check_program("dvipng", 2)
+
+ self.check_missing(progs)
+
+ if not self.need and not self.optional:
+ return
+
+ if self.verbose_warn_install:
+ print("You should run:")
+ print(f"\n\tsudo apt-get install {self.install}")
+
+ def give_redhat_hints(self):
+ progs = {
+ "Pod::Usage": "perl-Pod-Usage",
+ "convert": "ImageMagick",
+ "dot": "graphviz",
+ "python-sphinx": "python3-sphinx",
+ "rsvg-convert": "librsvg2-tools",
+ "virtualenv": "python3-virtualenv",
+ "xelatex": "texlive-xetex-bin",
+ "yaml": "python3-pyyaml",
+ }
+
+ fedora26_opt_pkgs = [
+ "graphviz-gd", # Fedora 26: needed for PDF support
+ ]
+
+ fedora_tex_pkgs = [
+ "dejavu-sans-fonts",
+ "dejavu-sans-mono-fonts",
+ "dejavu-serif-fonts",
+ "texlive-collection-fontsrecommended",
+ "texlive-collection-latex",
+ "texlive-xecjk",
+ ]
+
+ old = 0
+ rel = None
+ pkg_manager = "dnf"
+
+ match = re.search(r"(release|Linux)\s+(\d+)", self.system_release)
+ if match:
+ rel = int(match.group(2))
+
+ if not rel:
+ print("Couldn't identify release number")
+ old = 1
+ self.pdf = False
+ elif re.search("Fedora", self.system_release):
+ # Fedora 38 and upper use this CJK font
+
+ noto_sans_redhat = "google-noto-sans-cjk-fonts"
+ else:
+ # Almalinux, CentOS, RHEL, ...
+
+ # at least up to version 9 (and Fedora < 38), that's the CJK font
+ noto_sans_redhat = "google-noto-sans-cjk-ttc-fonts"
+
+ progs["virtualenv"] = "python-virtualenv"
+
+ if rel and rel < 8:
+ old = 1
+ self.pdf = False
+
+ # RHEL 7 is in ELS, currently up to Jun, 2026
+
+ print("Note: texlive packages on RHEL/CENTOS <= 7 are incomplete. Can't support PDF output")
+ print("If you want to build PDF, please read:")
+ print("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/")
+
+ if self.pdf:
+ pdf_pkgs = [
+ "/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
+ "/usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-Regular.ttc",
+ ]
+
+ self.check_missing_file(pdf_pkgs, noto_sans_redhat, 2)
+
+ if not old:
+ self.check_rpm_missing(fedora26_opt_pkgs, 2)
+ self.check_rpm_missing(fedora_tex_pkgs, 2)
+
+ self.check_missing_tex(2)
+
+ self.check_missing(progs)
+
+ if not self.need and not self.optional:
+ return
+
+ if self.verbose_warn_install:
+ print("You should run:")
+
+ if old:
+ # dnf is there since Fedora 18+ and RHEL 8
+ pkg_manager = "yum"
+
+ print(f"\n\tsudo {pkg_manager} install -y {self.install}")
+
+ def give_opensuse_hints(self):
+ progs = {
+ "Pod::Usage": "perl-Pod-Usage",
+ "convert": "ImageMagick",
+ "dot": "graphviz",
+ "python-sphinx": "python3-sphinx",
+ "virtualenv": "python3-virtualenv",
+ "xelatex": "texlive-xetex-bin",
+ "yaml": "python3-pyyaml",
+ }
+
+ # On Tumbleweed, this package is also named rsvg-convert
+ if not re.search(r"Tumbleweed", self.system_release):
+ progs["rsvg-convert"] = "rsvg-view"
+
+ suse_tex_pkgs = [
+ "texlive-babel-english",
+ "texlive-caption",
+ "texlive-colortbl",
+ "texlive-courier",
+ "texlive-dvips",
+ "texlive-helvetic",
+ "texlive-makeindex",
+ "texlive-metafont",
+ "texlive-metapost",
+ "texlive-palatino",
+ "texlive-preview",
+ "texlive-times",
+ "texlive-zapfchan",
+ "texlive-zapfding",
+ ]
+
+ progs["latexmk"] = "texlive-latexmk-bin"
+
+ # FIXME: add support for installing CJK fonts
+ #
+ # I tried hard, but was unable to find a way to install
+ # "Noto Sans CJK SC" on openSUSE
+
+ if self.pdf:
+ self.check_rpm_missing(suse_tex_pkgs, 2)
+ if self.pdf:
+ self.check_missing_tex(2)
+ self.check_missing(progs)
+
+ if not self.need and not self.optional:
+ return
+
+ if self.verbose_warn_install:
+ print("You should run:")
+ print(f"\n\tsudo zypper install --no-recommends {self.install}")
+
+ def give_mageia_hints(self):
+ progs = {
+ "Pod::Usage": "perl-Pod-Usage",
+ "convert": "ImageMagick",
+ "dot": "graphviz",
+ "python-sphinx": "python3-sphinx",
+ "rsvg-convert": "librsvg2",
+ "virtualenv": "python3-virtualenv",
+ "xelatex": "texlive",
+ "yaml": "python3-yaml",
+ }
+
+ tex_pkgs = [
+ "texlive-fontsextra",
+ ]
+
+ if re.search(r"OpenMandriva", self.system_release):
+ packager_cmd = "dnf install"
+ noto_sans = "noto-sans-cjk-fonts"
+ tex_pkgs = ["texlive-collection-fontsextra"]
+ else:
+ packager_cmd = "urpmi"
+ noto_sans = "google-noto-sans-cjk-ttc-fonts"
+
+ progs["latexmk"] = "texlive-collection-basic"
+
+ if self.pdf:
+ pdf_pkgs = [
+ "/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
+ "/usr/share/fonts/TTF/NotoSans-Regular.ttf",
+ ]
+
+ self.check_missing_file(pdf_pkgs, noto_sans, 2)
+ self.check_rpm_missing(tex_pkgs, 2)
+
+ self.check_missing(progs)
+
+ if not self.need and not self.optional:
+ return
+ if self.verbose_warn_install:
+ print("You should run:")
+ print(f"\n\tsudo {packager_cmd} {self.install}")
+
+ def give_arch_linux_hints(self):
+ progs = {
+ "convert": "imagemagick",
+ "dot": "graphviz",
+ "latexmk": "texlive-core",
+ "rsvg-convert": "extra/librsvg",
+ "virtualenv": "python-virtualenv",
+ "xelatex": "texlive-xetex",
+ "yaml": "python-yaml",
+ }
+
+ archlinux_tex_pkgs = [
+ "texlive-core",
+ "texlive-latexextra",
+ "ttf-dejavu",
+ ]
+
+ if self.pdf:
+ self.check_pacman_missing(archlinux_tex_pkgs, 2)
+
+ self.check_missing_file(
+ ["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"],
+ "noto-fonts-cjk",
+ 2,
+ )
+
+ self.check_missing(progs)
+
+ if not self.need and not self.optional:
+ return
+ if self.verbose_warn_install:
+ print("You should run:")
+ print(f"\n\tsudo pacman -S {self.install}")
+
+ def give_gentoo_hints(self):
+ progs = {
+ "convert": "media-gfx/imagemagick",
+ "dot": "media-gfx/graphviz",
+ "rsvg-convert": "gnome-base/librsvg",
+ "virtualenv": "dev-python/virtualenv",
+ "xelatex": "dev-texlive/texlive-xetex media-fonts/dejavu",
+ "yaml": "dev-python/pyyaml",
+ }
+
+ if self.pdf:
+ pdf_pkgs = {
+ "media-fonts/dejavu": [
+ "/usr/share/fonts/dejavu/DejaVuSans.ttf",
+ ],
+ "media-fonts/noto-cjk": [
+ "/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
+ "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc",
+ ],
+ }
+ for package, files in pdf_pkgs.items():
+ self.check_missing_file(files, package, 2)
+
+ self.check_missing(progs)
+
+ if not self.need and not self.optional:
+ return
+
+ if self.verbose_warn_install:
+ print("You should run:")
+ print("\n")
+
+ imagemagick = "media-gfx/imagemagick svg png"
+ cairo = "media-gfx/graphviz cairo pdf"
+ portage_imagemagick = "/etc/portage/package.use/imagemagick"
+ portage_cairo = "/etc/portage/package.use/graphviz"
+
+ result = self.run(["grep", "imagemagick", portage_imagemagick],
+ stdout=subprocess.PIPE, text=True)
+ if not result.stdout.strip():
+ print(f"\tsudo su -c 'echo \"{imagemagick}\" > {portage_imagemagick}'")
+
+ result = self.run(["grep", "graphviz", portage_cairo],
+ stdout=subprocess.PIPE, text=True)
+
+ if not result.stdout.strip():
+ print(f"\tsudo su -c 'echo \"{cairo}\" > {portage_cairo}'")
+
+ print(f"\tsudo emerge --ask {self.install}")
+
+ #
+ # Dispatch the check to an os_specific hinter
+ #
+
+ def check_distros(self):
+ # OS-specific hints logic
+ os_hints = {
+ re.compile("Red Hat Enterprise Linux"): self.give_redhat_hints,
+ re.compile("Fedora"): self.give_redhat_hints,
+ re.compile("AlmaLinux"): self.give_redhat_hints,
+ re.compile("Amazon Linux"): self.give_redhat_hints,
+ re.compile("CentOS"): self.give_redhat_hints,
+ re.compile("openEuler"): self.give_redhat_hints,
+ re.compile("Oracle Linux Server"): self.give_redhat_hints,
+ re.compile("Rocky Linux"): self.give_redhat_hints,
+ re.compile("Scientific Linux"): self.give_redhat_hints,
+ re.compile("Springdale Open Enterprise"): self.give_redhat_hints,
+
+ re.compile("Ubuntu"): self.give_debian_hints,
+ re.compile("Debian"): self.give_debian_hints,
+ re.compile("Devuan"): self.give_debian_hints,
+ re.compile("Kali"): self.give_debian_hints,
+ re.compile("Mint"): self.give_debian_hints,
+
+ re.compile("openSUSE"): self.give_opensuse_hints,
+
+ re.compile("Mageia"): self.give_mageia_hints,
+ re.compile("OpenMandriva"): self.give_mageia_hints,
+
+ re.compile("Arch Linux"): self.give_arch_linux_hints,
+ re.compile("Gentoo"): self.give_gentoo_hints,
+ }
+
+ # If the OS is detected, use per-OS hint logic
+ for regex, os_hint in os_hints.items():
+ if regex.search(self.system_release):
+ os_hint()
+
+ return
+
+ #
+ # Fall-back to generic hint code for other distros
+ # That's far from ideal, specially for LaTeX dependencies.
+ #
+ progs = {"sphinx-build": "sphinx"}
+ if self.pdf:
+ self.check_missing_tex(2)
+
+ self.check_missing(progs)
+
+ print(f"I don't know distro {self.system_release}.")
+ print("So, I can't provide you a hint with the install procedure.")
+ print("There are likely missing dependencies.")
+
+ #
+ # Common dependencies
+ #
+ def deactivate_help(self):
+ print("\n If you want to exit the virtualenv, you can use:")
+ print("\tdeactivate")
+
+ def get_virtenv(self):
+ cwd = os.getcwd()
+
+ activates = []
+
+ # Add all sphinx prefixes with possible version numbers
+ for p in self.virtenv_prefix:
+ activates += glob(f"{cwd}/{p}[0-9]*/bin/activate")
+
+ activates.sort(reverse=True, key=str.lower)
+
+ # Place sphinx_latest first, if it exists
+ for p in self.virtenv_prefix:
+ activates = glob(f"{cwd}/{p}*latest/bin/activate") + activates
+
+ ver = (0, 0, 0)
+ for f in activates:
+ # Discard too old Sphinx virtual environments
+ match = re.search(r"(\d+)\.(\d+)\.(\d+)", f)
+ if match:
+ ver = (int(match.group(1)), int(match.group(2)), int(match.group(3)))
+
+ if ver < self.min_version:
+ continue
+
+ sphinx_cmd = f.replace("activate", "sphinx-build")
+ if not os.path.isfile(sphinx_cmd):
+ continue
+
+ ver = self.get_sphinx_version(sphinx_cmd)
+
+ if not ver:
+ venv_dir = f.replace("/bin/activate", "")
+ print(f"Warning: virtual environment {venv_dir} is not working.\n" \
+ "Python version upgrade? Remove it with:\n\n" \
+ "\trm -rf {venv_dir}\n\n")
+ else:
+ if self.need_sphinx and ver >= self.min_version:
+ return (f, ver)
+ elif parse_version(ver) > self.cur_version:
+ return (f, ver)
+
+ return ("", ver)
+
+ def recommend_sphinx_upgrade(self):
+ # Avoid running sphinx-builds from venv if cur_version is good
+ if self.cur_version and self.cur_version >= RECOMMENDED_VERSION:
+ self.latest_avail_ver = self.cur_version
+ return None
+
+ # Get the highest version from sphinx_*/bin/sphinx-build and the
+ # corresponding command to activate the venv/virtenv
+ self.activate_cmd, self.venv_ver = self.get_virtenv()
+
+ # Store the highest version from Sphinx existing virtualenvs
+ if self.activate_cmd and self.venv_ver > self.cur_version:
+ self.latest_avail_ver = self.venv_ver
+ else:
+ if self.cur_version:
+ self.latest_avail_ver = self.cur_version
+ else:
+ self.latest_avail_ver = (0, 0, 0)
+
+ # As we don't know package version of Sphinx, and there's no
+ # virtual environments, don't check if upgrades are needed
+ if not self.virtualenv:
+ if not self.latest_avail_ver:
+ return None
+
+ return self.latest_avail_ver
+
+ # Either there are already a virtual env or a new one should be created
+ self.need_pip = 1
+
+ if not self.latest_avail_ver:
+ return None
+
+ # Return if the reason is due to an upgrade or not
+ if self.latest_avail_ver != (0, 0, 0):
+ if self.latest_avail_ver < RECOMMENDED_VERSION:
+ self.rec_sphinx_upgrade = 1
+
+ return self.latest_avail_ver
+
+ def recommend_sphinx_version(self, virtualenv_cmd):
+ # The logic here is complex, as it have to deal with different versions:
+ # - minimal supported version;
+ # - minimal PDF version;
+ # - recommended version.
+ # It also needs to work fine with both distro's package and venv/virtualenv
+
+ # Version is OK. Nothing to do.
+ if self.cur_version != (0, 0, 0) and self.cur_version >= RECOMMENDED_VERSION:
+ return
+
+ if not self.need_sphinx:
+ # sphinx-build is present and its version is >= $min_version
+
+ # only recommend enabling a newer virtenv version if makes sense.
+ if self.latest_avail_ver and self.latest_avail_ver > self.cur_version:
+ print("\nYou may also use the newer Sphinx version {self.latest_avail_ver} with:")
+ if f"{self.virtenv_prefix}" in os.getcwd():
+ print("\tdeactivate")
+ print(f"\t. {self.activate_cmd}")
+ self.deactivate_help()
+ return
+
+ if self.latest_avail_ver and self.latest_avail_ver >= RECOMMENDED_VERSION:
+ return
+
+ if not self.virtualenv:
+ # No sphinx either via package or via virtenv. As we can't
+ # Compare the versions here, just return, recommending the
+ # user to install it from the package distro.
+ if not self.latest_avail_ver or self.latest_avail_ver == (0, 0, 0):
+ return
+
+ # User doesn't want a virtenv recommendation, but he already
+ # installed one via virtenv with a newer version.
+ # So, print commands to enable it
+ if self.latest_avail_ver > self.cur_version:
+ print("\nYou may also use the Sphinx virtualenv version {self.latest_avail_ver} with:")
+ if f"{self.virtenv_prefix}" in os.getcwd():
+ print("\tdeactivate")
+ print(f"\t. {self.activate_cmd}")
+ self.deactivate_help()
+ return
+ print("\n")
+ else:
+ if self.need_sphinx:
+ self.need += 1
+
+ # Suggest newer versions if current ones are too old
+ if self.latest_avail_ver and self.latest_avail_ver >= self.min_version:
+ if self.latest_avail_ver >= RECOMMENDED_VERSION:
+ print("\nNeed to activate Sphinx (version {self.latest_avail_ver}) on virtualenv with:")
+ print(f"\t. {self.activate_cmd}")
+ self.deactivate_help()
+ return
+
+ # Version is above the minimal required one, but may be
+ # below the recommended one. So, print warnings/notes
+ if self.latest_avail_ver < RECOMMENDED_VERSION:
+ print(f"Warning: It is recommended at least Sphinx version {RECOMMENDED_VERSION}.")
+
+ # At this point, either it needs Sphinx or upgrade is recommended,
+ # both via pip
+
+ if self.rec_sphinx_upgrade:
+ if not self.virtualenv:
+ print("Instead of install/upgrade Python Sphinx pkg, you could use pip/pypi with:\n\n")
+ else:
+ print("To upgrade Sphinx, use:\n\n")
+ else:
+ print("\nSphinx needs to be installed either:\n1) via pip/pypi with:\n")
+
+ self.python_cmd = self.find_python_no_venv()
+
+ print(f"\t{virtualenv_cmd} {self.virtenv_dir}")
+ print(f"\t. {self.virtenv_dir}/bin/activate")
+ print(f"\tpip install -r {self.requirement_file}")
+ self.deactivate_help()
+
+ print("\n2) As a package with:")
+
+ old_need = self.need
+ old_optional = self.optional
+ self.missing = {}
+ self.pdf = False
+ self.optional = 0
+ self.install = ""
+ old_verbose = self.verbose_warn_install
+ self.verbose_warn_install = 0
+
+ self.add_package("python-sphinx", 0)
+
+ self.check_distros()
+
+ self.need = old_need
+ self.optional = old_optional
+ self.verbose_warn_install = old_verbose
+
+ print("\n" \
+ " Please note that Sphinx >= 3.0 will currently produce false-positive\n" \
+ " warning when the same name is used for more than one type (functions,\n" \
+ " structs, enums,...). This is known Sphinx bug. For more details, see:\n" \
+ "\thttps://github.com/sphinx-doc/sphinx/pull/8313")
+
+ def check_needs(self):
+ self.get_system_release()
+
+ # Check if Sphinx is already accessible from current environment
+ self.check_sphinx()
+
+ if self.system_release:
+ print(f"Detected OS: {self.system_release}.")
+ else:
+ print("Unknown OS")
+ if self.cur_version != (0, 0, 0):
+ ver = ver_str(self.cur_version)
+ print(f"Sphinx version: {ver}\n")
+
+ # FIXME: Check python command line, trying first python3
+ self.python_cmd = self.which("python3")
+ if not self.python_cmd:
+ self.python_cmd = self.check_program("python", 0)
+
+ # Check the type of virtual env, depending on Python version
+ if self.python_cmd:
+ if self.virtualenv:
+ try:
+ result = self.run(
+ [self.python_cmd, "--version"],
+ capture_output=True,
+ text=True,
+ check=True,
+ )
+
+ output = result.stdout + result.stderr
+
+ match = re.search(r"(\d+)\.(\d+)\.", output)
+ if match:
+ major = int(match.group(1))
+ minor = int(match.group(2))
+
+ if major < 3:
+ sys.exit("Python 3 is required to build the kernel docs")
+ if major == 3 and minor < 3:
+ self.need_virtualenv = True
+ else:
+ sys.exit(f"Warning: couldn't identify {self.python_cmd} version!")
+
+ except subprocess.CalledProcessError as e:
+ sys.exit(f"Error checking Python version: {e}")
+ else:
+ self.add_package("python-sphinx", 0)
+
+ self.venv_ver = self.recommend_sphinx_upgrade()
+
+ virtualenv_cmd = ""
+
+ if self.need_pip:
+ # Set virtualenv command line, if python < 3.3
+ # FIXME: can be removed as we're now with an upper min requirement
+ # but then we need to check python version
+ if self.need_virtualenv:
+ virtualenv_cmd = self.which("virtualenv-3")
+ if not virtualenv_cmd:
+ virtualenv_cmd = self.which("virtualenv-3.5")
+ if not virtualenv_cmd:
+ self.check_program("virtualenv", 0)
+ virtualenv_cmd = "virtualenv"
+ else:
+ virtualenv_cmd = f"{self.python_cmd} -m venv"
+ self.check_python_module("ensurepip", 0)
+
+ # Check for needed programs/tools
+ self.check_perl_module("Pod::Usage", 0)
+ self.check_python_module("yaml", 0)
+ self.check_program("make", 0)
+ self.check_program("gcc", 0)
+ self.check_program("dot", 1)
+ self.check_program("convert", 1)
+
+ if self.pdf:
+ # Extra PDF files - should use 2 for LaTeX is_optional
+ self.check_program("xelatex", 2)
+ self.check_program("rsvg-convert", 2)
+ self.check_program("latexmk", 2)
+
+ # Do distro-specific checks and output distro-install commands
+ self.check_distros()
+
+ if not self.python_cmd:
+ if self.need == 1:
+ sys.exit("Can't build as 1 mandatory dependency is missing")
+ elif self.need:
+ sys.exit(f"Can't build as {self.need} mandatory dependencies are missing")
+
+ # Check if sphinx-build is called sphinx-build-3
+ if self.need_symlink:
+ sphinx_path = self.which("sphinx-build-3")
+ if sphinx_path:
+ print(f"\tsudo ln -sf {sphinx_path} /usr/bin/sphinx-build\n")
+
+ self.recommend_sphinx_version(virtualenv_cmd)
+ print("")
+
+ if not self.optional:
+ print("All optional dependencies are met.")
+
+ if self.need == 1:
+ sys.exit("Can't build as 1 mandatory dependency is missing")
+ elif self.need:
+ sys.exit(f"Can't build as {self.need} mandatory dependencies are missing")
+
+ print("Needed package dependencies are met.")
+
+ def get_system_release(self):
+ """
+ Determine the system type. There's no unique way that would work
+ with all distros with a minimal package install. So, several
+ methods are used here.
+
+ By default, it will use lsb_release function. If not available, it will
+ fail back to reading the known different places where the distro name
+ is stored.
+
+ Several modern distros now have /etc/os-release, which usually have
+ a decent coverage.
+ """
+
+ if self.which("lsb_release"):
+ result = self.run(["lsb_release", "-d"], capture_output=True, text=True)
+ self.system_release = result.stdout.replace("Description:", "").strip()
+
+ release_files = [
+ "/etc/system-release",
+ "/etc/redhat-release",
+ "/etc/lsb-release",
+ "/etc/gentoo-release",
+ ]
+
+ if not self.system_release:
+ for f in release_files:
+ self.system_release = self.catcheck(f)
+ if self.system_release:
+ break
+
+ # This seems more common than LSB these days
+ if not self.system_release:
+ os_var = {}
+ try:
+ with open("/etc/os-release", "r", encoding="utf-8") as f:
+ for line in f:
+ match = re.match(r"^([\w\d\_]+)=\"?([^\"]*)\"?\n", line)
+ if match:
+ os_var[match.group(1)] = match.group(2)
+
+ self.system_release = os_var.get("NAME", "")
+ if "VERSION_ID" in os_var:
+ self.system_release += " " + os_var["VERSION_ID"]
+ elif "VERSION" in os_var:
+ self.system_release += " " + os_var["VERSION"]
+ except IOError:
+ pass
+
+ if not self.system_release:
+ self.system_release = self.catcheck("/etc/issue")
+
+ self.system_release = self.system_release.strip()
+
+DESCRIPTION = """
+Process some flags related to Sphinx installation and documentation build.
+"""
+
+
+def main():
+ parser = argparse.ArgumentParser(description=DESCRIPTION)
+
+ parser.add_argument(
+ "--no-virtualenv",
+ action="store_false",
+ dest="virtualenv",
+ help="Recommend installing Sphinx instead of using a virtualenv",
+ )
+
+ parser.add_argument(
+ "--no-pdf",
+ action="store_false",
+ dest="pdf",
+ help="Don't check for dependencies required to build PDF docs",
+ )
+
+ parser.add_argument(
+ "--version-check",
+ action="store_true",
+ dest="version_check",
+ help="If version is compatible, don't check for missing dependencies",
+ )
+
+ args = parser.parse_args()
+
+ checker = SphinxDependencyChecker(args)
+
+ checker.check_needs()
+
+
+if __name__ == "__main__":
+ main()
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 04/15] scripts: sphinx-pre-install: Make it compatible with Python 3.6
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (2 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 03/15] scripts: sphinx-pre-install: Convert script to Python Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 05/15] scripts: sphinx-pre-install: run on a supported version Mauro Carvalho Chehab
` (12 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
The minimal version requirements we have is 3.9. Yet, the
script which detects it is this one. So, let's try supporting
an old version here, as we may want to suggest to upgrade
Python version to build the docs.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index dcee2181b72f..71d86b230b22 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -115,7 +115,8 @@ class SphinxDependencyChecker:
def find_python_no_venv():
# FIXME: does it makes sense now that this script is in Python?
- result = subprocess.run(["pwd"], capture_output=True, text=True)
+ result = SphinxDependencyChecker.run(["pwd"], capture_output=True,
+ text=True)
cur_dir = result.stdout.strip()
python_names = ["python3", "python"]
@@ -135,12 +136,23 @@ class SphinxDependencyChecker:
def run(*args, **kwargs):
"""Excecute a command, hiding its output by default"""
- if not kwargs.get('capture_output', False):
+ capture_output = kwargs.pop('capture_output', False)
+
+ if capture_output:
+ if 'stdout' not in kwargs:
+ kwargs['stdout'] = subprocess.PIPE
+ if 'stderr' not in kwargs:
+ kwargs['stderr'] = subprocess.PIPE
+ else:
if 'stdout' not in kwargs:
kwargs['stdout'] = subprocess.DEVNULL
if 'stderr' not in kwargs:
kwargs['stderr'] = subprocess.DEVNULL
+ # Don't break with older Python versions
+ if 'text' in kwargs and sys.version_info < (3, 7):
+ kwargs['universal_newlines'] = kwargs.pop('text')
+
return subprocess.run(*args, **kwargs)
#
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 05/15] scripts: sphinx-pre-install: run on a supported version
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (3 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 04/15] scripts: sphinx-pre-install: Make it compatible with Python 3.6 Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 06/15] scripts: sphinx-pre-install: drop obsolete routines Mauro Carvalho Chehab
` (11 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
The scripts/sphinx-pre-install is used to detect problems at
the system environment and adjust it to build the Kernel
documentation. If the version is too old, it won't run, though.
Check if the version which started the script is valid. If not,
seek for a new one that is compatible with documentation
build.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 65 ++++++++++++++++++++++++++++++++++-
1 file changed, 64 insertions(+), 1 deletion(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 71d86b230b22..3912359d2bae 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -5,6 +5,9 @@
# pylint: disable=C0103,C0114,C0115,C0116,C0301
# pylint: disable=R0902,R0904,R0912,R0915,R1705,R1710,E1121
+# Note: this script requires at least Python 3.6 to run.
+# Don't add changes not compatible with it, it is meant to report
+# incompatible python versions.
import argparse
import os
@@ -16,7 +19,6 @@ from glob import glob
def parse_version(version):
"""Convert a major.minor.patch version into a tuple"""
-#
return tuple(int(x) for x in version.split("."))
@@ -27,6 +29,7 @@ def ver_str(version):
RECOMMENDED_VERSION = parse_version("3.4.3")
+MIN_PYTHON_VERSION = parse_version("3.7")
class SphinxDependencyChecker:
@@ -132,6 +135,65 @@ class SphinxDependencyChecker:
# Python not found at the PATH
return python_names[-1]
+ @staticmethod
+ def get_python_version(cmd):
+
+ result = SphinxDependencyChecker.run([cmd, "--version"],
+ capture_output=True, text=True)
+ version = result.stdout.strip()
+
+ match = re.search(r"(\d+\.\d+\.\d+)", version)
+ if match:
+ return parse_version(match.group(1))
+
+ print(f"Can't parse version {version}")
+ return (0, 0, 0)
+
+ @staticmethod
+ def find_python():
+
+ patterns = [
+ "python3.[0-9]",
+ "python3.[0-9][0-9]",
+ ]
+
+ new_python_cmd = None
+
+ # Seek for a python binary newer than MIN_PYTHON_VERSION
+ for path in os.getenv("PATH", "").split(":"):
+ for pattern in patterns:
+ for cmd in glob(os.path.join(path, pattern)):
+ if os.path.isfile(cmd) and os.access(cmd, os.X_OK):
+ version = SphinxDependencyChecker.get_python_version(cmd)
+ if version >= MIN_PYTHON_VERSION:
+ return(cmd)
+
+ @staticmethod
+ def check_python():
+
+ cur_ver = sys.version_info[:3]
+ if cur_ver >= MIN_PYTHON_VERSION:
+ return
+
+ python_ver = ver_str(cur_ver)
+
+ new_python_cmd = SphinxDependencyChecker.find_python()
+ if not new_python_cmd:
+ print(f"ERROR: Python version {python_ver} is not spported anymore")
+ print(f" Can't find a new version. This script may fail")
+ return
+
+ # Restart script using the newer version
+ script_path = os.path.abspath(sys.argv[0])
+ args = [new_python_cmd, script_path] + sys.argv[1:]
+
+ print(f"Python {python_ver} not supported. Changing to {new_python_cmd}")
+
+ try:
+ os.execv(new_python_cmd, args)
+ except OSError as e:
+ sys.exit(f"Failed to restart with {new_python_cmd}: {e}")
+
@staticmethod
def run(*args, **kwargs):
"""Excecute a command, hiding its output by default"""
@@ -1107,6 +1169,7 @@ def main():
checker = SphinxDependencyChecker(args)
+ checker.check_python()
checker.check_needs()
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 06/15] scripts: sphinx-pre-install: drop obsolete routines
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (4 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 05/15] scripts: sphinx-pre-install: run on a supported version Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 07/15] scripts: sphinx-pre-install: drop support for old virtualenv Mauro Carvalho Chehab
` (10 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 3912359d2bae..b639acd455cc 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -114,27 +114,6 @@ class SphinxDependencyChecker:
return None
- @staticmethod
- def find_python_no_venv():
- # FIXME: does it makes sense now that this script is in Python?
-
- result = SphinxDependencyChecker.run(["pwd"], capture_output=True,
- text=True)
- cur_dir = result.stdout.strip()
-
- python_names = ["python3", "python"]
-
- for d in os.environ.get("PATH", "").split(":"):
- if f"{cur_dir}/sphinx" in d:
- continue
-
- for p in python_names:
- if os.access(os.path.join(d, p), os.X_OK):
- return os.path.join(d, p)
-
- # Python not found at the PATH
- return python_names[-1]
-
@staticmethod
def get_python_version(cmd):
@@ -940,7 +919,7 @@ class SphinxDependencyChecker:
else:
print("\nSphinx needs to be installed either:\n1) via pip/pypi with:\n")
- self.python_cmd = self.find_python_no_venv()
+ self.python_cmd = os.path.abspath(sys.argv[0])
print(f"\t{virtualenv_cmd} {self.virtenv_dir}")
print(f"\t. {self.virtenv_dir}/bin/activate")
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 07/15] scripts: sphinx-pre-install: drop support for old virtualenv
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (5 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 06/15] scripts: sphinx-pre-install: drop obsolete routines Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 08/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Leap 15.x Mauro Carvalho Chehab
` (9 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
Up to Python 3.2, the virtual environment were created
via virtualenv binary.
As we dropped support for such old version, clean up the code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 69 +++++++++--------------------------
1 file changed, 18 insertions(+), 51 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index b639acd455cc..0a73b1b33842 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -80,7 +80,6 @@ class SphinxDependencyChecker:
self.need_symlink = 0
self.need_sphinx = 0
self.need_pip = 0
- self.need_virtualenv = 0
self.rec_sphinx_upgrade = 0
self.verbose_warn_install = 1
@@ -919,12 +918,14 @@ class SphinxDependencyChecker:
else:
print("\nSphinx needs to be installed either:\n1) via pip/pypi with:\n")
- self.python_cmd = os.path.abspath(sys.argv[0])
-
- print(f"\t{virtualenv_cmd} {self.virtenv_dir}")
- print(f"\t. {self.virtenv_dir}/bin/activate")
- print(f"\tpip install -r {self.requirement_file}")
- self.deactivate_help()
+ if not virtualenv_cmd:
+ print(" Currently not possible.\n")
+ print(" Please upgrade Python to a newer version and run this script again")
+ else:
+ print(f"\t{virtualenv_cmd} {self.virtenv_dir}")
+ print(f"\t. {self.virtenv_dir}/bin/activate")
+ print(f"\tpip install -r {self.requirement_file}")
+ self.deactivate_help()
print("\n2) As a package with:")
@@ -953,6 +954,7 @@ class SphinxDependencyChecker:
def check_needs(self):
self.get_system_release()
+ self.python_cmd = sys.executable
# Check if Sphinx is already accessible from current environment
self.check_sphinx()
@@ -965,56 +967,21 @@ class SphinxDependencyChecker:
ver = ver_str(self.cur_version)
print(f"Sphinx version: {ver}\n")
- # FIXME: Check python command line, trying first python3
- self.python_cmd = self.which("python3")
- if not self.python_cmd:
- self.python_cmd = self.check_program("python", 0)
-
# Check the type of virtual env, depending on Python version
- if self.python_cmd:
- if self.virtualenv:
- try:
- result = self.run(
- [self.python_cmd, "--version"],
- capture_output=True,
- text=True,
- check=True,
- )
+ virtualenv_cmd = None
- output = result.stdout + result.stderr
-
- match = re.search(r"(\d+)\.(\d+)\.", output)
- if match:
- major = int(match.group(1))
- minor = int(match.group(2))
-
- if major < 3:
- sys.exit("Python 3 is required to build the kernel docs")
- if major == 3 and minor < 3:
- self.need_virtualenv = True
- else:
- sys.exit(f"Warning: couldn't identify {self.python_cmd} version!")
-
- except subprocess.CalledProcessError as e:
- sys.exit(f"Error checking Python version: {e}")
- else:
- self.add_package("python-sphinx", 0)
+ if sys.version_info < MIN_PYTHON_VERSION:
+ min_ver = ver_str(MIN_PYTHON_VERSION)
+ print(f"ERROR: at least python {min_ver} is required to build the kernel docs")
+ self.need_sphinx = 1
self.venv_ver = self.recommend_sphinx_upgrade()
- virtualenv_cmd = ""
-
if self.need_pip:
- # Set virtualenv command line, if python < 3.3
- # FIXME: can be removed as we're now with an upper min requirement
- # but then we need to check python version
- if self.need_virtualenv:
- virtualenv_cmd = self.which("virtualenv-3")
- if not virtualenv_cmd:
- virtualenv_cmd = self.which("virtualenv-3.5")
- if not virtualenv_cmd:
- self.check_program("virtualenv", 0)
- virtualenv_cmd = "virtualenv"
+ if sys.version_info < MIN_PYTHON_VERSION:
+ self.need_pip = False
+ print("Warning: python version is not supported.")
+
else:
virtualenv_cmd = f"{self.python_cmd} -m venv"
self.check_python_module("ensurepip", 0)
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 08/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Leap 15.x
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (6 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 07/15] scripts: sphinx-pre-install: drop support for old virtualenv Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 09/15] scripts: sphinx-pre-install.py fix opensuse hints Mauro Carvalho Chehab
` (8 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
On openSUSE Leap 15.6, which is the current LTS version, has two
Sphinx packages. The normal one requires Python 3.6, which we
don't support anymore. However, it also has Python 3.11 with a
newer Sphinx version (7.2.6).
Suggest the newer version:
Detected OS: openSUSE Leap 15.6.
ERROR: at least python 3.7 is required to build the kernel docs
Warning: python version is not supported.
Warning: better to also install "convert".
Warning: better to also install "dot".
ERROR: please install "yaml", otherwise, build won't work.
You should run:
sudo zypper install --no-recommends ImageMagick graphviz python311-pyyaml
Sphinx needs to be installed either:
1) via pip/pypi with:
Currently not possible.
Please upgrade Python to a newer version and run this script again
2) As a package with:
sudo zypper install --no-recommends python311-Sphinx
Please note that Sphinx >= 3.0 will currently produce false-positive
warning when the same name is used for more than one type (functions,
structs, enums,...). This is known Sphinx bug. For more details, see:
https://github.com/sphinx-doc/sphinx/pull/8313
Can't build as 2 mandatory dependencies are missing
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 0a73b1b33842..eca42d90ed01 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -556,6 +556,22 @@ class SphinxDependencyChecker:
progs["latexmk"] = "texlive-latexmk-bin"
+ match = re.search(r"(Leap)\s+(\d+).(\d)", self.system_release)
+ if match:
+ rel = int(match.group(2))
+
+ # Leap 15.x uses Python 3.6, which is not compatible with
+ # the build system anymore. Suggest Python 3.11
+ if rel == 15:
+ if not self.which(self.python_cmd):
+ self.add_package(self.python_cmd, 0)
+
+ progs.update({
+ "python-sphinx": "python311-Sphinx",
+ "virtualenv": "python311-virtualenv",
+ "yaml": "python311-pyyaml",
+ })
+
# FIXME: add support for installing CJK fonts
#
# I tried hard, but was unable to find a way to install
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 09/15] scripts: sphinx-pre-install.py fix opensuse hints
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (7 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 08/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Leap 15.x Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 10/15] scripts: sphinx-pre-install.py: fix support for gentoo Mauro Carvalho Chehab
` (7 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
yaml hints arw wrong.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index eca42d90ed01..69e2ea228df7 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -530,7 +530,7 @@ class SphinxDependencyChecker:
"python-sphinx": "python3-sphinx",
"virtualenv": "python3-virtualenv",
"xelatex": "texlive-xetex-bin",
- "yaml": "python3-pyyaml",
+ "yaml": "python3-pyyaml", # or python3-PyYAML?
}
# On Tumbleweed, this package is also named rsvg-convert
@@ -569,7 +569,7 @@ class SphinxDependencyChecker:
progs.update({
"python-sphinx": "python311-Sphinx",
"virtualenv": "python311-virtualenv",
- "yaml": "python311-pyyaml",
+ "yaml": "python311-PyYAML",
})
# FIXME: add support for installing CJK fonts
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 10/15] scripts: sphinx-pre-install.py: fix support for gentoo
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (8 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 09/15] scripts: sphinx-pre-install.py fix opensuse hints Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 11/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Tumbleweed Mauro Carvalho Chehab
` (6 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
Some gentoo packages have changes. Fix it.
While here, improve emerge portage enable logic.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 69e2ea228df7..9cbf548b0b9c 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -669,12 +669,13 @@ class SphinxDependencyChecker:
def give_gentoo_hints(self):
progs = {
- "convert": "media-gfx/imagemagick",
- "dot": "media-gfx/graphviz",
- "rsvg-convert": "gnome-base/librsvg",
- "virtualenv": "dev-python/virtualenv",
- "xelatex": "dev-texlive/texlive-xetex media-fonts/dejavu",
- "yaml": "dev-python/pyyaml",
+ "convert": "media-gfx/imagemagick",
+ "dot": "media-gfx/graphviz",
+ "rsvg-convert": "gnome-base/librsvg",
+ "virtualenv": "dev-python/virtualenv",
+ "xelatex": "dev-texlive/texlive-xetex media-fonts/dejavu",
+ "yaml": "dev-python/pyyaml",
+ "python-sphinx": "dev-python/sphinx",
}
if self.pdf:
@@ -699,21 +700,17 @@ class SphinxDependencyChecker:
print("You should run:")
print("\n")
- imagemagick = "media-gfx/imagemagick svg png"
- cairo = "media-gfx/graphviz cairo pdf"
- portage_imagemagick = "/etc/portage/package.use/imagemagick"
- portage_cairo = "/etc/portage/package.use/graphviz"
- result = self.run(["grep", "imagemagick", portage_imagemagick],
- stdout=subprocess.PIPE, text=True)
- if not result.stdout.strip():
- print(f"\tsudo su -c 'echo \"{imagemagick}\" > {portage_imagemagick}'")
+ portages = [
+ "media-gfx/imagemagick",
+ "media-gfx/graphviz",
+ ]
- result = self.run(["grep", "graphviz", portage_cairo],
- stdout=subprocess.PIPE, text=True)
-
- if not result.stdout.strip():
- print(f"\tsudo su -c 'echo \"{cairo}\" > {portage_cairo}'")
+ for p in portages:
+ result = self.run(["grep", p, "/etc/portage/package.use/*"],
+ stdout=subprocess.PIPE, text=True)
+ if not result.stdout.strip():
+ print(f"\tsudo emerge -av1 {p}")
print(f"\tsudo emerge --ask {self.install}")
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 11/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Tumbleweed
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (9 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 10/15] scripts: sphinx-pre-install.py: fix support for gentoo Mauro Carvalho Chehab
@ 2025-06-30 21:34 ` Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 12/15] scripts: sphinx-pre-install.py: only show portage hints once Mauro Carvalho Chehab
` (5 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:34 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
On Tumbleweed, package names are named after python-313*, as it also
has older python versions on it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 9cbf548b0b9c..72ac64f4e60b 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -571,6 +571,14 @@ class SphinxDependencyChecker:
"virtualenv": "python311-virtualenv",
"yaml": "python311-PyYAML",
})
+ else:
+ # Tumbleweed defaults to Python 3.11
+
+ progs.update({
+ "python-sphinx": "python313-Sphinx",
+ "virtualenv": "python313-virtualenv",
+ "yaml": "python313-PyYAML",
+ })
# FIXME: add support for installing CJK fonts
#
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 12/15] scripts: sphinx-pre-install.py: only show portage hints once
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (10 preceding siblings ...)
2025-06-30 21:34 ` [PATCH 11/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Tumbleweed Mauro Carvalho Chehab
@ 2025-06-30 21:35 ` Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 13/15] scripts: sphinx-pre-install.py: cleanup rhel support Mauro Carvalho Chehab
` (4 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:35 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
On gentoo, doesn't repeat instructions about how to enable
portage.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 72ac64f4e60b..a941eae17a9e 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -89,6 +89,9 @@ class SphinxDependencyChecker:
self.python_cmd = ""
self.activate_cmd = ""
+ # Certain hints are meant to be shown only once
+ self.first_hint = True
+
self.min_version = (0, 0, 0)
self.cur_version = (0, 0, 0)
self.latest_avail_ver = (0, 0, 0)
@@ -714,11 +717,14 @@ class SphinxDependencyChecker:
"media-gfx/graphviz",
]
- for p in portages:
- result = self.run(["grep", p, "/etc/portage/package.use/*"],
- stdout=subprocess.PIPE, text=True)
- if not result.stdout.strip():
- print(f"\tsudo emerge -av1 {p}")
+ if self.first_hint:
+ for p in portages:
+ result = self.run(["grep", p, "/etc/portage/package.use/*"],
+ stdout=subprocess.PIPE, text=True)
+ if not result.stdout.strip():
+ print(f"\tsudo emerge -av1 {p}")
+
+ self.first_hint = False
print(f"\tsudo emerge --ask {self.install}")
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 13/15] scripts: sphinx-pre-install.py: cleanup rhel support
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (11 preceding siblings ...)
2025-06-30 21:35 ` [PATCH 12/15] scripts: sphinx-pre-install.py: only show portage hints once Mauro Carvalho Chehab
@ 2025-06-30 21:35 ` Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 14/15] docs: Makefile: switch to the new scripts/sphinx-pre-install.py Mauro Carvalho Chehab
` (3 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:35 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
Rhel < 8.0 is not supported anymore. Drop support for it.
Rhel 8 is problematic: at least on the tests I did with a
docker repo, it didn't work, but it could be due to the issue
that it is actually different than a real One.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.py | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index a941eae17a9e..50413b7d2f2c 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -487,15 +487,31 @@ class SphinxDependencyChecker:
progs["virtualenv"] = "python-virtualenv"
- if rel and rel < 8:
+ if not rel or rel < 8:
old = 1
self.pdf = False
- # RHEL 7 is in ELS, currently up to Jun, 2026
+ print("ERROR: Distro not supported. Too old?")
+ return
+
+ # TODO: check if RHEL8 still works.
+ # On my tests with docker "redhat/ubi8" image, there's no
+ # python3-sphinx (or similar) package. It comes with Python 3.6,
+ # but there are other python packages over there, so it may be
+ # possible to work with venv.
+
+ if self.first_hint:
+ print("Note: RHEL-based distros typically require extra repositories.\n" \
+ "For most, enabling epel and crb are enough:\n" \
+ "\tsudo dnf install -y epel-release", \
+ "\tsudo dnf config-manager --set-enabled crb\n" \
+ "Yet, some may have other required repositories. Those commands could be useful:" \
+ "\tsudo dnf repolist all" \
+ "\tsudo repoquery --available --info <pkgs>",
+ "\tsudo dnf config-manager --set-enabled '*' # enable all - probably not what you want")
+
+ self.first_hint = False
- print("Note: texlive packages on RHEL/CENTOS <= 7 are incomplete. Can't support PDF output")
- print("If you want to build PDF, please read:")
- print("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/")
if self.pdf:
pdf_pkgs = [
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 14/15] docs: Makefile: switch to the new scripts/sphinx-pre-install.py
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (12 preceding siblings ...)
2025-06-30 21:35 ` [PATCH 13/15] scripts: sphinx-pre-install.py: cleanup rhel support Mauro Carvalho Chehab
@ 2025-06-30 21:35 ` Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 15/15] scripts: sphinx-pre-install.pl: get rid of the old script Mauro Carvalho Chehab
` (2 subsequent siblings)
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:35 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
Now that we have a better, improved Python script, use it when
checking for documentation build dependencies.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
Documentation/Makefile | 14 +++++++-------
.../{sphinx-pre-install.py => sphinx-pre-install} | 0
2 files changed, 7 insertions(+), 7 deletions(-)
rename scripts/{sphinx-pre-install.py => sphinx-pre-install} (100%)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index c486fe3cc5e1..b98477df5ddf 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -46,7 +46,7 @@ ifeq ($(HAVE_SPHINX),0)
.DEFAULT:
$(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)
@echo
- @$(srctree)/scripts/sphinx-pre-install.pl
+ @$(srctree)/scripts/sphinx-pre-install
@echo " SKIP Sphinx $@ target."
else # HAVE_SPHINX
@@ -121,7 +121,7 @@ $(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml $(YNL_TOOL)
htmldocs texinfodocs latexdocs epubdocs xmldocs: $(YNL_INDEX)
htmldocs:
- @$(srctree)/scripts/sphinx-pre-install.pl --version-check
+ @$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
# If Rust support is available and .config exists, add rustdoc generated contents.
@@ -135,7 +135,7 @@ endif
endif
texinfodocs:
- @$(srctree)/scripts/sphinx-pre-install.pl --version-check
+ @$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
# Note: the 'info' Make target is generated by sphinx itself when
@@ -147,7 +147,7 @@ linkcheckdocs:
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
latexdocs:
- @$(srctree)/scripts/sphinx-pre-install.pl --version-check
+ @$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
ifeq ($(HAVE_PDFLATEX),0)
@@ -160,7 +160,7 @@ else # HAVE_PDFLATEX
pdfdocs: DENY_VF = XDG_CONFIG_HOME=$(FONTS_CONF_DENY_VF)
pdfdocs: latexdocs
- @$(srctree)/scripts/sphinx-pre-install.pl --version-check
+ @$(srctree)/scripts/sphinx-pre-install --version-check
$(foreach var,$(SPHINXDIRS), \
$(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" $(DENY_VF) -C $(BUILDDIR)/$(var)/latex || sh $(srctree)/scripts/check-variable-fonts.sh || exit; \
mkdir -p $(BUILDDIR)/$(var)/pdf; \
@@ -170,11 +170,11 @@ pdfdocs: latexdocs
endif # HAVE_PDFLATEX
epubdocs:
- @$(srctree)/scripts/sphinx-pre-install.pl --version-check
+ @$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
xmldocs:
- @$(srctree)/scripts/sphinx-pre-install.pl --version-check
+ @$(srctree)/scripts/sphinx-pre-install --version-check
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
endif # HAVE_SPHINX
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install
similarity index 100%
rename from scripts/sphinx-pre-install.py
rename to scripts/sphinx-pre-install
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 15/15] scripts: sphinx-pre-install.pl: get rid of the old script
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (13 preceding siblings ...)
2025-06-30 21:35 ` [PATCH 14/15] docs: Makefile: switch to the new scripts/sphinx-pre-install.py Mauro Carvalho Chehab
@ 2025-06-30 21:35 ` Mauro Carvalho Chehab
2025-07-02 23:03 ` [PATCH 00/15] Translate sphinx-pre-install to Python Jonathan Corbet
2025-07-08 3:09 ` Akira Yokosawa
16 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-30 21:35 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Akira Yokosawa, Mauro Carvalho Chehab,
Sai Vishnu M, linux-kernel
All features were ported to the Python version. Plus, it
supports more variants and contain fixes.
So, drop the old version.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install.pl | 1056 ---------------------------------
1 file changed, 1056 deletions(-)
delete mode 100755 scripts/sphinx-pre-install.pl
diff --git a/scripts/sphinx-pre-install.pl b/scripts/sphinx-pre-install.pl
deleted file mode 100755
index 07234d482fa8..000000000000
--- a/scripts/sphinx-pre-install.pl
+++ /dev/null
@@ -1,1056 +0,0 @@
-#!/usr/bin/env perl
-# SPDX-License-Identifier: GPL-2.0-or-later
-use strict;
-
-# Copyright (c) 2017-2020 Mauro Carvalho Chehab <mchehab@kernel.org>
-#
-
-my $prefix = "./";
-$prefix = "$ENV{'srctree'}/" if ($ENV{'srctree'});
-
-my $conf = $prefix . "Documentation/conf.py";
-my $requirement_file = $prefix . "Documentation/sphinx/requirements.txt";
-my $virtenv_prefix = "sphinx_";
-
-#
-# Static vars
-#
-
-my %missing;
-my $system_release;
-my $need = 0;
-my $optional = 0;
-my $need_symlink = 0;
-my $need_sphinx = 0;
-my $need_pip = 0;
-my $need_virtualenv = 0;
-my $rec_sphinx_upgrade = 0;
-my $verbose_warn_install = 1;
-my $install = "";
-my $virtenv_dir = "";
-my $python_cmd = "";
-my $activate_cmd;
-my $min_version;
-my $cur_version;
-my $rec_version = "3.4.3";
-my $latest_avail_ver;
-
-#
-# Command line arguments
-#
-
-my $pdf = 1;
-my $virtualenv = 1;
-my $version_check = 0;
-
-#
-# List of required texlive packages on Fedora and OpenSuse
-#
-
-my %texlive = (
- 'amsfonts.sty' => 'texlive-amsfonts',
- 'amsmath.sty' => 'texlive-amsmath',
- 'amssymb.sty' => 'texlive-amsfonts',
- 'amsthm.sty' => 'texlive-amscls',
- 'anyfontsize.sty' => 'texlive-anyfontsize',
- 'atbegshi.sty' => 'texlive-oberdiek',
- 'bm.sty' => 'texlive-tools',
- 'capt-of.sty' => 'texlive-capt-of',
- 'cmap.sty' => 'texlive-cmap',
- 'ecrm1000.tfm' => 'texlive-ec',
- 'eqparbox.sty' => 'texlive-eqparbox',
- 'eu1enc.def' => 'texlive-euenc',
- 'fancybox.sty' => 'texlive-fancybox',
- 'fancyvrb.sty' => 'texlive-fancyvrb',
- 'float.sty' => 'texlive-float',
- 'fncychap.sty' => 'texlive-fncychap',
- 'footnote.sty' => 'texlive-mdwtools',
- 'framed.sty' => 'texlive-framed',
- 'luatex85.sty' => 'texlive-luatex85',
- 'multirow.sty' => 'texlive-multirow',
- 'needspace.sty' => 'texlive-needspace',
- 'palatino.sty' => 'texlive-psnfss',
- 'parskip.sty' => 'texlive-parskip',
- 'polyglossia.sty' => 'texlive-polyglossia',
- 'tabulary.sty' => 'texlive-tabulary',
- 'threeparttable.sty' => 'texlive-threeparttable',
- 'titlesec.sty' => 'texlive-titlesec',
- 'ucs.sty' => 'texlive-ucs',
- 'upquote.sty' => 'texlive-upquote',
- 'wrapfig.sty' => 'texlive-wrapfig',
- 'ctexhook.sty' => 'texlive-ctex',
-);
-
-#
-# Subroutines that checks if a feature exists
-#
-
-sub check_missing(%)
-{
- my %map = %{$_[0]};
-
- foreach my $prog (sort keys %missing) {
- my $is_optional = $missing{$prog};
-
- # At least on some LTS distros like CentOS 7, texlive doesn't
- # provide all packages we need. When such distros are
- # detected, we have to disable PDF output.
- #
- # So, we need to ignore the packages that distros would
- # need for LaTeX to work
- if ($is_optional == 2 && !$pdf) {
- $optional--;
- next;
- }
-
- if ($verbose_warn_install) {
- if ($is_optional) {
- print "Warning: better to also install \"$prog\".\n";
- } else {
- print "ERROR: please install \"$prog\", otherwise, build won't work.\n";
- }
- }
- if (defined($map{$prog})) {
- $install .= " " . $map{$prog};
- } else {
- $install .= " " . $prog;
- }
- }
-
- $install =~ s/^\s//;
-}
-
-sub add_package($$)
-{
- my $package = shift;
- my $is_optional = shift;
-
- $missing{$package} = $is_optional;
- if ($is_optional) {
- $optional++;
- } else {
- $need++;
- }
-}
-
-sub check_missing_file($$$)
-{
- my $files = shift;
- my $package = shift;
- my $is_optional = shift;
-
- for (@$files) {
- return if(-e $_);
- }
-
- add_package($package, $is_optional);
-}
-
-sub findprog($)
-{
- foreach(split(/:/, $ENV{PATH})) {
- return "$_/$_[0]" if(-x "$_/$_[0]");
- }
-}
-
-sub find_python_no_venv()
-{
- my $prog = shift;
-
- my $cur_dir = qx(pwd);
- $cur_dir =~ s/\s+$//;
-
- foreach my $dir (split(/:/, $ENV{PATH})) {
- next if ($dir =~ m,($cur_dir)/sphinx,);
- return "$dir/python3" if(-x "$dir/python3");
- }
- foreach my $dir (split(/:/, $ENV{PATH})) {
- next if ($dir =~ m,($cur_dir)/sphinx,);
- return "$dir/python" if(-x "$dir/python");
- }
- return "python";
-}
-
-sub check_program($$)
-{
- my $prog = shift;
- my $is_optional = shift;
-
- return $prog if findprog($prog);
-
- add_package($prog, $is_optional);
-}
-
-sub check_perl_module($$)
-{
- my $prog = shift;
- my $is_optional = shift;
-
- my $err = system("perl -M$prog -e 1 2>/dev/null /dev/null");
- return if ($err == 0);
-
- add_package($prog, $is_optional);
-}
-
-sub check_python_module($$)
-{
- my $prog = shift;
- my $is_optional = shift;
-
- return if (!$python_cmd);
-
- my $err = system("$python_cmd -c 'import $prog' 2>/dev/null /dev/null");
- return if ($err == 0);
-
- add_package($prog, $is_optional);
-}
-
-sub check_rpm_missing($$)
-{
- my @pkgs = @{$_[0]};
- my $is_optional = $_[1];
-
- foreach my $prog(@pkgs) {
- my $err = system("rpm -q '$prog' 2>/dev/null >/dev/null");
- add_package($prog, $is_optional) if ($err);
- }
-}
-
-sub check_pacman_missing($$)
-{
- my @pkgs = @{$_[0]};
- my $is_optional = $_[1];
-
- foreach my $prog(@pkgs) {
- my $err = system("pacman -Q '$prog' 2>/dev/null >/dev/null");
- add_package($prog, $is_optional) if ($err);
- }
-}
-
-sub check_missing_tex($)
-{
- my $is_optional = shift;
- my $kpsewhich = findprog("kpsewhich");
-
- foreach my $prog(keys %texlive) {
- my $package = $texlive{$prog};
- if (!$kpsewhich) {
- add_package($package, $is_optional);
- next;
- }
- my $file = qx($kpsewhich $prog);
- add_package($package, $is_optional) if ($file =~ /^\s*$/);
- }
-}
-
-sub get_sphinx_fname()
-{
- if ($ENV{'SPHINXBUILD'}) {
- return $ENV{'SPHINXBUILD'};
- }
-
- my $fname = "sphinx-build";
- return $fname if findprog($fname);
-
- $fname = "sphinx-build-3";
- if (findprog($fname)) {
- $need_symlink = 1;
- return $fname;
- }
-
- return "";
-}
-
-sub get_sphinx_version($)
-{
- my $cmd = shift;
- my $ver;
-
- open IN, "$cmd --version 2>&1 |";
- while (<IN>) {
- if (m/^\s*sphinx-build\s+([\d\.]+)((\+\/[\da-f]+)|(b\d+))?$/) {
- $ver=$1;
- last;
- }
- # Sphinx 1.2.x uses a different format
- if (m/^\s*Sphinx.*\s+([\d\.]+)$/) {
- $ver=$1;
- last;
- }
- }
- close IN;
- return $ver;
-}
-
-sub check_sphinx()
-{
- open IN, $conf or die "Can't open $conf";
- while (<IN>) {
- if (m/^\s*needs_sphinx\s*=\s*[\'\"]([\d\.]+)[\'\"]/) {
- $min_version=$1;
- last;
- }
- }
- close IN;
-
- die "Can't get needs_sphinx version from $conf" if (!$min_version);
-
- $virtenv_dir = $virtenv_prefix . "latest";
-
- my $sphinx = get_sphinx_fname();
- if ($sphinx eq "") {
- $need_sphinx = 1;
- return;
- }
-
- $cur_version = get_sphinx_version($sphinx);
- die "$sphinx didn't return its version" if (!$cur_version);
-
- if ($cur_version lt $min_version) {
- printf "ERROR: Sphinx version is %s. It should be >= %s\n",
- $cur_version, $min_version;
- $need_sphinx = 1;
- return;
- }
-
- return if ($cur_version lt $rec_version);
-
- # On version check mode, just assume Sphinx has all mandatory deps
- exit (0) if ($version_check);
-}
-
-#
-# Ancillary subroutines
-#
-
-sub catcheck($)
-{
- my $res = "";
- $res = qx(cat $_[0]) if (-r $_[0]);
- return $res;
-}
-
-sub which($)
-{
- my $file = shift;
- my @path = split ":", $ENV{PATH};
-
- foreach my $dir(@path) {
- my $name = $dir.'/'.$file;
- return $name if (-x $name );
- }
- return undef;
-}
-
-#
-# Subroutines that check distro-specific hints
-#
-
-sub give_debian_hints()
-{
- my %map = (
- "python-sphinx" => "python3-sphinx",
- "yaml" => "python3-yaml",
- "ensurepip" => "python3-venv",
- "virtualenv" => "virtualenv",
- "dot" => "graphviz",
- "convert" => "imagemagick",
- "Pod::Usage" => "perl-modules",
- "xelatex" => "texlive-xetex",
- "rsvg-convert" => "librsvg2-bin",
- );
-
- if ($pdf) {
- check_missing_file(["/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty"],
- "texlive-lang-chinese", 2);
-
- check_missing_file(["/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"],
- "fonts-dejavu", 2);
-
- check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
- "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
- "/usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc"],
- "fonts-noto-cjk", 2);
- }
-
- check_program("dvipng", 2) if ($pdf);
- check_missing(\%map);
-
- return if (!$need && !$optional);
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n\tsudo apt-get install $install\n");
-}
-
-sub give_redhat_hints()
-{
- my %map = (
- "python-sphinx" => "python3-sphinx",
- "yaml" => "python3-pyyaml",
- "virtualenv" => "python3-virtualenv",
- "dot" => "graphviz",
- "convert" => "ImageMagick",
- "Pod::Usage" => "perl-Pod-Usage",
- "xelatex" => "texlive-xetex-bin",
- "rsvg-convert" => "librsvg2-tools",
- );
-
- my @fedora26_opt_pkgs = (
- "graphviz-gd", # Fedora 26: needed for PDF support
- );
-
- my @fedora_tex_pkgs = (
- "texlive-collection-fontsrecommended",
- "texlive-collection-latex",
- "texlive-xecjk",
- "dejavu-sans-fonts",
- "dejavu-serif-fonts",
- "dejavu-sans-mono-fonts",
- );
-
- #
- # Checks valid for RHEL/CentOS version 7.x.
- #
- my $old = 0;
- my $rel;
- my $noto_sans_redhat = "google-noto-sans-cjk-ttc-fonts";
- $rel = $2 if ($system_release =~ /(release|Linux)\s+(\d+)/);
-
- if (!($system_release =~ /Fedora/)) {
- $map{"virtualenv"} = "python-virtualenv";
-
- if ($rel && $rel < 8) {
- $old = 1;
- $pdf = 0;
-
- printf("Note: texlive packages on RHEL/CENTOS <= 7 are incomplete. Can't support PDF output\n");
- printf("If you want to build PDF, please read:\n");
- printf("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/\n");
- }
- } else {
- if ($rel && $rel < 26) {
- $old = 1;
- }
- if ($rel && $rel >= 38) {
- $noto_sans_redhat = "google-noto-sans-cjk-fonts";
- }
- }
- if (!$rel) {
- printf("Couldn't identify release number\n");
- $old = 1;
- $pdf = 0;
- }
-
- if ($pdf) {
- check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
- "/usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-Regular.ttc"],
- $noto_sans_redhat, 2);
- }
-
- check_rpm_missing(\@fedora26_opt_pkgs, 2) if ($pdf && !$old);
- check_rpm_missing(\@fedora_tex_pkgs, 2) if ($pdf);
- check_missing_tex(2) if ($pdf);
- check_missing(\%map);
-
- return if (!$need && !$optional);
-
- if (!$old) {
- # dnf, for Fedora 18+
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n\tsudo dnf install -y $install\n");
- } else {
- # yum, for RHEL (and clones) or Fedora version < 18
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n\tsudo yum install -y $install\n");
- }
-}
-
-sub give_opensuse_hints()
-{
- my %map = (
- "python-sphinx" => "python3-sphinx",
- "yaml" => "python3-pyyaml",
- "virtualenv" => "python3-virtualenv",
- "dot" => "graphviz",
- "convert" => "ImageMagick",
- "Pod::Usage" => "perl-Pod-Usage",
- "xelatex" => "texlive-xetex-bin",
- );
-
- # On Tumbleweed, this package is also named rsvg-convert
- $map{"rsvg-convert"} = "rsvg-view" if (!($system_release =~ /Tumbleweed/));
-
- my @suse_tex_pkgs = (
- "texlive-babel-english",
- "texlive-caption",
- "texlive-colortbl",
- "texlive-courier",
- "texlive-dvips",
- "texlive-helvetic",
- "texlive-makeindex",
- "texlive-metafont",
- "texlive-metapost",
- "texlive-palatino",
- "texlive-preview",
- "texlive-times",
- "texlive-zapfchan",
- "texlive-zapfding",
- );
-
- $map{"latexmk"} = "texlive-latexmk-bin";
-
- # FIXME: add support for installing CJK fonts
- #
- # I tried hard, but was unable to find a way to install
- # "Noto Sans CJK SC" on openSUSE
-
- check_rpm_missing(\@suse_tex_pkgs, 2) if ($pdf);
- check_missing_tex(2) if ($pdf);
- check_missing(\%map);
-
- return if (!$need && !$optional);
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n\tsudo zypper install --no-recommends $install\n");
-}
-
-sub give_mageia_hints()
-{
- my %map = (
- "python-sphinx" => "python3-sphinx",
- "yaml" => "python3-yaml",
- "virtualenv" => "python3-virtualenv",
- "dot" => "graphviz",
- "convert" => "ImageMagick",
- "Pod::Usage" => "perl-Pod-Usage",
- "xelatex" => "texlive",
- "rsvg-convert" => "librsvg2",
- );
-
- my @tex_pkgs = (
- "texlive-fontsextra",
- );
-
- $map{"latexmk"} = "texlive-collection-basic";
-
- my $packager_cmd;
- my $noto_sans;
- if ($system_release =~ /OpenMandriva/) {
- $packager_cmd = "dnf install";
- $noto_sans = "noto-sans-cjk-fonts";
- @tex_pkgs = ( "texlive-collection-fontsextra" );
- } else {
- $packager_cmd = "urpmi";
- $noto_sans = "google-noto-sans-cjk-ttc-fonts";
- }
-
-
- if ($pdf) {
- check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
- "/usr/share/fonts/TTF/NotoSans-Regular.ttf"],
- $noto_sans, 2);
- }
-
- check_rpm_missing(\@tex_pkgs, 2) if ($pdf);
- check_missing(\%map);
-
- return if (!$need && !$optional);
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n\tsudo $packager_cmd $install\n");
-}
-
-sub give_arch_linux_hints()
-{
- my %map = (
- "yaml" => "python-yaml",
- "virtualenv" => "python-virtualenv",
- "dot" => "graphviz",
- "convert" => "imagemagick",
- "xelatex" => "texlive-xetex",
- "latexmk" => "texlive-core",
- "rsvg-convert" => "extra/librsvg",
- );
-
- my @archlinux_tex_pkgs = (
- "texlive-core",
- "texlive-latexextra",
- "ttf-dejavu",
- );
- check_pacman_missing(\@archlinux_tex_pkgs, 2) if ($pdf);
-
- if ($pdf) {
- check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"],
- "noto-fonts-cjk", 2);
- }
-
- check_missing(\%map);
-
- return if (!$need && !$optional);
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n\tsudo pacman -S $install\n");
-}
-
-sub give_gentoo_hints()
-{
- my %map = (
- "yaml" => "dev-python/pyyaml",
- "virtualenv" => "dev-python/virtualenv",
- "dot" => "media-gfx/graphviz",
- "convert" => "media-gfx/imagemagick",
- "xelatex" => "dev-texlive/texlive-xetex media-fonts/dejavu",
- "rsvg-convert" => "gnome-base/librsvg",
- );
-
- check_missing_file(["/usr/share/fonts/dejavu/DejaVuSans.ttf"],
- "media-fonts/dejavu", 2) if ($pdf);
-
- if ($pdf) {
- check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
- "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc"],
- "media-fonts/noto-cjk", 2);
- }
-
- check_missing(\%map);
-
- return if (!$need && !$optional);
-
- printf("You should run:\n") if ($verbose_warn_install);
- printf("\n");
-
- my $imagemagick = "media-gfx/imagemagick svg png";
- my $cairo = "media-gfx/graphviz cairo pdf";
- my $portage_imagemagick = "/etc/portage/package.use/imagemagick";
- my $portage_cairo = "/etc/portage/package.use/graphviz";
-
- if (qx(grep imagemagick $portage_imagemagick 2>/dev/null) eq "") {
- printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n")
- }
- if (qx(grep graphviz $portage_cairo 2>/dev/null) eq "") {
- printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");
- }
-
- printf("\tsudo emerge --ask $install\n");
-
-}
-
-sub check_distros()
-{
- # Distro-specific hints
- if ($system_release =~ /Red Hat Enterprise Linux/) {
- give_redhat_hints;
- return;
- }
- if ($system_release =~ /CentOS/) {
- give_redhat_hints;
- return;
- }
- if ($system_release =~ /Scientific Linux/) {
- give_redhat_hints;
- return;
- }
- if ($system_release =~ /Oracle Linux Server/) {
- give_redhat_hints;
- return;
- }
- if ($system_release =~ /Fedora/) {
- give_redhat_hints;
- return;
- }
- if ($system_release =~ /Ubuntu/) {
- give_debian_hints;
- return;
- }
- if ($system_release =~ /Debian/) {
- give_debian_hints;
- return;
- }
- if ($system_release =~ /openSUSE/) {
- give_opensuse_hints;
- return;
- }
- if ($system_release =~ /Mageia/) {
- give_mageia_hints;
- return;
- }
- if ($system_release =~ /OpenMandriva/) {
- give_mageia_hints;
- return;
- }
- if ($system_release =~ /Arch Linux/) {
- give_arch_linux_hints;
- return;
- }
- if ($system_release =~ /Gentoo/) {
- give_gentoo_hints;
- return;
- }
-
- #
- # Fall-back to generic hint code for other distros
- # That's far from ideal, specially for LaTeX dependencies.
- #
- my %map = (
- "sphinx-build" => "sphinx"
- );
- check_missing_tex(2) if ($pdf);
- check_missing(\%map);
- print "I don't know distro $system_release.\n";
- print "So, I can't provide you a hint with the install procedure.\n";
- print "There are likely missing dependencies.\n";
-}
-
-#
-# Common dependencies
-#
-
-sub deactivate_help()
-{
- printf "\n If you want to exit the virtualenv, you can use:\n";
- printf "\tdeactivate\n";
-}
-
-sub get_virtenv()
-{
- my $ver;
- my $min_activate = "$ENV{'PWD'}/${virtenv_prefix}${min_version}/bin/activate";
- my @activates = glob "$ENV{'PWD'}/${virtenv_prefix}*/bin/activate";
-
- @activates = sort {$b cmp $a} @activates;
-
- foreach my $f (@activates) {
- next if ($f lt $min_activate);
-
- my $sphinx_cmd = $f;
- $sphinx_cmd =~ s/activate/sphinx-build/;
- next if (! -f $sphinx_cmd);
-
- my $ver = get_sphinx_version($sphinx_cmd);
-
- if (!$ver) {
- $f =~ s#/bin/activate##;
- print("Warning: virtual environment $f is not working.\nPython version upgrade? Remove it with:\n\n\trm -rf $f\n\n");
- }
-
- if ($need_sphinx && ($ver ge $min_version)) {
- return ($f, $ver);
- } elsif ($ver gt $cur_version) {
- return ($f, $ver);
- }
- }
- return ("", "");
-}
-
-sub recommend_sphinx_upgrade()
-{
- my $venv_ver;
-
- # Avoid running sphinx-builds from venv if $cur_version is good
- if ($cur_version && ($cur_version ge $rec_version)) {
- $latest_avail_ver = $cur_version;
- return;
- }
-
- # Get the highest version from sphinx_*/bin/sphinx-build and the
- # corresponding command to activate the venv/virtenv
- ($activate_cmd, $venv_ver) = get_virtenv();
-
- # Store the highest version from Sphinx existing virtualenvs
- if (($activate_cmd ne "") && ($venv_ver gt $cur_version)) {
- $latest_avail_ver = $venv_ver;
- } else {
- $latest_avail_ver = $cur_version if ($cur_version);
- }
-
- # As we don't know package version of Sphinx, and there's no
- # virtual environments, don't check if upgrades are needed
- if (!$virtualenv) {
- return if (!$latest_avail_ver);
- }
-
- # Either there are already a virtual env or a new one should be created
- $need_pip = 1;
-
- return if (!$latest_avail_ver);
-
- # Return if the reason is due to an upgrade or not
- if ($latest_avail_ver lt $rec_version) {
- $rec_sphinx_upgrade = 1;
- }
-
- return $latest_avail_ver;
-}
-
-#
-# The logic here is complex, as it have to deal with different versions:
-# - minimal supported version;
-# - minimal PDF version;
-# - recommended version.
-# It also needs to work fine with both distro's package and venv/virtualenv
-sub recommend_sphinx_version($)
-{
- my $virtualenv_cmd = shift;
-
- # Version is OK. Nothing to do.
- if ($cur_version && ($cur_version ge $rec_version)) {
- return;
- };
-
- if (!$need_sphinx) {
- # sphinx-build is present and its version is >= $min_version
-
- #only recommend enabling a newer virtenv version if makes sense.
- if ($latest_avail_ver gt $cur_version) {
- printf "\nYou may also use the newer Sphinx version $latest_avail_ver with:\n";
- printf "\tdeactivate\n" if ($ENV{'PWD'} =~ /${virtenv_prefix}/);
- printf "\t. $activate_cmd\n";
- deactivate_help();
-
- return;
- }
- return if ($latest_avail_ver ge $rec_version);
- }
-
- if (!$virtualenv) {
- # No sphinx either via package or via virtenv. As we can't
- # Compare the versions here, just return, recommending the
- # user to install it from the package distro.
- return if (!$latest_avail_ver);
-
- # User doesn't want a virtenv recommendation, but he already
- # installed one via virtenv with a newer version.
- # So, print commands to enable it
- if ($latest_avail_ver gt $cur_version) {
- printf "\nYou may also use the Sphinx virtualenv version $latest_avail_ver with:\n";
- printf "\tdeactivate\n" if ($ENV{'PWD'} =~ /${virtenv_prefix}/);
- printf "\t. $activate_cmd\n";
- deactivate_help();
-
- return;
- }
- print "\n";
- } else {
- $need++ if ($need_sphinx);
- }
-
- # Suggest newer versions if current ones are too old
- if ($latest_avail_ver && $latest_avail_ver ge $min_version) {
- # If there's a good enough version, ask the user to enable it
- if ($latest_avail_ver ge $rec_version) {
- printf "\nNeed to activate Sphinx (version $latest_avail_ver) on virtualenv with:\n";
- printf "\t. $activate_cmd\n";
- deactivate_help();
-
- return;
- }
-
- # Version is above the minimal required one, but may be
- # below the recommended one. So, print warnings/notes
-
- if ($latest_avail_ver lt $rec_version) {
- print "Warning: It is recommended at least Sphinx version $rec_version.\n";
- }
- }
-
- # At this point, either it needs Sphinx or upgrade is recommended,
- # both via pip
-
- if ($rec_sphinx_upgrade) {
- if (!$virtualenv) {
- print "Instead of install/upgrade Python Sphinx pkg, you could use pip/pypi with:\n\n";
- } else {
- print "To upgrade Sphinx, use:\n\n";
- }
- } else {
- print "\nSphinx needs to be installed either:\n1) via pip/pypi with:\n\n";
- }
-
- $python_cmd = find_python_no_venv();
-
- printf "\t$virtualenv_cmd $virtenv_dir\n";
-
- printf "\t. $virtenv_dir/bin/activate\n";
- printf "\tpip install -r $requirement_file\n";
- deactivate_help();
-
- printf "\n2) As a package with:\n";
-
- my $old_need = $need;
- my $old_optional = $optional;
- %missing = ();
- $pdf = 0;
- $optional = 0;
- $install = "";
- $verbose_warn_install = 0;
-
- add_package("python-sphinx", 0);
-
- check_distros();
-
- $need = $old_need;
- $optional = $old_optional;
-
- printf "\n Please note that Sphinx >= 3.0 will currently produce false-positive\n";
- printf " warning when the same name is used for more than one type (functions,\n";
- printf " structs, enums,...). This is known Sphinx bug. For more details, see:\n";
- printf "\thttps://github.com/sphinx-doc/sphinx/pull/8313\n";
-}
-
-sub check_needs()
-{
- # Check if Sphinx is already accessible from current environment
- check_sphinx();
-
- if ($system_release) {
- print "Detected OS: $system_release.\n";
- } else {
- print "Unknown OS\n";
- }
- printf "Sphinx version: %s\n\n", $cur_version if ($cur_version);
-
- # Check python command line, trying first python3
- $python_cmd = findprog("python3");
- $python_cmd = check_program("python", 0) if (!$python_cmd);
-
- # Check the type of virtual env, depending on Python version
- if ($python_cmd) {
- if ($virtualenv) {
- my $tmp = qx($python_cmd --version 2>&1);
- if ($tmp =~ m/(\d+\.)(\d+\.)/) {
- if ($1 < 3) {
- # Fail if it finds python2 (or worse)
- die "Python 3 is required to build the kernel docs\n";
- }
- if ($1 == 3 && $2 < 3) {
- # Need Python 3.3 or upper for venv
- $need_virtualenv = 1;
- }
- } else {
- die "Warning: couldn't identify $python_cmd version!";
- }
- } else {
- add_package("python-sphinx", 0);
- }
- }
-
- my $venv_ver = recommend_sphinx_upgrade();
-
- my $virtualenv_cmd;
-
- if ($need_pip) {
- # Set virtualenv command line, if python < 3.3
- if ($need_virtualenv) {
- $virtualenv_cmd = findprog("virtualenv-3");
- $virtualenv_cmd = findprog("virtualenv-3.5") if (!$virtualenv_cmd);
- if (!$virtualenv_cmd) {
- check_program("virtualenv", 0);
- $virtualenv_cmd = "virtualenv";
- }
- } else {
- $virtualenv_cmd = "$python_cmd -m venv";
- check_python_module("ensurepip", 0);
- }
- }
-
- # Check for needed programs/tools
- check_perl_module("Pod::Usage", 0);
- check_python_module("yaml", 0);
- check_program("make", 0);
- check_program("gcc", 0);
- check_program("dot", 1);
- check_program("convert", 1);
-
- # Extra PDF files - should use 2 for is_optional
- check_program("xelatex", 2) if ($pdf);
- check_program("rsvg-convert", 2) if ($pdf);
- check_program("latexmk", 2) if ($pdf);
-
- # Do distro-specific checks and output distro-install commands
- check_distros();
-
- if (!$python_cmd) {
- if ($need == 1) {
- die "Can't build as $need mandatory dependency is missing";
- } elsif ($need) {
- die "Can't build as $need mandatory dependencies are missing";
- }
- }
-
- # Check if sphinx-build is called sphinx-build-3
- if ($need_symlink) {
- printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n",
- which("sphinx-build-3");
- }
-
- recommend_sphinx_version($virtualenv_cmd);
- printf "\n";
-
- print "All optional dependencies are met.\n" if (!$optional);
-
- if ($need == 1) {
- die "Can't build as $need mandatory dependency is missing";
- } elsif ($need) {
- die "Can't build as $need mandatory dependencies are missing";
- }
-
- print "Needed package dependencies are met.\n";
-}
-
-#
-# Main
-#
-
-while (@ARGV) {
- my $arg = shift(@ARGV);
-
- if ($arg eq "--no-virtualenv") {
- $virtualenv = 0;
- } elsif ($arg eq "--no-pdf"){
- $pdf = 0;
- } elsif ($arg eq "--version-check"){
- $version_check = 1;
- } else {
- print "Usage:\n\t$0 <--no-virtualenv> <--no-pdf> <--version-check>\n\n";
- print "Where:\n";
- print "\t--no-virtualenv\t- Recommend installing Sphinx instead of using a virtualenv\n";
- print "\t--version-check\t- if version is compatible, don't check for missing dependencies\n";
- print "\t--no-pdf\t- don't check for dependencies required to build PDF docs\n\n";
- exit -1;
- }
-}
-
-#
-# Determine the system type. There's no standard unique way that would
-# work with all distros with a minimal package install. So, several
-# methods are used here.
-#
-# By default, it will use lsb_release function. If not available, it will
-# fail back to reading the known different places where the distro name
-# is stored
-#
-
-$system_release = qx(lsb_release -d) if which("lsb_release");
-$system_release =~ s/Description:\s*// if ($system_release);
-$system_release = catcheck("/etc/system-release") if !$system_release;
-$system_release = catcheck("/etc/redhat-release") if !$system_release;
-$system_release = catcheck("/etc/lsb-release") if !$system_release;
-$system_release = catcheck("/etc/gentoo-release") if !$system_release;
-
-# This seems more common than LSB these days
-if (!$system_release) {
- my %os_var;
- if (open IN, "cat /etc/os-release|") {
- while (<IN>) {
- if (m/^([\w\d\_]+)=\"?([^\"]*)\"?\n/) {
- $os_var{$1}=$2;
- }
- }
- $system_release = $os_var{"NAME"};
- if (defined($os_var{"VERSION_ID"})) {
- $system_release .= " " . $os_var{"VERSION_ID"} if (defined($os_var{"VERSION_ID"}));
- } else {
- $system_release .= " " . $os_var{"VERSION"};
- }
- }
-}
-$system_release = catcheck("/etc/issue") if !$system_release;
-$system_release =~ s/\s+$//;
-
-check_needs;
--
2.50.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (14 preceding siblings ...)
2025-06-30 21:35 ` [PATCH 15/15] scripts: sphinx-pre-install.pl: get rid of the old script Mauro Carvalho Chehab
@ 2025-07-02 23:03 ` Jonathan Corbet
2025-07-09 8:25 ` Mauro Carvalho Chehab
2025-07-08 3:09 ` Akira Yokosawa
16 siblings, 1 reply; 26+ messages in thread
From: Jonathan Corbet @ 2025-07-02 23:03 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Linux Doc Mailing List
Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-kernel,
Akira Yokosawa, Sai Vishnu M
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
> Hi Jon,
>
> This series port scripts/sphinx-pre-install to Python. It started as
> a bug-compatible version with the old logic.
In my limited testing this seems to work just fine ... Unless somebody
comes up with a problem, I don't see a lot of reasons to not apply it.
Thanks,
jon
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
` (15 preceding siblings ...)
2025-07-02 23:03 ` [PATCH 00/15] Translate sphinx-pre-install to Python Jonathan Corbet
@ 2025-07-08 3:09 ` Akira Yokosawa
2025-07-08 14:25 ` Jonathan Corbet
2025-07-09 8:58 ` Mauro Carvalho Chehab
16 siblings, 2 replies; 26+ messages in thread
From: Akira Yokosawa @ 2025-07-08 3:09 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Linux Doc Mailing List, Jonathan Corbet
Cc: linux-kernel, Sai Vishnu M, Akira Yokosawa
Hi Mauro,
On Mon, 30 Jun 2025 23:34:48 +0200, Mauro Carvalho Chehab wrote:
[...]
> The test script also ran the install procedure for system,
> venv and native Sphinx install.
Which install procedure did you test? The short one with the "--no-pdf"
option?
I am asking because installing the full list of packages in podman run
of opensuse/leap:15.6 didn't complete successfully for me.
And by the look of things, you stopped at installation, because you are
well aware of all the issues in running "make htmldocs" and its friends
after the install.
I assume you (or somebody else) are going to update the script once this
series is applied to make the suggested lists of packages be useful for
newcomers.
> The tests were done with those containers, obtained from
> lxc download templates or via podman run:
[...]
> It also properly detected RHEL 8 string:
>
> Detected OS : Red Hat Enterprise Linux release 8.10 (Ootpa).
> Installing venv : WARNING: No such file or directory: 'sphinx-build'
> Installing package_install : WARNING: No such file or directory: 'sphinx-build'
>
> But, at this particular docker container, no repositories had
> python3-sphinx nor python3-virtualenv, but I suspect that this
> is a problem on this particular image, as I'm almost sure we
> tested RHEL 8 in the past, so, I have hopes that this could
> still work with real RHEL, if it has Python >= 3.7.
FWIW, almalinux 8 provides python3-sphinx in the "PowerTools" repo.
It installs Sphinx 1.7.6 on top of python 3.6.8.
python3-virtualenv is in the "AppStream" repo. It also comes with
python 3.6.8.
>
> Yet, our goal is to support the latest LTS version, so
> RHEL 8 is out of scope.
Yes, I think it is reasonable to ignore RHEL 8 and its clones.
For the record, here is a WIP scorecard of suggested procedure by
actually running "make htmldocs" and its friends after installing distro
packages (if it succeeds):
------------------------------------------------------------------------
* debian:12
htmldocs: OK
latexdocs: NG
Debian and its derivative prohibit convert(1) (of ImageMagick) from
generating PDF by their default policy, so you'll get a bunch of:
[while building userspace-api.tex]
WARNING: Error #1 when calling: /usr/bin/convert /<srcdir>/Documentation/userspace-api/media/typical_media_device.svg /<srcdir>/Documentation/output/userspace-api/latex/typical_media_device.pdf
WARNING: Warning msg from convert(1): convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/426.
, and if you ignore them and try to build PDF, you'll get:
[while building userspace-api.pdf]
! Dimension too large.
\spx@boxes@fcolorbox ...dimexpr \ht \spx@tempboxa
+\spx@boxes@border@top +\s...
l.54887 \end{sphinxVerbatim}
?
! Emergency stop.
\spx@boxes@fcolorbox ...dimexpr \ht \spx@tempboxa
+\spx@boxes@border@top +\s...
l.54887 \end{sphinxVerbatim}
* fedora:latest (42)
htmldocs: NG
Container images of fedora has stopped having "which" as a command.
You need to install it manually. After installing "which": OK
pdfdocs: OK
* opensuse/leap:15.6
htmldocs: NG
After installing "which": OK
latexdocs: NG
Can't complete "zypper install" inside a podman container run using the
full package list ???
------------------------------------------------------------------------
Having look at these poor results, I don't see any reason to continue
testing further.
Regards,
Akira
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-08 3:09 ` Akira Yokosawa
@ 2025-07-08 14:25 ` Jonathan Corbet
2025-07-08 14:56 ` Akira Yokosawa
2025-07-09 8:58 ` Mauro Carvalho Chehab
1 sibling, 1 reply; 26+ messages in thread
From: Jonathan Corbet @ 2025-07-08 14:25 UTC (permalink / raw)
To: Akira Yokosawa, Mauro Carvalho Chehab, Linux Doc Mailing List
Cc: linux-kernel, Sai Vishnu M, Akira Yokosawa
Akira Yokosawa <akiyks@gmail.com> writes:
> Hi Mauro,
>
> On Mon, 30 Jun 2025 23:34:48 +0200, Mauro Carvalho Chehab wrote:
> [...]
>
>> The test script also ran the install procedure for system,
>> venv and native Sphinx install.
>
> Which install procedure did you test? The short one with the "--no-pdf"
> option?
>
> I am asking because installing the full list of packages in podman run
> of opensuse/leap:15.6 didn't complete successfully for me.
>
> And by the look of things, you stopped at installation, because you are
> well aware of all the issues in running "make htmldocs" and its friends
> after the install.
>
> I assume you (or somebody else) are going to update the script once this
> series is applied to make the suggested lists of packages be useful for
> newcomers.
Thanks for testing this out.
My question would be: are the results somehow worse than those provided
by the existing, Perl script? If this change regresses things, we
obviously do not want to proceed. If it reproduces the old behavior in
a more maintainable language, then hopefully it is a step toward fixing
things in the long run ... ?
Thanks,
jon
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-08 14:25 ` Jonathan Corbet
@ 2025-07-08 14:56 ` Akira Yokosawa
2025-07-09 9:17 ` Mauro Carvalho Chehab
2025-07-31 11:51 ` Mauro Carvalho Chehab
0 siblings, 2 replies; 26+ messages in thread
From: Akira Yokosawa @ 2025-07-08 14:56 UTC (permalink / raw)
To: Jonathan Corbet, Mauro Carvalho Chehab, Linux Doc Mailing List
Cc: linux-kernel, Sai Vishnu M, Akira Yokosawa
On Tue, 08 Jul 2025 08:25:08 -0600, Jonathan Corbet wrote:
> Akira Yokosawa <akiyks@gmail.com> writes:
>
>> Hi Mauro,
>>
>> On Mon, 30 Jun 2025 23:34:48 +0200, Mauro Carvalho Chehab wrote:
>> [...]
>>
>>> The test script also ran the install procedure for system,
>>> venv and native Sphinx install.
>>
>> Which install procedure did you test? The short one with the "--no-pdf"
>> option?
>>
>> I am asking because installing the full list of packages in podman run
>> of opensuse/leap:15.6 didn't complete successfully for me.
>>
>> And by the look of things, you stopped at installation, because you are
>> well aware of all the issues in running "make htmldocs" and its friends
>> after the install.
>>
>> I assume you (or somebody else) are going to update the script once this
>> series is applied to make the suggested lists of packages be useful for
>> newcomers.
>
> Thanks for testing this out.
>
> My question would be: are the results somehow worse than those provided
> by the existing, Perl script?
Not at all. Mauro made some improvements WRT opensuse/leap over the perl
one, but there remain a lot of rooms for improvements here and there.
I've been ignoring sphinx-pre-install all these years, but the impressive
test results presented in this cover-letter made me test it.
> If this change regresses things, we
> obviously do not want to proceed. If it reproduces the old behavior in
> a more maintainable language, then hopefully it is a step toward fixing
> things in the long run ... ?
Yes, translation into python would help a lot, I guess.
Thanks, Akira
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-02 23:03 ` [PATCH 00/15] Translate sphinx-pre-install to Python Jonathan Corbet
@ 2025-07-09 8:25 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-07-09 8:25 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Linux Doc Mailing List, linux-kernel, Akira Yokosawa,
Sai Vishnu M
Em Wed, 02 Jul 2025 17:03:54 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>
> > Hi Jon,
> >
> > This series port scripts/sphinx-pre-install to Python. It started as
> > a bug-compatible version with the old logic.
>
> In my limited testing this seems to work just fine ... Unless somebody
> comes up with a problem, I don't see a lot of reasons to not apply it.
I'm coming up with a bigger patch series in a few. Just re-running
the tests to see if everything is ok now.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-08 3:09 ` Akira Yokosawa
2025-07-08 14:25 ` Jonathan Corbet
@ 2025-07-09 8:58 ` Mauro Carvalho Chehab
1 sibling, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-07-09 8:58 UTC (permalink / raw)
To: Akira Yokosawa
Cc: Linux Doc Mailing List, Jonathan Corbet, linux-kernel,
Sai Vishnu M
Em Tue, 8 Jul 2025 12:09:52 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:
> Hi Mauro,
>
> On Mon, 30 Jun 2025 23:34:48 +0200, Mauro Carvalho Chehab wrote:
> [...]
>
> > The test script also ran the install procedure for system,
> > venv and native Sphinx install.
>
> Which install procedure did you test? The short one with the "--no-pdf"
> option?
No, I'm testing it with PDF.
> I am asking because installing the full list of packages in podman run
> of opensuse/leap:15.6 didn't complete successfully for me.
I got a couple of extra fixes for Leap. Will be submitting in a few.
> And by the look of things, you stopped at installation, because you are
> well aware of all the issues in running "make htmldocs" and its friends
> after the install.
>
> I assume you (or somebody else) are going to update the script once this
> series is applied to make the suggested lists of packages be useful for
> newcomers.
I'm not actually building the docs, just checking that the script will
install Sphinx and required dependencies. There are a couple of reasons
for that:
- the disk space on my desktop. Right now, I'm just copying the
files instead of doing a Kernel git clone. Even so, testing all
those distros is requiring about 100GB on my /var partition;
- test time. Right now, I'm starting dozens of machines in
lxc or podman in parallel. Still, it takes a lot of time to
download and install all packages;
- compilation build itself is out of the scope of the script.
I'm pretty sure we'll have compilation issues(*).
(*) on some RHEL-based distros, for instance, texlive-ctex package
is not there (I guess version 8). so, I suspect that CJK
builds may fail.
Anyway, fore sure there will be space for improvements after it, and
I really appreciate if you could send patches on the top of the new
series addressing the issues.
> > The tests were done with those containers, obtained from
> > lxc download templates or via podman run:
> [...]
>
> > It also properly detected RHEL 8 string:
> >
> > Detected OS : Red Hat Enterprise Linux release 8.10 (Ootpa).
> > Installing venv : WARNING: No such file or directory: 'sphinx-build'
> > Installing package_install : WARNING: No such file or directory: 'sphinx-build'
> >
> > But, at this particular docker container, no repositories had
> > python3-sphinx nor python3-virtualenv, but I suspect that this
> > is a problem on this particular image, as I'm almost sure we
> > tested RHEL 8 in the past, so, I have hopes that this could
> > still work with real RHEL, if it has Python >= 3.7.
On this container, you can only install Sphinx with packages with
a subscription, as the repository where it sits can't be enabled
without registering.
> FWIW, almalinux 8 provides python3-sphinx in the "PowerTools" repo.
> It installs Sphinx 1.7.6 on top of python 3.6.8.
> python3-virtualenv is in the "AppStream" repo. It also comes with
> python 3.6.8.
I added a version check on my test script. I'm opting to use
rockylinux 8 instead, as it is meant to be 1:1 binary compatible
with RHEL.
I will provide the output for it at the next version.
> >
> > Yet, our goal is to support the latest LTS version, so
> > RHEL 8 is out of scope.
>
> Yes, I think it is reasonable to ignore RHEL 8 and its clones.
Yes, but still it may work with venv. I'm adjusting the script
right now for it to propose installing python39 package and
accepting install on venv.
> For the record, here is a WIP scorecard of suggested procedure by
> actually running "make htmldocs" and its friends after installing distro
> packages (if it succeeds):
>
> ------------------------------------------------------------------------
> * debian:12
>
> htmldocs: OK
> latexdocs: NG
>
> Debian and its derivative prohibit convert(1) (of ImageMagick) from
> generating PDF by their default policy, so you'll get a bunch of:
>
> [while building userspace-api.tex]
>
> WARNING: Error #1 when calling: /usr/bin/convert /<srcdir>/Documentation/userspace-api/media/typical_media_device.svg /<srcdir>/Documentation/output/userspace-api/latex/typical_media_device.pdf
> WARNING: Warning msg from convert(1): convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/426.
>
> , and if you ignore them and try to build PDF, you'll get:
>
> [while building userspace-api.pdf]
>
> ! Dimension too large.
> \spx@boxes@fcolorbox ...dimexpr \ht \spx@tempboxa
> +\spx@boxes@border@top +\s...
> l.54887 \end{sphinxVerbatim}
>
> ?
> ! Emergency stop.
> \spx@boxes@fcolorbox ...dimexpr \ht \spx@tempboxa
> +\spx@boxes@border@top +\s...
> l.54887 \end{sphinxVerbatim}
I use Debian to regularly produce html results. It requires a
change at ImageMagick policies for it to run.
> * fedora:latest (42)
>
> htmldocs: NG
>
> Container images of fedora has stopped having "which" as a command.
> You need to install it manually. After installing "which": OK
Thanks for the feedback! I'm installing which on my container's
setup, as my test scripts require it. I'll add a check to install
it.
>
> pdfdocs: OK
>
> * opensuse/leap:15.6
>
> htmldocs: NG
> After installing "which": OK
Will do the same here.
>
> latexdocs: NG
> Can't complete "zypper install" inside a podman container run using the
> full package list ???
I added some fixes for it.
> Having look at these poor results, I don't see any reason to continue
> testing further.
Thanks for the feedback!
Thanks,
Mauro
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-08 14:56 ` Akira Yokosawa
@ 2025-07-09 9:17 ` Mauro Carvalho Chehab
2025-07-31 11:51 ` Mauro Carvalho Chehab
1 sibling, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-07-09 9:17 UTC (permalink / raw)
To: Akira Yokosawa
Cc: Jonathan Corbet, Linux Doc Mailing List, linux-kernel,
Sai Vishnu M
Em Tue, 8 Jul 2025 23:56:01 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:
> On Tue, 08 Jul 2025 08:25:08 -0600, Jonathan Corbet wrote:
> > Akira Yokosawa <akiyks@gmail.com> writes:
> >
> >> Hi Mauro,
> >>
> >> On Mon, 30 Jun 2025 23:34:48 +0200, Mauro Carvalho Chehab wrote:
> >> [...]
> >>
> >>> The test script also ran the install procedure for system,
> >>> venv and native Sphinx install.
> >>
> >> Which install procedure did you test? The short one with the "--no-pdf"
> >> option?
> >>
> >> I am asking because installing the full list of packages in podman run
> >> of opensuse/leap:15.6 didn't complete successfully for me.
> >>
> >> And by the look of things, you stopped at installation, because you are
> >> well aware of all the issues in running "make htmldocs" and its friends
> >> after the install.
> >>
> >> I assume you (or somebody else) are going to update the script once this
> >> series is applied to make the suggested lists of packages be useful for
> >> newcomers.
> >
> > Thanks for testing this out.
> >
> > My question would be: are the results somehow worse than those provided
> > by the existing, Perl script?
>
> Not at all. Mauro made some improvements WRT opensuse/leap over the perl
> one, but there remain a lot of rooms for improvements here and there.
On my tests, the results are better, and more variants are supported.
Those are the current results for my test script (on the version I'm
yet to submit):
AlmaLinux release 9.6 (Sage Margay):
------------------------------------
PASSED 1 - OS: AlmaLinux release 9.6 (Sage Margay), Python: 3.9.21, hostname: almalinux-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 7.4.7, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 3.4.3, Docutils 0.16
Arch Linux:
-----------
PASSED 1 - OS: Arch Linux, Python: 3.13.5
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.2.3, Docutils 0.21.2
CentOS Stream release 9:
------------------------
PASSED 1 - OS: CentOS Stream release 9, Python: 3.9.23, hostname: centos-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 7.4.7, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 3.4.3, Docutils 0.16
Debian GNU/Linux 12:
--------------------
PASSED 1 - OS: Debian GNU/Linux 12, Python: 3.11.2, hostname: debian-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 5.3.0, Docutils 0.19
Devuan GNU/Linux 5:
-------------------
PASSED 1 - OS: Devuan GNU/Linux 5, Python: 3.11.2, hostname: devuan-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 5.3.0, Docutils 0.19
Fedora release 42 (Adams):
--------------------------
PASSED 1 - OS: Fedora release 42 (Adams), Python: 3.13.5
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.1.3, Docutils 0.21.2
Gentoo Base System release 2.17:
--------------------------------
PASSED 1 - OS: Gentoo Base System release 2.17, Python: 3.13.3
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.2.3, Docutils 0.21.2
Kali GNU/Linux 2025.2:
----------------------
PASSED 1 - OS: Kali GNU/Linux 2025.2, Python: 3.13.3, hostname: kali-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.1.3, Docutils 0.21.2
Mageia 9:
---------
PASSED 1 - OS: Mageia 9, Python: 3.10.11, hostname: mageia-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.1.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 6.1.3, Docutils 0.19
Linux Mint 22:
--------------
PASSED 1 - OS: Linux Mint 22, Python: 3.10.12, hostname: mint-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.1.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 4.3.2, Docutils 0.17.1
openEuler release 25.03:
------------------------
PASSED 1 - OS: openEuler release 25.03, Python: 3.11.11, hostname: openeuler-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.1.3, Docutils 0.21.2
OpenMandriva Lx 4.3:
--------------------
PASSED 1 - OS: OpenMandriva Lx 4.3, Python: 3.9.8, hostname: openmandriva-test
FAILED 2 - System packages: Error: Unable to find a match: ensurepip
FAILED 3 - Sphinx on venv
PASSED 4 - Sphinx package: Sphinx Sphinx 4.3.2, Docutils 0.17
openSUSE Tumbleweed:
--------------------
PASSED 1 - OS: openSUSE Tumbleweed, Python: 3.13.5, hostname: opensuse-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.2.3, Docutils 0.21.2
Rocky Linux release 8.9 (Green Obsidian):
-----------------------------------------
PASSED 1 - OS: Rocky Linux release 8.9 (Green Obsidian), Python: 3.6.8, hostname: rockylinux8-test
PASSED 2 - System packages: Packages installed.
FAILED 3 - Sphinx on venv: No Sphinx version!
FAILED 4 - Sphinx package: No Sphinx version!
Rocky Linux release 9.6 (Blue Onyx):
------------------------------------
PASSED 1 - OS: Rocky Linux release 9.6 (Blue Onyx), Python: 3.9.21, hostname: rockylinux-test
FAILED 2 - System packages: Errors during downloading metadata for repository 'epel': - Curl error (28): Timeout was reached for http://ftp.rediris.es/mirror/fedora-epel/9/Everything/x86_64/repodata/repomd.xml [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds] - Curl error (28): Timeout was reached for https://mirror.yandex.ru/epel/9/Everything/x86_64/repodata/repomd.xml [Failed to connect to mirror.yandex.ru port 443: Connection timed out] - Downloading successful, but checksum doesn't match. Calculated: ae3b260e2d12fd111887d36ddd99b22dda9d038b2ce8b1240495e7dedf3eeca4a85e5c1ef10488649c614a3029cb790a0230dbd1a9bb1d20d5d868bcd3ce3bb6(sha512) Expected: 0b6aa1cb918981a1fa6712a14d80968d6bf4e7f121268f90cd5573edb21a36b40f6ec34f8668180c4048eb01afd2938941af61d61304383c858917ed7f2b98de(sha512) - Curl error (28): Timeout was reached for https://fr2.rpmfind.net/linux/epel/9/Everything/x86_64/repodata/repomd.xml [Operation timed out after 30000 milliseconds with 0 out of 0 bytes received] Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
PASSED 3 - Sphinx on venv: Sphinx Sphinx 7.4.7, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 3.4.3, Docutils 0.16
Springdale Open Enterprise Linux release 9.2 (Parma):
-----------------------------------------------------
PASSED 1 - OS: Springdale Open Enterprise Linux release 9.2 (Parma), Python: 3.9.16, hostname: springdalelinux-test
FAILED 2 - System packages: Error: Problem: package ImageMagick-6.9.13.25-1.el9.x86_64 requires libMagickCore-6.Q16.so.7()(64bit), but none of the providers can be installed - package ImageMagick-6.9.13.25-1.el9.x86_64 requires libMagickWand-6.Q16.so.7()(64bit), but none of the providers can be installed - package ImageMagick-6.9.13.25-1.el9.x86_64 requires ImageMagick-libs(x86-64) = 6.9.13.25-1.el9, but none of the providers can be installed - conflicting requests - nothing provides libraw_r.so.23()(64bit) needed by ImageMagick-libs-6.9.13.25-1.el9.x86_64
PASSED 3 - Sphinx on venv: Sphinx Sphinx 7.4.7, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 3.4.3, Docutils 0.16
Ubuntu 24.04.2 LTS:
-------------------
PASSED 1 - OS: Ubuntu 24.04.2 LTS, Python: 3.12.3, hostname: ubuntu-lts-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 7.2.6, Docutils 0.20.1
Ubuntu 25.04:
-------------
PASSED 1 - OS: Ubuntu 25.04, Python: 3.13.3, hostname: ubuntu-test
PASSED 2 - System packages: Packages installed.
PASSED 3 - Sphinx on venv: Sphinx Sphinx 8.2.3, Docutils 0.21.2
PASSED 4 - Sphinx package: Sphinx Sphinx 8.1.3, Docutils 0.21.2
Summary
=======
PASSED: AlmaLinux release 9.6 (Sage Margay) (4 passed, 0 failed, 0 skipped)
PASSED: Arch Linux (4 passed, 0 failed, 0 skipped)
PASSED: CentOS Stream release 9 (4 passed, 0 failed, 0 skipped)
PASSED: Debian GNU/Linux 12 (4 passed, 0 failed, 0 skipped)
PASSED: Devuan GNU/Linux 5 (4 passed, 0 failed, 0 skipped)
PASSED: Fedora release 42 (Adams) (4 passed, 0 failed, 0 skipped)
PASSED: Gentoo Base System release 2.17 (4 passed, 0 failed, 0 skipped)
PASSED: Kali GNU/Linux 2025.2 (4 passed, 0 failed, 0 skipped)
PASSED: Mageia 9 (4 passed, 0 failed, 0 skipped)
PASSED: Linux Mint 22 (4 passed, 0 failed, 0 skipped)
PASSED: openEuler release 25.03 (4 passed, 0 failed, 0 skipped)
PARTIAL: OpenMandriva Lx 4.3 (2 passed, 2 failed, 0 skipped)
PASSED: openSUSE Tumbleweed (4 passed, 0 failed, 0 skipped)
PARTIAL: Rocky Linux release 8.9 (Green Obsidian) (2 passed, 2 failed, 0 skipped)
PARTIAL: Rocky Linux release 9.6 (Blue Onyx) (3 passed, 1 failed, 0 skipped)
PARTIAL: Springdale Open Enterprise Linux release 9.2 (Parma) (3 passed, 1 failed, 0 skipped)
PASSED: Ubuntu 24.04.2 LTS (4 passed, 0 failed, 0 skipped)
PASSED: Ubuntu 25.04 (4 passed, 0 failed, 0 skipped)
So, basically:
- OpenMandriva LX 4.3 (*):
- I didn't find a way to make pip work there. Not critical, as
Sphinx installs as package.
- Perl script is not OK for it.
- RHEL8 variants:
- Installing Sphinx as packages is not possible (Python 3.6)
- Installing as venv is possible, but I need to adjust the script.
- Perl script is not OK for it.
- The error with Rocky Linux 9 is just because its mirrors are slow
now. It passed already on previous tests.
Yeah, there will always be room for improvements.
(*) Testing this one was not easy, as the docker image for it is
half-broken. The image:
https://hub.docker.com/r/openmandriva/4.0
is for LX4.0, but dnf points to wrong repositories. I had to do
some tricks to fix the repositories to the ones that actually exist
those days, using the tricks below:
"sed s,enabled=1,enabled=0, -i /etc/yum.repos.d/*"
"sed s,4.0,4.3, -i /etc/yum.repos.d/openmandriva-x86_64.repo"
"dnf update --repo release-x86_64 --releasever 4.3 -y"
"rm -rf /var/lib/rpm; rpm --rebuilddb"
"sed -i \"/^\\[openmandriva-x86_64\\]/,/^\\[/ s/^enabled=0/enabled=1/\" /etc/yum.repos.d/openmandriva-x86_64.repo"
"sed -i \"/^\\[updates-x86_64\\]/,/^\\[/ s/^enabled=0/enabled=1/\" /etc/yum.repos.d/openmandriva-x86_64.repo"
"dnf install -y passwd which net-tools openssh-server git python3 tar diffutils --releasever 4.3 -y"
"groupadd -r sshd || true"
"useradd -r -g sshd -s /sbin/nologin -c 'Privilege-separated SSH' sshd || true"
The above upgrades the container to LX 4.3 on a not recommended way ;-)
It also prepares the container to start sshd if one needs to copy files
to it via scp (sometimes I do, when I want to quickly test changes at the
scripts).
I couldn't find any newer container repository that could be installed
either via lxc or docker.
> I've been ignoring sphinx-pre-install all these years, but the impressive
> test results presented in this cover-letter made me test it.
>
> > If this change regresses things, we
> > obviously do not want to proceed. If it reproduces the old behavior in
> > a more maintainable language, then hopefully it is a step toward fixing
> > things in the long run ... ?
>
> Yes, translation into python would help a lot, I guess.
That's what I'm hoping as well ;-)
Regards,
Mauro
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-08 14:56 ` Akira Yokosawa
2025-07-09 9:17 ` Mauro Carvalho Chehab
@ 2025-07-31 11:51 ` Mauro Carvalho Chehab
2025-07-31 17:55 ` Mauro Carvalho Chehab
2025-08-06 3:13 ` Akira Yokosawa
1 sibling, 2 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-07-31 11:51 UTC (permalink / raw)
To: Akira Yokosawa
Cc: Jonathan Corbet, Linux Doc Mailing List, linux-kernel,
Sai Vishnu M
Em Tue, 8 Jul 2025 23:56:01 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:
> > My question would be: are the results somehow worse than those provided
> > by the existing, Perl script?
>
> Not at all. Mauro made some improvements WRT opensuse/leap over the perl
> one, but there remain a lot of rooms for improvements here and there.
>
> I've been ignoring sphinx-pre-install all these years, but the impressive
> test results presented in this cover-letter made me test it.
I'm now working to fix PDF generation, assuming that all packages from
sphinx-pre-install are installed.
I'm placing the patches on my scratch tree at:
https://github.com/mchehab/linux/tree/my-docs-next
It contains several branches merged there in sequence:
- elder_python_v1: makes kernel-doc run with elder kernels (2 patches);
- netlink_v10: patches adding an yaml parser for netlink (14 patches);
- sphinx-pre-install-v4: current version of this series (39 patches);
- pdfdocs: specific fixes for PDF doc generation (11 patches);
- sphinx-build-wrapper: a new script with a large cleanup at docs Makefile
(7 patches)
On my testbanch, this is the current summary, where:
- PASSED: means both HTML and PDF were generated:
PASSED - AlmaLinux release 9.6 (Sage Margay) (7 tests)
PASSED - Amazon Linux release 2023 (Amazon Linux) (7 tests)
PASSED - Arch Linux (7 tests)
PASSED - CentOS Stream release 9 (7 tests)
PASSED - Fedora release 42 (Adams) (7 tests)
PASSED - Kali GNU/Linux 2025.2 (7 tests)
PASSED - Mageia 9 (7 tests)
PASSED - openSUSE Leap 15.6 (7 tests)
PASSED - openSUSE Tumbleweed (7 tests)
PASSED - Oracle Linux Server release 9.6 (7 tests)
PASSED - Rocky Linux release 9.6 (Blue Onyx) (7 tests)
PASSED - Ubuntu 24.04.2 LTS (7 tests)
PASSED - Ubuntu 25.04 (7 tests)
- PARTIAL: problems with PDF generation:
Some PDF build files weren't built:
PARTIAL - Debian GNU/Linux 12 (7 tests)
PARTIAL - Devuan GNU/Linux 5 (7 tests)
PARTIAL - Gentoo Base System release 2.17 (7 tests)
PARTIAL - Linux Mint 22 (7 tests)
PARTIAL - openEuler release 25.03 (7 tests)
I didn't check the results here yet, but I suspect that the problems
may be related to CJK fonts and/or images inside files.
Packages installed, but no PDF were built:
PARTIAL - OpenMandriva Lx 4.0 (7 tests)
Here, the problem are at the distro LaTeX packages where
xelatex doesn't work even with a really simple manually
generated .tex file.
- FAILED: something bad happened:
FAILED - Red Hat Enterprise Linux release 8.10 (Ootpa) (7 tests)
(no subscription: I can't install missing packages)
FAILED - rockylinux8 (1 tests)
(this started today: I can't download LXC container for it.
Yesterday it got a PARTIAL result)
FAILED - Springdale Open Enterprise Linux release 9.2 (Parma) (7 tests)
(broken distro dependency for ImageMagick)
So, at least for me, it seems that the changes will be fixing
lots of existing issues.
Btw, one of the problem with PDFs is that the existing logic
doesn't really report success/failures for each PDF target.
That's why I ended writing a wrapper (sphinx-build-wrapper) with
checks the results. As a side effect, docs Makefile is now in
sane state.
Thanks,
Mauro
---
AlmaLinux release 9.6 (Sage Margay):
------------------------------------
PASSED: OS detection: AlmaLinux release 9.6 (Sage Margay)
SKIPPED (Sphinx Sphinx 3.4.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 6:19, return code: 0
PASSED: Build PDF documentation: Build time: 11:51, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Amazon Linux release 2023 (Amazon Linux):
-----------------------------------------
PASSED: OS detection: Amazon Linux release 2023 (Amazon Linux)
SKIPPED (Sphinx Sphinx 3.4.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 6:23, return code: 0
PASSED: Build PDF documentation: Build time: 11:17, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Arch Linux:
-----------
PASSED: OS detection: Arch Linux
PASSED: System packages: Packages installed
PASSED: Sphinx on venv: Sphinx Sphinx 8.2.3
PASSED: Sphinx package: Sphinx Sphinx 8.2.3
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:11, return code: 0
PASSED: Build PDF documentation: Build time: 6:09, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
CentOS Stream release 9:
------------------------
PASSED: OS detection: CentOS Stream release 9
SKIPPED (Sphinx Sphinx 3.4.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 6:20, return code: 0
PASSED: Build PDF documentation: Build time: 11:47, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Debian GNU/Linux 12:
--------------------
PASSED: OS detection: Debian GNU/Linux 12
SKIPPED (Sphinx Sphinx 5.3.0): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 6:08, return code: 0
PARTIAL: Build PDF documentation: Test failed (Build time: 10:25, return code: 2)
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
FAILED: userspace-api: Build failed (FAILED)
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
FAILED: translations: Build failed (FAILED)
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
FAILED: doc-guide: Build failed (FAILED)
PASSED: cdrom: pdf/cdrom.pdf
FAILED: gpu: Build failed (FAILED)
FAILED: i2c: Build failed (FAILED)
FAILED: RCU: Build failed (FAILED)
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
FAILED: arch: Build failed (FAILED)
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
FAILED: core-api: Build failed (FAILED)
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Devuan GNU/Linux 5:
-------------------
PASSED: OS detection: Devuan GNU/Linux 5
SKIPPED (Sphinx Sphinx 5.3.0): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 6:10, return code: 0
PARTIAL: Build PDF documentation: Test failed (Build time: 10:27, return code: 2)
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
FAILED: userspace-api: Build failed (FAILED)
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
FAILED: translations: Build failed (FAILED)
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
FAILED: doc-guide: Build failed (FAILED)
PASSED: cdrom: pdf/cdrom.pdf
FAILED: gpu: Build failed (FAILED)
FAILED: i2c: Build failed (FAILED)
FAILED: RCU: Build failed (FAILED)
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
FAILED: arch: Build failed (FAILED)
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
FAILED: core-api: Build failed (FAILED)
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Fedora release 42 (Adams):
--------------------------
PASSED: OS detection: Fedora release 42 (Adams)
SKIPPED (Sphinx Sphinx 8.1.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:09, return code: 0
PASSED: Build PDF documentation: Build time: 10:27, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Gentoo Base System release 2.17:
--------------------------------
PASSED: OS detection: Gentoo Base System release 2.17
SKIPPED (Sphinx Sphinx 8.2.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:28, return code: 0
PARTIAL: Build PDF documentation: Test failed (Build time: 9:19, return code: 2)
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
FAILED: userspace-api: Build failed (FAILED)
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
FAILED: translations: Build failed (FAILED)
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
FAILED: gpu: Build failed (FAILED)
FAILED: i2c: Build failed (FAILED)
FAILED: RCU: Build failed (FAILED)
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
FAILED: arch: Build failed (FAILED)
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
FAILED: core-api: Build failed (FAILED)
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Kali GNU/Linux 2025.2:
----------------------
PASSED: OS detection: Kali GNU/Linux 2025.2
SKIPPED (Sphinx Sphinx 8.1.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 3:20, return code: 0
PASSED: Build PDF documentation: Build time: 12:53, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Mageia 9:
---------
PASSED: OS detection: Mageia 9
PASSED: System packages: Packages installed
PASSED: Sphinx on venv: Sphinx Sphinx 8.1.3
PASSED: Sphinx package: Sphinx Sphinx 6.1.3
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:17, return code: 0
PASSED: Build PDF documentation: Build time: 14:28, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Linux Mint 22:
--------------
PASSED: OS detection: Linux Mint 22
SKIPPED (Sphinx Sphinx 4.3.2): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:24, return code: 0
PARTIAL: Build PDF documentation: Test failed (Build time: 11:00, return code: 2)
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
FAILED: userspace-api: Build failed (FAILED)
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
FAILED: translations: Build failed (FAILED)
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
FAILED: doc-guide: Build failed (FAILED)
PASSED: cdrom: pdf/cdrom.pdf
FAILED: gpu: Build failed (FAILED)
FAILED: i2c: Build failed (FAILED)
FAILED: RCU: Build failed (FAILED)
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
FAILED: arch: Build failed (FAILED)
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
FAILED: core-api: Build failed (FAILED)
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
openEuler release 25.03:
------------------------
PASSED: OS detection: openEuler release 25.03
PASSED: System packages: Packages installed
PASSED: Sphinx on venv: Sphinx Sphinx 8.2.3
PASSED: Sphinx package: Sphinx Sphinx 8.1.3
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:36, return code: 0
PARTIAL: Build PDF documentation: Test failed (Build time: 11:39, return code: 2)
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
FAILED: translations: Build failed (FAILED)
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
OpenMandriva Lx 4.0:
--------------------
PASSED: OS detection: OpenMandriva Lx 4.0
PASSED: System packages: Packages installed
PASSED: Sphinx on venv: Sphinx Sphinx 4.3.2
PASSED: Sphinx package: Sphinx Sphinx 4.3.2
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 0:00, return code: 0
PARTIAL: Build PDF documentation: PDF build didn't produce any results (Build time: 0:00, return code: 0)
openSUSE Leap 15.6:
-------------------
PASSED: OS detection: openSUSE Leap 15.6
SKIPPED (Sphinx Sphinx 7.2.6): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:29, return code: 0
PASSED: Build PDF documentation: Build time: 13:45, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
openSUSE Tumbleweed:
--------------------
PASSED: OS detection: openSUSE Tumbleweed
SKIPPED (Sphinx Sphinx 8.2.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 4:33, return code: 0
PASSED: Build PDF documentation: Build time: 13:18, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Oracle Linux Server release 9.6:
--------------------------------
PASSED: OS detection: Oracle Linux Server release 9.6
SKIPPED (Sphinx Sphinx 3.4.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:17, return code: 0
PASSED: Build PDF documentation: Build time: 11:30, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Red Hat Enterprise Linux release 8.10 (Ootpa):
----------------------------------------------
PASSED: OS detection: Red Hat Enterprise Linux release 8.10 (Ootpa)
FAILED: System packages: Error: Unable to find a match: google-noto-sans-cjk-ttc-fonts librsvg2-tools texlive-amscls texlive-amsfonts texlive-amsmath texlive-anyfontsize texlive-capt-of texlive-cmap texlive-collection-fontsrecommended texlive-collection-latex texlive-ec texlive-eqparbox texlive-euenc texlive-fancybox texlive-fancyvrb texlive-float texlive-fncychap texlive-framed texlive-luatex85 texlive-mdwtools texlive-multirow texlive-needspace texlive-oberdiek texlive-parskip texlive-polyglossia texlive-psnfss texlive-tabulary texlive-threeparttable texlive-titlesec texlive-tools texlive-ucs texlive-upquote texlive-wrapfig texlive-xecjk texlive-xetex-bin
PARTIAL: Sphinx on venv: No Sphinx version detected
PARTIAL: Sphinx package: No Sphinx version detected
PASSED: Clean documentation: Build time: 0:00, return code: 0
PARTIAL: Build HTML documentation: Test failed (Build time: 0:00, return code: 2)
PARTIAL: Build PDF documentation: PDF build didn't produce any results (Build time: 0:00, return code: 2)
rockylinux8:
------------
FAILED: Build failed at package installation (
Failed to setup distrolib.distro_manager.CustomError: Failed to setup distro
File "~/bin/doc-build-container.py", line 261, in <module>
asyncio.run(main())
/usr/lib64/python3.13/asyncio/runners.py, line 195, in run
return runner.run(main)
/usr/lib64/python3.13/asyncio/runners.py, line 118, in run
return self._loop.run_until_complete(task)
/usr/lib64/python3.13/asyncio/base_events.py, line 712, in run_until_complete
self.run_forever()
/usr/lib64/python3.13/asyncio/base_events.py, line 683, in run_forever
self._run_once()
/usr/lib64/python3.13/asyncio/base_events.py, line 2042, in _run_once
handle._run()
/usr/lib64/python3.13/asyncio/events.py, line 89, in _run
self._context.run(self._callback, *self._args)
File "distro_manager.py", line 612, in run_manager
return await manager.serial_run()
File "distro_manager.py", line 593, in serial_run
await self.run_distro(distro)
File "distro_manager.py", line 518, in run_distro
self.record_status(
)
Rocky Linux release 9.6 (Blue Onyx):
------------------------------------
PASSED: OS detection: Rocky Linux release 9.6 (Blue Onyx)
SKIPPED (Sphinx Sphinx 3.4.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 5:07, return code: 0
PASSED: Build PDF documentation: Build time: 11:29, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Springdale Open Enterprise Linux release 9.2 (Parma):
-----------------------------------------------------
PASSED: OS detection: Springdale Open Enterprise Linux release 9.2 (Parma)
FAILED: System packages: Error: Problem: package ImageMagick-6.9.13.25-1.el9.x86_64 requires libMagickCore-6.Q16.so.7()(64bit), but none of the providers can be installed - package ImageMagick-6.9.13.25-1.el9.x86_64 requires libMagickWand-6.Q16.so.7()(64bit), but none of the providers can be installed - package ImageMagick-6.9.13.25-1.el9.x86_64 requires ImageMagick-libs(x86-64) = 6.9.13.25-1.el9, but none of the providers can be installed - conflicting requests - nothing provides libraw_r.so.23()(64bit) needed by ImageMagick-libs-6.9.13.25-1.el9.x86_64
PASSED: Sphinx on venv: Sphinx Sphinx 7.4.7
PASSED: Sphinx package: Sphinx Sphinx 3.4.3
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 4:30, return code: 0
PARTIAL: Build PDF documentation: PDF build didn't produce any results (Build time: 0:00, return code: 0)
Ubuntu 24.04.2 LTS:
-------------------
PASSED: OS detection: Ubuntu 24.04.2 LTS
SKIPPED (Sphinx Sphinx 7.2.6): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 4:06, return code: 0
PASSED: Build PDF documentation: Build time: 10:38, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Ubuntu 25.04:
-------------
PASSED: OS detection: Ubuntu 25.04
SKIPPED (Sphinx Sphinx 8.1.3): System packages
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
PASSED: Clean documentation: Build time: 0:00, return code: 0
PASSED: Build HTML documentation: Build time: 3:28, return code: 0
PASSED: Build PDF documentation: Build time: 11:08, return code: 0
PDF docs:
---------
PASSED: dev-tools: pdf/dev-tools.pdf
PASSED: tools: pdf/tools.pdf
PASSED: filesystems: pdf/filesystems.pdf
PASSED: w1: pdf/w1.pdf
PASSED: maintainer: pdf/maintainer.pdf
PASSED: process: pdf/process.pdf
PASSED: isdn: pdf/isdn.pdf
PASSED: fault-injection: pdf/fault-injection.pdf
PASSED: iio: pdf/iio.pdf
PASSED: scheduler: pdf/scheduler.pdf
PASSED: staging: pdf/staging.pdf
PASSED: fpga: pdf/fpga.pdf
PASSED: power: pdf/power.pdf
PASSED: leds: pdf/leds.pdf
PASSED: edac: pdf/edac.pdf
PASSED: PCI: pdf/PCI.pdf
PASSED: firmware-guide: pdf/firmware-guide.pdf
PASSED: cpu-freq: pdf/cpu-freq.pdf
PASSED: mhi: pdf/mhi.pdf
PASSED: wmi: pdf/wmi.pdf
PASSED: timers: pdf/timers.pdf
PASSED: accel: pdf/accel.pdf
PASSED: hid: pdf/hid.pdf
PASSED: userspace-api: pdf/userspace-api.pdf
PASSED: spi: pdf/spi.pdf
PASSED: networking: pdf/networking.pdf
PASSED: virt: pdf/virt.pdf
PASSED: nvme: pdf/nvme.pdf
PASSED: translations: pdf/translations.pdf
PASSED: input: pdf/input.pdf
PASSED: tee: pdf/tee.pdf
PASSED: doc-guide: pdf/doc-guide.pdf
PASSED: cdrom: pdf/cdrom.pdf
PASSED: gpu: pdf/gpu.pdf
PASSED: i2c: pdf/i2c.pdf
PASSED: RCU: pdf/RCU.pdf
PASSED: watchdog: pdf/watchdog.pdf
PASSED: usb: pdf/usb.pdf
PASSED: rust: pdf/rust.pdf
PASSED: crypto: pdf/crypto.pdf
PASSED: kbuild: pdf/kbuild.pdf
PASSED: livepatch: pdf/livepatch.pdf
PASSED: mm: pdf/mm.pdf
PASSED: locking: pdf/locking.pdf
PASSED: infiniband: pdf/infiniband.pdf
PASSED: driver-api: pdf/driver-api.pdf
PASSED: bpf: pdf/bpf.pdf
PASSED: devicetree: pdf/devicetree.pdf
PASSED: block: pdf/block.pdf
PASSED: target: pdf/target.pdf
PASSED: arch: pdf/arch.pdf
PASSED: pcmcia: pdf/pcmcia.pdf
PASSED: scsi: pdf/scsi.pdf
PASSED: netlabel: pdf/netlabel.pdf
PASSED: sound: pdf/sound.pdf
PASSED: security: pdf/security.pdf
PASSED: accounting: pdf/accounting.pdf
PASSED: admin-guide: pdf/admin-guide.pdf
PASSED: core-api: pdf/core-api.pdf
PASSED: fb: pdf/fb.pdf
PASSED: peci: pdf/peci.pdf
PASSED: trace: pdf/trace.pdf
PASSED: misc-devices: pdf/misc-devices.pdf
PASSED: kernel-hacking: pdf/kernel-hacking.pdf
PASSED: hwmon: pdf/hwmon.pdf
Summary
=======
PASSED - AlmaLinux release 9.6 (Sage Margay) (7 tests)
PASSED - Amazon Linux release 2023 (Amazon Linux) (7 tests)
PASSED - Arch Linux (7 tests)
PASSED - CentOS Stream release 9 (7 tests)
PARTIAL - Debian GNU/Linux 12 (7 tests)
PARTIAL - Devuan GNU/Linux 5 (7 tests)
PASSED - Fedora release 42 (Adams) (7 tests)
PARTIAL - Gentoo Base System release 2.17 (7 tests)
PASSED - Kali GNU/Linux 2025.2 (7 tests)
PASSED - Mageia 9 (7 tests)
PARTIAL - Linux Mint 22 (7 tests)
PARTIAL - openEuler release 25.03 (7 tests)
PARTIAL - OpenMandriva Lx 4.0 (7 tests)
PASSED - openSUSE Leap 15.6 (7 tests)
PASSED - openSUSE Tumbleweed (7 tests)
PASSED - Oracle Linux Server release 9.6 (7 tests)
FAILED - Red Hat Enterprise Linux release 8.10 (Ootpa) (7 tests)
FAILED - rockylinux8 (1 tests)
PASSED - Rocky Linux release 9.6 (Blue Onyx) (7 tests)
FAILED - Springdale Open Enterprise Linux release 9.2 (Parma) (7 tests)
PASSED - Ubuntu 24.04.2 LTS (7 tests)
PASSED - Ubuntu 25.04 (7 tests)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-31 11:51 ` Mauro Carvalho Chehab
@ 2025-07-31 17:55 ` Mauro Carvalho Chehab
2025-08-06 3:13 ` Akira Yokosawa
1 sibling, 0 replies; 26+ messages in thread
From: Mauro Carvalho Chehab @ 2025-07-31 17:55 UTC (permalink / raw)
To: Akira Yokosawa
Cc: Jonathan Corbet, Linux Doc Mailing List, linux-kernel,
Sai Vishnu M
Em Thu, 31 Jul 2025 13:51:07 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:
> Em Tue, 8 Jul 2025 23:56:01 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
>
> > > My question would be: are the results somehow worse than those provided
> > > by the existing, Perl script?
> >
> > Not at all. Mauro made some improvements WRT opensuse/leap over the perl
> > one, but there remain a lot of rooms for improvements here and there.
> >
> > I've been ignoring sphinx-pre-install all these years, but the impressive
> > test results presented in this cover-letter made me test it.
>
> I'm now working to fix PDF generation, assuming that all packages from
> sphinx-pre-install are installed.
>
> I'm placing the patches on my scratch tree at:
> https://github.com/mchehab/linux/tree/my-docs-next
>
> It contains several branches merged there in sequence:
> - elder_python_v1: makes kernel-doc run with elder kernels (2 patches);
> - netlink_v10: patches adding an yaml parser for netlink (14 patches);
> - sphinx-pre-install-v4: current version of this series (39 patches);
> - pdfdocs: specific fixes for PDF doc generation (11 patches);
> - sphinx-build-wrapper: a new script with a large cleanup at docs Makefile
> (7 patches)
>
> On my testbanch, this is the current summary, where:
> - PASSED: means both HTML and PDF were generated:
>
> PASSED - AlmaLinux release 9.6 (Sage Margay) (7 tests)
> PASSED - Amazon Linux release 2023 (Amazon Linux) (7 tests)
> PASSED - Arch Linux (7 tests)
> PASSED - CentOS Stream release 9 (7 tests)
> PASSED - Fedora release 42 (Adams) (7 tests)
> PASSED - Kali GNU/Linux 2025.2 (7 tests)
> PASSED - Mageia 9 (7 tests)
> PASSED - openSUSE Leap 15.6 (7 tests)
> PASSED - openSUSE Tumbleweed (7 tests)
> PASSED - Oracle Linux Server release 9.6 (7 tests)
> PASSED - Rocky Linux release 9.6 (Blue Onyx) (7 tests)
> PASSED - Ubuntu 24.04.2 LTS (7 tests)
> PASSED - Ubuntu 25.04 (7 tests)
Forgot to mention, but for Debian-based distros, my setup does this at
the distro setup phase:
if [ -f /etc/ImageMagick-6/policy.xml ]; then
# Remove any existing restrictive policies for PDF/PS/EPS/XPS
sed -i '/<policy.*domain="coder".*pattern=".*\(PDF\|PS\|EPS\|XPS\).*"/d' /etc/ImageMagick-6/policy.xml
# Allow PDF patterns at the end </policymap>
sed -i '/<\/policymap>/i \ \ <policy domain="coder" rights="read|write" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />'etc/ImageMagick-6/policy.xml
fi
if [ -f /etc/ImageMagick-7/policy.xml ]; then
# Remove any existing restrictive policies for PDF/PS/EPS/XPS
sed -i '/<policy.*domain="coder".*pattern=".*\(PDF\|PS\|EPS\|XPS\).*"/d' /etc/ImageMagick-7/policy.xml
# Allow PDF patterns at the end </policymap>
sed -i '/<\/policymap>/i \ \ <policy domain="coder" rights="read|write" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />' /etc/ImageMagick-7/policy.xml
fi
to fix a debian-specific packaging issue that makes ImageMagick
to fail when it is used with PS/PDF files.
Regards,Mauro
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/15] Translate sphinx-pre-install to Python
2025-07-31 11:51 ` Mauro Carvalho Chehab
2025-07-31 17:55 ` Mauro Carvalho Chehab
@ 2025-08-06 3:13 ` Akira Yokosawa
1 sibling, 0 replies; 26+ messages in thread
From: Akira Yokosawa @ 2025-08-06 3:13 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Jonathan Corbet, Linux Doc Mailing List, linux-kernel,
Sai Vishnu M, Akira Yokosawa
Hi,
On Thu, 31 Jul 2025 13:51:07 +0200, Mauro Carvalho Chehab wrote:
> Em Tue, 8 Jul 2025 23:56:01 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
>
>> I've been ignoring sphinx-pre-install all these years, but the impressive
>> test results presented in this cover-letter made me test it.
>
> I'm now working to fix PDF generation, assuming that all packages from
> sphinx-pre-install are installed.
>
> I'm placing the patches on my scratch tree at:
> https://github.com/mchehab/linux/tree/my-docs-next
>
> It contains several branches merged there in sequence:
> - elder_python_v1: makes kernel-doc run with elder kernels (2 patches);
> - netlink_v10: patches adding an yaml parser for netlink (14 patches);
> - sphinx-pre-install-v4: current version of this series (39 patches);
> - pdfdocs: specific fixes for PDF doc generation (11 patches);
> - sphinx-build-wrapper: a new script with a large cleanup at docs Makefile
> (7 patches)
Sorry, but I've not looked into those branches.
[...]
> So, at least for me, it seems that the changes will be fixing
> lots of existing issues.
>
> Btw, one of the problem with PDFs is that the existing logic
> doesn't really report success/failures for each PDF target.
> That's why I ended writing a wrapper (sphinx-build-wrapper) with
> checks the results. As a side effect, docs Makefile is now in
> sane state.
I might be interested in seeing the docs Makefile updates.
>
> Thanks,
> Mauro
>
> ---
[...]
> Summary
> =======
> PASSED - AlmaLinux release 9.6 (Sage Margay) (7 tests)
> PASSED - Amazon Linux release 2023 (Amazon Linux) (7 tests)
> PASSED - Arch Linux (7 tests)
> PASSED - CentOS Stream release 9 (7 tests)
> PARTIAL - Debian GNU/Linux 12 (7 tests)
> PARTIAL - Devuan GNU/Linux 5 (7 tests)
> PASSED - Fedora release 42 (Adams) (7 tests)
> PARTIAL - Gentoo Base System release 2.17 (7 tests)
> PASSED - Kali GNU/Linux 2025.2 (7 tests)
> PASSED - Mageia 9 (7 tests)
> PARTIAL - Linux Mint 22 (7 tests)
> PARTIAL - openEuler release 25.03 (7 tests)
> PARTIAL - OpenMandriva Lx 4.0 (7 tests)
> PASSED - openSUSE Leap 15.6 (7 tests)
> PASSED - openSUSE Tumbleweed (7 tests)
> PASSED - Oracle Linux Server release 9.6 (7 tests)
> FAILED - Red Hat Enterprise Linux release 8.10 (Ootpa) (7 tests)
> FAILED - rockylinux8 (1 tests)
> PASSED - Rocky Linux release 9.6 (Blue Onyx) (7 tests)
> FAILED - Springdale Open Enterprise Linux release 9.2 (Parma) (7 tests)
> PASSED - Ubuntu 24.04.2 LTS (7 tests)
> PASSED - Ubuntu 25.04 (7 tests)
Here is a summary I have made based on my own tests against limited list of
distros. I'm still ignoring sphinx_pre_install.
-----------------------------------------------------------------------
* TL;DR
Setting up a tool for SVG --> PDF conversion and CJK fonts properly for
"make latexdocs" and "make pdfdocs" is sometimes tricky.
Summary table as of 2025/08/02 WRT distro packages installed as they are:
[legends]
pdf & img: pdfdocs with ImageMagick + rsvg-convert; w/o CJK fonts
pdf & ink: pdfdocs with Inkscape; w/o CJK fonts
pdf & cjk: pdfdocs with either ImageMagick or Inkscape; with CJK fonts
========================================================================
pdf
-----------------
distro python3 sphinx html img ink cjk notes
=================== ======= ======= ===== ===== ===== ===== =========
debian:bullseye 3.9.2 3.4.3 PASS FAIL PASS PASS [*0]
debian:bookworm 3.11.2 5.3.0 PASS FAIL PASS PASS [*0]
debian:trixie 3.13.5 8.1.3 PASS FAIL PASS PASS [*6]
ubuntu:jammy 3.10.6 4.3.2 PASS FAIL PASS PASS [*0]
ubuntu:noble 3.12.3 7.2.6 PASS FAIL PASS PASS [*6]
ubuntu:plucky 3.13.3 8.1.3 PASS FAIL PASS PASS [*6]
almalinux:9 3.9.21 3.4.3 PASS PASS PASS PASS
almalinux:10 3.12.9 7.2.6 PASS PASS --- FAIL [*1]
fedora:42 3.13.5 8.1.3 PASS PASS PASS PASS [*2]
opensuse/leap:15.6 3.11.9 7.2.6 PASS PASS FAIL FAIL [*3]
mageia:9 3.10.11 6.1.3 PASS PASS PASS PASS [*4]
opensuse/tumbleweed 3.13.5 8.2.3 PASS PASS PASS FAIL [*5]
archlinux 3.13.5 8.2.3 PASS PASS PASS PASS
=================== ======= ======= ===== ===== ===== ===== ==========
"FAIL" means several situations, most of which can be worked around by
manual intervention after installing distro packages:
(1) error/warning in "make latexdocs"
(1-a) due to some issues in distro package that is not up-to-date
(1-b) convert(1) of ImageMagick doesn't generate PDFs with the warning:
WARNING: Warning msg from convert(1): convert: attempt to perform an
operation not allowed by the security policy `PDF' ...
(1-c) Incompatibility of newly added SVG figures with avalable
SVG --> PDF converters:
(1-c1) covert(1) + rsvg-convert(1)
(1-c2) inkscape(1)
(2) error in "make pdfdocs"
(2-a) (1-b) or (1-c) can cause "LaTeX Warning: Float too large for page
by <huge>pt" and ends up in the fatal error of xelatex:
"! TeX capacity exceeded, sorry [main memory size=5000000]"
(2-b) (1-b) or (1-c) can cause xelatex to error-exit without leaving
any hint in the .log file.
(3) CJK pages can't be rendered
(3-a) due to missing *static* Noto CJK fonts in distro packages
Notes
=====
[*0] ImageMagick is not allowed to generate PDFs in Debian and its
derivative releases prior to ubuntu:noble.
[*1] An issue in cairo prevents a DOT diagram in a CJK page to be converted
into PDF ("dot -Tpdf" crash; known issue with cairo-1.18.2-2.el10).
Inkscape is not in EPEL 10. Use of flatpak is recommended for GUI apps,
but flatpak apps don't see font setups of hosts by default.
Serif shape Static Noto CJK fonts are not provided as distro packages.
[*2] Due to a xelatex & fontspec limitation, if you have variable Noto CJK
fonts installed, they need to be deny-listed for building PDF docs
with CJK fonts.
[*3] Sphinx 7.2.6 is provided as python311-Sphinx.
Inkscape 1.0.1 crashes against figures drawn with Inkscape 1.4.x.
Noto CJK fonts are not provided as distro packages.
[*4] When Inkscape is available, their parallel runs under Gnome desktop
can cause emergency saves of SVG files. This issue can be worked
around by, e.g., building under a text-only session or a non-Gnome
desktop.
[*5] Static Noto CJK fonts are not provided as distro packages.
Even if they are manually installed from Google fonts manually,
deny-listing distro-provided variable ones is required for CJK pages.
[*6] convert(1) + rsvg_convert(1) doesn't work well with some SVG files
under recent debian and its derivatives. Incomplete list of examples:
- Documentation/gpu/pipe_and_queue_abstraction.svg:
convert: unrecognized color `context-stroke' @ warning/color.c/GetColorCompliance/1057.
convert: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4456.
- Documentation/userspace-api/media/v4l/selection.svg:
convert: unrecognized color `dt' @ warning/color.c/GetColorCompliance/1064.
convert: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4548.
convert: unrecognized color `w' @ warning/color.c/GetColorCompliance/1064.
convert: unrecognized color `dt' @ warning/color.c/GetColorCompliance/1064.
convert: unrecognized color `w' @ warning/color.c/GetColorCompliance/1064.
[about almalinux:8]
There is a package python3.11, but there is no accompanying package
for virtualenv in official EL 8 repos. It might be possible to install
python3.11 as well as accompanying pip and pyyaml, and install modern
Sphinx by non-venv pip. This might be feasible, e.g., in containerized
setups.
On top of almalinux:8, as far as I could test, xelatex & fontspec
can't discover fonts by its names such as "DejaVu Sans".
-----------------------------------------------------------------------
Thanks, Akira
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2025-08-06 3:13 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 21:34 [PATCH 00/15] Translate sphinx-pre-install to Python Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 01/15] scripts: sphinx-pre-install: fix version check for Fedora Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 02/15] scripts: sphinx-pre-install: rename it to scripts/sphinx-pre-install.pl Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 03/15] scripts: sphinx-pre-install: Convert script to Python Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 04/15] scripts: sphinx-pre-install: Make it compatible with Python 3.6 Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 05/15] scripts: sphinx-pre-install: run on a supported version Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 06/15] scripts: sphinx-pre-install: drop obsolete routines Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 07/15] scripts: sphinx-pre-install: drop support for old virtualenv Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 08/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Leap 15.x Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 09/15] scripts: sphinx-pre-install.py fix opensuse hints Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 10/15] scripts: sphinx-pre-install.py: fix support for gentoo Mauro Carvalho Chehab
2025-06-30 21:34 ` [PATCH 11/15] scripts: sphinx-pre-install: Address issues with OpenSUSE Tumbleweed Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 12/15] scripts: sphinx-pre-install.py: only show portage hints once Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 13/15] scripts: sphinx-pre-install.py: cleanup rhel support Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 14/15] docs: Makefile: switch to the new scripts/sphinx-pre-install.py Mauro Carvalho Chehab
2025-06-30 21:35 ` [PATCH 15/15] scripts: sphinx-pre-install.pl: get rid of the old script Mauro Carvalho Chehab
2025-07-02 23:03 ` [PATCH 00/15] Translate sphinx-pre-install to Python Jonathan Corbet
2025-07-09 8:25 ` Mauro Carvalho Chehab
2025-07-08 3:09 ` Akira Yokosawa
2025-07-08 14:25 ` Jonathan Corbet
2025-07-08 14:56 ` Akira Yokosawa
2025-07-09 9:17 ` Mauro Carvalho Chehab
2025-07-31 11:51 ` Mauro Carvalho Chehab
2025-07-31 17:55 ` Mauro Carvalho Chehab
2025-08-06 3:13 ` Akira Yokosawa
2025-07-09 8:58 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).