@@ -266,6 +266,42 @@ documentation in PDF format:
.. literalinclude:: ../tools/host_packages_scripts/almalinux_docs_pdf.sh
:language: shell
+CentOS Stream Packages
+----------------------
+
+Here are the packages needed to build an image on a headless system
+with a supported CentOS Stream distribution:
+
+.. literalinclude:: ../tools/host_packages_scripts/centosstream_essential.sh
+ :language: shell
+
+Here are the packages needed to build Project documentation manuals:
+
+.. literalinclude:: ../tools/host_packages_scripts/centosstream_docs.sh
+ :language: shell
+
+.. literalinclude:: ../tools/host_packages_scripts/pip3_docs.sh
+ :language: shell
+
+In addition to the previous packages, the following TeX Live packages
+are needed to build the documentation in PDF format and can be installed with
+the `TeX Live package manager <https://tug.org/texlive/tlmgr.html>`__:
+
+.. literalinclude:: ../tools/host_packages_scripts/tlmgr_docs_pdf.sh
+ :language: shell
+
+.. warning::
+
+ The Tex Live installation above is only valid for `x86_64` hosts.
+
+Before building the documentation PDF, setup the ``PATH`` to use the installed
+packages (with ``${textooldir}`` pointing to the TeX Live installation from the
+previous step):
+
+.. code-block:: console
+
+ $ export PATH="${PATH}:${textooldir}/tl/bin/x86_64-linux"
+
.. _system-requirements-buildtools:
Required Git, tar, Python, make and gcc Versions
@@ -33,6 +33,7 @@ $0 OCI_IMAGE [make arguments...]
OCI_IMAGE is an image:tag of an OCI image hosted on hub.docker.com. It is one
of:
+ - centos:stream9
- debian:12
- debian:13
- fedora:39
@@ -82,6 +83,9 @@ main ()
local version
version=$(echo "$image" | awk -F: '{print $NF}')
+ # Default to docker.io unless overwritten below
+ local repo=docker.io
+
case $image in
# Missing latexmk texlive-gnu-freefont packages at the very least
# "almalinux:8"*|\
@@ -91,6 +95,14 @@ main ()
# docs_pdf=almalinux_docs_pdf.sh
# pip3=pip3_docs.sh
# ;;
+ "centos:stream9"*)
+ containerfile=Containerfile.stream
+ essential=centosstream_essential.sh
+ docs=centosstream_docs.sh
+ docs_pdf=tlmgr_docs_pdf.sh
+ pip3=pip3_docs.sh
+ repo=quay.io/centos
+ ;;
# Missing python3-saneyaml
# "debian:11"*|\
"debian:12"*|\
@@ -137,7 +149,7 @@ main ()
$OCI build \
--tag "yocto-docs-$sanitized_dockername:latest" \
- --build-arg ARG_FROM="docker.io/$image" \
+ --build-arg ARG_FROM="$repo/$image" \
--build-arg INCLUDE_ESSENTIAL_PACKAGES="${INCLUDE_ESSENTIAL_PACKAGES}" \
--build-arg ESSENTIAL="host_packages_scripts/$essential" \
--build-arg DOCS="host_packages_scripts/$docs" \
@@ -7,6 +7,9 @@ ARG DOCS=fedora_docs.sh
ARG DOCS_PDF=fedora_docs_pdf.sh
ARG PIP3=pip3_docs.sh
+ENV TEXTOOLDIR=/opt/docs-build-tex-tools
+ENV PATH="$PATH:$TEXTOOLDIR/tl/bin/x86_64-linux"
+
# relative to the location of the dockerfile
COPY --chmod=777 ${ESSENTIAL} /temp/host_packages_essential.sh
COPY --chmod=777 ${DOCS} /temp/host_packages_docs.sh
new file mode 120000
@@ -0,0 +1 @@
+Containerfile.dnf
\ No newline at end of file
@@ -1 +1 @@
-sudo dnf install git glibc-locale-source librsvg2-tools make python3-pip which
+sudo dnf install -y git glibc-locale-source librsvg2-tools make python3-pip which
@@ -1,5 +1,5 @@
sudo dnf install -y epel-release
-sudo yum install dnf-plugins-core
+sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --set-enabled crb
sudo dnf makecache
-sudo dnf install bzip2 ccache chrpath cpio cpp diffstat diffutils gawk gcc gcc-c++ git glibc-devel glibc-langpack-en gzip libacl make patch perl perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python3 python3-GitPython python3-jinja2 python3-pexpect python3-pip rpcgen socat tar texinfo unzip wget which xz zstd
+sudo dnf install -y bzip2 ccache chrpath cpio cpp diffstat diffutils gawk gcc gcc-c++ git glibc-devel glibc-langpack-en gzip libacl make patch perl perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python3 python3-GitPython python3-jinja2 python3-pexpect python3-pip rpcgen socat tar texinfo unzip wget which xz zstd
new file mode 120000
@@ -0,0 +1 @@
+almalinux_docs.sh
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+almalinux_essential.sh
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,8 @@
+sudo dnf install -y wget
+textooldir=${TEXTOOLDIR:-"./docs-build-tex-tools"}
+mkdir -p "$textooldir"/tl
+wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -O "$textooldir"/install-tl-unx.tar.gz
+tar xzf "$textooldir"/install-tl-unx.tar.gz -C "$textooldir"
+"$textooldir"/install-tl-*/install-tl --scheme=small --texdir="${textooldir}"/tl --no-interaction
+PATH="$PATH:${textooldir}/tl/bin/x86_64-linux" tlmgr install titlesec varwidth tabulary needspace upquote framed capt-of wrapfig fncychap gnu-freefont ctex latexmk nimbus15
+rm -r "$textooldir"/install-tl*
Add support for building the docs in CentOS Stream 9. Use RedHat's container image from quay.io. The centosstream_essential.sh centosstream_docs.sh are symlinks to the almalinux scripts. Just pass -y to each dnf command as it was a problem when building the CentOS container, and isn't a problem for AlmaLinux. Introduce a new installation script: tlmgr_docs_pdf.sh. As I wasn't able to locate all the necessary tex packages to build the documentation in a PDF format, I resorted to using what is used on the Autobuilder: a local installation of texlive packages through tlmgr. This will allow us to provide a way of building the docs as PDF for the distros that lack this support at the moment. Export TEXTOOLDIR in Containerfile.dnf to pick up TexLive's installation when available. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/ref-manual/system-requirements.rst | 36 ++++++++++++++++++++++ documentation/tools/build-docs-container | 14 ++++++++- .../tools/containerfiles/Containerfile.dnf | 3 ++ .../tools/containerfiles/Containerfile.stream | 1 + .../tools/host_packages_scripts/almalinux_docs.sh | 2 +- .../host_packages_scripts/almalinux_essential.sh | 4 +-- .../host_packages_scripts/centosstream_docs.sh | 1 + .../centosstream_essential.sh | 1 + .../tools/host_packages_scripts/tlmgr_docs_pdf.sh | 8 +++++ 9 files changed, 66 insertions(+), 4 deletions(-)