linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).