Compare commits

..

2 Commits

Author SHA1 Message Date
MickLesk
8f8e1d0313 Trim comments 2026-09-10 14:18:24 +02:00
MickLesk
a8c8f1cb10 Rewrite the retired Gitea base in every container before updating it
git.community-scripts.org was a mirror of the same repositories and is
gone. A container built against it cannot update: the older entrypoint
pulls ct/<app>.sh straight from the dead host, so it never reaches the
update helper that could repair itself.

Rewriting it from the host is the one place that reaches those, and it
is where people already sweep all their containers. Only the host and
Gitea's /raw/<kind>/ segment change, so a fork keeps its own owner,
repo and ref.
2026-09-10 14:11:30 +02:00
4 changed files with 21 additions and 8 deletions

View File

@@ -553,12 +553,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- fix(solidtime): prevent composer install from hanging on root prompt [@supersoju](https://github.com/supersoju) ([#17146](https://github.com/community-scripts/ProxmoxVE/pull/17146)) - fix(solidtime): prevent composer install from hanging on root prompt [@supersoju](https://github.com/supersoju) ([#17146](https://github.com/community-scripts/ProxmoxVE/pull/17146))
- fix(hermesagent): wait for root gateway cleanup [@steveonjava](https://github.com/steveonjava) ([#17147](https://github.com/community-scripts/ProxmoxVE/pull/17147)) - fix(hermesagent): wait for root gateway cleanup [@steveonjava](https://github.com/steveonjava) ([#17147](https://github.com/community-scripts/ProxmoxVE/pull/17147))
### 💾 Core
- Keep the script name when regenerating the entrypoint [@MickLesk](https://github.com/MickLesk) ([core#35](https://github.com/community-scripts/core/pull/35))
- Rewrite the dead Gitea base onto GitHub instead of failing the update [@MickLesk](https://github.com/MickLesk) ([core#33](https://github.com/community-scripts/core/pull/33))
- core.func: fall back to a usable HOME when the shell has none [@MickLesk](https://github.com/MickLesk) ([core#32](https://github.com/community-scripts/core/pull/32))
## 2026-09-09 ## 2026-09-09
### 🆕 New Scripts ### 🆕 New Scripts

View File

@@ -69,7 +69,6 @@ function update_script() {
$STD git -C /opt/browserless/ reset --hard origin/main $STD git -C /opt/browserless/ reset --hard origin/main
$STD npm update --prefix /opt/browserless $STD npm update --prefix /opt/browserless
$STD npm ci --include=optional --include=dev --prefix /opt/browserless $STD npm ci --include=optional --include=dev --prefix /opt/browserless
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps $STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed. # Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome $STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome

View File

@@ -62,7 +62,6 @@ mkdir /opt/browserless
$STD /opt/changedetection/.venv/bin/python -m pip install playwright $STD /opt/changedetection/.venv/bin/python -m pip install playwright
$STD git clone https://github.com/browserless/chrome /opt/browserless $STD git clone https://github.com/browserless/chrome /opt/browserless
$STD npm ci --include=optional --include=dev --prefix /opt/browserless $STD npm ci --include=optional --include=dev --prefix /opt/browserless
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null $STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null $STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null $STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null

View File

@@ -178,6 +178,24 @@ function resolve_service_script() {
return 1 return 1
} }
# The retired Gitea mirror. The old entrypoint pulls ct/<app>.sh straight from
# it and never reaches the update helper that would repair itself, so rewrite it
# here. Only host and /raw/<kind>/ change; owner, repo and ref are kept.
function repair_update_url() {
local container="$1"
pct exec "$container" -- sh -c '
[ -f /usr/bin/update ] || exit 1
grep -q git.community-scripts.org /usr/bin/update || exit 1
sed -i \
-e "s|https://git[.]community-scripts[.]org/|https://raw.githubusercontent.com/|g" \
-e "s|/raw/branch/|/|g" -e "s|/raw/tag/|/|g" -e "s|/raw/commit/|/|g" \
/usr/bin/update
' >/dev/null 2>&1 || return 1
echo -e "${BL}[INFO]${CL} Repaired update URL (Gitea -> GitHub) in container $container"
log_write "Container $container: rewrote the retired Gitea base in /usr/bin/update"
}
function detect_service() { function detect_service() {
local container="$1" local container="$1"
local tmpdir update_file local tmpdir update_file
@@ -489,6 +507,9 @@ for container in $CHOICE; do
sleep 5 sleep 5
fi fi
#0.5) Rewrite a retired Gitea base before anything reads it.
repair_update_url "$container"
#1) Detect service using the service name in the update command #1) Detect service using the service name in the update command
detect_service $container detect_service $container