-
Notifications
You must be signed in to change notification settings - Fork 124
RHAIENG-1758- Revise Tests for 2025b Onboarding: PandocMissing #2677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||||||||||
| #!/bin/bash | ||||||||||||||
| 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" | ||||||||||||||
|
|
||||||||||||||
| ARCH="${UNAME_TO_GOARCH[$(uname -m)]}" | ||||||||||||||
|
|
||||||||||||||
| if [[ "$ARCH" == "ppc64le" ]]; then | ||||||||||||||
|
|
||||||||||||||
| # Install Pandoc from EPEL repository | ||||||||||||||
| dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||||||||||||||
| dnf install -y pandoc | ||||||||||||||
|
Comment on lines
+16
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error handling and checksum verification for external dependencies. Lines 16–17 install an external RPM and Pandoc package without verifying integrity or handling installation failures. If - dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
- dnf install -y pandoc
+ dnf install -y --setopt=skip_missing_names_on_install=False \
+ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
+ dnf install -y --setopt=skip_missing_names_on_install=False pandoc && \
+ pandoc --version # Verify installation📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| pandoc --version | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You seem to be adding a step that installs pandoc where previously it was not installed, and at the same you're adding a skip in a test that was previously checking for pandoc being present. I'd expect you'd do one or the other, not both, tbh.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes you are correct I will change the test doc back and rebuild. |
||||||||||||||
|
|
||||||||||||||
| fi | ||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,83 @@ | ||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||
| 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" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ARCH="${UNAME_TO_GOARCH[$(uname -m)]}" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| if [[ "$ARCH" == "ppc64le" ]]; then | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| echo "Installing TeX Live from source for $ARCH..." | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Install build dependencies | ||||||||||||||||||||||||||||||
| dnf install -y gcc-toolset-13 perl make libX11-devel \ | ||||||||||||||||||||||||||||||
| zlib-devel freetype-devel libpng-devel ncurses-devel \ | ||||||||||||||||||||||||||||||
| gd-devel libtool wget tar xz \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXmu-devel-1.1.3-8.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXext-devel-1.3.4-8.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libICE-devel-1.0.10-8.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libSM-devel-1.2.3-10.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXmu-1.1.3-8.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXaw-devel-1.0.13-19.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXaw-1.0.13-19.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXt-devel-1.2.0-6.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/flex-2.6.4-9.el9.ppc64le.rpm \ | ||||||||||||||||||||||||||||||
| https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/bison-3.7.4-5.el9.ppc64le.rpm | ||||||||||||||||||||||||||||||
|
Comment on lines
+21
to
+30
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add checksum verification for all external downloads. External downloads lack integrity verification, making builds non-reproducible and vulnerable to supply-chain risks. Downloads occur at:
Compute and verify SHA256 checksums immediately after each download: # Step 1: Download and extract the TeX Live source
- wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz
- tar -xf texlive-20250308-source.tar.xz
+ TEXLIVE_SOURCE="texlive-20250308-source.tar.xz"
+ TEXLIVE_SOURCE_SHA256="<expected-hash-here>"
+ wget "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/${TEXLIVE_SOURCE}"
+ echo "${TEXLIVE_SOURCE_SHA256} ${TEXLIVE_SOURCE}" | sha256sum -c - || exit 1
+ tar -xf "${TEXLIVE_SOURCE}"Apply the same pattern to the TeX Live installer (line 55) and consider pinning RPM package checksums or caching them locally. Also applies to: 33-33, 55-55 |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Step 1: Download and extract the TeX Live source | ||||||||||||||||||||||||||||||
| wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz | ||||||||||||||||||||||||||||||
| tar -xf texlive-20250308-source.tar.xz | ||||||||||||||||||||||||||||||
| cd texlive-20250308-source | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Enable newer GCC toolchain | ||||||||||||||||||||||||||||||
| source /opt/rh/gcc-toolset-13/enable | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Create build directory and build | ||||||||||||||||||||||||||||||
| mkdir -p ../texlive-build | ||||||||||||||||||||||||||||||
| cd ../texlive-build | ||||||||||||||||||||||||||||||
| ../texlive-20250308-source/configure --prefix=/usr/local/texlive | ||||||||||||||||||||||||||||||
| make -j"$(nproc)" | ||||||||||||||||||||||||||||||
| make install | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Symlink for pdflatex | ||||||||||||||||||||||||||||||
| ln -sf pdftex /usr/local/texlive/bin/powerpc64le-unknown-linux-gnu/pdflatex | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Cleanup sources to reduce image size | ||||||||||||||||||||||||||||||
| rm -rf /texlive-20250308-source /texlive-build | ||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Step 2: Run TeX Live installer for runtime tree setup | ||||||||||||||||||||||||||||||
| cd / | ||||||||||||||||||||||||||||||
| wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | ||||||||||||||||||||||||||||||
| tar -xzf install-tl-unx.tar.gz | ||||||||||||||||||||||||||||||
| cd install-tl-2*/ | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Comment on lines
+55
to
+58
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unsafe glob expansion for directory traversal. Line 57 uses wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
- cd install-tl-2*/
+
+ # Find the extracted install-tl directory
+ INSTALL_TL_DIR=$(find . -maxdepth 1 -type d -name 'install-tl-*' | head -1)
+ if [[ -z "$INSTALL_TL_DIR" ]]; then
+ echo "Error: TeX Live installer directory not found after extraction"
+ exit 1
+ fi
+ cd "$INSTALL_TL_DIR"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| # Create a custom install profile | ||||||||||||||||||||||||||||||
| TEXLIVE_INSTALL_PREFIX="/usr/local/texlive" | ||||||||||||||||||||||||||||||
| cat <<EOF > texlive.profile | ||||||||||||||||||||||||||||||
| selected_scheme scheme-small | ||||||||||||||||||||||||||||||
| TEXDIR $TEXLIVE_INSTALL_PREFIX | ||||||||||||||||||||||||||||||
| TEXMFCONFIG ~/.texlive2025/texmf-config | ||||||||||||||||||||||||||||||
| TEXMFVAR ~/.texlive2025/texmf-var | ||||||||||||||||||||||||||||||
| option_doc 0 | ||||||||||||||||||||||||||||||
| option_src 0 | ||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ./install-tl --profile=texlive.profile --custom-bin=$TEXLIVE_INSTALL_PREFIX/bin/powerpc64le-unknown-linux-gnu | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # TeX Live binary directory | ||||||||||||||||||||||||||||||
| TEX_BIN_DIR="/usr/local/texlive/bin/powerpc64le-unknown-linux-gnu" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Create standard symlink 'linux' → arch-specific folder | ||||||||||||||||||||||||||||||
| ln -sf "$TEX_BIN_DIR" /usr/local/texlive/bin/linux | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Set up environment | ||||||||||||||||||||||||||||||
| export PATH="$TEXLIVE_INSTALL_PREFIX/bin/linux:$PATH" | ||||||||||||||||||||||||||||||
| pdflatex --version | ||||||||||||||||||||||||||||||
| tlmgr --version | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: opendatahub-io/notebooks
Length of output: 192
🌐 Web query:
opendatahub-io/notebooks jupyter/utils install_texlive.sh install_pandoc.sh💡 Result:
I searched the opendatahub-io/notebooks repository but I couldn't find files named install_texlive.sh or install_pandoc.sh under jupyter/utils (or elsewhere) in that repo. The repository index and jupyter directory listing I checked are here. [1]
Do you want me to (a) search other branches/older commits for those filenames, (b) search other repos or the web for equivalent install scripts, or (c) show example install scripts for TeX Live and Pandoc you can use?
References:
[1] opendatahub-io/notebooks (repo root / jupyter directory).
🌐 Web query:
opendatahub-io/notebooks install_pdf_deps.sh💡 Result:
Do you want me to (pick one):
Which would you like?
Critical:
install_texlive.shandinstall_pandoc.shscripts are missing and will cause Docker build to fail.Lines 20–21 attempt to COPY these scripts from
jupyter/utils/, but they do not exist in the repository. The COPY commands will fail during the Docker build process. Additionally, the RUN commands at lines 24–25 that execute these scripts cannot succeed if the files are not present.Add the missing scripts to
jupyter/utils/with implementations for all supported architectures (ppc64le, x86_64, aarch64, s390x) that output artifacts to/usr/local/texliveand/usr/local/pandocrespectively to match the cache mount paths expected in the dockerfile.