From 5e0036dfa9d5968dad232a7b40dd976a9ff2f452 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 21 May 2026 02:53:38 +0200 Subject: [PATCH] fix(image-build): pass INFINITO_SRC_DIR as build-arg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit a77a57040 dropped the inline default from the Dockerfile's INFINITO_SRC_DIR ARG so env/default.env stays the only SPOT. The compose-driven build path already forwards the value via compose.yml's build.args, but the standalone scripts/image/{build,push}.sh paths (local `make build`, CI `🏗️ Build ()`) had not been updated. Without --build-arg INFINITO_SRC_DIR=..., the ARG resolves to empty inside the image, so `RUN /bin/bash ${INFINITO_SRC_DIR}/roles/...` becomes `/bin/bash /roles/...` and exits 127. Both scripts now assert INFINITO_SRC_DIR (sourced from scripts/meta/env/load.sh) and pass it through. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/image/build.sh | 2 ++ scripts/image/push.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/scripts/image/build.sh b/scripts/image/build.sh index ae694b2cbe..a2f5a5b779 100755 --- a/scripts/image/build.sh +++ b/scripts/image/build.sh @@ -259,8 +259,10 @@ fi echo "------------------------------------------------------------" # Common build args +: "${INFINITO_SRC_DIR:?INFINITO_SRC_DIR must be set; source scripts/meta/env/load.sh}" build_args=( --build-arg "INFINITO_PARENT_IMAGE=${PKGMGR_IMAGE}" + --build-arg "INFINITO_SRC_DIR=${INFINITO_SRC_DIR}" --build-arg "NIX_CONFIG=${NIX_CONFIG:-}" ) diff --git a/scripts/image/push.sh b/scripts/image/push.sh index 0e4e50a812..7fa2296e54 100755 --- a/scripts/image/push.sh +++ b/scripts/image/push.sh @@ -31,6 +31,7 @@ while true; do --tag "ghcr.io/${ghcr_owner}/${repo_name}/${MATRIX_DISTRO}:${IMAGE_TAG}" \ --label "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}" \ --build-arg "INFINITO_PARENT_IMAGE=ghcr.io/kevinveenbirkenbach/pkgmgr-${MATRIX_DISTRO}:stable" \ + --build-arg "INFINITO_SRC_DIR=${INFINITO_SRC_DIR:?INFINITO_SRC_DIR must be set; source scripts/meta/env/load.sh}" \ "${nix_arg[@]}" \ --cache-from "type=gha,scope=${repo_name}-${MATRIX_DISTRO}" \ --cache-to "type=gha,mode=max,scope=${repo_name}-${MATRIX_DISTRO}" \