lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1751318230.git.mchehab+huawei@kernel.org>
Date: Mon, 30 Jun 2025 23:34:48 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
	Jonathan Corbet <corbet@....net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
	Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
	linux-kernel@...r.kernel.org,
	Akira Yokosawa <akiyks@...il.com>,
	Sai Vishnu M <saivishnu725@...il.com>
Subject: [PATCH 00/15] Translate sphinx-pre-install to Python

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