[arch-commits] Commit in kubectl/trunk (PKGBUILD gotags.patch)

Morten Linderud foxboron at archlinux.org
Thu Sep 3 15:37:20 UTC 2020


    Date: Thursday, September 3, 2020 @ 15:37:19
  Author: foxboron
Revision: 697506

upgpkg: kubectl 1.18.5-2 - Rebuilds for go-pie todolist and package guidelines

Added:
  kubectl/trunk/gotags.patch
Modified:
  kubectl/trunk/PKGBUILD

--------------+
 PKGBUILD     |   20 +++++++++++++++-----
 gotags.patch |   13 +++++++++++++
 2 files changed, 28 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-03 15:16:33 UTC (rev 697505)
+++ PKGBUILD	2020-09-03 15:37:19 UTC (rev 697506)
@@ -7,18 +7,28 @@
 pkgname=kubectl
 pkgdesc="Kubernetes.io client binary"
 pkgver=1.18.5
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 url="https://kubernetes.io"
 license=('Apache')
 depends=('glibc')
-makedepends=('go-pie' 'rsync' 'git')
+makedepends=('go' 'rsync' 'git')
 #source=("git+https://github.com/kubernetes/kubernetes#tag=v${pkgver}")
-source=("kubernetes-$pkgver.tar.gz::https://dl.k8s.io/v$pkgver/kubernetes-src.tar.gz")
-sha512sums=('9ddcd8b517e3cf78113ef977c365d26f0f27fe9b7fd9410f0214fd38cd38c6de6f37d7fbe2bb398587caceb4ae484afc2fe7ae14b80b70fe728405f3d5bd4115')
+source=("kubernetes-$pkgver.tar.gz::https://dl.k8s.io/v$pkgver/kubernetes-src.tar.gz"
+        "gotags.patch")
+sha512sums=('9ddcd8b517e3cf78113ef977c365d26f0f27fe9b7fd9410f0214fd38cd38c6de6f37d7fbe2bb398587caceb4ae484afc2fe7ae14b80b70fe728405f3d5bd4115'
+            '413ddce3e475107db030a04d6ed53d145ead8d13d2d153c4cb6ce635643d7cc922cab90f528b7f8152b43f157c2c441759e6d48511be1a9a16e491e177bf97e8')
 
+prepare(){
+  patch -Np1 < "$srcdir/gotags.patch"
+}
+
 build() {
-  make WHAT=cmd/kubectl
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  make WHAT=cmd/kubectl GOFLAGS="-buildmode=pie -trimpath"
   # we don't need this anymore, but let's keep it.
   #cd cmd/kubectl
   #go build -trimpath -ldflags "-extldflags ${LDFLAGS}" -o kubectl

Added: gotags.patch
===================================================================
--- gotags.patch	                        (rev 0)
+++ gotags.patch	2020-09-03 15:37:19 UTC (rev 697506)
@@ -0,0 +1,13 @@
+diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
+index b646bbe2edf..89d0a5cdba1 100755
+--- a/hack/lib/golang.sh
++++ b/hack/lib/golang.sh
+@@ -790,7 +790,7 @@ kube::golang::build_binaries() {
+ 
+     # extract tags if any specified in GOFLAGS
+     # shellcheck disable=SC2001
+-    gotags="selinux,$(echo "${GOFLAGS:-}" | sed -e 's|.*-tags=\([^-]*\).*|\1|')"
++    gotags="selinux $(echo "${GOFLAGS:-}" | sed -e 's|.*-tags=\([^-]*\).*|\1|')"
+ 
+     local -a targets=()
+     local arg
\ No newline at end of file


More information about the arch-commits mailing list