[PATCH 8/8] tools/build-docs-container: make it possible to print the distro list

Antonin Godard
2025-12-22T12:28:41Z

Add a special "supported_distros" argument to the script to make it
possible to return the list of supported distros. This is useful for use
in a external script, to run the docs build on a specific set or all
supported distros concurrently.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
documentation/tools/build-docs-container | 49 +++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 17 deletions(-)

diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container
index c5cdd9c4c..510435c3c 100755
--- a/documentation/tools/build-docs-container
+++ b/documentation/tools/build-docs-container
@@ -20,6 +20,32 @@

set -eu -o pipefail

+declare -a _SUPPORTED_DISTROS=(
+ almalinux:8
+ almalinux:9
+ centos:stream9
+ debian:12
+ debian:13
+ fedora:39
+ fedora:40
+ fedora:41
+ fedora:42
+ leap:15.5
+ leap:15.6
+ rockylinux:8
+ rockylinux:9
+ ubuntu:22.04
+ ubuntu:24.04
+ ubuntu:25.04
+ ubuntu:25.10
+)
+
+
+if [ "${1:-}" = "supported_distros" ]; then
+ echo "${_SUPPORTED_DISTROS[@]}"
+ exit 0
+fi
+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
CONTAINERCMD=${CONTAINERCMD:-docker}
DOCS_DIR="$SCRIPT_DIR/../.."
@@ -35,24 +61,13 @@ $0 OCI_IMAGE [make arguments...]

OCI_IMAGE is an image:tag of an OCI image hosted on hub.docker.com. It is one
of:
- - almalinux:8
- - almalinux:9
- - centos:stream9
- - debian:12
- - debian:13
- - fedora:39
- - fedora:40
- - fedora:41
- - fedora:42
- - leap:15.5
- - leap:15.6
- - rockylinux:8
- - rockylinux:9
- - ubuntu:22.04
- - ubuntu:24.04
- - ubuntu:25.04
- - ubuntu:25.10
+"
+
+ for distro in "${_SUPPORTED_DISTROS[@]}"; do
+ echo " - $distro"
+ done

+ echo "
[make arguments] is one or more argument to pass to the make command of
documentation/Makefile, see that file for what's supported. This is typically
intended to be used to provide specific make targets.

--
2.51.0