From 100085c88610db229ebb5080c058547189a1d3c7 Mon Sep 17 00:00:00 2001 From: Bazaah Date: Sun, 4 Feb 2024 20:49:02 +0000 Subject: [PATCH] pkgbuild: add GOFLAGS for rw modecache, pie Fixes a few namcap complaints and allows a standard rm -rf to clean the go modcache. Also ensure go does not attempt to update the go.mod file during the build. --- .SRCINFO | 2 +- PKGBUILD | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 1cd4ee2..127bebc 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = docker-credential-vault-login pkgdesc = Docker Credential Helper for Vault-stored Credentials pkgver = 0.3.47 - pkgrel = 1 + pkgrel = 2 url = https://github.com/morningconsult/docker-credential-vault-login arch = x86_64 license = Apache-2.0 diff --git a/PKGBUILD b/PKGBUILD index b7ad548..a13b90d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=docker-credential-vault-login pkgdesc='Docker Credential Helper for Vault-stored Credentials' pkgver=0.3.47 -pkgrel=1 +pkgrel=2 _commit='ee4808152406c315faa5e78281ab93b97eb2c218' arch=('x86_64') url='https://github.com/morningconsult/docker-credential-vault-login' @@ -26,6 +26,8 @@ prepare() { # download dependencies export GOPATH="${srcdir}" + export GOFLAGS="-mod=readonly -modcacherw -buildmode=pie" + go mod download } @@ -37,6 +39,7 @@ build() { export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export GOPATH="${srcdir}" + export GOFLAGS="-mod=readonly -modcacherw -buildmode=pie" ./scripts/build-binary.sh \ "v${pkgver}" \