[arch-commits] Commit in cri-o/trunk (3 files)

David Runge dvzrv at gemini.archlinux.org
Sun Feb 13 00:26:47 UTC 2022


    Date: Sunday, February 13, 2022 @ 00:26:46
  Author: dvzrv
Revision: 1133009

upgpkg: cri-o 1.23.1-1: Upgrade to 1.23.1.

Add debug package.
Update patch to add LDFLAGS for pinns.
Remove unnecessary quotes and curly braces.

Added:
  cri-o/trunk/cri-o-1.23.1-pinns_ldflags.patch
Modified:
  cri-o/trunk/PKGBUILD
Deleted:
  cri-o/trunk/cri-o-1.21.0-pinns_pie.patch

----------------------------------+
 PKGBUILD                         |  100 ++++++++++++++++++-------------------
 cri-o-1.21.0-pinns_pie.patch     |   24 --------
 cri-o-1.23.1-pinns_ldflags.patch |   17 ++++++
 3 files changed, 67 insertions(+), 74 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-02-12 23:36:39 UTC (rev 1133008)
+++ PKGBUILD	2022-02-13 00:26:46 UTC (rev 1133009)
@@ -3,41 +3,46 @@
 # Contributor: Tony Lambiris <tony at libpcap.net>
 
 pkgname=cri-o
-pkgver=1.23.0
+pkgver=1.23.1
 pkgrel=1
 pkgdesc="Open Container Initiative-based implementation of Kubernetes Container Runtime Interface"
-arch=('x86_64')
+arch=(x86_64)
 url="https://github.com/cri-o/cri-o"
