From daffece57de4aad16b4316412efeb97a986a601b Mon Sep 17 00:00:00 2001 From: lofyer Date: Tue, 4 Aug 2026 14:37:07 +0800 Subject: [PATCH] feat(branding): update ZStack build tooling Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- scripts/bootstrap | 4 ++-- scripts/build-image | 8 ++++---- scripts/lib/common.sh | 2 +- scripts/verify-image | 20 ++++++++++++-------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index dea237d..5420de8 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -13,7 +13,7 @@ # # Usage: # scripts/bootstrap # clone both, checkout the default version -# scripts/bootstrap v2.2.1 # checkout a specific v-lofyer +# scripts/bootstrap v2.2.2 # checkout a specific v-lofyer # # Existing clones are left alone (only their remotes are verified). # @@ -24,7 +24,7 @@ set -o pipefail source "$(dirname "${BASH_SOURCE[0]}")/lib/common.sh" # Keep in sync with the version table in AGENTS.md. -DEFAULT_VERSION="v2.2.1" +DEFAULT_VERSION="v2.2.2" VERSION="${1:-${DEFAULT_VERSION}}" BRANCH="${VERSION}-lofyer" diff --git a/scripts/build-image b/scripts/build-image index 234fd50..8d261ac 100755 --- a/scripts/build-image +++ b/scripts/build-image @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# build-image: one-shot build of the MesaStack control-plane image from the +# build-image: one-shot build of the ZStack AIOS control-plane image from the # workspace root. Builds the rebranded frontend, overlays it plus our patched # backend sources onto the matching official release image, then (by default) # smoke tests the result. @@ -59,9 +59,9 @@ step "Building frontend" if [[ "${UI_BUILD}" == "1" ]]; then require_cmd npm if [[ "${DRY_RUN}" == "1" ]]; then - echo "(dry-run) (cd ${UI_REPO} && npm run build)" + echo "(dry-run) (cd ${UI_REPO} && GPUSTACK_UI_VERSION=${VERSION} npm run build)" else - (cd "${UI_REPO}" && npm run build) + (cd "${UI_REPO}" && GPUSTACK_UI_VERSION="${VERSION}" npm run build) fi else log "skipping frontend build (--skip-ui-build)" @@ -99,4 +99,4 @@ fi step "Done" log "image: ${IMAGE}" log "run it with:" -echo " docker run -d --name mesastack -p 80:80 -v /var/run/docker.sock:/var/run/docker.sock ${IMAGE}" +echo " docker run -d --name zstack-aios -p 80:80 -v /var/run/docker.sock:/var/run/docker.sock ${IMAGE}" diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index afb8c84..7d1b502 100644 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -48,7 +48,7 @@ require_repos() { repo_branch() { git -C "${1}" rev-parse --abbrev-ref HEAD 2>/dev/null; } # Extract the upstream version from a v-lofyer branch name. -# Echoes the version (e.g. v2.2.1) or fails. +# Echoes the version (e.g. v2.2.2) or fails. lofyer_branch_version() { local branch="${1}" if [[ "${branch}" =~ ^(v[0-9]+\.[0-9]+\.[0-9]+[0-9A-Za-z.]*)-lofyer$ ]]; then diff --git a/scripts/verify-image b/scripts/verify-image index 6a5ee73..3b0bf82 100755 --- a/scripts/verify-image +++ b/scripts/verify-image @@ -1,17 +1,17 @@ #!/usr/bin/env bash # -# verify-image: smoke test a built MesaStack image. +# verify-image: smoke test a built ZStack AIOS image. # # Checks, in order: # 1. static - gpustack version, API_KEY_PREFIX, UI assets carry our brand # and no leftover upstream brand in index.html -# 2. runtime - boots the server, confirms / serves the MesaStack title, -# logs in and creates an API key to prove the mesastack_ prefix -# is live end to end, and that old gpustack_ keys are rejected +# 2. runtime - boots the server, confirms / serves the ZStack AIOS title, +# logs in and creates an API key to prove the zstack_ prefix +# is live end to end, and that old brand prefixes are rejected # # Usage: # scripts/verify-image # verify ${NAMESPACE}/${REPOSITORY}: -# IMAGE=mesastack/gpustack:v2.2.1 scripts/verify-image +# IMAGE=mesastack/gpustack:v2.2.2 scripts/verify-image # scripts/verify-image --static-only # skip booting a container # set -o errexit @@ -39,10 +39,10 @@ if [[ -z "${IMAGE:-}" ]]; then fi SMOKE_PORT="${SMOKE_PORT:-18080}" -CONTAINER="${CONTAINER:-mesastack-verify}" +CONTAINER="${CONTAINER:-zstack-verify}" SITE_PACKAGES="/usr/local/lib/python3.11/dist-packages" -BRAND="${BRAND:-MesaStack}" -EXPECTED_PREFIX="${EXPECTED_PREFIX:-mesastack}" +BRAND="${BRAND:-ZStack AIOS}" +EXPECTED_PREFIX="${EXPECTED_PREFIX:-zstack}" docker image inspect "${IMAGE}" >/dev/null 2>&1 || fail "image not found locally: ${IMAGE}" log "verifying ${IMAGE}" @@ -74,6 +74,10 @@ check "old gpustack_ keys rejected" \ docker run --rm --entrypoint python3 "${IMAGE}" -c \ "from gpustack.security import is_valid_format as v; assert not v('gpustack_aaaa_bbbb')[0]" +check "old mesastack_ keys rejected" \ + docker run --rm --entrypoint python3 "${IMAGE}" -c \ + "from gpustack.security import is_valid_format as v; assert not v('mesastack_aaaa_bbbb')[0]" + check "masked value uses ${EXPECTED_PREFIX}_" \ docker run --rm --entrypoint python3 "${IMAGE}" -c \ "from gpustack.utils.api_keys import get_masked_api_key_value as m; assert m('abcd1234') == '${EXPECTED_PREFIX}_abcd***', m('abcd1234')"