diff options
author | Amir Zarrinkafsh | 2024-04-01 20:00:15 +1100 |
---|---|---|
committer | Amir Zarrinkafsh | 2024-04-01 20:00:15 +1100 |
commit | 7ee5f414ebf305199797774756ba96ad4da01fc4 (patch) | |
tree | 13006907be4d0dc76f2024f963cc1f8b89c272b8 | |
parent | 40e3a5141baa15d5f8cb59906c33dc936a9ea421 (diff) | |
download | aur-7ee5f414ebf305199797774756ba96ad4da01fc4.tar.gz |
Build PIE executable and fix gomodcache permissions
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = authelia pkgdesc = The Cloud ready multi-factor authentication portal for your Apps. pkgver = 4.38.7 - pkgrel = 1 + pkgrel = 2 url = https://github.com/authelia/authelia arch = x86_64 arch = aarch64 @@ -1,7 +1,7 @@ # Maintainer: Amir Zarrinkafsh <nightah at me dot com> pkgname=authelia pkgver=4.38.7 -pkgrel=1 +pkgrel=2 pkgdesc="The Cloud ready multi-factor authentication portal for your Apps." arch=('x86_64' 'aarch64' 'armv7h') url="https://github.com/authelia/authelia" @@ -25,7 +25,7 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/a sha256sums=('b15d764ee48271041f4146f6460738734c882cad3bac4c9a57ebc154e5c67931') build() { - export GOPATH="$srcdir/gopath" PATH="$PATH:$srcdir/gopath/bin" _pkgver="v${pkgver}" + export GOPATH="$srcdir/gopath" PATH="$PATH:$srcdir/gopath/bin" _pkgver="v${pkgver}" CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong" CGO_LDFLAGS="-Wl,-z,relro,-z,now" cd "$srcdir/$pkgname-$pkgver/web" COMMIT=$(curl -s https://api.github.com/repos/authelia/authelia/tags | jq -r '.[] | select(.name==env._pkgver) | .commit.sha') @@ -38,7 +38,14 @@ build() { pnpm build cd .. cp -R api internal/server/public_html/ - go build -ldflags "-w ${XOPTIONS}" -trimpath -o authelia cmd/authelia/*.go + go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -s -w ${XOPTIONS}" \ + -o authelia \ + cmd/authelia/*.go } package() { |