From 06bbf5e48568f9626b05cdcf86e005dccf7336d6 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Wed, 1 Jan 2025 00:00:00 +0700 Subject: [PATCH] testing/popeye: upgrade to 0.21.6 --- testing/popeye/APKBUILD | 16 ++++++++++--- .../popeye/fix-cilium-integer-overflow_patch | 23 +++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 testing/popeye/fix-cilium-integer-overflow_patch diff --git a/testing/popeye/APKBUILD b/testing/popeye/APKBUILD index cb26876dcaa..fb53d19ba21 100644 --- a/testing/popeye/APKBUILD +++ b/testing/popeye/APKBUILD @@ -1,20 +1,29 @@ # Contributor: Hoang Nguyen maintainer="Hoang Nguyen " pkgname=popeye -pkgver=0.21.5 +pkgver=0.21.6 pkgrel=0 pkgdesc="Kubernetes cluster resource sanitizer" url="https://popeyecli.io/" arch="all" license="Apache-2.0" makedepends="go" -source="$pkgname-$pkgver.tar.gz::https://github.com/derailed/popeye/archive/refs/tags/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/derailed/popeye/archive/refs/tags/v$pkgver.tar.gz + fix-cilium-integer-overflow_patch + " options="net" # download Go modules export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" +prepare() { + default_prepare + + go mod vendor + patch -p1 -i "$srcdir"/fix-cilium-integer-overflow_patch +} + build() { GOLDFLAGS=" -X github.com/derailed/popeye/cmd.version=v$pkgver @@ -33,5 +42,6 @@ package() { } sha512sums=" -b92d28282f41889b27cf952fe0e518d210dcf4b0e0061a96b92f08bd1a91a9e38028724ad34df4f91e31650c62a3966f7298ce3b5609bb4c4c2cf8a9a1892f0d popeye-0.21.5.tar.gz +5982bee176ffbdea05cf16a8ba0b6f944bfe890b6d6fa25fe8a6e7a6f159cc7774906875470210c67fccc5c186f36435df65b06e343faccb34b680727cba6f29 popeye-0.21.6.tar.gz +99a989c069454af9b90d068056e3169f0d03af016264e1473748142fefaa3b47eabc89e93bd440aacda7ed3948cd685c6482830673832610b577cdbfeb54fed6 fix-cilium-integer-overflow_patch " diff --git a/testing/popeye/fix-cilium-integer-overflow_patch b/testing/popeye/fix-cilium-integer-overflow_patch new file mode 100644 index 00000000000..7118d51bbfb --- /dev/null +++ b/testing/popeye/fix-cilium-integer-overflow_patch @@ -0,0 +1,23 @@ +Patch-Source: https://github.com/cilium/cilium/commit/a802f91a6de0edaf5b1e2e48845bcf85de23b563 + +diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go +index 72b69afbb0f49..dcf0950dcdf26 100644 +--- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go ++++ b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go +@@ -9,6 +9,7 @@ import ( + "errors" + "fmt" + "io" ++ "math" + "net" + "os" + "path/filepath" +@@ -495,7 +496,7 @@ var HaveNetkit = sync.OnceValue(func() error { + l, err := link.AttachNetkit(link.NetkitOptions{ + Program: prog, + Attach: ebpf.AttachNetkitPrimary, +- Interface: int(^uint32(0)), ++ Interface: math.MaxInt, + }) + // We rely on this being checked during the syscall. With + // an otherwise correct payload we expect ENODEV here as