Files
nixpkgs/pkgs/applications/networking/cluster/k3s/go_runc_require.patch
Robert Rose 3a3eac6705 k3s: move go_runc_require.patch to top-level directory
The patch will be needed in all versions later than 1.34
2026-01-06 23:03:15 +01:00

19 lines
598 B
Diff

# Adds explicit require of opencontainers/runc to go.mod before version.sh is called and
# removes it afterwards so that later build commands don't complain about inconsistent
# vendoring.
diff --git a/scripts/package-cli b/scripts/package-cli
index a15d754926..bc450dbe4e 100755
--- a/scripts/package-cli
+++ b/scripts/package-cli
@@ -3,7 +3,10 @@ set -e -x
cd $(dirname $0)/..
+runc_require=$(grep "github.com/opencontainers/runc" go.mod | awk -F '=> ' '{print $2}' | xargs -0 printf 'require %s')
+echo "$runc_require" >> go.mod
. ./scripts/version.sh
+sed -i '$d' go.mod
GO=${GO-go}