diff mbox series

[v2,4/5] ref-manual/system-requirements.rst: fix AlmaLinux PDF build

Message ID 20251211-build-docs-container-tlmgr-v2-4-58719c103a50@bootlin.com
State Under Review
Headers show
Series Add missing CentOS Stream / RockyLinux distros to the system-requirements.rst doc | expand

Commit Message

Antonin Godard Dec. 11, 2025, 9:06 a.m. UTC
Use the new tlmgr_docs_pdf.sh script in build-docs-container to fix
the build of the documentation PDF for AlmaLinux 8 and 9.

Fix the almalinux_essential.sh script to either enable powertools or crb
depending on the AlmaLinux version (powertools for 8, crb for 9). Pass
-y to dnf install command (otherwise stops when building the container).

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/ref-manual/system-requirements.rst    | 21 +++++++++++++--------
 documentation/tools/build-docs-container            | 18 ++++++++++--------
 .../tools/containerfiles/Containerfile.almalinux    |  2 +-
 .../tools/host_packages_scripts/almalinux_docs.sh   |  2 +-
 .../host_packages_scripts/almalinux_docs_pdf.sh     |  1 -
 .../host_packages_scripts/almalinux_essential.sh    |  6 +++---
 6 files changed, 28 insertions(+), 22 deletions(-)

Comments

Quentin Schulz Dec. 11, 2025, 1:55 p.m. UTC | #1
Hi Antonin,

On 12/11/25 10:06 AM, Antonin Godard via lists.yoctoproject.org wrote:
> Use the new tlmgr_docs_pdf.sh script in build-docs-container to fix
> the build of the documentation PDF for AlmaLinux 8 and 9.
> 

This should be one commit...

> Fix the almalinux_essential.sh script to either enable powertools or crb
> depending on the AlmaLinux version (powertools for 8, crb for 9). Pass

...another one...

> -y to dnf install command (otherwise stops when building the container).
> 

and another one.

> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   documentation/ref-manual/system-requirements.rst    | 21 +++++++++++++--------
>   documentation/tools/build-docs-container            | 18 ++++++++++--------
>   .../tools/containerfiles/Containerfile.almalinux    |  2 +-
>   .../tools/host_packages_scripts/almalinux_docs.sh   |  2 +-
>   .../host_packages_scripts/almalinux_docs_pdf.sh     |  1 -
>   .../host_packages_scripts/almalinux_essential.sh    |  6 +++---
>   6 files changed, 28 insertions(+), 22 deletions(-)
> 
> diff --git a/documentation/ref-manual/system-requirements.rst b/documentation/ref-manual/system-requirements.rst
> index e9d5012e3..4063253f7 100644
> --- a/documentation/ref-manual/system-requirements.rst
> +++ b/documentation/ref-manual/system-requirements.rst
> @@ -253,18 +253,23 @@ Here are the packages needed to build Project documentation manuals:
>   .. 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::
>   
> -   Unlike Fedora or OpenSUSE, AlmaLinux does not provide the packages
> -   ``texlive-collection-fontsextra``, ``texlive-collection-lang*`` and
> -   ``texlive-collection-latexextra``, so you may run into issues. These may be
> -   installed using `tlmgr <https://tug.org/texlive/tlmgr.html>`_.
> +   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:
>   
> -In addition to the previous packages, here are the packages needed to build the
> -documentation in PDF format:
> +.. code-block:: console
>   
> -.. literalinclude:: ../tools/host_packages_scripts/almalinux_docs_pdf.sh
> -   :language: shell
> +   $ export PATH="${PATH}:${textooldir}/tl/bin/x86_64-linux"
>   

Same remark as in patch 3.

>   CentOS Stream Packages
>   ----------------------
> diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container
> index 0800c4333..9d1bfdcdf 100755
> --- a/documentation/tools/build-docs-container
> +++ b/documentation/tools/build-docs-container
> @@ -33,6 +33,8 @@ $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
> @@ -84,14 +86,14 @@ main ()
>     version=$(echo "$image" | awk -F: '{print $NF}')
>   
>     case $image in
> -    # Missing latexmk texlive-gnu-freefont packages at the very least
> -    # "almalinux:8"*|\
> -    # "almalinux:9"*)
> -    #   containerfile=Containerfile.almalinux
> -    #   docs=almalinux_docs.sh
> -    #   docs_pdf=almalinux_docs_pdf.sh
> -    #   pip3=pip3_docs.sh
> -    #   ;;
> +    "almalinux:8"*|\
> +    "almalinux:9"*)
> +      containerfile=Containerfile.almalinux
> +      essential=almalinux_essential.sh
> +      docs=almalinux_docs.sh
> +      docs_pdf=tlmgr_docs_pdf.sh
> +      pip3=pip3_docs.sh
> +      ;;
>       "centos:stream9"*)
>         containerfile=Containerfile.stream
>         essential=centosstream_essential.sh
> diff --git a/documentation/tools/containerfiles/Containerfile.almalinux b/documentation/tools/containerfiles/Containerfile.almalinux
> index 7237e9b99..5430d17dc 120000
> --- a/documentation/tools/containerfiles/Containerfile.almalinux
> +++ b/documentation/tools/containerfiles/Containerfile.almalinux
> @@ -1 +1 @@
> -Containerfile.dnf
> \ No newline at end of file
> +Containerfile.stream
> \ No newline at end of file
> diff --git a/documentation/tools/host_packages_scripts/almalinux_docs.sh b/documentation/tools/host_packages_scripts/almalinux_docs.sh
> index 8188d529a..dfb201fe2 100644
> --- a/documentation/tools/host_packages_scripts/almalinux_docs.sh
> +++ b/documentation/tools/host_packages_scripts/almalinux_docs.sh
> @@ -1 +1 @@
> -sudo dnf install git glibc-locale-source librsvg2-tools make python3-pip which
> +sudo dnf install git glibc-locale-source librsvg2-tools make python3-pip which wget

