Date: Friday, April 9, 2021 @ 17:46:45
  Author: dvzrv
Revision: 915284

upgpkg: cri-tools 1.21.0-1: Upgrade to 1.21.0.

Adapt makefile patch to upstream changes.
Adapt creation and installation of shell completions to upstream changes.
Use install directly to install binaries, as there is now only one make target
for installation.

Added:
  cri-tools/trunk/cri-tools-1.21.0-makefile.patch
Modified:
  cri-tools/trunk/PKGBUILD
Deleted:
  cri-tools/trunk/cri-tools-1.19.0-makefile.patch

---------------------------------+
 PKGBUILD                        |   28 ++++++++++++++--------------
 cri-tools-1.19.0-makefile.patch |   29 -----------------------------
 cri-tools-1.21.0-makefile.patch |   31 +++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 43 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-04-09 17:45:35 UTC (rev 915283)
+++ PKGBUILD    2021-04-09 17:46:45 UTC (rev 915284)
@@ -2,9 +2,9 @@
 
 pkgbase=cri-tools
 pkgname=('crictl' 'critest')
-pkgver=1.20.0
-_commit='ec9e336fd8c21c4bab89a6aed2c4a138c8cfae75' # v1.20.0
-pkgrel=2
+pkgver=1.21.0
+_commit='80bcedb1222865e848a4232a4bcf1a388b328ba9' # v1.21.0
+pkgrel=1
 pkgdesc="CLI and validation tools for Kubelet Container Runtime Interface 
(CRI)"
 arch=('x86_64')
 url="https://github.com/kubernetes-sigs/cri-tools";
@@ -14,17 +14,17 @@
 makedepends=('git' 'go')
 # can only build from git: 
https://github.com/kubernetes-sigs/cri-tools/issues/676
 source=("git+https://github.com/kubernetes-sigs/${pkgbase}#commit=${_commit}";
-        "${pkgbase}-1.19.0-makefile.patch"
+        "${pkgbase}-1.21.0-makefile.patch"
 )
 sha512sums=('SKIP'
-            
'db51a5228b2ca0dcfe493a7178d4318b831e13c8461a68cc6239ab4ee717773b8955d2d86312bc518d4b4552289679ce71fac8961f29bb8b9d6ad5eba9332e75')
+            
'272be756f3d2514b885e0e9db2c27d851fbea016d58502fa8f5954c6b79ebb240fdbe78577e6a07ca9d737706f0e409fac7a34c664e483359c817922ea8394c2')
 b2sums=('SKIP'
-        
'b26bde7934ecd79b7afa18fdd2438451893a4d298aaad4d20d2361b4ef92601b2fab79145681ae6044561ef340a22dcc83cfb091feb0e9ca4900e944224c2f10')
+        
'2f6c0bb70e38ed98de5f2f80a18b1852a82e6614c6acd5a968d6bdc0d4955bb2e8b81050daf50e35a4eb3637e48e879fe0c9b4fc58b4ae3d827246a3dff82710')
 
 prepare() {
   cd "${pkgbase}"
   # set CGO_ENABLED, honor GOFLAGS and allow adding to GO_LDFLAGS
-  patch -Np1 -i ../"${pkgbase}-1.19.0-makefile.patch"
+  patch -Np1 -i ../"${pkgbase}-1.21.0-makefile.patch"
 }
 
 build() {
@@ -40,11 +40,11 @@
   make
 
   # crictl shell completion
-  mkdir -v _output/completions
+  mkdir -vp build/completions
   local _binary
   for _binary in crictl; do
-    "_output/${_binary}" completion bash > "_output/completions/${_binary}"
-    "_output/${_binary}" completion zsh > "_output/completions/_${_binary}"
+    "build/bin/${_binary}" completion bash > "build/completions/${_binary}"
+    "build/bin/${_binary}" completion zsh > "build/completions/_${_binary}"
   done
 }
 
@@ -52,10 +52,10 @@
   pkgdesc="A CLI for CRI-compatible container runtimes"
 
   cd "$pkgbase"
-  make install-crictl BINDIR="${pkgdir}/usr/bin/"
+  install -vDm 755 "build/bin/${pkgname}" -t "${pkgdir}/usr/bin"
   # shell completion
-  install -vDm 644 "_output/completions/${pkgname}" -t 
"$pkgdir/usr/share/bash-completion/completions/"
-  install -vDm 644 "_output/completions/_${pkgname}" -t 
"$pkgdir/usr/share/zsh/site-functions/"
+  install -vDm 644 "build/completions/${pkgname}" -t 
"$pkgdir/usr/share/bash-completion/completions/"
+  install -vDm 644 "build/completions/_${pkgname}" -t 
"$pkgdir/usr/share/zsh/site-functions/"
   # docs
   install -vDm 644 "docs/${pkgname}.md" -t 
