refactor: remove dead updater and simplify ISO launcher

This commit is contained in:
2026-09-12 16:29:48 +03:00
parent 9c5c29239c
commit 9da6dac1bd
4 changed files with 32 additions and 183 deletions
+27 -52
View File
@@ -124,66 +124,41 @@ else
echo "=== using existing builder image ${IMAGE_REF} (${BUILDER_PLATFORM}) ==="
fi
# Build base docker run args (without --authorized-keys)
build_run_args() {
_variant="$1"
_auth_arg=""
if [ -n "$AUTH_KEYS" ]; then
_auth_arg="--authorized-keys /tmp/bee-authkeys/${AUTH_KEYS_BASE}"
fi
echo "run --rm --privileged \
--platform ${BUILDER_PLATFORM} \
-v ${REPO_ROOT}:/work \
-v ${CACHE_DIR}:/cache \
${AUTH_KEYS:+-v ${AUTH_KEYS_DIR}:/tmp/bee-authkeys:ro} \
run_variant() {
_v="$1"
echo "=== building variant: ${_v} ==="
set -- \
--rm \
--privileged \
--platform "${BUILDER_PLATFORM}" \
-v "${REPO_ROOT}:/work" \
-v "${CACHE_DIR}:/cache" \
-e BEE_CONTAINER_BUILD=1 \
-e GOCACHE=/cache/go-build \
-e GOMODCACHE=/cache/go-mod \
-e TMPDIR=/cache/tmp \
-e BEE_CACHE_DIR=/cache/bee \
-w /work \
${IMAGE_REF} \
sh /work/iso/builder/build.sh --variant ${_variant} ${_auth_arg}"
}
-e BEE_REQUIRE_MEMTEST=1
run_variant() {
_v="$1"
echo "=== building variant: ${_v} ==="
if [ -n "$AUTH_KEYS" ]; then
"$CONTAINER_TOOL" run --rm --privileged \
--platform "${BUILDER_PLATFORM}" \
-v "${REPO_ROOT}:/work" \
-v "${CACHE_DIR}:/cache" \
-v "${AUTH_KEYS_DIR}:/tmp/bee-authkeys:ro" \
-e BEE_CONTAINER_BUILD=1 \
-e GOCACHE=/cache/go-build \
-e GOMODCACHE=/cache/go-mod \
-e TMPDIR=/cache/tmp \
-e BEE_CACHE_DIR=/cache/bee \
-e BEE_REQUIRE_MEMTEST=1 \
${MIRROR:+-e "BEE_MIRROR=${MIRROR}"} \
-w /work \
"${IMAGE_REF}" \
sh /work/iso/builder/build.sh --variant "${_v}" \
--authorized-keys "/tmp/bee-authkeys/${AUTH_KEYS_BASE}" \
${MIRROR:+--mirror "${MIRROR}"}
else
"$CONTAINER_TOOL" run --rm --privileged \
--platform "${BUILDER_PLATFORM}" \
-v "${REPO_ROOT}:/work" \
-v "${CACHE_DIR}:/cache" \
-e BEE_CONTAINER_BUILD=1 \
-e GOCACHE=/cache/go-build \
-e GOMODCACHE=/cache/go-mod \
-e TMPDIR=/cache/tmp \
-e BEE_CACHE_DIR=/cache/bee \
-e BEE_REQUIRE_MEMTEST=1 \
${MIRROR:+-e "BEE_MIRROR=${MIRROR}"} \
-w /work \
"${IMAGE_REF}" \
sh /work/iso/builder/build.sh --variant "${_v}" \
${MIRROR:+--mirror "${MIRROR}"}
set -- "$@" -v "${AUTH_KEYS_DIR}:/tmp/bee-authkeys:ro"
fi
if [ -n "$MIRROR" ]; then
set -- "$@" -e "BEE_MIRROR=${MIRROR}"
fi
set -- "$@" -w /work "${IMAGE_REF}" \
sh /work/iso/builder/build.sh --variant "${_v}"
if [ -n "$AUTH_KEYS" ]; then
set -- "$@" --authorized-keys "/tmp/bee-authkeys/${AUTH_KEYS_BASE}"
fi
if [ -n "$MIRROR" ]; then
set -- "$@" --mirror "${MIRROR}"
fi
"$CONTAINER_TOOL" run "$@"
}
case "$VARIANT" in
+5
View File
@@ -16,6 +16,11 @@ for tool in mksquashfs unsquashfs rsync; do
}
done
find . -maxdepth 0 -printf '' >/dev/null 2>&1 || {
echo "test-squashfs-layers: GNU find not available, skipping"
exit 0
}
T="$(mktemp -d)"
trap 'rm -rf "$T"' EXIT INT TERM HUP
ROOT="$T/root"