From da6ca25f7012d15876cacae40c73cf5c7798281b Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Wed, 2 Sep 2026 17:41:34 +0200 Subject: [PATCH] Pin Go to the version each project declares in go.mod setup_go with no GO_VERSION resolves to whatever go.dev currently serves, so every Go app was built against a moving target. When 1.27 landed it broke wanderer outright (#16909): PocketBase pins go 1.25.0 and stack-overflows at startup when built with anything newer. Two problems, both fixed here: setup_go ran before the source was fetched in all 15 install scripts, so the pin could not be read even if someone wanted one. It now runs after the fetch and reads the version out of go.mod. 13 ct/ scripts rebuild with go during update. Eleven never called setup_go at all and rebuilt with whatever the container happened to have; the other two called it before the fetch. All 13 now use the same call as their installer, verified identical string for string. caddy is left alone: xcaddy fetches the Caddy source itself, so there is no local go.mod to read, and it already pins deliberately. wanderer is in #16976. --- ct/authentik.sh | 2 +- ct/bitmagnet.sh | 1 + ct/cloudflare-ddns.sh | 2 +- ct/databasus.sh | 1 + ct/firecrawl.sh | 1 + ct/gluetun.sh | 1 + ct/koffan.sh | 1 + ct/localagi.sh | 1 + ct/networkoptimizer.sh | 1 + ct/paperless-gpt.sh | 1 + ct/tor-snowflake.sh | 1 + ct/watcharr.sh | 1 + ct/yopass.sh | 1 + install/authentik-install.sh | 2 +- install/bitmagnet-install.sh | 2 +- install/cloudflare-ddns-install.sh | 2 +- install/databasus-install.sh | 2 +- install/firecrawl-install.sh | 2 +- install/gluetun-install.sh | 2 +- install/koffan-install.sh | 2 +- install/localagi-install.sh | 2 +- install/neko-install.sh | 2 +- install/networkoptimizer-install.sh | 2 +- install/paperless-gpt-install.sh | 2 +- install/seelf-install.sh | 2 +- install/tor-snowflake-install.sh | 2 +- install/watcharr-install.sh | 2 +- install/yopass-install.sh | 2 +- 28 files changed, 28 insertions(+), 17 deletions(-) diff --git a/ct/authentik.sh b/ct/authentik.sh index 4290c6bd1..55bba6c28 100644 --- a/ct/authentik.sh +++ b/ct/authentik.sh @@ -44,7 +44,6 @@ function update_script() { msg_ok "Update dependencies" NODE_VERSION="26" NODE_MODULE=pnpm@11 setup_nodejs - setup_go $STD uv cache clean UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.7" setup_uv RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust @@ -86,6 +85,7 @@ function update_script() { msg_ok "Stopped Services" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik" + GO_VERSION="$(grep -m1 '^go ' /opt/authentik/go.mod | awk '{print $2}')" setup_go msg_info "Configuring rust" cd /opt/authentik diff --git a/ct/bitmagnet.sh b/ct/bitmagnet.sh index fa5c8ed5e..56680e154 100644 --- a/ct/bitmagnet.sh +++ b/ct/bitmagnet.sh @@ -71,6 +71,7 @@ update_deb_based() { msg_ok "Data backed up" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/bitmagnet/go.mod | awk '{print $2}')" setup_go restore_backup msg_info "Configuring Bitmagnet" diff --git a/ct/cloudflare-ddns.sh b/ct/cloudflare-ddns.sh index 829afe1c8..c4f1d657b 100644 --- a/ct/cloudflare-ddns.sh +++ b/ct/cloudflare-ddns.sh @@ -37,8 +37,8 @@ function update_script() { systemctl stop cloudflare-ddns msg_ok "Stopped Service" - setup_go CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cloudflare-ddns" "favonia/cloudflare-ddns" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/cloudflare-ddns/go.mod | awk '{print $2}')" setup_go msg_info "Updating ${APP}" cd /opt/cloudflare-ddns diff --git a/ct/databasus.sh b/ct/databasus.sh index 7c858888f..6f5c119c1 100644 --- a/ct/databasus.sh +++ b/ct/databasus.sh @@ -70,6 +70,7 @@ function update_script() { msg_ok "Ensured Database Clients" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus" + GO_VERSION="$(grep -m1 '^go ' /opt/databasus/backend/go.mod | awk '{print $2}')" setup_go msg_info "Updating Databasus" export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 diff --git a/ct/firecrawl.sh b/ct/firecrawl.sh index 1a2c176f9..07c183a57 100644 --- a/ct/firecrawl.sh +++ b/ct/firecrawl.sh @@ -42,6 +42,7 @@ function update_script() { create_backup /opt/firecrawl/.env CLEAN_INSTALL=1 fetch_and_deploy_gh_release "firecrawl" "firecrawl/firecrawl" "tarball" "latest" "/opt/firecrawl" + GO_VERSION="$(grep -m1 '^go ' /opt/firecrawl/apps/api/sharedLibs/go-html-to-md/go.mod | awk '{print $2}')" setup_go restore_backup diff --git a/ct/gluetun.sh b/ct/gluetun.sh index 0b059a58a..c8600dc08 100644 --- a/ct/gluetun.sh +++ b/ct/gluetun.sh @@ -39,6 +39,7 @@ function update_script() { msg_ok "Stopped Service" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/gluetun/go.mod | awk '{print $2}')" setup_go msg_info "Building Gluetun" cd /opt/gluetun diff --git a/ct/koffan.sh b/ct/koffan.sh index 9f50d2bdc..5bb3d1b33 100644 --- a/ct/koffan.sh +++ b/ct/koffan.sh @@ -40,6 +40,7 @@ function update_script() { create_backup /opt/koffan/data CLEAN_INSTALL=1 fetch_and_deploy_gh_release "koffan" "PanSalut/Koffan" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/koffan/go.mod | awk '{print $2}')" setup_go restore_backup msg_info "Rebuilding Koffan" diff --git a/ct/localagi.sh b/ct/localagi.sh index 2c8688400..6b544ef55 100644 --- a/ct/localagi.sh +++ b/ct/localagi.sh @@ -40,6 +40,7 @@ function update_script() { create_backup /opt/localagi/.env CLEAN_INSTALL=1 fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarball" "latest" "/opt/localagi" + GO_VERSION="$(grep -m1 '^go ' /opt/localagi/go.mod | awk '{print $2}')" setup_go restore_backup msg_info "Building LocalAGI" diff --git a/ct/networkoptimizer.sh b/ct/networkoptimizer.sh index aec1a7ec3..5533d9444 100644 --- a/ct/networkoptimizer.sh +++ b/ct/networkoptimizer.sh @@ -39,6 +39,7 @@ function update_script() { create_backup /opt/networkoptimizer/networkoptimizer.env CLEAN_INSTALL=1 fetch_and_deploy_gh_release "networkoptimizer" "Ozark-Connect/NetworkOptimizer" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/networkoptimizer/src/uwnspeedtest/go.mod | awk '{print $2}')" setup_go restore_backup msg_info "Rebuilding NetworkOptimizer" diff --git a/ct/paperless-gpt.sh b/ct/paperless-gpt.sh index 234f0e9d1..c824fa576 100644 --- a/ct/paperless-gpt.sh +++ b/ct/paperless-gpt.sh @@ -41,6 +41,7 @@ function update_script() { fi fetch_and_deploy_gh_release "paperless-gpt" "icereed/paperless-gpt" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/paperless-gpt/go.mod | awk '{print $2}')" setup_go msg_info "Updating Paperless-GPT" cd /opt/paperless-gpt/web-app diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 2bf7757f8..3bf693a15 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -44,6 +44,7 @@ function update_script() { msg_ok "Stopped Service" CLEAN_INSTALL=1 GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/tor-snowflake/proxy/go.mod | awk '{print $2}')" setup_go msg_info "Building Snowflake" cd /opt/tor-snowflake/proxy diff --git a/ct/watcharr.sh b/ct/watcharr.sh index c32b7ce43..623cb9bde 100644 --- a/ct/watcharr.sh +++ b/ct/watcharr.sh @@ -40,6 +40,7 @@ function update_script() { create_backup /opt/watcharr/server/data CLEAN_INSTALL=1 fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/watcharr/server/go.mod | awk '{print $2}')" setup_go restore_backup msg_info "Updating Watcharr" diff --git a/ct/yopass.sh b/ct/yopass.sh index 1c247d3cd..556bff5ff 100644 --- a/ct/yopass.sh +++ b/ct/yopass.sh @@ -38,6 +38,7 @@ function update_script() { msg_ok "Stopped Service" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "yopass" "jhaals/yopass" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/yopass/go.mod | awk '{print $2}')" setup_go msg_info "Building Yopass" cd /opt/yopass diff --git a/install/authentik-install.sh b/install/authentik-install.sh index 7f089b759..00783c0b5 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -52,7 +52,6 @@ msg_ok "Installed Dependencies" NODE_VERSION="26" NODE_MODULE=pnpm@11 setup_nodejs setup_yq -setup_go RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.7" setup_uv PG_VERSION="17" setup_postgresql @@ -62,6 +61,7 @@ XMLSEC_VERSION="1.3.12" AUTHENTIK_VERSION="version/2026.8.0" fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "${XMLSEC_VERSION}" "/opt/xmlsec" fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik" +GO_VERSION="$(grep -m1 '^go ' /opt/authentik/go.mod | awk '{print $2}')" setup_go fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary" msg_info "Setting up xmlsec" diff --git a/install/bitmagnet-install.sh b/install/bitmagnet-install.sh index 6a10f33e6..14e6fdf3a 100644 --- a/install/bitmagnet-install.sh +++ b/install/bitmagnet-install.sh @@ -23,9 +23,9 @@ setup_deb_based() { PG_VERSION="16" setup_postgresql PG_DB_NAME="bitmagnet" PG_DB_USER="bitmagnet" setup_postgresql_db - setup_go fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball" + GO_VERSION="$(grep -m1 '^go ' /opt/bitmagnet/go.mod | awk '{print $2}')" setup_go RELEASE=$(cat ~/.bitmagnet) msg_info "Configuring bitmagnet" diff --git a/install/cloudflare-ddns-install.sh b/install/cloudflare-ddns-install.sh index 9fc2771f2..18659bbd7 100644 --- a/install/cloudflare-ddns-install.sh +++ b/install/cloudflare-ddns-install.sh @@ -51,8 +51,8 @@ while true; do done msg_ok "Configured Application" -setup_go fetch_and_deploy_gh_release "cloudflare-ddns" "favonia/cloudflare-ddns" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/cloudflare-ddns/go.mod | awk '{print $2}')" setup_go msg_info "Building ${APPLICATION}" cd /opt/cloudflare-ddns diff --git a/install/databasus-install.sh b/install/databasus-install.sh index 56faeb178..2ac3e5c87 100644 --- a/install/databasus-install.sh +++ b/install/databasus-install.sh @@ -22,7 +22,6 @@ $STD apt install -y \ msg_ok "Installed Dependencies" PG_VERSION="17" setup_postgresql -setup_go NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs msg_info "Installing Database Clients" @@ -52,6 +51,7 @@ done msg_ok "Installed Database Clients" fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus" +GO_VERSION="$(grep -m1 '^go ' /opt/databasus/backend/go.mod | awk '{print $2}')" setup_go msg_info "Building Databasus (Patience)" export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 diff --git a/install/firecrawl-install.sh b/install/firecrawl-install.sh index 9ef46523e..1a6582924 100644 --- a/install/firecrawl-install.sh +++ b/install/firecrawl-install.sh @@ -28,11 +28,11 @@ $STD apt install -y \ msg_ok "Installed Dependencies" NODE_VERSION="22" NODE_MODULE="pnpm@11.4.0" setup_nodejs -setup_go RUST_PROFILE="minimal" setup_rust PG_VERSION="17" PG_MODULES="cron" setup_postgresql fetch_and_deploy_gh_release "firecrawl" "firecrawl/firecrawl" "tarball" "latest" "/opt/firecrawl" +GO_VERSION="$(grep -m1 '^go ' /opt/firecrawl/apps/api/sharedLibs/go-html-to-md/go.mod | awk '{print $2}')" setup_go msg_info "Configuring FDB" FDB_VERSION="$(awk -F= '/^ARG FDB_VERSION=/{print $2; exit}' /opt/firecrawl/apps/api/Dockerfile)" diff --git a/install/gluetun-install.sh b/install/gluetun-install.sh index 68e841d93..86f3b0411 100644 --- a/install/gluetun-install.sh +++ b/install/gluetun-install.sh @@ -26,9 +26,9 @@ $STD update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy ln -sf /usr/sbin/openvpn /usr/sbin/openvpn2.6 msg_ok "Configured iptables" -setup_go fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/gluetun/go.mod | awk '{print $2}')" setup_go msg_info "Building Gluetun" cd /opt/gluetun diff --git a/install/koffan-install.sh b/install/koffan-install.sh index 51f6e6edf..e7acc6f40 100644 --- a/install/koffan-install.sh +++ b/install/koffan-install.sh @@ -17,8 +17,8 @@ msg_info "Installing Dependencies" $STD apt install -y build-essential msg_ok "Installed Dependencies" -setup_go fetch_and_deploy_gh_release "koffan" "PanSalut/Koffan" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/koffan/go.mod | awk '{print $2}')" setup_go msg_info "Building Koffan" cd /opt/koffan diff --git a/install/localagi-install.sh b/install/localagi-install.sh index 3589d1b8b..364204bae 100644 --- a/install/localagi-install.sh +++ b/install/localagi-install.sh @@ -19,7 +19,6 @@ $STD apt install -y build-essential msg_ok "Installed Dependencies" NODE_VERSION="24" setup_nodejs -setup_go msg_info "Installing Bun" export BUN_INSTALL="/root/.bun" @@ -29,6 +28,7 @@ ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx msg_ok "Installed Bun" fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarball" "latest" "/opt/localagi" +GO_VERSION="$(grep -m1 '^go ' /opt/localagi/go.mod | awk '{print $2}')" setup_go msg_info "Configuring LocalAGI" mkdir -p /opt/localagi/pool diff --git a/install/neko-install.sh b/install/neko-install.sh index 3dde5f869..cc47b9f1a 100644 --- a/install/neko-install.sh +++ b/install/neko-install.sh @@ -48,9 +48,9 @@ $STD apt install -y \ msg_ok "Installed Build Dependencies" NODE_VERSION="22" setup_nodejs -setup_go fetch_and_deploy_gh_release "neko" "m1k1o/neko" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/neko/server/go.mod | awk '{print $2}')" setup_go msg_info "Building Client" cd /opt/neko/client diff --git a/install/networkoptimizer-install.sh b/install/networkoptimizer-install.sh index 44fd49e18..2f109ed12 100644 --- a/install/networkoptimizer-install.sh +++ b/install/networkoptimizer-install.sh @@ -27,9 +27,9 @@ setup_deb822_repo \ $STD apt install -y dotnet-sdk-10.0 msg_ok "Installed Dependencies" -setup_go fetch_and_deploy_gh_release "networkoptimizer" "Ozark-Connect/NetworkOptimizer" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/networkoptimizer/src/uwnspeedtest/go.mod | awk '{print $2}')" setup_go msg_info "Building NetworkOptimizer" RID="linux-x64" diff --git a/install/paperless-gpt-install.sh b/install/paperless-gpt-install.sh index e3eb54642..47228b4ef 100644 --- a/install/paperless-gpt-install.sh +++ b/install/paperless-gpt-install.sh @@ -23,8 +23,8 @@ $STD apt install -y \ msg_ok "Installed Dependencies" NODE_VERSION="24" setup_nodejs -setup_go fetch_and_deploy_gh_release "paperless-gpt" "icereed/paperless-gpt" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/paperless-gpt/go.mod | awk '{print $2}')" setup_go msg_info "Setup Paperless-GPT" cd /opt/paperless-gpt/web-app diff --git a/install/seelf-install.sh b/install/seelf-install.sh index 2b8f4c69c..19e7d0c38 100644 --- a/install/seelf-install.sh +++ b/install/seelf-install.sh @@ -19,9 +19,9 @@ $STD apt install -y \ gcc msg_ok "Installed Dependencies" -setup_go NODE_VERSION="22" setup_nodejs fetch_and_deploy_gh_release "seelf" "YuukanOO/seelf" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/seelf/go.mod | awk '{print $2}')" setup_go msg_info "Setting up seelf. Patience" cd /opt/seelf diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index 2e540648b..d3a75a7df 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -13,10 +13,10 @@ setting_up_container network_check update_os -setup_go msg_info "Building Snowflake" GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/tor-snowflake/proxy/go.mod | awk '{print $2}')" setup_go cd /opt/tor-snowflake/proxy $STD go build -o snowflake-proxy . msg_ok "Built Snowflake Proxy" diff --git a/install/watcharr-install.sh b/install/watcharr-install.sh index 5aae1cbbd..bb170734b 100644 --- a/install/watcharr-install.sh +++ b/install/watcharr-install.sh @@ -17,9 +17,9 @@ msg_info "Installing Dependencies" $STD apt install -y gcc msg_ok "Installed Dependencies" -setup_go NODE_VERSION="24" setup_nodejs fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/watcharr/server/go.mod | awk '{print $2}')" setup_go msg_info "Setup Watcharr" cd /opt/watcharr diff --git a/install/yopass-install.sh b/install/yopass-install.sh index c0f1b4c76..790544f30 100644 --- a/install/yopass-install.sh +++ b/install/yopass-install.sh @@ -18,10 +18,10 @@ $STD apt install -y redis-server systemctl enable -q --now redis-server msg_ok "Installed Dependencies" -setup_go NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs fetch_and_deploy_gh_release "yopass" "jhaals/yopass" "tarball" +GO_VERSION="$(grep -m1 '^go ' /opt/yopass/go.mod | awk '{print $2}')" setup_go msg_info "Building Yopass" cd /opt/yopass