From c192296aefa2336716140b256ed7f37fe806ffb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 18 Aug 2025 17:33:56 +0200 Subject: [PATCH 1/4] RHAIENG-XXX: simplify PDF dependencies setup in `install_pdf_deps.sh` by replacing manual installations with `dnf` package installation # Conflicts: # jupyter/utils/install_pdf_deps.sh --- jupyter/utils/install_pdf_deps.sh | 64 +++++++++++++++---------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/jupyter/utils/install_pdf_deps.sh b/jupyter/utils/install_pdf_deps.sh index 16a5c8d15f..13758ebd52 100755 --- a/jupyter/utils/install_pdf_deps.sh +++ b/jupyter/utils/install_pdf_deps.sh @@ -4,37 +4,35 @@ set -euxo pipefail -# Mapping of `uname -m` values to equivalent GOARCH values -declare -A UNAME_TO_GOARCH -UNAME_TO_GOARCH["x86_64"]="amd64" -UNAME_TO_GOARCH["aarch64"]="arm64" -UNAME_TO_GOARCH["ppc64le"]="ppc64le" -UNAME_TO_GOARCH["s390x"]="s390x" +dnf install -y \ + pandoc \ + texlive-adjustbox \ + texlive-bibtex \ + texlive-charter \ + texlive-ec \ + texlive-euro \ + texlive-eurosym \ + texlive-fpl \ + texlive-jknapltx \ + texlive-knuth-local \ + texlive-lm-math \ + texlive-marvosym \ + texlive-mathpazo \ + texlive-mflogo-font \ + texlive-parskip \ + texlive-plain \ + texlive-pxfonts \ + texlive-rsfs \ + texlive-tcolorbox \ + texlive-times \ + texlive-titling \ + texlive-txfonts \ + texlive-ulem \ + texlive-upquote \ + texlive-utopia \ + texlive-wasy \ + texlive-wasy-type1 \ + texlive-wasysym \ + texlive-xetex -ARCH="${UNAME_TO_GOARCH[$(uname -m)]}" -if [[ -z "${ARCH:-}" ]]; then - echo "Unsupported architecture: $(uname -m)" >&2 - exit 1 -fi - -# Skip PDF export installation for s390x and ppc64le architectures -if [[ "$(uname -m)" == "s390x" || "$(uname -m)" == "ppc64le" ]]; then - echo "PDF export functionality is not supported on $(uname -m) architecture. Skipping installation." - exit 0 -fi - -# tex live installation -echo "Installing TexLive to allow PDf export from Notebooks" -curl -fL https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -o install-tl-unx.tar.gz -zcat < install-tl-unx.tar.gz | tar xf - -cd install-tl-2* -perl ./install-tl --no-interaction --scheme=scheme-small --texdir=/usr/local/texlive -mv /usr/local/texlive/bin/"$(uname -m)-linux" /usr/local/texlive/bin/linux -cd /usr/local/texlive/bin/linux -./tlmgr install tcolorbox pdfcol adjustbox titling enumitem soul ucs collection-fontsrecommended - -# pandoc installation -curl -fL "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-${ARCH}.tar.gz" -o /tmp/pandoc.tar.gz -mkdir -p /usr/local/pandoc -tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/pandoc/ -rm -f /tmp/pandoc.tar.gz +dnf clean all From 5a906f24f84a4e9bda4c47da3ae5106ae7a68a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 18 Aug 2025 17:44:57 +0200 Subject: [PATCH 2/4] RHAIENG-XXX: add `subscription-manager refresh` to `install_pdf_deps.sh` for ensuring up-to-date subscriptions --- jupyter/utils/install_pdf_deps.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jupyter/utils/install_pdf_deps.sh b/jupyter/utils/install_pdf_deps.sh index 13758ebd52..cb834fbe9c 100755 --- a/jupyter/utils/install_pdf_deps.sh +++ b/jupyter/utils/install_pdf_deps.sh @@ -4,6 +4,9 @@ set -euxo pipefail +# https://konflux.pages.redhat.com/docs/users/building/activation-keys-subscription.html#automatic-registration +subscription-manager refresh + dnf install -y \ pandoc \ texlive-adjustbox \ From 8a933b8bfdfa1765a23f798f59d4a180e61dcdf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 18 Aug 2025 18:03:23 +0200 Subject: [PATCH 3/4] RHAIENG-XXX: update `install_pdf_deps.sh` to enable `codeready-builder` repo and remove `subscription-manager refresh` --- jupyter/utils/install_pdf_deps.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jupyter/utils/install_pdf_deps.sh b/jupyter/utils/install_pdf_deps.sh index cb834fbe9c..88b6c827d1 100755 --- a/jupyter/utils/install_pdf_deps.sh +++ b/jupyter/utils/install_pdf_deps.sh @@ -5,7 +5,9 @@ set -euxo pipefail # https://konflux.pages.redhat.com/docs/users/building/activation-keys-subscription.html#automatic-registration -subscription-manager refresh +#subscription-manager refresh + +subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms dnf install -y \ pandoc \ From 139e76586919d7e2ab81e362de24048ed142937d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Mon, 18 Aug 2025 18:38:53 +0200 Subject: [PATCH 4/4] RHAIENG-XXX: add `subscription-manager refresh` to Dockerfile, comment out unused repo enabling in `install_pdf_deps.sh` --- jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu | 2 ++ jupyter/utils/install_pdf_deps.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu b/jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu index eece2861a0..0166868272 100644 --- a/jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu +++ b/jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu @@ -47,6 +47,8 @@ RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setop && dnf clean all -y # upgrade first to avoid fixable vulnerabilities end +RUN subscription-manager refresh + # Install useful OS packages RUN dnf install -y perl mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum diff --git a/jupyter/utils/install_pdf_deps.sh b/jupyter/utils/install_pdf_deps.sh index 88b6c827d1..7390faff0f 100755 --- a/jupyter/utils/install_pdf_deps.sh +++ b/jupyter/utils/install_pdf_deps.sh @@ -7,7 +7,7 @@ set -euxo pipefail # https://konflux.pages.redhat.com/docs/users/building/activation-keys-subscription.html#automatic-registration #subscription-manager refresh -subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms +#subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms dnf install -y \ pandoc \