-license=('Apache')
-depends=('cni-plugins' 'conmon' 'crun' 'conntrack-tools' 'containers-common'
-'device-mapper' 'glibc' 'iproute2' 'iptables' 'runc')
-makedepends=('apparmor' 'btrfs-progs' 'gpgme' 'go' 'go-md2man' 'libassuan'
-'libseccomp' 'ostree')
-optdepends=('apparmor: for apparmor integration'
-            'btrfs-progs: for btrfs support')
-provides=('container-runtime')
-backup=('etc/crio/crio.conf'
-        'etc/cni/net.d/100-crio-bridge.conf'
-        'etc/cni/net.d/199-crio-loopback.conf'
+license=(Apache)
+depends=(cni-plugins conmon crun conntrack-tools containers-common
+device-mapper glibc iproute2 iptables runc)
+makedepends=(apparmor btrfs-progs gpgme go go-md2man libassuan libseccomp
+ostree)
+optdepends=(
+  'apparmor: for apparmor integration'
+  'btrfs-progs: for btrfs support'
 )
+provides=(container-runtime)
+backup=(
+  'etc/crio/crio.conf'
+  'etc/cni/net.d/100-crio-bridge.conf'
+  'etc/cni/net.d/199-crio-loopback.conf'
+)
 # configuration override and hook directories should exist
-options=('emptydirs')
-install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz"
-        "modules-${pkgname}.conf"
-        "sysctl-${pkgname}.conf"
-        "${pkgname}-1.21.0-pinns_pie.patch")
-sha512sums=('d445461b44914574c57d1a64c47b77be87f59326594cc74cc40de42e81935470fded03ee1800b52129b6312fa0acadab211f4e25d1a77b8f3b83e0604a850977'
+options=(debug emptydirs)
+install=$pkgname.install
+source=(
+  $pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
+  modules-$pkgname.conf
+  sysctl-$pkgname.conf
+  $pkgname-1.23.1-pinns_ldflags.patch
+)
+sha512sums=('3d7170edcd60279474b8e135b523cd75c3db80d0d98945683bcd234b2bf8d08c748662393a47e99dafbb667a2e3a0f041114096c5fb472e967fc50dfec8d2e31'
             '85ee1310cb36c85c42b4068a9549a3ef72b856cd61b2c1036c3e871ef43a69ed80b43599ad94ce5b069ddd823e730596bb3d3875d4ba8cd77c4cc1985335ffff'
             'fbcc3c29d5d3dedf56ea96577dec50cb2656b4a22f5a82bf2d600ae20c6b113d35d5db116bac5520398d47a22d40835f56b86433c5713924060e1a7018d297ec'
-            'dbe51c558a50212065de97794b87af3205b3624b43d073f70be245528a309d2f2bf5c6f6a15e4137d9f3e737a38166d08fed87ede27e33fad843b3b01194eb34')
-b2sums=('127cfac1ba0a76aba970e769f554d7034a464bffc2a8b6e3bbdd6f76f6c7459236cc22344c39cdc9eadcaa21af746ac918091c03df379aee89bb28962c662ab9'
+            '85be7e2250c543c6565182363ffccf47d0736b3aca4bf126bfe84e51a4d2b8b62a67b297254b174cde0d407c9f77d9abbad0c3883f3f9d89013720174c617004')
+b2sums=('980411d0ae08f95c2666b6bf45d978cbcd0fb47469b3d4cef1fe1ee4560c3f5d44638998742513e72878c2b1456377f21e3b05114164fda09eb6119fb98ae1c9'
         '2771c64b45876d728fc139aa90754df8aadb07e14a7e1126a1488dfcbad7ebcbca923cb0230c4b87acdc6dad8243af2ad06ef4ce587d5c71fc200e40835d8b8d'
         'c8a2133df6575c54eb9bd0a89a0c6c764c0cd456bff7338c4a2e1ef4f70a5a778d5a05c335fcf2491ed55e15fc36c677853c0bc8ab66d673f1950fa2c7695f6e'
-        '06558ff67ba4dd6386ada8d50883b7fbc6a74ee6110ad9dc1ee167c43ba48c2c4f15c6a3f7bcabdf6363c235fc482d6fad077821188d65489249ee5764fe7680')
+        '5e4e453eaa99b930d018ca200de791be7de2e5c3da60e5a6f84f0d61e1b18e5f7a6a7700503445a7f39fba0baac67c0042f8d69e2529374c6913458c465bc0e5')
 
 prepare() {
-  cd "${pkgname}-${pkgver}"
+  cd $pkgname-$pkgver
   # make sure that /run instead of /var/run is used
   sed -e 's|/var/run|/run|g' \
       -i crictl.yaml pkg/config/config{,_unix}.go \
@@ -44,21 +49,19 @@
       docs/*.md crio-umount.conf \
       vendor/github.com/containers/conmon/runner/config/config_unix.go
   # make sure that /usr/bin is used in systemd units
-  sed -e 's|/usr/local|/usr|g' \
-      -i contrib/systemd/*.service
+  sed -e 's|/usr/local|/usr|g' -i contrib/systemd/*.service
   # set the correct default PATH for cni-plugins
-  sed -e 's|/opt/cni/bin/|/usr/lib/cni/|g' \
-      -i pkg/config/config_unix.go
-  # do not statically link pinns and enable PIE
-  patch -Np1 -i "../${pkgname}-1.21.0-pinns_pie.patch"
+  sed -e 's|/opt/cni/bin/|/usr/lib/cni/|g' -i pkg/config/config_unix.go
+  # apply LDFLAGS to pinns
+  patch -Np1 -i ../$pkgname-1.23.1-pinns_ldflags.patch
 }
 
 build() {
-  cd "${pkgname}-${pkgver}"
-  export CGO_CPPFLAGS="${CPPFLAGS}"
-  export CGO_CFLAGS="${CFLAGS}"
-  export CGO_CXXFLAGS="${CXXFLAGS}"
-  export CGO_LDFLAGS="${LDFLAGS}"
+  cd $pkgname-$pkgver
+  export CGO_CPPFLAGS="$CPPFLAGS"
+  export CGO_CFLAGS="$CFLAGS"
+  export CGO_CXXFLAGS="$CXXFLAGS"
+  export CGO_LDFLAGS="$LDFLAGS"
   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
 
   make GO_MD2MAN=/usr/bin/go-md2man
@@ -65,24 +68,21 @@
 }
 
 package() {
-  depends+=('libdevmapper.so' 'libgpgme.so' 'libseccomp.so')
-  cd "${pkgname}-${pkgver}"
+  depends+=(libdevmapper.so libgpgme.so libseccomp.so)
+
+  cd $pkgname-$pkgver
   # makefile is mixing DESTDIR and PREFIX
-  make install install.systemd GO_MD2MAN=/usr/bin/go-md2man DESTDIR="${pkgdir}" PREFIX="${pkgdir}/usr"
+  make install install.systemd GO_MD2MAN=/usr/bin/go-md2man DESTDIR="$pkgdir" PREFIX="$pkgdir/usr"
   # install CNI configs
-  install -vDm 644 contrib/cni/10-crio-bridge.conf "${pkgdir}/etc/cni/net.d/100-crio-bridge.conf"
-  install -vDm 644 contrib/cni/99-loopback.conf "${pkgdir}/etc/cni/net.d/199-crio-loopback.conf"
+  install -vDm 644 contrib/cni/10-crio-bridge.conf "$pkgdir/etc/cni/net.d/100-crio-bridge.conf"
+  install -vDm 644 contrib/cni/99-loopback.conf "$pkgdir/etc/cni/net.d/199-crio-loopback.conf"
   # modules
-  install -vDm 644 "../modules-${pkgname}.conf" "${pkgdir}/usr/lib/modules-load.d/cri-o.conf"
+  install -vDm 644 ../modules-$pkgname.conf "$pkgdir/usr/lib/modules-load.d/cri-o.conf"
   # sysctl
-  install -vDm 644 "../sysctl-${pkgname}.conf" "${pkgdir}/usr/lib/sysctl.d/90-cri-o.conf"
+  install -vDm 644 ../sysctl-$pkgname.conf "$pkgdir/usr/lib/sysctl.d/90-cri-o.conf"
   # docs
-  install -vDm 644 {CONTRIBUTING,README,awesome,code-of-conduct,install,transfer,tutorial}.md \
-    -t "${pkgdir}/usr/share/doc/${pkgname}/"
-  install -vDm 644 tutorials/*.md \
-    -t "${pkgdir}/usr/share/doc/${pkgname}/tutorials/"
-  install -vDm 644 contrib/cni/*.{conf,md} \
-    -t "${pkgdir}/usr/share/doc/${pkgname}/examples/cni/"
-  install -vDm 644 contrib/metrics-exporter/{Containerfile,*.{yaml,gif,json,go}} \
-    -t "${pkgdir}/usr/share/doc/${pkgname}/examples/metrics-exporter/"
+  install -vDm 644 {CONTRIBUTING,README,awesome,code-of-conduct,install,transfer,tutorial}.md -t "$pkgdir/usr/share/doc/$pkgname/"
+  install -vDm 644 tutorials/*.md -t "$pkgdir/usr/share/doc/$pkgname/tutorials/"
+  install -vDm 644 contrib/cni/*.{conf,md} -t "$pkgdir/usr/share/doc/$pkgname/examples/cni/"
+  install -vDm 644 contrib/metrics-exporter/{Containerfile,*.{yaml,gif,json,go}} -t "$pkgdir/usr/share/doc/$pkgname/examples/metrics-exporter/"
 }

Deleted: cri-o-1.21.0-pinns_pie.patch
===================================================================
--- cri-o-1.21.0-pinns_pie.patch	2022-02-12 23:36:39 UTC (rev 1133008)
+++ cri-o-1.21.0-pinns_pie.patch	2022-02-13 00:26:46 UTC (rev 1133009)
@@ -1,24 +0,0 @@
-diff -ruN a/Makefile b/Makefile
---- a/Makefile	2021-04-13 23:47:29.000000000 +0200
-+++ b/Makefile	2021-04-15 11:18:45.140171673 +0200
-@@ -153,7 +153,7 @@
- 		${SHELLFILES} ${BATS_FILES}
- 
- bin/pinns:
--	$(MAKE) -C pinns
-+	$(MAKE) -C pinns LDFLAGS=$(LDFLAGS)
- 
- test/copyimg/copyimg: $(GO_FILES) .gopathok
- 	$(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/copyimg
-diff -ruN a/pinns/Makefile b/pinns/Makefile
---- a/pinns/Makefile	2021-04-13 23:47:29.000000000 +0200
-+++ b/pinns/Makefile	2021-04-15 11:21:01.100633321 +0200
-@@ -8,7 +8,7 @@
- all: ../bin/pinns
- 
- ../bin/pinns: $(obj) | ../bin
--	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
-+	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LIBS)
- 	$(STRIP) -s $@
- 
- %.o: %.c $(HEADERS)

Added: cri-o-1.23.1-pinns_ldflags.patch
===================================================================
--- cri-o-1.23.1-pinns_ldflags.patch	                        (rev 0)
+++ cri-o-1.23.1-pinns_ldflags.patch	2022-02-13 00:26:46 UTC (rev 1133009)
@@ -0,0 +1,17 @@
+diff -ruN a/pinns/Makefile b/pinns/Makefile
+--- a/pinns/Makefile	2022-02-11 22:59:14.000000000 +0100
++++ b/pinns/Makefile	2022-02-13 00:49:24.575120677 +0100
+@@ -4,11 +4,12 @@
+ STRIP ?= strip
+ override LIBS +=
+ CFLAGS ?= -std=c99 -Os -Wall -Werror -Wextra -static
++LDFLAGS ?=
+ 
+ all: ../bin/pinns
+ 
+ ../bin/pinns: $(obj) | ../bin
+-	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
++	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LIBS)
+ 	$(STRIP) -s $@
+ 
+ %.o: %.c $(HEADERS)



More information about the arch-commits mailing list