From 981e4f757186b9332105561c03e16c8afd6cf80c Mon Sep 17 00:00:00 2001 From: bigbes Date: Wed, 5 Aug 2026 13:51:55 +0300 Subject: [PATCH] fix(apk): keep -modcacherw when overriding GOFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GOFLAGS="-trimpath" passed to make clobbers abuild's default GOFLAGS, dropping -modcacherw: the module cache then extracts read-only and the CI cache tarball made from it fails to unpack on the next build (mkdir into 0555 dirs, permission denied — warm build #266). The poisoned gomod tarball was deleted by ad-hoc job #268. --- APKBUILD | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/APKBUILD b/APKBUILD index 3dd0daaf4ef6d99a93f9c6d92ea33ca5550170a3..e877002ab3b605ccbe78d666b5e42345f2c545f2 100644 --- a/APKBUILD +++ b/APKBUILD @@ -34,7 +34,10 @@ build() { export GOMODCACHE="$HOME/go/pkg/mod" # web/static (bundle.js + hashed CSS) is committed and go:embed-ed, so # there is no `make css` / `make bundle` step here — see README. - CGO_ENABLED=0 make build GOFLAGS="-trimpath" + # -modcacherw matters beyond convenience: without it the module cache is + # extracted read-only, and the CI cache tarball made from it can't be + # unpacked on the next build (mkdir into 0555 dirs fails). + CGO_ENABLED=0 make build GOFLAGS="-trimpath -modcacherw" } package() {