From 8a35f649604971431a810658445c132c3e7f3292 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Tue, 29 Sep 2026 13:46:45 +0200 Subject: [PATCH] Default the scripts base to ProxmoxVE A script that does not name its repo now loads install/ from production instead of the testing repo, so a missing pin fails while testing rather than for users. ProxmoxVED pins its own base as of community-scripts/ProxmoxVED@f1a0624f. --- .github/workflows/pr-test-command.yml | 2 +- core/build.func | 2 +- core/core.func | 4 ++-- docs/loading.md | 3 ++- incus/build.func | 2 +- incus/core.func | 2 +- incus/tools.func | 2 +- lxc/install.func | 4 ++-- misc/update.sh | 2 +- pve/vm-core.func | 4 ++-- ui/build-ui.func | 2 +- 11 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-test-command.yml b/.github/workflows/pr-test-command.yml index e34b7ec..465884d 100644 --- a/.github/workflows/pr-test-command.yml +++ b/.github/workflows/pr-test-command.yml @@ -39,7 +39,7 @@ jobs: if (!head) return; const base = `https://raw.githubusercontent.com/${head.full_name}/${pr.head.ref}`; - const scripts = 'https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main'; + const scripts = 'https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main'; const files = await github.paginate(github.rest.pulls.listFiles, { owner: context.repo.owner, repo: context.repo.repo, pull_number: pr.number, diff --git a/core/build.func b/core/build.func index f1d2c31..18ffd28 100644 --- a/core/build.func +++ b/core/build.func @@ -26,7 +26,7 @@ [[ -n "${_LXC_BUILD_DISPATCHED:-}" ]] && return _LXC_BUILD_DISPATCHED=1 -_CS_DEFAULT_URL="${_CS_DEFAULT_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +_CS_DEFAULT_URL="${_CS_DEFAULT_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" _CS_CORE_DEFAULT_URL="${_CS_CORE_DEFAULT_URL:-https://raw.githubusercontent.com/community-scripts/core/main}" # ── Engine layout ───────────────────────────────────────────────────────────── diff --git a/core/core.func b/core/core.func index 3b5797e..f188cb1 100644 --- a/core/core.func +++ b/core/core.func @@ -257,7 +257,7 @@ write_update_entrypoint() { [[ -z "$name" ]] && return 0 local base core_url website - base="$(_cs_live_base "${base_override:-${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}}")" + base="$(_cs_live_base "${base_override:-${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}}")" core_url="${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}" website="${COMMUNITY_SCRIPTS_WEBSITE_URL:-https://community-scripts.org}" @@ -609,7 +609,7 @@ _cs_scripts_ref_line() { [[ -n "$url" ]] || return 0 # Both official mains count as default, not just one literal: _CS_DEFAULT_URL - # is not exported either, and CI rewrites VED to VE on promotion. + # is not exported either, and ProxmoxVED scripts pin their own. for d in "${_CS_DEFAULT_URL:-}" \ https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main \ https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main; do diff --git a/docs/loading.md b/docs/loading.md index 854d08a..ce5b970 100644 --- a/docs/loading.md +++ b/docs/loading.md @@ -30,7 +30,8 @@ location is deliberate — conflating the two is what used to break local ([`host/source-origin.func`](../host/source-origin.func)). GitHub remotes only; a checkout hosted anywhere else needs the URL set by hand. 3. **Defaults** — `community-scripts/core@main` for the engine, - `community-scripts/ProxmoxVED@main` for the scripts + `community-scripts/ProxmoxVE@main` for the scripts. ProxmoxVED and Incus + scripts override the latter with `_CS_DEFAULT_URL` on their second line. ## Environment variables diff --git a/incus/build.func b/incus/build.func index 2f62b99..a8b2103 100644 --- a/incus/build.func +++ b/incus/build.func @@ -13,7 +13,7 @@ [[ -n "${_INCUS_BUILD_FUNC_LOADED:-}" ]] && return _INCUS_BUILD_FUNC_LOADED=1 -INCUS_COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +INCUS_COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" # Mark update-mode when we are inside an Incus container (not the host daemon). if declare -f is_incus_container >/dev/null 2>&1 && is_incus_container; then diff --git a/incus/core.func b/incus/core.func index ecf91b6..c05c012 100644 --- a/incus/core.func +++ b/incus/core.func @@ -27,7 +27,7 @@ [[ -n "${_INCUS_CORE_FUNC_LOADED:-}" ]] && return _INCUS_CORE_FUNC_LOADED=1 -INCUS_COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +INCUS_COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" # Load upstream misc/core.func for full helper parity (prompt_*, dev-mode, etc.). # Incus-specific behavior is provided through incus_* functions and aliases below. diff --git a/incus/tools.func b/incus/tools.func index 4696a13..9127016 100644 --- a/incus/tools.func +++ b/incus/tools.func @@ -17,7 +17,7 @@ [[ -n "${_INCUS_TOOLS_FUNC_LOADED:-}" ]] && return _INCUS_TOOLS_FUNC_LOADED=1 -INCUS_COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +INCUS_COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" # Load Incus core first so msg_*/silent/catch_errors aliases are available. if [[ -z "${_INCUS_CORE_FUNC_LOADED:-}" ]]; then diff --git a/lxc/install.func b/lxc/install.func index b3846d6..ff3c380 100644 --- a/lxc/install.func +++ b/lxc/install.func @@ -356,7 +356,7 @@ _bootstrap() { # Two roots: the engine (core) and the scripts live in separate repos, and # inside the container there is no resolver — the host exports both bases. # Override either independently for fork/branch testing. - COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" + COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" COMMUNITY_SCRIPTS_CORE_URL="${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}" # A TMPDIR pointing at something that does not exist kills every mktemp in the @@ -1819,7 +1819,7 @@ EOF write_update_entrypoint "$app" "$update_script_name" else # Defensive fallback if core.func is not loaded: legacy direct-pull entrypoint. - echo "bash -c \"\$(curl -fsSL ${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}/ct/${update_script_name}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL ${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}/ct/${update_script_name}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update fi diff --git a/misc/update.sh b/misc/update.sh index c4bb847..fa7f357 100644 --- a/misc/update.sh +++ b/misc/update.sh @@ -47,7 +47,7 @@ _cs_github_base() { esac } -BASE="$(_cs_github_base "${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}")" +BASE="$(_cs_github_base "${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}")" export COMMUNITY_SCRIPTS_URL="$BASE" WEBSITE="${COMMUNITY_SCRIPTS_WEBSITE_URL:-https://community-scripts.org}" diff --git a/pve/vm-core.func b/pve/vm-core.func index 9eaafe8..faa0917 100644 --- a/pve/vm-core.func +++ b/pve/vm-core.func @@ -10,7 +10,7 @@ _VM_CORE_DISPATCHED=1 # that does not itself need downloading first. See core/build.func. _CS_CURL_RETRY=(--retry 3 --retry-delay 1 --retry-connrefused --connect-timeout 10) -COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" if command -v pveversion &>/dev/null; then : @@ -58,7 +58,7 @@ SPINNER_MSG="" [[ -n "${_CORE_FUNC_LOADED:-}" ]] && return _CORE_FUNC_LOADED=1 -COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" load_api_functions() { if ! declare -f post_to_api_vm >/dev/null 2>&1; then diff --git a/ui/build-ui.func b/ui/build-ui.func index 4f7e1e1..c048413 100644 --- a/ui/build-ui.func +++ b/ui/build-ui.func @@ -114,7 +114,7 @@ variables() { # Configurable base URL for development — override with COMMUNITY_SCRIPTS_URL # See docs/DEV_MODE.md for details -COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}" # Repeated per file rather than shared: there is nowhere to put a shared copy # that does not itself need downloading first. See core/build.func.