[arch-commits] Commit in kubeone/trunk (PKGBUILD)

Christian Rebischke shibumi at archlinux.org
Mon Sep 21 15:30:03 UTC 2020


    Date: Monday, September 21, 2020 @ 15:30:03
  Author: shibumi
Revision: 711227

upgpkg: kubeone 1.0.2-2 enable all security flags for kubeone

Modified:
  kubeone/trunk/PKGBUILD

----------+
 PKGBUILD |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-21 14:45:04 UTC (rev 711226)
+++ PKGBUILD	2020-09-21 15:30:03 UTC (rev 711227)
@@ -7,7 +7,7 @@
 # We check out the repo via git for retrieving necessary information
 # for `kubeone version`.
 _kubeone_commit="cd136169157687f2cc6ad720393d2115c834c181"
-pkgrel=1
+pkgrel=2
 pkgdesc="A lifecycle management tool for Highly-Available Kubernetes clusters"
 url="https://www.kubeone.io"
 arch=("x86_64")
@@ -17,6 +17,14 @@
 source=("${pkgname}-${_pkgver}::git+https://github.com/kubermatic/kubeone#commit=${_kubeone_commit}")
 sha512sums=('SKIP')
 
+prepare() {
+  cd "${pkgname}-${_pkgver}"
+  sed -E 's/(CGO_ENABLED)=0/\1=1/g' -i Makefile
+  sed '/^export GOFLAGS/ s/$/ -modcacherw -buildmode=pie/' -i Makefile
+  sed '/^GOLDFLAGS?=/ s/=/= -linkmode=external /' -i Makefile
+
+}
+
 build() {
   cd "${pkgname}-${_pkgver}"
   export CGO_CPPFLAGS="${CPPFLAGS}"
@@ -23,7 +31,6 @@
   export CGO_CFLAGS="${CFLAGS}"
   export CGO_CXXFLAGS="${CXXFLAGS}"
   export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
   make build
 }
 
@@ -33,7 +40,6 @@
   export CGO_CFLAGS="${CFLAGS}"
   export CGO_CXXFLAGS="${CXXFLAGS}"
   export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
   make test
 }
 


More information about the arch-commits mailing list