Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions buildpacks/conda-nodefaults/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ cp environment.yml "$TMPDIR/original.yml"
cache_layer_dir="${CNB_LAYERS_DIR}"/cache
mkdir -p "${cache_layer_dir}"

OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)

case "$ARCH" in
x86_64) ARCH=amd64 ;;
arm64|aarch64) ARCH=arm64 ;;
*) >&2 echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
OS="${CNB_TARGET_OS:-unknown}"
ARCH="${CNB_TARGET_ARCH:-unknown}"

YQ_FILENAME="yq_${OS}_${ARCH}"
YQ_VERSION=v4.47.1
Expand Down
16 changes: 16 additions & 0 deletions buildpacks/renku-variables/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ set -eo pipefail

echo -e "=== 🔧 \033[1mRenku Environment Variables buildpack\033[0m ==="

# NOTE: we run platform mismatch check here as this buildpack is always selected
CURRENT_ARCH="$(uname -m)"
case "${CURRENT_ARCH}" in
"aarch64"|"arm64") CURRENT_ARCH="arm64" ;;
"amd64"|"x86_64") CURRENT_ARCH="amd64" ;;
*) >&2 echo "ERROR: Unsupported architecture: ${CURRENT_ARCH}" ;;
esac

if [ -n "${CNB_TARGET_ARCH:-}" ]; then
if [ "${CNB_TARGET_ARCH}" != "${CURRENT_ARCH}" ]; then
>&2 echo "WARNING: current architecture ${CURRENT_ARCH} does not match target architecture ${CNB_TARGET_ARCH}!"
>&2 echo "WARNING: the resulting image may not run as expected!"
fi
fi


layers_dir="$1"
layer_dir="${layers_dir}"/renku-env
env_dir="${layer_dir}"/env.launch
Expand Down
8 changes: 1 addition & 7 deletions buildpacks/rstudio/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ RSTUDIO_VERSION="2025.09.2-418"
OS_CODENAME=jammy # https://posit.co/download/rstudio-server gives jammy regardless of ubuntu version
FNAME="rstudio-$RSTUDIO_VERSION.deb"

ARCH=$(uname -m)

case "$ARCH" in
x86_64) ARCH=amd64 ;;
arm64|aarch64) ARCH=arm64 ;;
*) >&2 echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
ARCH="${CNB_TARGET_ARCH:-unknown}"

if [ -f "$cache_layer_dir/$FNAME" ]; then
echo "Found rstudio $RSTUDIO_VERSION in $cache_layer_dir skipping download"
Expand Down
7 changes: 6 additions & 1 deletion buildpacks/ttyd/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ ttyd_layer_dir="${layers_dir}"/ttyd
ttyd_bin_dir="${ttyd_layer_dir}"/bin
mkdir -p "${ttyd_bin_dir}"

ARCH=$(uname -i)
ARCH="${CNB_TARGET_ARCH:-unknown}"
case "${ARCH}" in
"arm64") ARCH="aarch64" ;;
"amd64") ARCH="x86_64" ;;
esac

TTYD_VERSION="1.7.7"
TTYD_URL="https://github.com/tsl0922/ttyd/releases/download/${TTYD_VERSION}/ttyd.${ARCH}"

Expand Down
9 changes: 3 additions & 6 deletions buildpacks/vscodium/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ mkdir -p "${execd_layer_dir}"
mkdir -p "${cache_layer_dir}"


ARCH=$(uname -m)

case "$ARCH" in
x86_64) ARCH=x64 ;;
arm64|aarch64) ARCH=arm64 ;;
*) >&2 echo "Unsupported architecture: $ARCH"; exit 1 ;;
ARCH="${CNB_TARGET_ARCH:-unknown}"
case "${ARCH}" in
"amd64") ARCH="x64" ;;
esac

VSCODIUM_DEFAULT_VERSION="1.104.36664"
Expand Down
14 changes: 3 additions & 11 deletions scripts/install_shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,13 @@ LOCATION=$2

OS="linux"
case "$(uname)" in
'Darwin')
OS='darwin'
;;
*) ;;
'Darwin') OS='darwin' ;;
esac

ARCH="x86_64"
case "$(uname -m)" in
'aarch64')
ARCH='aarch64'
;;
'arm64')
ARCH='aarch64'
;;
*) ;;
'aarch64') ARCH='aarch64' ;;
'arm64') ARCH='aarch64' ;;
esac

if [[ -z $VERSION ]]; then
Expand Down