From ea69ae93b88f8eba4d9c9680bd6f13fae629c672 Mon Sep 17 00:00:00 2001 From: vxtls <187420201+vxtls@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:25:28 -0500 Subject: [PATCH] fix(steps-guix): support explicit build dir for source-less seed packages --- steps-guix/helpers.sh | 7 +++++-- steps-guix/mes-minimal-stripped-0.19-i686-linux/pass1.sh | 1 + .../mescc-tools-static-stripped-0.5.2-i686-linux/pass1.sh | 1 + steps-guix/static-binaries-0-i686-linux/pass1.sh | 1 + steps/helpers.sh | 7 +++++-- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/steps-guix/helpers.sh b/steps-guix/helpers.sh index 81639197..6e617a80 100755 --- a/steps-guix/helpers.sh +++ b/steps-guix/helpers.sh @@ -181,7 +181,7 @@ build() { pkg=$1 get_revision "${pkg}" script_name=${2:-pass$((revision+1)).sh} - dirname=${3:-${pkg}} + build_dir=${3:-${pkg}} # shellcheck disable=SC2015 bin_preseed && return || true # Normal build if preseed fails @@ -206,6 +206,9 @@ build() { # shellcheck source=/dev/null . "${build_script}" fi + if [ -n "${BUILD_DIRNAME+x}" ]; then + build_dir="${BUILD_DIRNAME}" + fi echo "${pkg}: getting sources." build_stage=src_get @@ -216,7 +219,7 @@ build() { call $build_stage unset EXTRA_DISTFILES - cd "${dirname}" || (echo "Cannot cd into build/${dirname}!"; kill $$) + cd "${build_dir}" || (echo "Cannot cd into build/${build_dir}!"; kill $$) echo "${pkg}: preparing source." build_stage=src_prepare diff --git a/steps-guix/mes-minimal-stripped-0.19-i686-linux/pass1.sh b/steps-guix/mes-minimal-stripped-0.19-i686-linux/pass1.sh index 2a4b618a..7697c298 100644 --- a/steps-guix/mes-minimal-stripped-0.19-i686-linux/pass1.sh +++ b/steps-guix/mes-minimal-stripped-0.19-i686-linux/pass1.sh @@ -4,6 +4,7 @@ src_get() { :; } src_unpack() { :; } src_prepare() { :; } src_configure() { :; } +BUILD_DIRNAME=. src_compile() { local stage diff --git a/steps-guix/mescc-tools-static-stripped-0.5.2-i686-linux/pass1.sh b/steps-guix/mescc-tools-static-stripped-0.5.2-i686-linux/pass1.sh index da335f48..7c16be46 100644 --- a/steps-guix/mescc-tools-static-stripped-0.5.2-i686-linux/pass1.sh +++ b/steps-guix/mescc-tools-static-stripped-0.5.2-i686-linux/pass1.sh @@ -4,6 +4,7 @@ src_get() { :; } src_unpack() { :; } src_prepare() { :; } src_configure() { :; } +BUILD_DIRNAME=. src_compile() { local stage copied diff --git a/steps-guix/static-binaries-0-i686-linux/pass1.sh b/steps-guix/static-binaries-0-i686-linux/pass1.sh index 04239828..f496a243 100644 --- a/steps-guix/static-binaries-0-i686-linux/pass1.sh +++ b/steps-guix/static-binaries-0-i686-linux/pass1.sh @@ -4,6 +4,7 @@ src_get() { :; } src_unpack() { :; } src_prepare() { :; } src_configure() { :; } +BUILD_DIRNAME=. src_compile() { local stage dist diff --git a/steps/helpers.sh b/steps/helpers.sh index c4d0bf2c..bb0283f5 100755 --- a/steps/helpers.sh +++ b/steps/helpers.sh @@ -181,7 +181,7 @@ build() { pkg=$1 get_revision "${pkg}" script_name=${2:-pass$((revision+1)).sh} - dirname=${3:-${pkg}} + build_dir=${3:-${pkg}} # shellcheck disable=SC2015 bin_preseed && return || true # Normal build if preseed fails @@ -206,6 +206,9 @@ build() { # shellcheck source=/dev/null . "${build_script}" fi + if [ -n "${BUILD_DIRNAME+x}" ]; then + build_dir="${BUILD_DIRNAME}" + fi echo "${pkg}: getting sources." build_stage=src_get @@ -216,7 +219,7 @@ build() { call $build_stage unset EXTRA_DISTFILES - cd "${dirname}" || (echo "Cannot cd into build/${dirname}!"; kill $$) + cd "${build_dir}" || (echo "Cannot cd into build/${build_dir}!"; kill $$) echo "${pkg}: preparing source." build_stage=src_prepare