diff options
author | psykose <alice@ayaya.dev> | 2022-08-04 10:32:56 +0000 |
---|---|---|
committer | psykose <alice@ayaya.dev> | 2022-08-04 12:33:04 +0200 |
commit | d9e95826c086ba4b679198c1d458746d48ef8b3e (patch) | |
tree | dc0d717c8c3a045ec8b88fda24b5019b342782d4 | |
parent | c1b3caf678a639c1f902aad6dc4b8f0a1d600e97 (diff) | |
download | aports-d9e95826c086ba4b679198c1d458746d48ef8b3e.zip |
testing/*: add gocache vars
see cffbff77e1cf386d901febec4a35b2a905065514
192 files changed, 808 insertions, 206 deletions
diff --git a/testing/6cord/APKBUILD b/testing/6cord/APKBUILD index 0b76102921f..4007ee8748a 100644 --- a/testing/6cord/APKBUILD +++ b/testing/6cord/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Danct12 <danct12@disroot.org> # Maintainer: Danct12 <danct12@disroot.org> pkgname="6cord" -pkgver="9.6" +pkgver=9.6 pkgrel=8 pkgdesc="Discord TUI + SIXEL client" url="https://gitlab.com/diamondburned/6cord" @@ -13,6 +13,10 @@ source="https://gitlab.com/diamondburned/6cord/-/archive/stable-$pkgver/6cord-st options="!check" # no testsuite builddir="$srcdir/6cord-stable-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o bin/6cord } diff --git a/testing/aaaaxy/APKBUILD b/testing/aaaaxy/APKBUILD index 5201b1d4191..09b1f98d306 100644 --- a/testing/aaaaxy/APKBUILD +++ b/testing/aaaaxy/APKBUILD @@ -24,6 +24,10 @@ source=" " options="net" # Needed for go mod download. +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { default_prepare diff --git a/testing/acmetool/APKBUILD b/testing/acmetool/APKBUILD index c422950c63f..9e40538ce2b 100644 --- a/testing/acmetool/APKBUILD +++ b/testing/acmetool/APKBUILD @@ -19,6 +19,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/hlandau/acmetool/archive/v$p export GOPATH="$srcdir/go" export GOCACHE="$srcdir/go-build" export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" diff --git a/testing/air/APKBUILD b/testing/air/APKBUILD index c96509e23b5..0164faa8de9 100644 --- a/testing/air/APKBUILD +++ b/testing/air/APKBUILD @@ -10,6 +10,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/cosmtrek/air/archive/refs/tags/v$pkgver.tar.gz" options="!check" # failed to build, error: open /dev/ptmx: no such device +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir -v build local goldflags=" diff --git a/testing/alpine-lift/APKBUILD b/testing/alpine-lift/APKBUILD index b49e9ecb2bb..01793d50a37 100644 --- a/testing/alpine-lift/APKBUILD +++ b/testing/alpine-lift/APKBUILD @@ -13,6 +13,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/bjwschaap/alpine-lift/archiv makefile.patch " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { export CGO_CPPFLAGS="$CPPFLAGS" export CGO_CFLAGS="$CFLAGS" diff --git a/testing/antibody/APKBUILD b/testing/antibody/APKBUILD index 16aff95d00f..5e0c1572c1a 100644 --- a/testing/antibody/APKBUILD +++ b/testing/antibody/APKBUILD @@ -13,6 +13,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/getantibody/antibody/archive options="!check" # uses removed github api export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -o antibody -ldflags "-X main.version=$pkgver" -trimpath diff --git a/testing/apko/APKBUILD b/testing/apko/APKBUILD index 77fe67396c3..8a7e37ba4b1 100644 --- a/testing/apko/APKBUILD +++ b/testing/apko/APKBUILD @@ -16,6 +16,10 @@ subpackages=" " source="https://github.com/chainguard-dev/apko/archive/v$pkgver/apko-$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir build go build -o build/ -tags -tags=pivkey,pkcs11key "$builddir"/... diff --git a/testing/aports-glmr/APKBUILD b/testing/aports-glmr/APKBUILD index e53bf14435b..83ede18baee 100644 --- a/testing/aports-glmr/APKBUILD +++ b/testing/aports-glmr/APKBUILD @@ -10,6 +10,10 @@ makedepends="go" source="https://gitlab.alpinelinux.org/ncopa/aports-glmr/-/archive/$pkgver/aports-glmr-$pkgver.tar.gz" options="!check" # no checks +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/apptainer/APKBUILD b/testing/apptainer/APKBUILD index 7a8480be6e4..8645e800c15 100644 --- a/testing/apptainer/APKBUILD +++ b/testing/apptainer/APKBUILD @@ -23,6 +23,9 @@ source="https://github.com/apptainer/apptainer/releases/download/v$pkgver/apptai export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -modcacherw -trimpath" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare diff --git a/testing/bettercap/APKBUILD b/testing/bettercap/APKBUILD index 6f189b8febe..8f6dc071ac5 100644 --- a/testing/bettercap/APKBUILD +++ b/testing/bettercap/APKBUILD @@ -10,13 +10,16 @@ license="GPL-3.0-only" makedepends="libusb-dev libnetfilter_queue-dev libpcap-dev linux-headers go" source="https://github.com/bettercap/bettercap/archive/refs/tags/v$pkgver/bettercap-v$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -modcacherw -trimpath" # github.com/chifflier/nfqueue-go/nfqueue 2017-02-22 does not include # <sys/types.h> for these types, this is the easiest patch export CGO_CFLAGS="$CFLAGS -Du_int32_t=uint32_t -Du_int16_t=uint16_t -Du_int8_t=uint8_t" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o "$builddir/bettercap" . } diff --git a/testing/blackbox_exporter/APKBUILD b/testing/blackbox_exporter/APKBUILD index 0c23454a780..2a04ef922c3 100644 --- a/testing/blackbox_exporter/APKBUILD +++ b/testing/blackbox_exporter/APKBUILD @@ -20,6 +20,10 @@ subpackages="$pkgname-openrc" # 0.18.0-r0: # - CVE-2020-16248 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build } diff --git a/testing/blocky/APKBUILD b/testing/blocky/APKBUILD index c74ff48832d..be728614116 100644 --- a/testing/blocky/APKBUILD +++ b/testing/blocky/APKBUILD @@ -11,6 +11,10 @@ options="net" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/0xERR0R/blocky/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make VERSION=$pkgver build } diff --git a/testing/bombadillo/APKBUILD b/testing/bombadillo/APKBUILD index 3e1efa8968f..d8ce09fc5c7 100644 --- a/testing/bombadillo/APKBUILD +++ b/testing/bombadillo/APKBUILD @@ -14,6 +14,9 @@ builddir="$srcdir/bombadillo" export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make build diff --git a/testing/booster/APKBUILD b/testing/booster/APKBUILD index b291722091f..0b2fd8d9b5c 100644 --- a/testing/booster/APKBUILD +++ b/testing/booster/APKBUILD @@ -24,8 +24,10 @@ source="https://github.com/anatol/booster/archive/refs/tags/$pkgver/booster-$pkg provides="initramfs-generator" provider_priority=1 # lowest, **must** be lower than main/mkinitfs -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { cd "$builddir"/generator diff --git a/testing/boringproxy/APKBUILD b/testing/boringproxy/APKBUILD index a24e4d742af..619dada37d6 100644 --- a/testing/boringproxy/APKBUILD +++ b/testing/boringproxy/APKBUILD @@ -12,6 +12,9 @@ makedepends="go inkscape libcap" source="$pkgname-$pkgver.tar.gz::https://github.com/boringproxy/boringproxy/archive/refs/tags/v$pkgver.tar.gz" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { # from ./scripts/generate_logo.sh diff --git a/testing/btcd/APKBUILD b/testing/btcd/APKBUILD index c2cd8960a46..d1e6329fa92 100644 --- a/testing/btcd/APKBUILD +++ b/testing/btcd/APKBUILD @@ -13,9 +13,13 @@ source="https://github.com/btcsuite/btcd/archive/v$_pkgver/btcd-$_pkgver.tar.gz " builddir="$srcdir/$pkgname-$_pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir bin - go build -trimpath -ldflags="-s -w" -v -o bin . ./cmd/... + go build -trimpath -v -o bin . ./cmd/... } check() { diff --git a/testing/buildkit/APKBUILD b/testing/buildkit/APKBUILD index 98ccf3dfdb8..2440a34dfcc 100644 --- a/testing/buildkit/APKBUILD +++ b/testing/buildkit/APKBUILD @@ -18,6 +18,9 @@ options="!check" # needs to mount various things as root export GOFLAGS="$GOFLAGS -modcacherw -trimpath" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare diff --git a/testing/certigo/APKBUILD b/testing/certigo/APKBUILD index a01497c4b9d..0e06839d08e 100644 --- a/testing/certigo/APKBUILD +++ b/testing/certigo/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/square/certigo/archive/v$pkgver/v$pkgver.tar.gz" options="chmod-clean" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -trimpath } diff --git a/testing/certstrap/APKBUILD b/testing/certstrap/APKBUILD index 1c019a9f27a..88b0ab95f3a 100644 --- a/testing/certstrap/APKBUILD +++ b/testing/certstrap/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/square/certstrap/archive/v$pkgver/v$pkgver.tar.gz" options="chmod-clean" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -trimpath } diff --git a/testing/cfssl/APKBUILD b/testing/cfssl/APKBUILD index 260fb75119d..ffd30a9c14e 100644 --- a/testing/cfssl/APKBUILD +++ b/testing/cfssl/APKBUILD @@ -11,12 +11,14 @@ options="!check" # TODO: fix and enable tests makedepends="go" source="https://github.com/cloudflare/cfssl/archive/v$pkgver/cfssl-$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -modcacherw -mod=vendor" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build \ - -ldflags="-s -w -X github.com/cloudflare/cfssl/cli/version.version=$pkgver" \ + -ldflags="-X github.com/cloudflare/cfssl/cli/version.version=$pkgver" \ -v -o bin/ ./cmd/... } diff --git a/testing/chathistorysync/APKBUILD b/testing/chathistorysync/APKBUILD index 812a78e7d29..b2aad5fe2cf 100644 --- a/testing/chathistorysync/APKBUILD +++ b/testing/chathistorysync/APKBUILD @@ -13,6 +13,10 @@ source=" subpackages="$pkgname-doc" builddir="$srcdir/$pkgname-v$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/clash/APKBUILD b/testing/clash/APKBUILD index 89b655499ed..a6d1c071411 100644 --- a/testing/clash/APKBUILD +++ b/testing/clash/APKBUILD @@ -13,9 +13,12 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/Dreamacro/clash/archive/refs clash.initd" options="!check" # The upstream does not provide a proper way to test the pakcage +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -modcacherw" + build() { - export GOFLAGS="$GOFLAGS -modcacherw" - export GOPATH="$builddir"/gopath make VERSION="v$pkgver" docker } diff --git a/testing/cliphist/APKBUILD b/testing/cliphist/APKBUILD index e5ecd782dd6..9e54a9f01be 100644 --- a/testing/cliphist/APKBUILD +++ b/testing/cliphist/APKBUILD @@ -13,6 +13,10 @@ makedepends="go" subpackages="$pkgname-fzf::noarch" source="$pkgname-$pkgver.tar.gz::https://github.com/sentriz/cliphist/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build } diff --git a/testing/clipman/APKBUILD b/testing/clipman/APKBUILD index f90c40ca7ff..8d4d366fab5 100644 --- a/testing/clipman/APKBUILD +++ b/testing/clipman/APKBUILD @@ -13,6 +13,10 @@ options="!check" # no tests subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/yory8/clipman/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o $pkgname } @@ -21,6 +25,7 @@ package() { install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname install -Dm644 docs/clipman.1 -t "$pkgdir"/usr/share/man/man1 } + sha512sums=" 4d02cad58a5637df64a32673406632a9626633fa2bfc6cff28dc6c724048a3f6e40482a3f0eca64ad0af2e0100b426d8779beef29f24e28b5c494878ae1c0ef4 clipman-1.6.1.tar.gz " diff --git a/testing/cloudflared/APKBUILD b/testing/cloudflared/APKBUILD index eb8eeba68c7..3b1f1c0eec0 100644 --- a/testing/cloudflared/APKBUILD +++ b/testing/cloudflared/APKBUILD @@ -11,6 +11,10 @@ makedepends="go gettext" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/cloudflare/cloudflared/archive/refs/tags/$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make cloudflared DATE="\"$(date -u '+%Y-%m-%d-%H%M UTC')\"" VERSION="$pkgver" envsubst < cloudflared_man_template > cloudflared.1 diff --git a/testing/cloudfoundry-cli/APKBUILD b/testing/cloudfoundry-cli/APKBUILD index c34f8eed5d7..cd6f717e24f 100644 --- a/testing/cloudfoundry-cli/APKBUILD +++ b/testing/cloudfoundry-cli/APKBUILD @@ -13,9 +13,9 @@ options="!check" # some tests fail source="$pkgname-$pkgver.tar.gz::https://github.com/cloudfoundry/cli/archive/v$pkgver.tar.gz" builddir="$srcdir/cli-$pkgver" -export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -mod=mod -modcacherw" diff --git a/testing/cointop/APKBUILD b/testing/cointop/APKBUILD index 5e336f34be4..e74a53ff9cd 100644 --- a/testing/cointop/APKBUILD +++ b/testing/cointop/APKBUILD @@ -10,6 +10,10 @@ license="Apache-2.0" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/cointop-sh/cointop/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/$pkgname -ldflags "-X github.com/cointop-sh/cointop/cointop.version=v$pkgver" } diff --git a/testing/comics-downloader/APKBUILD b/testing/comics-downloader/APKBUILD index 3b7c6034ae4..650ac5820ad 100644 --- a/testing/comics-downloader/APKBUILD +++ b/testing/comics-downloader/APKBUILD @@ -13,11 +13,9 @@ makedepends="go mesa-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev" subpackages="$pkgname-gui:gui" source="$pkgver-$pkgname.tar.gz::https://github.com/Girbons/comics-downloader/archive/refs/tags/v$pkgver.tar.gz" -export GOPATH="$srcdir" - -prepare() { - default_prepare -} +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -o build/comics-downloader ./cmd/downloader diff --git a/testing/conntracct/APKBUILD b/testing/conntracct/APKBUILD index 32dd866e02d..e53feae1f2a 100644 --- a/testing/conntracct/APKBUILD +++ b/testing/conntracct/APKBUILD @@ -18,6 +18,10 @@ source=" dont-run-setcap.patch " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mage build } diff --git a/testing/consul-replicate/APKBUILD b/testing/consul-replicate/APKBUILD index 7ac822e4813..f9c35d41bd2 100644 --- a/testing/consul-replicate/APKBUILD +++ b/testing/consul-replicate/APKBUILD @@ -7,26 +7,28 @@ pkgdesc="Consul cross-DC KV replication daemon" url="https://www.consul.io/" arch="all" license="MPL-2.0" -depends="" makedepends="go" -source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/$pkgname/archive/v$pkgver.tar.gz" -builddir="$srcdir/$pkgname-$pkgver" +source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/consule-replicate/archive/v$pkgver.tar.gz" -build() { - cd "$builddir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOPATH="$builddir" +export GO111MODULE=off +build() { mkdir -p "$builddir/src/github.com/hashicorp" - ln -s "$builddir" "$builddir/src/github.com/hashicorp/$pkgname" + ln -sf "$builddir" "$builddir/src/github.com/hashicorp/$pkgname" cd "$builddir/src/github.com/hashicorp/$pkgname" - GOPATH="$builddir" GO111MODULE=off go build -v -o bin/$pkgname + go build -v -o bin/$pkgname } package() { - cd "$builddir" - # Main binary install -m750 -D bin/$pkgname "$pkgdir"/usr/bin/$pkgname } -sha512sums="960f8a54890932663d832247e2f9eec536a6e4f21e3e1f602399e9465cbb355eb2e4dcbc198bd2362442088c1912664b0640b59ce099c988508f4715b73fbcd7 consul-replicate-0.4.0.tar.gz" +sha512sums=" +960f8a54890932663d832247e2f9eec536a6e4f21e3e1f602399e9465cbb355eb2e4dcbc198bd2362442088c1912664b0640b59ce099c988508f4715b73fbcd7 consul-replicate-0.4.0.tar.gz +" diff --git a/testing/corerad/APKBUILD b/testing/corerad/APKBUILD index 805d14afbe6..755e986ab87 100644 --- a/testing/corerad/APKBUILD +++ b/testing/corerad/APKBUILD @@ -19,6 +19,10 @@ source=" # access denied for ipv6 autoconfiguration [ "$CARCH" = "s390x" ] && options="$options !check" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make VERSION="$pkgver" @@ -37,6 +41,7 @@ package() { install -Dm755 "$srcdir"/corerad.initd "$pkgdir"/etc/init.d/corerad install -Dm644 corerad.toml "$pkgdir"/etc/corerad/config.toml } + sha512sums=" 48a5f33cb4dccf5fe650232df46c8d35e94833b569468775657cead34040bfb322b7f556a156c6827a3540ced00f1e5443c07f68651ea13ef5434731dcf3320f corerad-1.2.1.tar.gz 96c40309aa6e81db5e5d136ee2ca9b1c24471acd1b20ff773020d3106dcc82e0fcb4b52112cbcb2b16c45211073b1d19bc0381ef7d93bd1c3cf53745633a22b4 corerad.initd diff --git a/testing/cri-o/APKBUILD b/testing/cri-o/APKBUILD index 6a1443b5ea7..dc8ba099f0c 100644 --- a/testing/cri-o/APKBUILD +++ b/testing/cri-o/APKBUILD @@ -60,10 +60,12 @@ source="https://github.com/cri-o/cri-o/archive/v$pkgver/cri-o-$pkgver.tar.gz # 1.24.1-r0: # - CVE-2022-1708 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOBIN="$GOPATH/bin" build() { - export GOPATH="$srcdir" - export GOBIN="$GOPATH/bin" # https://github.com/cri-o/cri-o/blob/master/install.md#build-tags make BUILDTAGS="seccomp selinux containers_image_openpgp containers_image_ostree_stub" } diff --git a/testing/cri-tools/APKBUILD b/testing/cri-tools/APKBUILD index b6551ea8fd3..4495c00abcf 100644 --- a/testing/cri-tools/APKBUILD +++ b/testing/cri-tools/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" options="!check" # no check available source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes-sigs/cri-tools/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make all } @@ -19,6 +23,7 @@ package() { install -Dm755 build/bin/crictl "$pkgdir/usr/bin/crictl" install -Dm755 build/bin/critest "$pkgdir/usr/bin/critest" } + sha512sums=" 9b5907b37bb5f00295eff4fa4207ae55d930feae7e0f48fa130c7ecc936bcd259a11d59ed240684a3e12c8bcee40f2c67d7f4af52c2a76df3d7bf82e5e388a75 cri-tools-1.24.2.tar.gz " diff --git a/testing/crowdsec/APKBUILD b/testing/crowdsec/APKBUILD index 66651c4b94b..1cd47198076 100644 --- a/testing/crowdsec/APKBUILD +++ b/testing/crowdsec/APKBUILD @@ -13,6 +13,10 @@ makedepends="go jq bash gettext binutils-gold coreutils" options="!check" # no test suite identified source="$pkgname-$pkgver.tar.gz::https://github.com/crowdsecurity/crowdsec/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make BUILD_VERSION=v$pkgver build } diff --git a/testing/cs-firewall-bouncer/APKBUILD b/testing/cs-firewall-bouncer/APKBUILD index 6ec826ce176..14db7854820 100644 --- a/testing/cs-firewall-bouncer/APKBUILD +++ b/testing/cs-firewall-bouncer/APKBUILD @@ -16,7 +16,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/crowdsecurity/cs-firewall-bo " export GOFLAGS="$GOFLAGS -modcacherw" -export GOCACHE=$srcdir/go-build +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make BUILD_VERSION=$pkgver BUILD_TAG=master diff --git a/testing/csvq/APKBUILD b/testing/csvq/APKBUILD index 39316736ed7..86d27831165 100644 --- a/testing/csvq/APKBUILD +++ b/testing/csvq/APKBUILD @@ -11,6 +11,10 @@ options="!check" # no test suite makedepends="go" source="https://github.com/mithrandie/csvq/archive/v$pkgver/csvq-v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build } diff --git a/testing/ctop/APKBUILD b/testing/ctop/APKBUILD index 37500bf3205..e445b02df4c 100644 --- a/testing/ctop/APKBUILD +++ b/testing/ctop/APKBUILD @@ -12,6 +12,10 @@ makedepends="go" options="!check" # no test suite source="$pkgname-$pkgver.tar.gz::https://github.com/bcicen/ctop/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build } diff --git a/testing/delve/APKBUILD b/testing/delve/APKBUILD index 75cb612a8f3..11832f38147 100644 --- a/testing/delve/APKBUILD +++ b/testing/delve/APKBUILD @@ -12,7 +12,10 @@ options="net chmod-clean" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/go-delve/delve/archive/refs/tags/v$pkgver.tar.gz" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir bin diff --git a/testing/desync/APKBUILD b/testing/desync/APKBUILD index 4a0995805fb..3e53f624f0c 100644 --- a/testing/desync/APKBUILD +++ b/testing/desync/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" depends="fuse" source="$pkgname-$pkgver.tar.gz::https://github.com/folbricht/desync/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" mkdir build diff --git a/testing/didder/APKBUILD b/testing/didder/APKBUILD index 94a61be1e53..1b8459fabf7 100644 --- a/testing/didder/APKBUILD +++ b/testing/didder/APKBUILD @@ -13,12 +13,14 @@ subpackages="$pkgname-doc" options="!check" # no test files source="$pkgname-$pkgver.tar.gz::https://github.com/makeworld-the-better-one/didder/archive/v$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build \ - -ldflags="-s -w -linkmode=external -extldflags \"$LDFLAGS\" \ + -ldflags="-linkmode=external -extldflags \"$LDFLAGS\" \ -X main.version=$pkgver -X main.commit=$_commit \ -X main.builtBy=Alpine_Linux" \ -v . diff --git a/testing/distrobuilder/APKBUILD b/testing/distrobuilder/APKBUILD index aab331ff015..1a9074bfd76 100644 --- a/testing/distrobuilder/APKBUILD +++ b/testing/distrobuilder/APKBUILD @@ -14,20 +14,21 @@ checkdepends="squashfs-tools" source="https://github.com/lxc/distrobuilder/archive/refs/tags/distrobuilder-$pkgver.tar.gz" builddir="$srcdir/distrobuilder-distrobuilder-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -modcacherw" + build() { - export GOPATH="$srcdir" - GOFLAGS="$GOFLAGS -modcacherw" - make + go build -o out ./distrobuilder } check() { - go install -v -x github.com/remyoudompheng/go-misc/deadcode@latest - PATH="$PATH:$GOPATH/bin" - make check + go test ./... } package() { - install -Dm755 $srcdir/bin/$pkgname "$pkgdir"/usr/bin/$pkgname + install -Dm755 out "$pkgdir"/usr/bin/$pkgname install -Dm644 -t "$pkgdir"/usr/share/doc/distrobuilder doc/*.md install -Dm644 -t "$pkgdir"/usr/share/doc/distrobuilder/examples doc/examples/*.yaml } diff --git a/testing/dive/APKBUILD b/testing/dive/APKBUILD index 7cfff752202..7c7ce11c6c4 100644 --- a/testing/dive/APKBUILD +++ b/testing/dive/APKBUILD @@ -3,20 +3,23 @@ pkgname=dive pkgver=0.10.0 pkgrel=7 -pkgdesc='Tool for exploring each layer in a docker image' -url='https://github.com/wagoodman/dive' -arch='all' -license='MIT' -depends='docker' -makedepends='go' +pkgdesc="Tool for exploring each layer in a docker image" +url="https://github.com/wagoodman/dive" +arch="all" +license="MIT" +depends="docker" +makedepends="go" source="https://github.com/wagoodman/dive/archive/v$pkgver/dive-$pkgver.tar.gz" -options='chmod-clean !check' # No test suite +options="chmod-clean !check" # No test suite + +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build \ -trimpath \ -ldflags " - -s -w -X main.version=$pkgver " \ -o bin/dive . @@ -26,4 +29,6 @@ package() { install -Dm755 bin/dive "$pkgdir/usr/bin/dive" } -sha512sums="a027d6f694acdc7680a733df2800e255db93df450704e748778860ac16a19040be855c04238c18d63b10b2042023cf3bf5e8ac9974362decd81dc0259fd0dd1c dive-0.10.0.tar.gz" +sha512sums=" +a027d6f694acdc7680a733df2800e255db93df450704e748778860ac16a19040be855c04238c18d63b10b2042023cf3bf5e8ac9974362decd81dc0259fd0dd1c dive-0.10.0.tar.gz +" diff --git a/testing/docker-volume-local-persist/APKBUILD b/testing/docker-volume-local-persist/APKBUILD index 0eb11efba94..a81f5ad51e2 100644 --- a/testing/docker-volume-local-persist/APKBUILD +++ b/testing/docker-volume-local-persist/APKBUILD @@ -8,7 +8,6 @@ arch="all" license="MIT" depends="docker" makedepends="go glide" -install="" subpackages="$pkgname-openrc" source=" docker-local-persist-$pkgver.tar.gz::https://github.com/MatchbookLab/local-persist/archive/v$pkgver.tar.gz @@ -16,12 +15,15 @@ source=" " builddir="$srcdir/local-persist-$pkgver" +export GOPATH="$startdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - cd "$builddir" - export GOPATH="$startdir" export GO111MODULE=off glide install --skip-test - go build -v -ldflags "-s -w" \ + go build -v \ -o bin/local-persist } @@ -32,5 +34,7 @@ package() { "$pkgdir"/etc/init.d/docker-volume-local-persist } -sha512sums="43a061c937c84eaab817dc62e4be5adfee960e357a2eea504e87c8e5fda32f5a835dc6d145f7d787f4907cd592a04c0159455d8d28d40e158f5a93c4e4fc060a docker-local-persist-1.3.0.tar.gz -806b53e97b52d7ec2517cd978ddce6de14321519a64a4f309e3ea233f77b0c6cb1c9ec6bd9431ebe6d1eef83c7fe6ab2b8720bc4e552b64f3741a1fcd0df4bac docker-volume-local-persist.initd" +sha512sums=" +43a061c937c84eaab817dc62e4be5adfee960e357a2eea504e87c8e5fda32f5a835dc6d145f7d787f4907cd592a04c0159455d8d28d40e158f5a93c4e4fc060a docker-local-persist-1.3.0.tar.gz +806b53e97b52d7ec2517cd978ddce6de14321519a64a4f309e3ea233f77b0c6cb1c9ec6bd9431ebe6d1eef83c7fe6ab2b8720bc4e552b64f3741a1fcd0df4bac docker-volume-local-persist.initd +" diff --git a/testing/dockerize/APKBUILD b/testing/dockerize/APKBUILD index 7392be90cd0..49f38e092d1 100644 --- a/testing/dockerize/APKBUILD +++ b/testing/dockerize/APKBUILD @@ -14,6 +14,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/jwilder/dockerize/archive/v$ go.sum " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { default_prepare @@ -31,6 +35,8 @@ package() { cp -r examples "$pkgdir"/usr/share/dockerize/ } -sha512sums="5ee217b97a23cde8a56ec4c4a262152343d777f95813582d93d2f97f3348ba67bbd415a071ad6449157ab261f65d2dbe2d41e4bb69e37c0699d79947b4af6c12 dockerize-0.6.1.tar.gz +sha512sums=" +5ee217b97a23cde8a56ec4c4a262152343d777f95813582d93d2f97f3348ba67bbd415a071ad6449157ab261f65d2dbe2d41e4bb69e37c0699d79947b4af6c12 dockerize-0.6.1.tar.gz b8d6c6608a6e4a77b325a46c7e3e8b35d65d631294ad9dd414e1e8a7a6d181b89630572f30e8de87ee399dca9a906aa10cc240e827b06e23cfcf789d453478cf go.mod -d994a4d78e3291be9803fe8f98fed2fd02a5b428faf52e682f799331d09a2393462360916a78e3198257e0d55528f8d7080790ba4dafb04f436885070607fe71 go.sum" +d994a4d78e3291be9803fe8f98fed2fd02a5b428faf52e682f799331d09a2393462360916a78e3198257e0d55528f8d7080790ba4dafb04f436885070607fe71 go.sum +" diff --git a/testing/doggo/APKBUILD b/testing/doggo/APKBUILD index a228d42917c..162e93a3a88 100644 --- a/testing/doggo/APKBUILD +++ b/testing/doggo/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/mr-karan/doggo/archive/v$pkgver.tar.gz" options="!check" #no test suite +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make CLI_BIN="./doggo" VERSION=$pkgver build-cli } diff --git a/testing/dolt/APKBUILD b/testing/dolt/APKBUILD index 3f9b1c97d39..ae91a2a9b5e 100644 --- a/testing/dolt/APKBUILD +++ b/testing/dolt/APKBUILD @@ -10,17 +10,14 @@ license="Apache-2.0" options="!check chmod-clean" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/dolthub/dolt/archive/refs/tags/v$pkgver.tar.gz" -builddir="$srcdir"/$pkgname-$pkgver +builddir="$srcdir/$pkgname-$pkgver/go" -prepare() { - cd go - mkdir -p build -} +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - cd go - export GOPATH="$srcdir" - export GOROOT="/usr/lib/go" + mkdir -p build go build \ -trimpath \ -buildmode=pie \ @@ -32,7 +29,6 @@ build() { } package() { - cd go install -Dm755 build/dolt "$pkgdir"/usr/bin/dolt install -Dm755 build/dolt "$pkgdir"/usr/bin/git-dolt install -Dm755 build/dolt "$pkgdir"/usr/bin/git-dolt-smudge diff --git a/testing/drone-cli/APKBUILD b/testing/drone-cli/APKBUILD index 53b84a54b37..ce6a64b74b8 100644 --- a/testing/drone-cli/APKBUILD +++ b/testing/drone-cli/APKBUILD @@ -10,8 +10,11 @@ arch="all" makedepends="go" source="drone-cli-$pkgver.tar.gz::https://github.com/harness/drone-cli/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - export GOPATH="$srcdir" go build -ldflags "-X main.version=$pkgver" -o bin/drone ./drone } diff --git a/testing/dsnet/APKBUILD b/testing/dsnet/APKBUILD index 3a8e57ec8aa..b0daa8f2ef1 100644 --- a/testing/dsnet/APKBUILD +++ b/testing/dsnet/APKBUILD @@ -12,8 +12,11 @@ makedepends="go" options="!check chmod-clean" # no tests available source="$pkgname-$pkgver.tar.gz::https://github.com/naggie/dsnet/archive/refs/tags/v$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ diff --git a/testing/dstask/APKBUILD b/testing/dstask/APKBUILD index fb9aa8e4153..c58699073e3 100644 --- a/testing/dstask/APKBUILD +++ b/testing/dstask/APKBUILD @@ -17,13 +17,16 @@ source="https://github.com/naggie/dstask/archive/v$pkgver/dstask-$pkgver.tar.gz integration-tests.patch " -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { _git_commit=$(zcat "$srcdir"/dstask-$pkgver.tar.gz | git get-tar-commit-id) _build_date=$(date -u "+%Y-%m-%dT%TZ" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH}) - _ldflags="-s -w + _ldflags=" -X github.com/naggie/dstask.GIT_COMMIT=$_git_commit -X github.com/naggie/dstask.VERSION=$pkgver-r$pkgrel -X github.com/naggie/dstask.BUILD_DATE=$_build_date diff --git a/testing/duf/APKBUILD b/testing/duf/APKBUILD index 55ec9b663c7..f8d4c4dc8b4 100644 --- a/testing/duf/APKBUILD +++ b/testing/duf/APKBUILD @@ -11,6 +11,10 @@ arch="all" makedepends="go" source="https://github.com/muesli/duf/archive/v$pkgver/duf-$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ -trimpath \ diff --git a/testing/efm-langserver/APKBUILD b/testing/efm-langserver/APKBUILD index 85284aff778..bb02713fe2e 100644 --- a/testing/efm-langserver/APKBUILD +++ b/testing/efm-langserver/APKBUILD @@ -11,10 +11,13 @@ makedepends="go" options="net chmod-clean" source="$pkgname-$pkgver.tar.gz::https://github.com/mattn/efm-langserver/archive/refs/tags/v$pkgver.tar.gz" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - go build -ldflags="-s -w -X main.revision=$pkgver" -o $pkgname . + go build -ldflags="-X main.revision=$pkgver" -o $pkgname . } check() { diff --git a/testing/ejson/APKBUILD b/testing/ejson/APKBUILD index 135cfa8fd2a..9a4987575a7 100644 --- a/testing/ejson/APKBUILD +++ b/testing/ejson/APKBUILD @@ -13,6 +13,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/Shopify/$pkgname/archive/v$p _gourl=github.com/Shopify/ejson builddir="$srcdir"/src/$_gourl +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p "${builddir%/*}" mv "$srcdir"/$pkgname-$pkgver "$builddir" @@ -42,4 +46,7 @@ package() { mkdir -p "$pkgdir"/usr/share mv build/man "$pkgdir"/usr/share/man/ } -sha512sums="cd49e70b1578f0f960b6d6d77499297bcee7eac3b8595109757697ef844ba8867c353e257105af9b90fdbcca3a08445ae0c9b666c7bc6db26ab7303b5834c5bd ejson-1.2.1.tar.gz" + +sha512sums=" +cd49e70b1578f0f960b6d6d77499297bcee7eac3b8595109757697ef844ba8867c353e257105af9b90fdbcca3a08445ae0c9b666c7bc6db26ab7303b5834c5bd ejson-1.2.1.tar.gz +" diff --git a/testing/elvish/APKBUILD b/testing/elvish/APKBUILD index c9284316586..25c20a4b709 100644 --- a/testing/elvish/APKBUILD +++ b/testing/elvish/APKBUILD @@ -11,6 +11,10 @@ options="!check chmod-clean" source="$pkgname-$pkgver.tar.gz::https://github.com/elves/elvish/archive/v$pkgver.tar.gz" builddir="$srcdir/src/github.com/elves/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p ${builddir%/*} mv "$srcdir"/$pkgname-$pkgver "$builddir"/ diff --git a/testing/emptty/APKBUILD b/testing/emptty/APKBUILD index 91f829cbc4f..576d3227670 100644 --- a/testing/emptty/APKBUILD +++ b/testing/emptty/APKBUILD @@ -7,13 +7,16 @@ url="https://github.com/tvrzna/emptty" arch="all" license="MIT" makedepends="git go linux-pam-dev libx11-dev" -checkdepends="git go" source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" subpackages=" $pkgname-doc $pkgname-openrc " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir -p dist/ go build -o dist/emptty diff --git a/testing/envconsul/APKBUILD b/testing/envconsul/APKBUILD index 79d148db14d..1434c1d1e68 100644 --- a/testing/envconsul/APKBUILD +++ b/testing/envconsul/APKBUILD @@ -10,6 +10,10 @@ arch="all" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/envconsul/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { export CGO_ENABLED="0" mkdir -p pkg/linux-$CARCH diff --git a/testing/ergo/APKBUILD b/testing/ergo/APKBUILD index 29e46b09ccf..6d0e0fa9791 100644 --- a/testing/ergo/APKBUILD +++ b/testing/ergo/APKBUILD @@ -19,6 +19,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/ergochat/ergo/archive/refs/t ircd.yaml " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build } diff --git a/testing/esbuild/APKBUILD b/testing/esbuild/APKBUILD index bb5e23e5d0c..f276a9076f8 100644 --- a/testing/esbuild/APKBUILD +++ b/testing/esbuild/APKBUILD @@ -13,6 +13,10 @@ source="https://github.com/evanw/esbuild/archive/v$pkgver/esbuild-$pkgver.tar.gz export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ -ldflags="-X main.version=$pkgver" \ diff --git a/testing/etcd/APKBUILD b/testing/etcd/APKBUILD index 90a33deea91..f5e32a54ead 100644 --- a/testing/etcd/APKBUILD +++ b/testing/etcd/APKBUILD @@ -22,18 +22,21 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/coreos/etcd/archive/v$pkgver " export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -mod=mod" prepare() { default_prepare - export GOPATH="$(pwd)/_gopath" - export GOFLAGS="$GOFLAGS -mod=mod" + export GOPATH="$builddir/_gopath" _coreos="$GOPATH/src/github.com/etcd-io" mkdir -vp $_coreos ln -vsf $srcdir/$pkgname-$pkgver $_coreos/$pkgname } build() { - GO_LDFLAGS="-w -s" bash -x ./build + bash -x ./build } package() { diff --git a/testing/exercism/APKBUILD b/testing/exercism/APKBUILD index 70ed9992786..7c3d066d38c 100644 --- a/testing/exercism/APKBUILD +++ b/testing/exercism/APKBUILD @@ -14,9 +14,14 @@ subpackages=" $pkgname-fish-completion $pkgname-zsh-completion " -source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/exercism/cli/archive/v$pkgver.tar.gz" builddir="$srcdir"/cli-$pkgver +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -modcacherw" + prepare() { default_prepare @@ -25,9 +30,6 @@ prepare() { } build() { - export GOPATH="$srcdir" - export GOFLAGS="$GOFLAGS -modcacherw" - go build -o bin/exercism exercism/main.go } diff --git a/testing/exoscale/APKBUILD b/testing/exoscale/APKBUILD index 7d2c88ae179..cb17f1c5e36 100644 --- a/testing/exoscale/APKBUILD +++ b/testing/exoscale/APKBUILD @@ -14,6 +14,10 @@ source="https://github.com/exoscale/cli/archive/refs/tags/v$pkgver/exoscale-$pkg " builddir="$srcdir/cli-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { default_prepare diff --git a/testing/filebeat/APKBUILD b/testing/filebeat/APKBUILD index 465c7e19639..f923d794c4f 100644 --- a/testing/filebeat/APKBUILD +++ b/testing/filebeat/APKBUILD @@ -20,6 +20,10 @@ source="beats-$pkgver.tar.gz::https://github.com/elastic/beats/archive/v$pkgver. " builddir="$srcdir/src/github.com/elastic/beats/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p "$srcdir/src/github.com/elastic/" mv "$srcdir/beats-$pkgver" "$srcdir/src/github.com/elastic/beats" diff --git a/testing/firectl/APKBUILD b/testing/firectl/APKBUILD index 5417c4b508f..7fea0d636bb 100644 --- a/testing/firectl/APKBUILD +++ b/testing/firectl/APKBUILD @@ -12,6 +12,10 @@ makedepends="go" source="https://github.com/firecracker-microvm/firectl/archive/v$pkgver/firectl-$pkgver.tar.gz" options="!check" # the tests require a kernel image to be present +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/flannel/APKBUILD b/testing/flannel/APKBUILD index 2313ed441e2..c978ea04316 100644 --- a/testing/flannel/APKBUILD +++ b/testing/flannel/APKBUILD @@ -17,15 +17,12 @@ $_pkgname.initd $_pkgname.confd" builddir="$srcdir/$pkgname-$pkgver" -export GOPATH="$srcdir" - -prepare() { - default_prepare - mkdir -p $builddir/out -} +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - export GO111MODULE=on + mkdir -p out go build \ -mod=readonly \ -ldflags "-s -w -X github.com/flannel-io/flannel/version.Version=$pkgver" \ diff --git a/testing/fq/APKBUILD b/testing/fq/APKBUILD index e529adf0232..3da1843b8c8 100644 --- a/testing/fq/APKBUILD +++ b/testing/fq/APKBUILD @@ -12,7 +12,9 @@ checkdepends="expect" source="https://github.com/wader/fq/archive/v$pkgver/fq-$pkgver.tar.gz" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make fq diff --git a/testing/gb/APKBUILD b/testing/gb/APKBUILD index 1e3dcdad132..32cbb837322 100644 --- a/testing/gb/APKBUILD +++ b/testing/gb/APKBUILD @@ -16,6 +16,10 @@ source="gb-$pkgver.tar.gz::https://github.com/constabulary/gb/archive/v$pkgver.t " builddir="$srcdir/src/github.com/constabulary/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p ${builddir%/*} mv "$srcdir"/$pkgname-$pkgver "$builddir"/ diff --git a/testing/geodns/APKBUILD b/testing/geodns/APKBUILD index 33671fa4de1..e4f3b9537a8 100644 --- a/testing/geodns/APKBUILD +++ b/testing/geodns/APKBUILD @@ -13,14 +13,16 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/abh/geodns/archive/v$pkgver. $pkgname.confd " -export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - go build -v -ldflags "-s -w" + go build -v cd geodns-logs - go build -v -ldflags "-s -w" + go build -v } check() { diff --git a/testing/git-bug/APKBUILD b/testing/git-bug/APKBUILD index a8614156763..8e1366a2946 100644 --- a/testing/git-bug/APKBUILD +++ b/testing/git-bug/APKBUILD @@ -18,6 +18,9 @@ export GIT_LAST_TAG=v$pkgver export GIT_EXACT_TAG=v$pkgver export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make diff --git a/testing/glow/APKBUILD b/testing/glow/APKBUILD index 10a675babe1..b290befea8a 100644 --- a/testing/glow/APKBUILD +++ b/testing/glow/APKBUILD @@ -10,6 +10,10 @@ license="MIT" makedepends="go" source="https://github.com/charmbracelet/glow/archive/v$pkgver/glow-$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/$pkgname -ldflags "-X main.Version=$pkgver" } diff --git a/testing/go-mtpfs/APKBUILD b/testing/go-mtpfs/APKBUILD index 85881b4b4da..9ff1a37b546 100644 --- a/testing/go-mtpfs/APKBUILD +++ b/testing/go-mtpfs/APKBUILD @@ -10,6 +10,10 @@ makedepends="go libusb-dev" options="net !check" # tests require MTP device to be connected source="$pkgname-$pkgver.tar.gz::https://github.com/hanwen/go-mtpfs/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build } diff --git a/testing/go-passbolt-cli/APKBUILD b/testing/go-passbolt-cli/APKBUILD index 7e38070a8f3..972f4d4818e 100644 --- a/testing/go-passbolt-cli/APKBUILD +++ b/testing/go-passbolt-cli/APKBUILD @@ -14,7 +14,9 @@ source=" " export GOFLAGS="$GOFLAGS -modcacherw" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -trimpath -o go-passbolt-cli diff --git a/testing/go-pingu/APKBUILD b/testing/go-pingu/APKBUILD index 3afc4928f4d..561fbe6868c 100644 --- a/testing/go-pingu/APKBUILD +++ b/testing/go-pingu/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/sheepla/pingu/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/$_pkgbin-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o bin/$_pkgbin \ -ldflags "-X main.appVersion=$pkgver -X main.appRevision=" diff --git a/testing/gobuster/APKBUILD b/testing/gobuster/APKBUILD index 1fb10a59d50..5005c1fcf09 100644 --- a/testing/gobuster/APKBUILD +++ b/testing/gobuster/APKBUILD @@ -9,10 +9,12 @@ license="Apache-2.0" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/OJ/gobuster/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - go build -ldflags "-s -w" \ - -gcflags="all=-trimpath=$GOPATH/src" \ - -asmflags="all=-trimpath=$GOPATH/src" \ + go build -trimpath \ -o build/gobuster } @@ -24,4 +26,6 @@ package() { install -Dm755 "./build/gobuster" "$pkgdir/usr/bin/gobuster" } -sha512sums="956789e83aca3a06e04080ecf8bb723328b717019abf6b749e600c6e632c2c6a39b8ac9293521ed82c309cdcf3402a0a88107b62590d74e8947958f625c3de20 gobuster-3.1.0.tar.gz" +sha512sums=" +956789e83aca3a06e04080ecf8bb723328b717019abf6b749e600c6e632c2c6a39b8ac9293521ed82c309cdcf3402a0a88107b62590d74e8947958f625c3de20 gobuster-3.1.0.tar.gz +" diff --git a/testing/golangci-lint/APKBUILD b/testing/golangci-lint/APKBUILD index 52886be4d19..e94cd1f5b07 100644 --- a/testing/golangci-lint/APKBUILD +++ b/testing/golangci-lint/APKBUILD @@ -14,6 +14,10 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/golangci/golangci-lint/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { local goldflags=" -X main.version=$pkgver diff --git a/testing/gomaildrop/APKBUILD b/testing/gomaildrop/APKBUILD index f78210743bc..f07f968f28d 100644 --- a/testing/gomaildrop/APKBUILD +++ b/testing/gomaildrop/APKBUILD @@ -11,8 +11,10 @@ makedepends="go redo gettext" source="https://gitlab.alpinelinux.org/kdaudt/gomaildrop/-/archive/v$pkgver/gomaildrop-v$pkgver.tar.gz" builddir="$srcdir/$pkgname-v$pkgver" -export GOPATH="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw -mod=readonly" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { ./configure --prefix /usr @@ -24,7 +26,6 @@ check() { } package() { - cd "$builddir" DESTDIR="$pkgdir" redo install } diff --git a/testing/gopls/APKBUILD b/testing/gopls/APKBUILD index 9e69378f032..04f7fd9f7e3 100644 --- a/testing/gopls/APKBUILD +++ b/testing/gopls/APKBUILD @@ -12,17 +12,19 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/golang/tools/archive/gopls/v$pkgver.tar.gz" builddir="$srcdir/tools-$pkgname-v$pkgver/$pkgname" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + +build() { + go build -trimpath -o dist/gopls +} check() { cd test go test } -build() { - go build -trimpath -o dist/gopls -} - package() { install -Dm755 dist/gopls "$pkgdir"/usr/bin/gopls } diff --git a/testing/goreman/APKBUILD b/testing/goreman/APKBUILD index c51f552ad25..47973a385ff 100644 --- a/testing/goreman/APKBUILD +++ b/testing/goreman/APKBUILD @@ -12,6 +12,9 @@ source="https://github.com/mattn/goreman/archive/v$pkgver/goreman-$pkgver.tar.gz options="!check" # No test suite export GOFLAGS="$GOFLAGS -modcacherw -trimpath" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -o bin/goreman . diff --git a/testing/gortr/APKBUILD b/testing/gortr/APKBUILD index 6c04a08a111..d6d08cf2802 100644 --- a/testing/gortr/APKBUILD +++ b/testing/gortr/APKBUILD @@ -18,7 +18,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/cloudflare/gortr/archive/v$p $pkgname.confd " -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare @@ -55,6 +57,8 @@ package() { install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname } -sha512sums="02cd38da2af1af11a3384578c81cc07098b6e0a5abdf17cd70dcc7256c7a0ec687a60d590e7ce7a133faa28d0a768ef206c7a59672a10998e52b8a2dc2752a44 gortr-0.14.7.tar.gz +sha512sums=" +02cd38da2af1af11a3384578c81cc07098b6e0a5abdf17cd70dcc7256c7a0ec687a60d590e7ce7a133faa28d0a768ef206c7a59672a10998e52b8a2dc2752a44 gortr-0.14.7.tar.gz 62142d3faa1cb34b39c1e1eb9698feb81dc7c53b3b0db9607b0c8cc10f3b20affc45525641e70fbc0aa0515abd02a48fe7a8a05ea809315ad90f5e139df39801 gortr.initd -06d5a49b90584a53ed879c12fab2d5a6d3ca0c3d35cd71e2d213b1513bb5335c3f107fabdacb0ff29f301a51e875fb5358076cdc4a366d3e400b6910bfde1ec6 gortr.confd" +06d5a49b90584a53ed879c12fab2d5a6d3ca0c3d35cd71e2d213b1513bb5335c3f107fabdacb0ff29f301a51e875fb5358076cdc4a366d3e400b6910bfde1ec6 gortr.confd +" diff --git a/testing/gosu/APKBUILD b/testing/gosu/APKBUILD index a99f87ddbd5..5a29c51f571 100644 --- a/testing/gosu/APKBUILD +++ b/testing/gosu/APKBUILD @@ -21,6 +21,10 @@ source="https://github.com/tianon/gosu/archive/$_gosu_ver/$_gosu_src.tar.gz https://github.com/opencontainers/runc/archive/v$_runc_ver/$_runc_src.tar.gz" options="!check" # require docker to run tests +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + builddir="$srcdir"/$_gosu_repo prepare() { mkdir -p $_gosu_repo $_runc_repo @@ -34,7 +38,7 @@ build() { CGO_ENABLED=0 \ GOPATH="$startdir:$srcdir/$_runc_repo/Godeps/_workspace" \ GO111MODULE=off \ - go build -v -ldflags '-s -w' + go build -v } package() { diff --git a/testing/gron/APKBUILD b/testing/gron/APKBUILD index 48c4b18243f..13f61bc0e3d 100644 --- a/testing/gron/APKBUILD +++ b/testing/gron/APKBUILD @@ -10,9 +10,9 @@ license="MIT" makedepends="go>=1.11" source="gron-$pkgver.tar.gz::https://github.com/tomnomnom/gron/archive/v$pkgver.tar.gz" -export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" @@ -24,7 +24,7 @@ prepare() { } build() { - go build -v -ldflags "-s -w -X main.gronVersion=$pkgver" -o gron + go build -v -ldflags "-X main.gronVersion=$pkgver" -o gron } check() { diff --git a/testing/grype/APKBUILD b/testing/grype/APKBUILD index 1842740e4d8..15645262a29 100644 --- a/testing/grype/APKBUILD +++ b/testing/grype/APKBUILD @@ -18,9 +18,12 @@ source="https://github.com/anchore/grype/archive/v$pkgver/grype-$pkgver.tar.gz" options="!check" # tests need docker export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -ldflags " -X github.com/anchore/grype/internal/version.version=$pkgver diff --git a/testing/gum/APKBUILD b/testing/gum/APKBUILD index ad5610aff8b..74f2dcb52b1 100644 --- a/testing/gum/APKBUILD +++ b/testing/gum/APKBUILD @@ -17,6 +17,10 @@ subpackages=" makedepends="go" source="https://github.com/charmbracelet/gum/archive/v$pkgver/gum-v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build . ./gum man > gum.1 diff --git a/testing/gx-go/APKBUILD b/testing/gx-go/APKBUILD index 224f8467582..c9f17faaf27 100644 --- a/testing/gx-go/APKBUILD +++ b/testing/gx-go/APKBUILD @@ -17,6 +17,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/whyrusleeping/$pkgname/archi " builddir="$srcdir/src/github.com/whyrusleeping/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { export GOPATH="$srcdir" export GO111MODULE=off diff --git a/testing/gx/APKBUILD b/testing/gx/APKBUILD index 779bd970314..b0ecc8d44e2 100644 --- a/testing/gx/APKBUILD +++ b/testing/gx/APKBUILD @@ -16,6 +16,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/whyrusleeping/gx/archive/v$p " builddir="$srcdir/src/github.com/whyrusleeping/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { export GOPATH="$srcdir" diff --git a/testing/headscale/APKBUILD b/testing/headscale/APKBUILD index 31480f6be16..c51aa5853ef 100644 --- a/testing/headscale/APKBUILD +++ b/testing/headscale/APKBUILD @@ -17,6 +17,10 @@ source="https://github.com/juanfont/headscale/archive/v$pkgver/headscale-$pkgver fix-32bit.patch " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { default_prepare diff --git a/testing/helm/APKBUILD b/testing/helm/APKBUILD index 832a735119f..d5df1143068 100644 --- a/testing/helm/APKBUILD +++ b/testing/helm/APKBUILD @@ -23,9 +23,9 @@ case "$CARCH" in x86|armv7) options="$options !check" ;; esac -export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" export CGO_ENABLED=0 diff --git a/testing/helmfile/APKBUILD b/testing/helmfile/APKBUILD index b16ece27f08..ec152a338b5 100644 --- a/testing/helmfile/APKBUILD +++ b/testing/helmfile/APKBUILD @@ -16,6 +16,10 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/helmfile/helmfile/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o $pkgname -ldflags "-X github.com/helmfile/helmfile/pkg/app/version.Version=v$pkgver" } diff --git a/testing/heplify-server/APKBUILD b/testing/heplify-server/APKBUILD index d747f5f4633..3ea215d27bc 100644 --- a/testing/heplify-server/APKBUILD +++ b/testing/heplify-server/APKBUILD @@ -25,9 +25,9 @@ case $CARCH in esac -export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" diff --git a/testing/heplify/APKBUILD b/testing/heplify/APKBUILD index 22ac40bb0d2..29cd4385827 100644 --- a/testing/heplify/APKBUILD +++ b/testing/heplify/APKBUILD @@ -15,6 +15,10 @@ source="https://github.com/sipcapture/heplify/archive/$pkgver/heplify-$pkgver.ta # net required to download Go dependencies options="net" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make all } diff --git a/testing/hilbish/APKBUILD b/testing/hilbish/APKBUILD index 1fa65c18e46..e7a251e5c82 100644 --- a/testing/hilbish/APKBUILD +++ b/testing/hilbish/APKBUILD @@ -20,6 +20,10 @@ source=" " builddir="$srcdir/Hilbish-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o hilbish -ldflags "-X main.Version=$pkgver" } diff --git a/testing/hledger-timeclock/APKBUILD b/testing/hledger-timeclock/APKBUILD index b1b1838505f..321b31c8c6f 100644 --- a/testing/hledger-timeclock/APKBUILD +++ b/testing/hledger-timeclock/APKBUILD @@ -15,6 +15,10 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~dhruvin/hledger-timeclock/ar builddir="$srcdir/$pkgname-v$pkgver" options="!check" # no tests +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make all } diff --git a/testing/homer-app/APKBUILD b/testing/homer-app/APKBUILD index a961ed18d0e..c7fe9f36bf2 100644 --- a/testing/homer-app/APKBUILD +++ b/testing/homer-app/APKBUILD @@ -16,6 +16,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/homer-app/archive change-default-locations.patch " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make modules make all diff --git a/testing/hub/APKBUILD b/testing/hub/APKBUILD index ae2f630eb5c..1077778c54e 100644 --- a/testing/hub/APKBUILD +++ b/testing/hub/APKBUILD @@ -21,6 +21,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/github/hub/archive/v$pkgver. builddir="$srcdir/src/github.com/github/hub" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p "${builddir%/*}" mv $pkgname-$pkgver "$builddir" diff --git a/testing/ijq/APKBUILD b/testing/ijq/APKBUILD index 0a7f149a1a8..b4c54d00cb0 100644 --- a/testing/ijq/APKBUILD +++ b/testing/ijq/APKBUILD @@ -16,6 +16,10 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~gpanders/ijq/archive/v$pkgve " builddir="$srcdir/$pkgname-v$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/imgdiff/APKBUILD b/testing/imgdiff/APKBUILD index dc530e85791..397f014a114 100644 --- a/testing/imgdiff/APKBUILD +++ b/testing/imgdiff/APKBUILD @@ -12,6 +12,10 @@ subpackages="$pkgname-doc" makedepends="go" source="https://github.com/n7olkachev/imgdiff/archive/v$pkgver/imgdiff-v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o imgdiff cmd/main.go } diff --git a/testing/jackal/APKBUILD b/testing/jackal/APKBUILD index 6d881ff90b3..09473dffc80 100644 --- a/testing/jackal/APKBUILD +++ b/testing/jackal/APKBUILD @@ -21,6 +21,10 @@ source=" " options="!check" # checks require unpackaged external tools +export GOPATH="$srcdir/go" +export GOCACHE="$srcdir/go-build" +export GOTEMPDIR="$srcdir/go" + prepare() { default_prepare diff --git a/testing/jfrog-cli/APKBUILD b/testing/jfrog-cli/APKBUILD index 10b03095bdb..5bcf3f54c3d 100644 --- a/testing/jfrog-cli/APKBUILD +++ b/testing/jfrog-cli/APKBUILD @@ -12,8 +12,12 @@ replaces="jfrog-cli-go" provides="jfrog-cli-go=$pkgver-r$pkgrel" source="$pkgname-$pkgver.tar.gz::https://github.com/jfrog/jfrog-cli/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - go build -o bin/jfrog -ldflags '-w -extldflags "-static"' main.go + go build -o bin/jfrog main.go } package() { diff --git a/testing/judo/APKBUILD b/testing/judo/APKBUILD index bfbff53c86e..bed35a6c959 100644 --- a/testing/judo/APKBUILD +++ b/testing/judo/APKBUILD @@ -10,8 +10,10 @@ arch="all" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/rollcat/judo/archive/refs/tags/$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v . diff --git a/testing/k0sctl/APKBUILD b/testing/k0sctl/APKBUILD index 35d9a87af38..fe9386d1f16 100644 --- a/testing/k0sctl/APKBUILD +++ b/testing/k0sctl/APKBUILD @@ -15,6 +15,10 @@ subpackages=" source="https://github.com/k0sproject/k0sctl/archive/refs/tags/v$pkgver/k0sctl-$pkgver.tar.gz" builddir="$srcdir/k0sctl-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make diff --git a/testing/kapow/APKBUILD b/testing/kapow/APKBUILD index 245f7ed2706..b6407e801f3 100644 --- a/testing/kapow/APKBUILD +++ b/testing/kapow/APKBUILD @@ -10,6 +10,10 @@ makedepends="go" source="https://github.com/BBVA/kapow/archive/v$pkgver/kapow-$pkgver.tar.gz" builddir="$srcdir/kapow-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build } diff --git a/testing/keybase-client/APKBUILD b/testing/keybase-client/APKBUILD index 8ee6adf2339..b8933b9e420 100644 --- a/testing/keybase-client/APKBUILD +++ b/testing/keybase-client/APKBUILD @@ -13,6 +13,10 @@ options="!check" # need access to localhost:3000, which doesn't work with our in source="$pkgname-$pkgver.tar.gz::https://github.com/keybase/client/archive/v$pkgver.tar.gz" builddir="$srcdir/client-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { cd "$srcdir" export GOPATH="$PWD" diff --git a/testing/khinsider/APKBUILD b/testing/khinsider/APKBUILD index a496acaaf61..4a79e4fcfb5 100644 --- a/testing/khinsider/APKBUILD +++ b/testing/khinsider/APKBUILD @@ -12,6 +12,10 @@ source="https://github.com/marcus-crane/khinsider/archive/v$pkgver/khinsider-v$p builddir="$srcdir/khinsider-$pkgver" options="!check net" # No upstream tests +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { default_prepare go mod download diff --git a/testing/kind/APKBUILD b/testing/kind/APKBUILD index 2502eba1bb6..0122398f773 100644 --- a/testing/kind/APKBUILD +++ b/testing/kind/APKBUILD @@ -16,11 +16,13 @@ subpackages=" source="https://github.com/kubernetes-sigs/kind/archive/v$pkgver/kind-$pkgver.tar.gz" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - go build -ldflags "-s -w" + go build ./kind completion bash > $pkgname.bash ./kind completion fish > $pkgname.fish diff --git a/testing/kine/APKBUILD b/testing/kine/APKBUILD index 66b9795afe6..75dd9783072 100644 --- a/testing/kine/APKBUILD +++ b/testing/kine/APKBUILD @@ -12,8 +12,12 @@ options="!check" # no testsuite source="$pkgname-$pkgver.tar.gz::https://github.com/k3s-io/kine/archive/v$pkgver.tar.gz" provides="etcd-api" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - go build -v -ldflags="-w -s" . + go build -v . } package() { diff --git a/testing/ko/APKBUILD b/testing/ko/APKBUILD index 801b883f739..f61b36eeef3 100644 --- a/testing/ko/APKBUILD +++ b/testing/ko/APKBUILD @@ -14,6 +14,10 @@ subpackages=" " source="https://github.com/google/ko/archive/v$pkgver/ko-$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir build go build -o build/ "$builddir"/... diff --git a/testing/kompose/APKBUILD b/testing/kompose/APKBUILD index c9a971f44a4..2a6981d01fe 100644 --- a/testing/kompose/APKBUILD +++ b/testing/kompose/APKBUILD @@ -17,6 +17,10 @@ subpackages=" source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kompose/archive/v$pkgver.tar.gz" builddir="$srcdir/src/github.com/kubernetes/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p "$srcdir/src/github.com/kubernetes/" ln -sf "$srcdir/$pkgname-$pkgver" "$srcdir/src/github.com/kubernetes/$pkgname" diff --git a/testing/kopia/APKBUILD b/testing/kopia/APKBUILD index eb367f326dd..68d5a01591e 100644 --- a/testing/kopia/APKBUILD +++ b/testing/kopia/APKBUILD @@ -14,12 +14,14 @@ source="https://github.com/kopia/kopia/archive/v$pkgver/kopia-$pkgver.tar.gz skip-docker-tests.patch " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" export CGO_ENABLED=0 build() { - go build -ldflags "-s -w -X github.com/kopia/kopia/repo.BuildVersion=$pkgver" + go build -ldflags "-X github.com/kopia/kopia/repo.BuildVersion=$pkgver" ./kopia --completion-script-bash > $pkgname.bash ./kopia --completion-script-zsh > $pkgname.zsh diff --git a/testing/kops/APKBUILD b/testing/kops/APKBUILD index f72b56e8619..9c692a17f40 100644 --- a/testing/kops/APKBUILD +++ b/testing/kops/APKBUILD @@ -12,8 +12,10 @@ makedepends="go" options="net" source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kops/archive/v$pkgver.tar.gz" -export GOMODCACHE="$srcdir"/go export GOFLAGS="$GOFLAGS -modcacherw -mod=readonly" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare diff --git a/testing/kubectl-krew/APKBUILD b/testing/kubectl-krew/APKBUILD index 96640603d8c..5e350698ebb 100644 --- a/testing/kubectl-krew/APKBUILD +++ b/testing/kubectl-krew/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes-sigs/krew/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/krew-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { GOLDFLAGS=" -X sigs.k8s.io/krew/internal/version.gitCommit=AlpineLinux diff --git a/testing/kubefwd/APKBUILD b/testing/kubefwd/APKBUILD index d11824a6109..33963bbdfba 100644 --- a/testing/kubefwd/APKBUILD +++ b/testing/kubefwd/APKBUILD @@ -15,6 +15,10 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/txn2/kubefwd/archive/refs/tags/$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -tags netgo -o bin/$pkgname \ -ldflags "-X main.Version=$pkgver" \ diff --git a/testing/kubepug/APKBUILD b/testing/kubepug/APKBUILD index 981370de254..ace94d3846c 100644 --- a/testing/kubepug/APKBUILD +++ b/testing/kubepug/APKBUILD @@ -14,6 +14,10 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/rikatz/kubepug/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -ldflags "-X sigs.k8s.io/release-utils/version.gitVersion=v$pkgver" -o bin/$pkgname diff --git a/testing/kubergrunt/APKBUILD b/testing/kubergrunt/APKBUILD index 8022f6cc941..2a4ad9aa2af 100644 --- a/testing/kubergrunt/APKBUILD +++ b/testing/kubergrunt/APKBUILD @@ -10,6 +10,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/gruntwork-io/kubergrunt/archive/refs/tags/v$pkgver.tar.gz" options="!check" # Tests require a running Kubernetes cluster +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/$pkgname -ldflags "-X main.VERSION=v$pkgver" ./cmd } diff --git a/testing/kubernetes/APKBUILD b/testing/kubernetes/APKBUILD index 8418a8a416d..e2688cc3f3b 100644 --- a/testing/kubernetes/APKBUILD +++ b/testing/kubernetes/APKBUILD @@ -68,10 +68,14 @@ _agent="kubelet" _cli="kubeadm kubectl" _services="kube-apiserver kube-controller-manager kube-proxy kube-scheduler" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make generated_files for _pkgs in $_agent $_cli $_services ; do - make GOFLAGS="-buildmode=pie -v -tags=providerless" GOLDFLAGS="-extldflags=-static -w -s" WHAT=cmd/$_pkgs + make GOFLAGS="-buildmode=pie -v -tags=providerless" GOLDFLAGS="-extldflags=-static" WHAT=cmd/$_pkgs done } diff --git a/testing/kubeseal/APKBUILD b/testing/kubeseal/APKBUILD index 55b7fb11bdd..17061a6562d 100644 --- a/testing/kubeseal/APKBUILD +++ b/testing/kubeseal/APKBUILD @@ -10,6 +10,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/bitnami-labs/sealed-secrets/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/sealed-secrets-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v \ -o bin/$pkgname \ diff --git a/testing/kustomize/APKBUILD b/testing/kustomize/APKBUILD index c980126c30f..277d16a5b76 100644 --- a/testing/kustomize/APKBUILD +++ b/testing/kustomize/APKBUILD @@ -17,13 +17,15 @@ source="https://github.com/kubernetes-sigs/kustomize/archive/kustomize/v$pkgver/ builddir="$srcdir/kustomize-kustomize-v$pkgver/kustomize" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { local builddate="$(date -u "+%Y-%m-%dT%TZ" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})" - go build -ldflags="-s -w + go build -ldflags=" -X sigs.k8s.io/kustomize/api/provenance.version=$pkgver -X sigs.k8s.io/kustomize/api/provenance.buildDate=$builddate " diff --git a/testing/lazydocker/APKBUILD b/testing/lazydocker/APKBUILD index 0dca8738f4c..d89020109ba 100644 --- a/testing/lazydocker/APKBUILD +++ b/testing/lazydocker/APKBUILD @@ -11,17 +11,22 @@ makedepends="go" options="chmod-clean !check" # checks failing, reported upstream: https://github.com/jesseduffield/lazydocker/issues/236 source="$pkgname-$pkgver.tar.gz::https://github.com/jesseduffield/lazydocker/archive/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - GOPATH="$srcdir" go build + go build } check() { - GOPATH="$srcdir" go test ./... + go test ./... } package() { install -Dm755 $pkgname "$pkgdir"/usr/bin/lazydocker } - -sha512sums="59198b2f8e7c7c0686d4b1ddef3f585411e672055ede5f6a279c28cd8d94ba619078658d5b8f6c43915667f8180feb7d9407ea1003b3bc3b642e1502a165c78e lazydocker-0.12.tar.gz" +sha512sums=" +59198b2f8e7c7c0686d4b1ddef3f585411e672055ede5f6a279c28cd8d94ba619078658d5b8f6c43915667f8180feb7d9407ea1003b3bc3b642e1502a165c78e lazydocker-0.12.tar.gz +" diff --git a/testing/litespeed/APKBUILD b/testing/litespeed/APKBUILD index 530989c72cf..82822a4b1de 100644 --- a/testing/litespeed/APKBUILD +++ b/testing/litespeed/APKBUILD @@ -31,6 +31,10 @@ source="https://openlitespeed.org/packages/openlitespeed-$pkgver.src.tgz " builddir="$srcdir/openlitespeed-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { default_prepare diff --git a/testing/loki/APKBUILD b/testing/loki/APKBUILD index f2f595d7d43..a0683f78c59 100644 --- a/testing/loki/APKBUILD +++ b/testing/loki/APKBUILD @@ -19,9 +19,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/grafana/loki/archive/refs/ta go-1.18-sigsegv.patch " -export GOPATH="$srcdir" -export GOCACHE="$srcdir" +export GOCACHE="$srcdir/go-cache" export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw -trimpath" export CGO_ENABLED=0 diff --git a/testing/lxd-feature/APKBUILD b/testing/lxd-feature/APKBUILD index b7bbcf89469..8a1a8e57fbd 100644 --- a/testing/lxd-feature/APKBUILD +++ b/testing/lxd-feature/APKBUILD @@ -73,6 +73,10 @@ ldpath="/usr/lib/lxd" sonameprefix="$pkgname:" builddir="$srcdir/lxd-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { export GOPATH="$builddir/_dist" export GOFLAGS="$GOFLAGS -buildmode=pie -trimpath" diff --git a/testing/mabel/APKBUILD b/testing/mabel/APKBUILD index 3437e501c6c..6ec367cd7aa 100644 --- a/testing/mabel/APKBUILD +++ b/testing/mabel/APKBUILD @@ -11,8 +11,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/smmr-software/mabel/archive/ anacrolix-mmsg-support-riscv64.patch.noauto " -export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare diff --git a/testing/maddy/APKBUILD b/testing/maddy/APKBUILD index 90277e4028a..fee6a656e2f 100644 --- a/testing/maddy/APKBUILD +++ b/testing/maddy/APKBUILD @@ -18,10 +18,12 @@ source="https://github.com/foxcpp/maddy/archive/v$pkgver/maddy-$pkgver.tar.gz " export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw -tags=libsqlite3" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - ldflags="-extldflags \"$LDFLAGS\" -s -w + ldflags="-extldflags \"$LDFLAGS\" -X github.com/foxcpp/maddy.Version=$pkgver " diff --git a/testing/madonctl/APKBUILD b/testing/madonctl/APKBUILD index ae701df7ead..c395b872a48 100644 --- a/testing/madonctl/APKBUILD +++ b/testing/madonctl/APKBUILD @@ -13,6 +13,10 @@ source="madonctl-$_gitrev.tar.gz::https://github.com/McKael/madonctl/archive/$_g options="!check" # No tests builddir="$srcdir/$pkgname-$_gitrev" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build } diff --git a/testing/mage/APKBUILD b/testing/mage/APKBUILD index df8561a8704..7f5b0e1d81a 100644 --- a/testing/mage/APKBUILD +++ b/testing/mage/APKBUILD @@ -13,7 +13,9 @@ depends="go" options="chmod-clean" source="https://github.com/magefile/mage/archive/v$pkgver/mage-$pkgver.tar.gz" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -o bin/mage -ldflags=" diff --git a/testing/mailsec-check/APKBUILD b/testing/mailsec-check/APKBUILD index 862e7dd80d3..575d56280b9 100644 --- a/testing/mailsec-check/APKBUILD +++ b/testing/mailsec-check/APKBUILD @@ -15,8 +15,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/foxcpp/mailsec-check/archive builddir="$srcdir/$pkgname-$_commit" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build diff --git a/testing/mautrix-whatsapp/APKBUILD b/testing/mautrix-whatsapp/APKBUILD index 6cf58f1ce25..b5fc796c0f4 100644 --- a/testing/mautrix-whatsapp/APKBUILD +++ b/testing/mautrix-whatsapp/APKBUILD @@ -18,6 +18,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/mautrix/whatsapp/archive/v$p " builddir="$srcdir"/whatsapp-$pkgver +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build } diff --git a/testing/metricbeat/APKBUILD b/testing/metricbeat/APKBUILD index abb7eb8a507..8648a215b6f 100644 --- a/testing/metricbeat/APKBUILD +++ b/testing/metricbeat/APKBUILD @@ -19,9 +19,9 @@ source="beats-$pkgver.tar.gz::https://github.com/elastic/beats/archive/v$pkgver. builddir="$srcdir/beats-$pkgver" -export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" diff --git a/testing/minikube/APKBUILD b/testing/minikube/APKBUILD index 900a4088496..09938f12a09 100644 --- a/testing/minikube/APKBUILD +++ b/testing/minikube/APKBUILD @@ -21,6 +21,9 @@ source="https://github.com/kubernetes/minikube/archive/v$pkgver/minikube-$pkgver " export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare diff --git a/testing/minio-client/APKBUILD b/testing/minio-client/APKBUILD index dadd2ba93f4..6f300aefc61 100644 --- a/testing/minio-client/APKBUILD +++ b/testing/minio-client/APKBUILD @@ -21,8 +21,10 @@ source="$_pkgname-$pkgver.tar.gz::https://github.com/minio/$_pkgname/archive/$_p builddir="$srcdir/$_pkgname-$_pkgver" options="net" -export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { local _ldflags=$(go run buildscripts/gen-ldflags.go 2> /dev/null) diff --git a/testing/mkcert/APKBUILD b/testing/mkcert/APKBUILD index 12bbc1db669..31a39c1b84e 100644 --- a/testing/mkcert/APKBUILD +++ b/testing/mkcert/APKBUILD @@ -10,6 +10,10 @@ makedepends="go nss-tools" options="chmod-clean" source="$pkgname-$pkgver.tar.gz::https://github.com/FiloSottile/mkcert/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go generate go build -ldflags "-X main.Version=$pkgver" -v diff --git a/testing/mqtt2prometheus/APKBUILD b/testing/mqtt2prometheus/APKBUILD index f1bc56a073b..505d3c95c1f 100644 --- a/testing/mqtt2prometheus/APKBUILD +++ b/testing/mqtt2prometheus/APKBUILD @@ -10,6 +10,10 @@ license="MIT" makedepends="go" source="https://github.com/hikhvar/mqtt2prometheus/archive/v$pkgver/mqtt2prometheus-$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o mqtt2prometheus ./cmd } diff --git a/testing/mtg/APKBUILD b/testing/mtg/APKBUILD index d2bb9cc8320..a6a7f0f4413 100644 --- a/testing/mtg/APKBUILD +++ b/testing/mtg/APKBUILD @@ -18,10 +18,11 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/9seconds/mtg/archive/refs/ta skip-network-tests.patch increase-test-timeout.patch " -export GOPATH=$srcdir/go -export GOCACHE=$srcdir/go-build -export GOTMPDIR=$srcdir + export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v . diff --git a/testing/mynewt-newt/APKBUILD b/testing/mynewt-newt/APKBUILD index ba86b888370..c2366bceaf0 100644 --- a/testing/mynewt-newt/APKBUILD +++ b/testing/mynewt-newt/APKBUILD @@ -15,6 +15,10 @@ subpackages="$pkgname-doc" source="mynewt-newt-$pkgver.tar.gz::https://github.com/apache/mynewt-newt/archive/mynewt_${_ver}.tar.gz" builddir="$srcdir/mynewt-newt-mynewt_${_ver}" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { ./build.sh } diff --git a/testing/nats-server/APKBUILD b/testing/nats-server/APKBUILD index 6ad15600e62..3250495a677 100644 --- a/testing/nats-server/APKBUILD +++ b/testing/nats-server/APKBUILD @@ -11,9 +11,10 @@ license="Apache-2.0" makedepends="go" source="https://github.com/nats-io/nats-server/archive/v$pkgver/nats-server-$pkgver.tar.gz" -export GOPATH="$srcdir" -export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build diff --git a/testing/navidrome/APKBUILD b/testing/navidrome/APKBUILD index 13b3701b6db..57576236e32 100644 --- a/testing/navidrome/APKBUILD +++ b/testing/navidrome/APKBUILD @@ -27,7 +27,9 @@ source=" options="$options chmod-clean" export GOFLAGS="$GOFLAGS -modcacherw -trimpath" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" # secfixes: # 0.47.5-r0: diff --git a/testing/nerdctl/APKBUILD b/testing/nerdctl/APKBUILD index 4a0216805aa..9a5d6a8f240 100644 --- a/testing/nerdctl/APKBUILD +++ b/testing/nerdctl/APKBUILD @@ -14,7 +14,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/containerd/nerdctl/archive/r options="!check" # a lot fail export GOFLAGS="$GOFLAGS -modcacherw -trimpath" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -ldflags "-X github.com/containerd/nerdctl/pkg/version.Version=$pkgver" \ diff --git a/testing/netdata-go-plugins/APKBUILD b/testing/netdata-go-plugins/APKBUILD index 631ad89236a..39003090cac 100644 --- a/testing/netdata-go-plugins/APKBUILD +++ b/testing/netdata-go-plugins/APKBUILD @@ -12,8 +12,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/netdata/go.d.plugin/tar.gz/refs/tags/v$pkgver" builddir="$srcdir/go.d.plugin-$pkgver" -export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v -o go.d.plugin ./cmd/godplugin diff --git a/testing/nsq/APKBUILD b/testing/nsq/APKBUILD index 2cf2b42018b..4f8e3568737 100644 --- a/testing/nsq/APKBUILD +++ b/testing/nsq/APKBUILD @@ -12,9 +12,12 @@ options="chmod-clean" source="$pkgname-$pkgver.tar.gz::https://github.com/nsqio/nsq/archive/v$pkgver.tar.gz glibc-test.patch" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go mod download - export GOPATH="$srcdir/go" make } @@ -30,5 +33,7 @@ package() { } -sha512sums="01ef18775a3ee6688fed2c7b85f35099d6b01e9a2f10813b3baa94a6c5a2974abf70ee8d2c6d5aebb6952825ab0a2f986838d3dc35e7b5e06bef3ffa8c0e7c15 nsq-1.2.0.tar.gz -e0fa26f0a7b412dc4b3e56cb1d557183d86e751862b86f9192fca153232e856713c2cf76f1f063b7595912e4164c7b6e1f33cfec6fab9c7e8e96297646230a22 glibc-test.patch" +sha512sums=" +01ef18775a3ee6688fed2c7b85f35099d6b01e9a2f10813b3baa94a6c5a2974abf70ee8d2c6d5aebb6952825ab0a2f986838d3dc35e7b5e06bef3ffa8c0e7c15 nsq-1.2.0.tar.gz +e0fa26f0a7b412dc4b3e56cb1d557183d86e751862b86f9192fca153232e856713c2cf76f1f063b7595912e4164c7b6e1f33cfec6fab9c7e8e96297646230a22 glibc-test.patch +" diff --git a/testing/nwg-bar/APKBUILD b/testing/nwg-bar/APKBUILD index 85f65c10b52..a7a40880cbc 100644 --- a/testing/nwg-bar/APKBUILD +++ b/testing/nwg-bar/APKBUILD @@ -11,6 +11,10 @@ makedepends="go glib-dev cairo-dev gtk+3.0-dev gtk-layer-shell-dev" source="https://github.com/nwg-piotr/nwg-bar/archive/v$pkgver/nwg-bar-v$pkgver.tar.gz" options="!check net" # no upstream tests +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -o bin/nwg-bar . } diff --git a/testing/obfs4proxy/APKBUILD b/testing/obfs4proxy/APKBUILD index c394b189c4e..a75518ef651 100644 --- a/testing/obfs4proxy/APKBUILD +++ b/testing/obfs4proxy/APKBUILD @@ -12,7 +12,9 @@ options="!strip chmod-clean" source="$pkgname-$pkgver.tar.gz::https://github.com/Yawning/obfs4/archive/obfs4proxy-$pkgver.tar.gz" builddir="$srcdir"/obfs4-$pkgname-$pkgver -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v -o ./$pkgname-executable ./$pkgname diff --git a/testing/openrc-exporter/APKBUILD b/testing/openrc-exporter/APKBUILD index 100ff58573e..5987aea0a0e 100644 --- a/testing/openrc-exporter/APKBUILD +++ b/testing/openrc-exporter/APKBUILD @@ -19,6 +19,10 @@ source=" " options="!check" # No tests yet +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { CGO_ENABLED=1 go build -v -ldflags "-X main.version=$pkgver" \ -trimpath ./cmd/openrc-exporter diff --git a/testing/podman-tui/APKBUILD b/testing/podman-tui/APKBUILD index 59869725da4..93d21b755ef 100644 --- a/testing/podman-tui/APKBUILD +++ b/testing/podman-tui/APKBUILD @@ -12,8 +12,10 @@ depends="podman" options="!check" source="$pkgname-$pkgver.tar.gz::https://github.com/containers/podman-tui/archive/v$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v . diff --git a/testing/pomo/APKBUILD b/testing/pomo/APKBUILD index 788a6847230..f8c3f4f391a 100644 --- a/testing/pomo/APKBUILD +++ b/testing/pomo/APKBUILD @@ -12,7 +12,9 @@ subpackages="$pkgname-doc" source="https://github.com/kevinschoon/pomo/archive/$pkgver/pomo-$pkgver.tar.gz" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw -tags=libsqlite3" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build \ diff --git a/testing/popeye/APKBUILD b/testing/popeye/APKBUILD index 6868b84ef1d..8e9eda7f033 100644 --- a/testing/popeye/APKBUILD +++ b/testing/popeye/APKBUILD @@ -10,6 +10,10 @@ license="Apache-2.0" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/derailed/popeye/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { GOLDFLAGS=" -X github.com/derailed/popeye/cmd.version=v$pkgver diff --git a/testing/prometheus-json-exporter/APKBUILD b/testing/prometheus-json-exporter/APKBUILD index 66a3b54cbb9..5848c0d00eb 100644 --- a/testing/prometheus-json-exporter/APKBUILD +++ b/testing/prometheus-json-exporter/APKBUILD @@ -17,7 +17,11 @@ source="$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz 0001-disable-go-race-detector.patch " builddir="$srcdir/$_pkgname-$pkgver" + export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make build diff --git a/testing/prometheus-openrc-exporter/APKBUILD b/testing/prometheus-openrc-exporter/APKBUILD index fee20e33332..af428e23dea 100644 --- a/testing/prometheus-openrc-exporter/APKBUILD +++ b/testing/prometheus-openrc-exporter/APKBUILD @@ -17,6 +17,10 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~tomleb/$_pkgname/archive/$pk options="!check" builddir="$srcdir/$_pkgname-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/prometheus-postgres-exporter/APKBUILD b/testing/prometheus-postgres-exporter/APKBUILD index aa64449c2e7..0fafe4f5b92 100644 --- a/testing/prometheus-postgres-exporter/APKBUILD +++ b/testing/prometheus-postgres-exporter/APKBUILD @@ -16,7 +16,11 @@ source="$_pkgname-$pkgver.tar.gz::https://github.com/prometheus-community/postgr postgres-exporter.confd disable-go-race-detector.patch" builddir="$srcdir/$_pkgname-$pkgver" + export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make build diff --git a/testing/prometheus-rethinkdb-exporter/APKBUILD b/testing/prometheus-rethinkdb-exporter/APKBUILD index fe1cde01b4f..5ca20813359 100644 --- a/testing/prometheus-rethinkdb-exporter/APKBUILD +++ b/testing/prometheus-rethinkdb-exporter/APKBUILD @@ -15,6 +15,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/rethinkdb/prometheus-exporte " builddir="$srcdir/prometheus-exporter-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/prometheus-unbound-exporter/APKBUILD b/testing/prometheus-unbound-exporter/APKBUILD index a3dbd2dd498..a3ae9604f1f 100644 --- a/testing/prometheus-unbound-exporter/APKBUILD +++ b/testing/prometheus-unbound-exporter/APKBUILD @@ -17,12 +17,16 @@ source="$_pkgname-$pkgver.tar.gz::https://github.com/letsencrypt/unbound_exporte 0001-dont-authenticate-by-default.patch " builddir="$srcdir/$_pkgname-$pkgver" -export GOFLAGS="$GOFLAGS -modcacherw" options="!check" # no test suite available +export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ - -ldflags "-s -w -X github.com/prometheus/common/version.Version=$pkgver" \ + -ldflags "-X github.com/prometheus/common/version.Version=$pkgver" \ -v -o unbound_exporter } diff --git a/testing/pulumi/APKBUILD b/testing/pulumi/APKBUILD index 371f6784282..306ca256f78 100644 --- a/testing/pulumi/APKBUILD +++ b/testing/pulumi/APKBUILD @@ -15,6 +15,11 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/pulumi/pulumi/archive/v$pkgv " builddir="$srcdir/github.com/pulumi/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -modcacherw" + prepare() { mkdir -p ${builddir%/*} mv $srcdir/$pkgname-$pkgver "$builddir"/ @@ -23,7 +28,6 @@ prepare() { } build() { - export GOFLAGS="$GOFLAGS -modcacherw" PULUMI_VERSION="v$pkgver" PULUMI_ROOT="$srcdir"/opt GOPATH="$srcdir" make install_plugin_all } diff --git a/testing/rancher-cli/APKBUILD b/testing/rancher-cli/APKBUILD index 8e6fac7ac57..0df07f978d6 100644 --- a/testing/rancher-cli/APKBUILD +++ b/testing/rancher-cli/APKBUILD @@ -10,6 +10,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/cli/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/cli-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/rancher -ldflags "-X main.VERSION=v$pkgver" } diff --git a/testing/reg/APKBUILD b/testing/reg/APKBUILD index 1b51dd7f057..cf27104e9db 100644 --- a/testing/reg/APKBUILD +++ b/testing/reg/APKBUILD @@ -11,11 +11,14 @@ makedepends="go" source="https://github.com/genuinetools/reg/archive/v$pkgver/reg-$pkgver.tar.gz" options="chmod-clean" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ -trimpath \ -ldflags " - -s -w -X github.com/genuinetools/reg/version.GITCOMMIT=v$pkgver -X github.com/genuinetools/reg/version.VERSION=$pkgver-r$pkgrel " \ diff --git a/testing/rke/APKBUILD b/testing/rke/APKBUILD index 1800eb62a16..2ccc689a3ab 100644 --- a/testing/rke/APKBUILD +++ b/testing/rke/APKBUILD @@ -16,6 +16,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/rke/archive/v$pkgver # 1.3.2-r0: # - CVE-2021-25742 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -ldflags "-X main.VERSION=$pkgver" } diff --git a/testing/rootlesskit/APKBUILD b/testing/rootlesskit/APKBUILD index 9cca0f388f1..b9416ff028a 100644 --- a/testing/rootlesskit/APKBUILD +++ b/testing/rootlesskit/APKBUILD @@ -14,6 +14,10 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/rootless-containers/rootlesskit/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { mkdir -v build go build -v \ diff --git a/testing/rqlite/APKBUILD b/testing/rqlite/APKBUILD index 828d27f7339..c5f985eaff9 100644 --- a/testing/rqlite/APKBUILD +++ b/testing/rqlite/APKBUILD @@ -18,6 +18,9 @@ subpackages=" source="$pkgname-$pkgver.tar.gz::https://github.com/rqlite/rqlite/archive/refs/tags/v$pkgver.tar.gz" export GOFLAGS="$GOFLAGS -modcacherw -trimpath" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build ./cmd/rqbench diff --git a/testing/ruuvi-prometheus/APKBUILD b/testing/ruuvi-prometheus/APKBUILD index d515e8d3fb1..4800af3eff1 100644 --- a/testing/ruuvi-prometheus/APKBUILD +++ b/testing/ruuvi-prometheus/APKBUILD @@ -16,8 +16,12 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/joneskoo/ruuvi-prometheus/ar ruuvi-prometheus.initd " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - go build -ldflags="-s -w -X main.version=$pkgver" + go build -ldflags="-X main.version=$pkgver" } package() { diff --git a/testing/satellite/APKBUILD b/testing/satellite/APKBUILD index 6731c5f85cb..75163998b2d 100644 --- a/testing/satellite/APKBUILD +++ b/testing/satellite/APKBUILD @@ -17,6 +17,10 @@ source=" pkggroups="satellite" builddir="$srcdir/$pkgname-v$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } @@ -36,6 +40,7 @@ package() { install -Dm644 doc/satellite.1 "$pkgdir"/usr/share/man/man1/satellite.1 install -Dm644 doc/satellite.toml.5 "$pkgdir"/usr/share/man/man5/satellite.toml.5 } + sha512sums="2b14e6bd7a1b33a0b4cf402e64585f9f87d2491709bd2f383ec0777b24a372fa7360ca7da96d21e61790095554c8029b07cdddc7a23688465ee77f7854beea48 satellite-1.0.0.tar.gz dcf84f7f09651426189280df73ce683b5a88bc40764e1ae5e0993fe2d9a796e36437c5f064fae120d749f8fd0151ef11296210556408a04441fc01e571f8f6cb satellite.initd f20f287640743ede9139a12fb7cbbcc9f2f51bc179322e04253e236daf55090aa043e9e01ec7f29cadc965cdb73bbaa86080072840913c88503138df8a04e443 satellite.confd" diff --git a/testing/scalingo/APKBUILD b/testing/scalingo/APKBUILD index b5d2dda8de7..74b5923e5a1 100644 --- a/testing/scalingo/APKBUILD +++ b/testing/scalingo/APKBUILD @@ -12,10 +12,12 @@ source="https://github.com/Scalingo/cli/archive/$pkgver/cli-$pkgver.tar.gz" options="chmod-clean" builddir="$srcdir/cli-$pkgver" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - go build -trimpath -ldflags "-s -w" -o bin/scalingo ./scalingo + go build -trimpath -o bin/scalingo ./scalingo } check() { diff --git a/testing/seaweedfs/APKBUILD b/testing/seaweedfs/APKBUILD index 966df4a4609..015e017652d 100644 --- a/testing/seaweedfs/APKBUILD +++ b/testing/seaweedfs/APKBUILD @@ -16,14 +16,14 @@ source=" " export GO111MODULE=on -export GOPATH="$srcdir" export CGO_ENABLED=1 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { GO_LDFLAGS=" - -w -s - -extldflags - -static + -extldflags \"$LDFLAGS\" -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=AlpineLinux " # build for large disk support diff --git a/testing/secsipidx/APKBUILD b/testing/secsipidx/APKBUILD index e7bf9c260b8..b731f0ac829 100644 --- a/testing/secsipidx/APKBUILD +++ b/testing/secsipidx/APKBUILD @@ -12,9 +12,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/asipto/secsipidx/archive/v1. go.sum " -export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" diff --git a/testing/senpai/APKBUILD b/testing/senpai/APKBUILD index 602c2b6d63e..44ed81483fa 100644 --- a/testing/senpai/APKBUILD +++ b/testing/senpai/APKBUILD @@ -13,6 +13,10 @@ subpackages="$pkgname-doc" source="https://git.sr.ht/~taiite/senpai/archive/$_commit.tar.gz" builddir="$srcdir/$pkgname-$_commit" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make GOFLAGS="$GOFLAGS" } diff --git a/testing/singularity/APKBUILD b/testing/singularity/APKBUILD index 3ccd7b4cd87..2198c2bfc95 100644 --- a/testing/singularity/APKBUILD +++ b/testing/singularity/APKBUILD @@ -41,8 +41,10 @@ source="https://github.com/apptainer/singularity/releases/download/v$pkgver/sing # 3.5.2-r0: # - CVE-2019-19724 -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -modcacherw -trimpath" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" prepare() { default_prepare diff --git a/testing/sipexer/APKBUILD b/testing/sipexer/APKBUILD index d0897648a9e..0d14778a020 100644 --- a/testing/sipexer/APKBUILD +++ b/testing/sipexer/APKBUILD @@ -10,10 +10,11 @@ license="GPL-3.0" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/miconda/sipexer/archive/refs/tags/v$pkgver.tar.gz" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - go get ./... go build -v -o bin/ ./... } diff --git a/testing/slides/APKBUILD b/testing/slides/APKBUILD index 93cf10acc06..d1ac23bbcba 100644 --- a/testing/slides/APKBUILD +++ b/testing/slides/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" checkdepends="bash" source="https://github.com/maaslalani/slides/archive/v$pkgver/slides-v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build } diff --git a/testing/soju/APKBUILD b/testing/soju/APKBUILD index 098b1a8a51f..21e1e2e2679 100644 --- a/testing/soju/APKBUILD +++ b/testing/soju/APKBUILD @@ -21,7 +21,9 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/soju/archive/v$pkgv builddir="$srcdir/$pkgname-v$pkgver" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw -tags=libsqlite3" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make GOFLAGS="$GOFLAGS" diff --git a/testing/sops/APKBUILD b/testing/sops/APKBUILD index 3255cf234a6..db2a5b1ee09 100644 --- a/testing/sops/APKBUILD +++ b/testing/sops/APKBUILD @@ -16,9 +16,11 @@ source="https://github.com/mozilla/sops/archive/v$pkgver/sops-$pkgver.tar.gz builddir="$srcdir/sops-$pkgver" options="net" # for downloading Go modules -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -modcacherw" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v ./cmd/sops diff --git a/testing/sos/APKBUILD b/testing/sos/APKBUILD index aff0ce84d6c..5ee379e61fa 100644 --- a/testing/sos/APKBUILD +++ b/testing/sos/APKBUILD @@ -14,12 +14,14 @@ source="sos-$pkgver.tar.gz::https://github.com/skx/sos/archive/release-$pkgver.t " builddir="$srcdir/sos-release-$pkgver" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v \ -trimpath \ - -ldflags="-s -w -X main.version=$pkgver" \ + -ldflags="-X main.version=$pkgver" \ -o ./bin/sos } diff --git a/testing/speedtest-go/APKBUILD b/testing/speedtest-go/APKBUILD index b4f618d3775..b99abf35137 100644 --- a/testing/speedtest-go/APKBUILD +++ b/testing/speedtest-go/APKBUILD @@ -14,8 +14,12 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/librespeed/speedtest-go/arch speedtest-go.initd settings-change.patch" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { - go build -ldflags "-w -s" -trimpath -o speedtest main.go + go build -trimpath -o speedtest main.go } package() { diff --git a/testing/speedtest_exporter/APKBUILD b/testing/speedtest_exporter/APKBUILD index fa427ab7050..24a5c5200e3 100644 --- a/testing/speedtest_exporter/APKBUILD +++ b/testing/speedtest_exporter/APKBUILD @@ -21,6 +21,10 @@ source=" 0001-Fix-log.Infof-format-test-error.patch " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build } @@ -37,6 +41,7 @@ package() { install -Dm644 "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname } + sha512sums=" cb6073ca622e8df2b8436a2e30af2c9c7c99be6d950d4383de014c000e279a1ea0394bed3097754f24923859bbc2d5ebf20787eb90417c15aad35a0b88b64161 speedtest_exporter-0.3.1.tar.gz 29fa32f35accbc8f26864258c957e1dbaf03e54b68c2361ba2c664fca65de8cfeac971ed96e48b0d556611f7af041b1f4711a36e189a3e746fc2a22cecece2fb speedtest_exporter.initd diff --git a/testing/ssh-cert-authority/APKBUILD b/testing/ssh-cert-authority/APKBUILD index 987b83e5848..d0029fe27a0 100644 --- a/testing/ssh-cert-authority/APKBUILD +++ b/testing/ssh-cert-authority/APKBUILD @@ -12,6 +12,10 @@ makedepends="go" options="net" source="$pkgname-$pkgver.tar.gz::https://github.com/cloudtools/ssh-cert-authority/archive/$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { local pkg=github.com/cloudtools/ssh-cert-authority diff --git a/testing/step-certificates/APKBUILD b/testing/step-certificates/APKBUILD index e10f408d1be..794c5b4dc4a 100644 --- a/testing/step-certificates/APKBUILD +++ b/testing/step-certificates/APKBUILD @@ -32,6 +32,10 @@ source=" " builddir="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make simple } diff --git a/testing/stern/APKBUILD b/testing/stern/APKBUILD index 541573badc8..dc4098288d9 100644 --- a/testing/stern/APKBUILD +++ b/testing/stern/APKBUILD @@ -15,6 +15,10 @@ subpackages=" " source="$pkgname-$pkgver.tar.gz::https://github.com/stern/stern/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { GOLDFLAGS=" -X github.com/stern/stern/cmd.version=$pkgver diff --git a/testing/syft/APKBUILD b/testing/syft/APKBUILD index 04cdc00c783..bcede802fd8 100644 --- a/testing/syft/APKBUILD +++ b/testing/syft/APKBUILD @@ -12,8 +12,10 @@ source="https://github.com/anchore/syft/archive/v$pkgver/syft-$pkgver.tar.gz" options="!check" # tests need docker export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -ldflags " diff --git a/testing/tangctl/APKBUILD b/testing/tangctl/APKBUILD index dbbaf0abf51..72a8637a326 100644 --- a/testing/tangctl/APKBUILD +++ b/testing/tangctl/APKBUILD @@ -23,6 +23,9 @@ esac export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" export GOPATH="$srcdir" export CGO_ENABLED=0 +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build ./cmd/tangctl diff --git a/testing/taskcafe/APKBUILD b/testing/taskcafe/APKBUILD index 6b31f31d32b..3847c661c00 100644 --- a/testing/taskcafe/APKBUILD +++ b/testing/taskcafe/APKBUILD @@ -22,6 +22,9 @@ options="!check chmod-clean net" export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { export NODE_OPTIONS=--openssl-legacy-provider diff --git a/testing/terraform-provider-libvirt/APKBUILD b/testing/terraform-provider-libvirt/APKBUILD index fc83afcb347..366eab42fdf 100644 --- a/testing/terraform-provider-libvirt/APKBUILD +++ b/testing/terraform-provider-libvirt/APKBUILD @@ -13,6 +13,10 @@ source="https://github.com/dmacvicar/terraform-provider-libvirt/archive/v$pkgver " options="!check" # testsuite takes too long to run and appears need a running libvirt +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { unset LDFLAGS make VERSION="$pkgver" diff --git a/testing/terragrunt/APKBUILD b/testing/terragrunt/APKBUILD index c328dd425b6..24acd16913e 100644 --- a/testing/terragrunt/APKBUILD +++ b/testing/terragrunt/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/gruntwork-io/terragrunt/archive/refs/tags/v$pkgver.tar.gz" options="!check" # Various tests need AWS or Google cloud credentials +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/$pkgname -ldflags "-X main.VERSION=v$pkgver" } diff --git a/testing/thanos/APKBUILD b/testing/thanos/APKBUILD index 26e8ca19fa5..462228ea733 100644 --- a/testing/thanos/APKBUILD +++ b/testing/thanos/APKBUILD @@ -16,10 +16,13 @@ source=" thanos.confd " +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -trimpath" + build() { - GOFLAGS="$GOFLAGS -trimpath" GOLDFLAGS=" - -extldflags '-static' -X github.com/prometheus/common/version.Version=$pkgver -X github.com/prometheus/common/version.Revision=AlpineLinux -X github.com/prometheus/common/version.Branch=master @@ -28,7 +31,6 @@ build() { " go build \ - $GOFLAGS \ -ldflags "$GOLDFLAGS" \ ./cmd/thanos } diff --git a/testing/ticker/APKBUILD b/testing/ticker/APKBUILD index ff4cb5060a3..b791298c07f 100644 --- a/testing/ticker/APKBUILD +++ b/testing/ticker/APKBUILD @@ -10,6 +10,10 @@ license="GPL-3.0-or-later" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/achannarasappa/ticker/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/$pkgname -ldflags "-X github.com/achannarasappa/ticker/cmd.Version=v$pkgver" } diff --git a/testing/tlsrouter/APKBUILD b/testing/tlsrouter/APKBUILD index 2d4e4249ac4..b41be36b827 100644 --- a/testing/tlsrouter/APKBUILD +++ b/testing/tlsrouter/APKBUILD @@ -20,10 +20,9 @@ source="tlsrouter-$pkgver.tar.gz::https://github.com/inetaf/tcpproxy/tarball/$_s builddir="$srcdir/inetaf-tcpproxy-$_short_commit/cmd/tlsrouter" export GOFLAGS="$GOFLAGS -modcacherw" - -prepare() { - default_prepare -} +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build . @@ -44,6 +43,7 @@ package() { setcap cap_net_bind_service=+ep "$pkgdir/usr/bin/$pkgname" } + sha512sums=" 5cecd7e8cf65d1aac29cf720ab6879df2a724b46b6ff8e042d79541b66d8ae415702a6c69670ea746883cf28a9ec51a8f67be15098a3d71654d9fdd3ba0a5150 tlsrouter-0_git20220202.tar.gz 495b26eaba88b57f4e363b7e89e302ba73c89a38f69c3c299ba4dd3531e5a2231c92b90c11d79a0199fbe602059c43ad52ae3d6cdfe532b350a884a90b21983e tlsrouter.initd diff --git a/testing/trivy/APKBUILD b/testing/trivy/APKBUILD index bc838a444ca..8d159b089f0 100644 --- a/testing/trivy/APKBUILD +++ b/testing/trivy/APKBUILD @@ -15,6 +15,10 @@ makedepends="btrfs-progs-dev go linux-headers lvm2-dev" source="https://github.com/aquasecurity/trivy/archive/v$pkgver/trivy-$pkgver.tar.gz" options="net !check" # needs tinygo to turn go into wasm for tests +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make build VERSION=$pkgver } diff --git a/testing/tty-proxy/APKBUILD b/testing/tty-proxy/APKBUILD index 49acf7e5510..032c0970ff2 100644 --- a/testing/tty-proxy/APKBUILD +++ b/testing/tty-proxy/APKBUILD @@ -11,10 +11,13 @@ makedepends="go" source="https://github.com/elisescu/tty-proxy/archive/v$pkgver/tty-proxy-$pkgver.tar.gz" options="chmod-clean !check" # no test suite +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ - -trimpath \ - -ldflags "-s -w" + -trimpath } package() { diff --git a/testing/tty-share/APKBUILD b/testing/tty-share/APKBUILD index 0dafcefdefd..bd1faa5c710 100644 --- a/testing/tty-share/APKBUILD +++ b/testing/tty-share/APKBUILD @@ -11,10 +11,13 @@ makedepends="go" source="https://github.com/elisescu/tty-share/archive/v$pkgver/tty-share-$pkgver.tar.gz" options="chmod-clean !check" # no test suite +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build \ - -trimpath \ - -ldflags "-s -w" + -trimpath } package() { diff --git a/testing/undock/APKBUILD b/testing/undock/APKBUILD index 4bf2a92a9dc..375ba93dff4 100644 --- a/testing/undock/APKBUILD +++ b/testing/undock/APKBUILD @@ -9,6 +9,10 @@ license="MIT" makedepends="go linux-headers gpgme-dev btrfs-progs-dev lvm2-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/crazy-max/undock/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { export _gotags="containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" go build -v -o bin/$pkgname \ diff --git a/testing/uni/APKBUILD b/testing/uni/APKBUILD index e42a7ee1e89..624a1209283 100644 --- a/testing/uni/APKBUILD +++ b/testing/uni/APKBUILD @@ -11,8 +11,10 @@ makedepends="go" options="!check" # no test files source="$pkgname-$pkgver.tar.gz::https://github.com/arp242/uni/archive/v$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { go build -v . diff --git a/testing/up/APKBUILD b/testing/up/APKBUILD index 5254c3b06b1..78ac99f580a 100644 --- a/testing/up/APKBUILD +++ b/testing/up/APKBUILD @@ -10,6 +10,10 @@ license="Apache-2.0" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/akavel/up/archive/refs/tags/v$pkgver.tar.gz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { go build -v -o bin/$pkgname } diff --git a/testing/wireguard-go/APKBUILD b/testing/wireguard-go/APKBUILD index fb1b4f3e081..7f4b01f527d 100644 --- a/testing/wireguard-go/APKBUILD +++ b/testing/wireguard-go/APKBUILD @@ -13,6 +13,10 @@ subpackages="$pkgname-doc" options="!check" source="https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-$pkgver.tar.xz" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make } diff --git a/testing/wl-gammarelay/APKBUILD b/testing/wl-gammarelay/APKBUILD index e9255166965..6d28cbb9fb9 100644 --- a/testing/wl-gammarelay/APKBUILD +++ b/testing/wl-gammarelay/APKBUILD @@ -12,7 +12,9 @@ source="https://github.com/jeremija/wl-gammarelay/archive/v$pkgver/wl-gammarelay options="!check" # no test suite export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { make -C protocol @@ -20,7 +22,7 @@ build() { } package() { - install -Dm755 wl-gammarelay "$pkgdir"/usr/bin/wl-gammarelay + install -Dm755 wl-gammarelay "$pkgdir"/usr/bin/wl-gammarelay } sha512sums=" diff --git a/testing/wormhole-william/APKBUILD b/testing/wormhole-william/APKBUILD index df2522e2a28..923c340a8d8 100644 --- a/testing/wormhole-william/APKBUILD +++ b/testing/wormhole-william/APKBUILD @@ -8,13 +8,15 @@ arch="all" url="https://github.com/psanford/wormhole-william" license="MIT" makedepends="go" -source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/psanford/wormhole-william/archive/v$pkgver.tar.gz" -export GOPATH="$srcdir" export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { - go build -ldflags="-s -w" -v . + go build -v . } check() { diff --git a/testing/wtfutil/APKBUILD b/testing/wtfutil/APKBUILD index 7e815ae177e..2cbf13931db 100644 --- a/testing/wtfutil/APKBUILD +++ b/testing/wtfutil/APKBUILD @@ -11,6 +11,10 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/wtfutil/wtf/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/wtf-$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + build() { make PREFIX=/usr } @@ -20,7 +24,7 @@ check() { } package() { - install -Dm755 bin/wtfutil $pkgdir/usr/bin/wtfutil + install -Dm755 bin/wtfutil "$pkgdir"/usr/bin/wtfutil } sha512sums=" diff --git a/testing/xmpp-dns/APKBUILD b/testing/xmpp-dns/APKBUILD index bec41be19ca..1969a8e046e 100644 --- a/testing/xmpp-dns/APKBUILD +++ b/testing/xmpp-dns/APKBUILD @@ -11,8 +11,12 @@ makedepends="go" source="$pkgname-$pkgver.tar.gz::https://salsa.debian.org/mdosch/xmpp-dns/-/archive/v$pkgver/xmpp-dns-v$pkgver.tar.gz" builddir="$srcdir/$pkgname-v$pkgver" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -modcacherw" + build() { - export GOFLAGS="$GOFLAGS -modcacherw" go build -o xmpp-dns } @@ -23,8 +27,7 @@ check() { } package() { - mkdir -p "$pkgdir"/usr/bin - install xmpp-dns "$pkgdir"/usr/bin + install -Dm755 xmpp-dns -t "$pkgdir"/usr/bin/ } sha512sums=" diff --git a/testing/ytt/APKBUILD b/testing/ytt/APKBUILD index 76308ef56fe..dba50af38fe 100644 --- a/testing/ytt/APKBUILD +++ b/testing/ytt/APKBUILD @@ -13,6 +13,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/vmware-tanzu/carvel-ytt/arch 0001-e2e-tests.patch" builddir="$srcdir/src/github.com/k14s/$pkgname" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" + prepare() { mkdir -p ${builddir%/*} mv "$srcdir"/carvel-$pkgname-$pkgver "$builddir"/ @@ -20,7 +24,7 @@ prepare() { } build() { - local ldflags="-w -s -X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=$pkgver" + local ldflags="-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=$pkgver" export GOPATH="$srcdir" export CGO_ENABLED=0 rm -f website/generated.go diff --git a/testing/zabbix-agent2-alpine/APKBUILD b/testing/zabbix-agent2-alpine/APKBUILD index fc3a2892357..a7f95697c31 100644 --- a/testing/zabbix-agent2-alpine/APKBUILD +++ b/testing/zabbix-agent2-alpine/APKBUILD @@ -22,8 +22,9 @@ install="$pkgname.pre-install" builddir="$srcdir/zabbix-$pkgver" export GOPATH="$srcdir/go" -export GOCACHE="$srcdir/go-build" -export GOTEMPDIR="$srcdir/go" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" diff --git a/testing/zrepl/APKBUILD b/testing/zrepl/APKBUILD index cbc48f34092..f0843be3513 100644 --- a/testing/zrepl/APKBUILD +++ b/testing/zrepl/APKBUILD @@ -20,7 +20,9 @@ source=" zrepl.initd " -export GOPATH="$srcdir" +export GOCACHE="$srcdir/go-cache" +export GOTMPDIR="$srcdir" +export GOMODCACHE="$srcdir/go" build() { export GO111MODULE=on |