I don't think wget is a requirement for the docs (the non-PDF variants)?

[...]

> diff --git a/documentation/tools/host_packages_scripts/almalinux_essential.sh b/documentation/tools/host_packages_scripts/almalinux_essential.sh
> index 76c5280ee..9564bb4fe 100644
> --- a/documentation/tools/host_packages_scripts/almalinux_essential.sh
> +++ b/documentation/tools/host_packages_scripts/almalinux_essential.sh
> @@ -1,5 +1,5 @@
>   sudo dnf install -y epel-release
> -sudo yum install dnf-plugins-core
> -sudo dnf config-manager --set-enabled crb
> +sudo yum install -y dnf-plugins-core

Interesting that we use yum here and not dnf?

Looks ok to me otherwise.

Cheers,
Quentin
diff mbox series

Patch

diff --git a/documentation/ref-manual/system-requirements.rst b/documentation/ref-manual/system-requirements.rst
index e9d5012e3..4063253f7 100644
--- a/documentation/ref-manual/system-requirements.rst
+++ b/documentation/ref-manual/system-requirements.rst
@@ -253,18 +253,23 @@  Here are the packages needed to build Project documentation manuals:
 .. 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::
 
-   Unlike Fedora or OpenSUSE, AlmaLinux does not provide the packages
-   ``texlive-collection-fontsextra``, ``texlive-collection-lang*`` and
-   ``texlive-collection-latexextra``, so you may run into issues. These may be
-   installed using `tlmgr <https://tug.org/texlive/tlmgr.html>`_.
+   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:
 
-In addition to the previous packages, here are the packages needed to build the
-documentation in PDF format:
+.. code-block:: console
 
-.. literalinclude:: ../tools/host_packages_scripts/almalinux_docs_pdf.sh
-   :language: shell
+   $ export PATH="${PATH}:${textooldir}/tl/bin/x86_64-linux"
 
 CentOS Stream Packages
 ----------------------
diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container
index 0800c4333..9d1bfdcdf 100755
--- a/documentation/tools/build-docs-container
+++ b/documentation/tools/build-docs-container
@@ -33,6 +33,8 @@  $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
@@ -84,14 +86,14 @@  main ()
   version=$(echo "$image" | awk -F: '{print $NF}')
 
   case $image in
-    # Missing latexmk texlive-gnu-freefont packages at the very least
-    # "almalinux:8"*|\
-    # "almalinux:9"*)
-    #   containerfile=Containerfile.almalinux
-    #   docs=almalinux_docs.sh
-    #   docs_pdf=almalinux_docs_pdf.sh
-    #   pip3=pip3_docs.sh
-    #   ;;
+    "almalinux:8"*|\
+    "almalinux:9"*)
+      containerfile=Containerfile.almalinux
+      essential=almalinux_essential.sh
+      docs=almalinux_docs.sh
+      docs_pdf=tlmgr_docs_pdf.sh
+      pip3=pip3_docs.sh
+      ;;
     "centos:stream9"*)
       containerfile=Containerfile.stream
       essential=centosstream_essential.sh
diff --git a/documentation/tools/containerfiles/Containerfile.almalinux b/documentation/tools/containerfiles/Containerfile.almalinux
index 7237e9b99..5430d17dc 120000
--- a/documentation/tools/containerfiles/Containerfile.almalinux
+++ b/documentation/tools/containerfiles/Containerfile.almalinux
@@ -1 +1 @@ 
-Containerfile.dnf
\ No newline at end of file
+Containerfile.stream
\ No newline at end of file
diff --git a/documentation/tools/host_packages_scripts/almalinux_docs.sh b/documentation/tools/host_packages_scripts/almalinux_docs.sh
index 8188d529a..dfb201fe2 100644
--- a/documentation/tools/host_packages_scripts/almalinux_docs.sh
+++ b/documentation/tools/host_packages_scripts/almalinux_docs.sh
@@ -1 +1 @@ 
-sudo dnf install git glibc-locale-source librsvg2-tools make python3-pip which
+sudo dnf install git glibc-locale-source librsvg2-tools make python3-pip which wget
diff --git a/documentation/tools/host_packages_scripts/almalinux_docs_pdf.sh b/documentation/tools/host_packages_scripts/almalinux_docs_pdf.sh
deleted file mode 100644
index 8341eb8c2..000000000
--- a/documentation/tools/host_packages_scripts/almalinux_docs_pdf.sh
+++ /dev/null
@@ -1 +0,0 @@ 
-sudo dnf install latexmk texlive-collection-fontsrecommended texlive-collection-latex texlive-collection-latexrecommended texlive-collection-xetex texlive-fncychap texlive-gnu-freefont texlive-tex-gyre texlive-xetex
diff --git a/documentation/tools/host_packages_scripts/almalinux_essential.sh b/documentation/tools/host_packages_scripts/almalinux_essential.sh
index 76c5280ee..9564bb4fe 100644
--- a/documentation/tools/host_packages_scripts/almalinux_essential.sh
+++ b/documentation/tools/host_packages_scripts/almalinux_essential.sh
@@ -1,5 +1,5 @@ 
 sudo dnf install -y epel-release
-sudo yum install dnf-plugins-core
-sudo dnf config-manager --set-enabled crb
+sudo yum install -y dnf-plugins-core
+sudo dnf config-manager --set-enabled crb || sudo dnf config-manager --set-enabled powertools
 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