"${pkgdir}/usr/share/doc/${pkgname}/"
   install -vDm 644 docs/examples/*.{json,yaml} -t 
"${pkgdir}/usr/share/doc/${pkgname}/examples/"
@@ -67,7 +67,7 @@
   pkgdesc="A benchmarking CLI for CRI-compatible container runtimes"
 
   cd "$pkgbase"
-  make install-critest BINDIR="${pkgdir}/usr/bin/"
+  install -vDm 755 "build/bin/${pkgname}" -t "${pkgdir}/usr/bin"
   # docs
   install -vDm 644 docs/{benchmark,validation}.md -t 
"${pkgdir}/usr/share/doc/${pkgname}/"
   install -vDm 644 
{{CHANGELOG,CONTRIBUTING,README,code-of-conduct}.md,SECURITY_CONTACTS} \

Deleted: cri-tools-1.19.0-makefile.patch
===================================================================
--- cri-tools-1.19.0-makefile.patch     2021-04-09 17:45:35 UTC (rev 915283)
+++ cri-tools-1.19.0-makefile.patch     2021-04-09 17:46:45 UTC (rev 915284)
@@ -1,29 +0,0 @@
-diff -ruN a/Makefile b/Makefile
---- a/Makefile 2020-08-28 11:44:53.000000000 +0200
-+++ b/Makefile 2020-11-05 13:32:43.543054387 +0100
-@@ -33,7 +33,7 @@
- 
- VERSION := $(shell git describe --tags --dirty --always)
- VERSION := $(VERSION:v%=%)
--GO_LDFLAGS := -X $(PROJECT)/pkg/version.Version=$(VERSION)
-+GO_LDFLAGS := $(GO_LDFLAGS) -X $(PROJECT)/pkg/version.Version=$(VERSION)
- BUILDTAGS := selinux
- 
- BUILD_PATH := $(shell pwd)/build
-@@ -57,13 +57,13 @@
-       @echo " * 'clean' - Clean artifacts."
- 
- critest:
--      CGO_ENABLED=0 $(GO_TEST) -c -o $(CURDIR)/_output/critest$(BIN_EXT) \
-+      CGO_ENABLED=1 $(GO_TEST) -c -o $(CURDIR)/_output/critest$(BIN_EXT) \
-               -ldflags '$(GO_LDFLAGS)' \
-               -tags '$(BUILDTAGS)' \
--           $(PROJECT)/cmd/critest
-+              $(PROJECT)/cmd/critest
- 
- crictl:
--      CGO_ENABLED=0 $(GO_BUILD) -o $(CURDIR)/_output/crictl$(BIN_EXT) \
-+      CGO_ENABLED=1 $(GO_BUILD) -o $(CURDIR)/_output/crictl$(BIN_EXT) \
-               -ldflags '$(GO_LDFLAGS)' \
-               -tags '$(BUILDTAGS)' \
-               $(PROJECT)/cmd/crictl

Added: cri-tools-1.21.0-makefile.patch
===================================================================
--- cri-tools-1.21.0-makefile.patch                             (rev 0)
+++ cri-tools-1.21.0-makefile.patch     2021-04-09 17:46:45 UTC (rev 915284)
@@ -0,0 +1,31 @@
+diff --git i/Makefile w/Makefile
+index 35c198ca..d5ce23cb 100644
+--- i/Makefile
++++ w/Makefile
+@@ -34,7 +34,7 @@ BINDIR ?= /usr/local/bin
+ 
+ VERSION := $(shell git describe --tags --dirty --always)
+ VERSION := $(VERSION:v%=%)
+-GO_LDFLAGS := -X $(PROJECT)/pkg/version.Version=$(VERSION)
++GO_LDFLAGS := $(GO_LDFLAGS) -X $(PROJECT)/pkg/version.Version=$(VERSION)
+ BUILDTAGS := selinux
+ 
+ BUILD_PATH := $(shell pwd)/build
+@@ -64,7 +64,7 @@ critest:
+       @$(MAKE) -B $(CRITEST)
+ 
+ $(CRITEST):
+-      CGO_ENABLED=0 $(GO_TEST) -c -o $@ \
++      CGO_ENABLED=1 $(GO_TEST) -c -o $@ \
+               -ldflags '$(GO_LDFLAGS)' \
+               -tags '$(BUILDTAGS)' \
+            $(PROJECT)/cmd/critest
+@@ -73,7 +73,7 @@ crictl:
+       @$(MAKE) -B $(CRICTL)
+ 
+ $(CRICTL):
+-      CGO_ENABLED=0 $(GO_BUILD) -o $@ \
++      CGO_ENABLED=1 $(GO_BUILD) -o $@ \
+               -ldflags '$(GO_LDFLAGS)' \
+               -tags '$(BUILDTAGS)' \
+               $(PROJECT)/cmd/crictl

Reply via email to