fix: set C.UTF-8 locale in provisioning script
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled

Fresh Debian LXCs have no locale configured, spamming "apt-listchanges:
Can't set locale" / perl warnings across every install and breaking some
packages' post-install scripts. Pin LANG/LC_ALL=C.UTF-8 (and hoist
DEBIAN_FRONTEND) at the top of the in-container bootstrap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 01:21:23 +02:00
parent f248508919
commit 5f888e6386

View File

@@ -465,6 +465,9 @@ func executeApprovedAction(ctx context.Context, pool *db.Pool, execID uuid.UUID,
func provisionScript(pkgs []string, postInstall string) string {
var b strings.Builder
b.WriteString("set -o pipefail\n")
// A fresh debian LXC has no locale set, which spams "Can't set locale"
// warnings and breaks some package post-install scripts. Pin C.UTF-8.
b.WriteString("export LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive\n")
b.WriteString("probe=deb.debian.org\n")
b.WriteString("ok=0\n")
b.WriteString("for i in $(seq 1 30); do if getent hosts \"$probe\" >/dev/null 2>&1; then ok=1; break; fi; sleep 2; done\n")