-
Notifications
You must be signed in to change notification settings - Fork 70
feat: adding tmux to UDI 9 / 10 #254
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
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 |
|---|---|---|
|
|
@@ -554,6 +554,40 @@ RUN dnf -y install bash-completion \ | |
| && dnf clean all \ | ||
| && rm -rf /var/cache/yum | ||
|
|
||
| ## tmux - using pre-built binaries (not available in UBI repos) | ||
| RUN <<'EOF' | ||
| set -euf -o pipefail | ||
|
|
||
| TEMP_DIR="$(mktemp -d)" | ||
| cd "${TEMP_DIR}" | ||
|
|
||
| TMUX_VERSION="3.6a" | ||
|
|
||
| case "$TARGETARCH" in | ||
| amd64) | ||
| TMUX_ARCH="x86_64" | ||
| ;; | ||
| arm64) | ||
| TMUX_ARCH="arm64" | ||
| ;; | ||
| *) | ||
| echo "Skipping tmux install for unsupported architecture: $TARGETARCH" | ||
| exit 0 | ||
| ;; | ||
| esac | ||
|
|
||
| TMUX_TGZ="tmux-${TMUX_VERSION}-linux-${TMUX_ARCH}.tar.gz" | ||
| TMUX_TGZ_URL="https://github.com/tmux/tmux-builds/releases/download/v${TMUX_VERSION}/${TMUX_TGZ}" | ||
|
|
||
| curl -sSLO "${TMUX_TGZ_URL}" | ||
| tar -xz --no-same-owner -f "${TMUX_TGZ}" | ||
| mv tmux /usr/local/bin/tmux | ||
| chmod +x /usr/local/bin/tmux | ||
|
Comment on lines
+582
to
+585
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
TMUX_VERSION="3.6a"
echo "Release assets:"
curl -fsSL "https://api.github.com/repos/tmux/tmux-builds/releases/tags/v${TMUX_VERSION}" \
| jq -r '.assets[].name' | sort
for arch in x86_64 arm64; do
tgz="tmux-${TMUX_VERSION}-linux-${arch}.tar.gz"
url="https://github.com/tmux/tmux-builds/releases/download/v${TMUX_VERSION}/${tgz}"
echo "Inspecting ${tgz}"
curl -fsSLO "${url}"
tar -tzf "${tgz}" | head -n 20
rm -f "${tgz}"
doneRepository: devfile/developer-images Length of output: 309 🏁 Script executed: # Read the Dockerfile to see the tmux installation block and surrounding context
cat -n universal/ubi10/Dockerfile | sed -n '570,595p'Repository: devfile/developer-images Length of output: 1019 🏁 Script executed: # Search for other curl/tar installation patterns in the same Dockerfile to compare
rg -n "curl.*-O|tar.*-xz|checksum|sha256" universal/ubi10/Dockerfile | head -30Repository: devfile/developer-images Length of output: 1662 🏁 Script executed: # Check if there's a .sha256 or checksum file available for tmux releases
curl -fsSL "https://api.github.com/repos/tmux/tmux-builds/releases/tags/v3.6a" | jq '.assets[] | {name, browser_download_url}'Repository: devfile/developer-images Length of output: 117 Verify tmux artifact integrity before installing binary. Line 582 downloads and installs an executable without checksum validation. Multiple other tools in this Dockerfile (Krew, Helm, Kustomize, TKN, KN, Terraform, E2FSPROGS) verify checksums; tmux should follow the same pattern for supply-chain security. While tmux-builds does not publish checksums, consider alternative verification methods (e.g., GPG signatures if available, hash comparison with upstream documentation) or explicitly document the risk acceptance. 🤖 Prompt for AI Agents
Collaborator
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. 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.
|
||
|
|
||
| cd - | ||
| rm -rf "${TEMP_DIR}" | ||
| EOF | ||
|
|
||
| RUN <<EOF | ||
| oc completion bash > /usr/share/bash-completion/completions/oc | ||
| tkn completion bash > /usr/share/bash-completion/completions/tkn | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Avoid temp-dir leak on unsupported architectures.
Line 561 creates
TEMP_DIRbefore the archcase; on unsupported arch (Line 575), script exits before cleanup (Line 588).♻️ Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
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.
@ibuziuk could we move the:
to after the
casestatement?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.