Patch bundled installer for dead DigitalOcean mirror and hanging maxmind PPA
Real install test on Ubuntu 20.04 surfaced two stale external deps in the bundled `install`: the DigitalOcean MariaDB 10.6 mirror no longer resolves (DO retired their distro mirrors), and `add-apt-repository ppa:maxmind/ppa` hangs forever on hosts that can't reach launchpad.net. patch_installer() rewrites the MariaDB mirror to mirror.rackspace.com and drops the maxmind PPA (libmaxminddb0/-dev, mmdb-bin ship in Ubuntu's own repos). Both patches are gated on the pattern being present, so future fixed packages are untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
863a050413
commit
265e6944ce
@@ -175,6 +175,39 @@ fetch() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Patch the bundled installer for stale external dependencies
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# The 2025-era bundled `install` references two sources that are now broken on
|
||||||
|
# fresh boxes:
|
||||||
|
# 1. MariaDB 10.6 repo at ams2.mirrors.digitalocean.com — DigitalOcean retired
|
||||||
|
# their distro mirrors, so the host no longer resolves (DNS failure).
|
||||||
|
# 2. `add-apt-repository ppa:maxmind/ppa` — queries the launchpad.net API,
|
||||||
|
# which hangs indefinitely on networks that can't reach launchpad.net. The
|
||||||
|
# packages it provides (libmaxminddb0/-dev, mmdb-bin) ship in Ubuntu's own
|
||||||
|
# repos anyway, so the PPA is unnecessary.
|
||||||
|
# These patches are best-effort: each only fires if its pattern is present, so a
|
||||||
|
# future fixed package is left untouched.
|
||||||
|
patch_installer() {
|
||||||
|
[ -f install ] || return 0
|
||||||
|
local changed=0
|
||||||
|
|
||||||
|
if grep -q 'ams2\.mirrors\.digitalocean\.com' install; then
|
||||||
|
sed -i 's|ams2\.mirrors\.digitalocean\.com/mariadb/repo/10\.6/ubuntu|mirror.rackspace.com/mariadb/repo/10.6/ubuntu|g' install
|
||||||
|
info "Patched: MariaDB mirror -> mirror.rackspace.com (DigitalOcean mirror is dead)."
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -q 'add-apt-repository -y ppa:maxmind/ppa' install; then
|
||||||
|
sed -i 's|sudo add-apt-repository -y ppa:maxmind/ppa|true|g' install
|
||||||
|
info "Patched: dropped maxmind PPA (launchpad.net can hang; pkgs are in Ubuntu repos)."
|
||||||
|
changed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "$changed" -eq 0 ] && info "No installer patches needed (upstream looks current)."
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Extract + run
|
# Extract + run
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -191,6 +224,8 @@ extract_and_run() {
|
|||||||
info "Setting permissions..."
|
info "Setting permissions..."
|
||||||
chmod +x install
|
chmod +x install
|
||||||
|
|
||||||
|
patch_installer
|
||||||
|
|
||||||
if [ "$XUI_INTERACTIVE" = "1" ]; then
|
if [ "$XUI_INTERACTIVE" = "1" ]; then
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user