aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-networking/cni/cni_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-networking/cni/cni_git.bb')
-rw-r--r--recipes-networking/cni/cni_git.bb51
1 files changed, 39 insertions, 12 deletions
diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb
index 3ad939bd..fda7af60 100644
--- a/recipes-networking/cni/cni_git.bb
+++ b/recipes-networking/cni/cni_git.bb
@@ -9,35 +9,58 @@ Because of this focus, CNI has a wide range of support and the specification \
is simple to implement. \
"
-SRCREV_cni = "4cfb7b568922a3c79a23e438dc52fe537fc9687e"
-# Version 0.8.5
-SRCREV_plugins = "1f33fb729ae2b8900785f896df2dc1f6fe5e8239"
+SRCREV_cni = "b62753aa2bfa365c1ceaff6f25774a8047c896b5"
+SRCREV_plugins = "b6a0e0bc96906f0d3bd6bfcaab0b5ae72292f46c"
+SRCREV_flannel_plugin = "6464faacf5c00e25321573225d74638455ef03a0"
+SRCREV_FORMAT = "cni_plugins"
SRC_URI = "\
- git://github.com/containernetworking/cni.git;nobranch=1;name=cni \
- git://github.com/containernetworking/plugins.git;nobranch=1;destsuffix=${S}/src/github.com/containernetworking/plugins;name=plugins \
+ git://github.com/containernetworking/cni.git;branch=main;name=cni;protocol=https \
+ git://github.com/containernetworking/plugins.git;branch=main;destsuffix=${S}/src/github.com/containernetworking/plugins;name=plugins;protocol=https \
+ git://github.com/flannel-io/cni-plugin;branch=main;name=flannel_plugin;protocol=https;destsuffix=${S}/src/github.com/containernetworking/plugins/plugins/meta/flannel \
+ file://modules.txt \
"
-RPROVIDES_${PN} += "kubernetes-cni"
+# generated via:
+# ./scripts/oe-go-mod-autogen.py --repo https://github.com/containernetworking/cni.git --rev <insert your rev here>
+include src_uri.inc
+
+DEPENDS = " \
+ rsync-native \
+ "
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
GO_IMPORT = "import"
-PV = "0.7.1+git${SRCREV_cni}"
+PV = "v1.2.0-rc0+git${SRCREV_cni}"
inherit go
inherit goarch
+# https://github.com/llvm/llvm-project/issues/53999
+TOOLCHAIN = "gcc"
+
+# sets the "sites" variable.
+include relocation.inc
+
do_compile() {
mkdir -p ${S}/src/github.com/containernetworking
ln -sfr ${S}/src/import ${S}/src/github.com/containernetworking/cni
+ # our copied .go files are to be used for the build
+ ln -sf vendor.copy vendor
+
+ # inform go that we know what we are doing
+ cp ${WORKDIR}/modules.txt vendor/
+
+ export GO111MODULE=off
+
cd ${B}/src/github.com/containernetworking/cni/libcni
- ${GO} build
+ ${GO} build ${GOBUILDFLAGS}
cd ${B}/src/github.com/containernetworking/cni/cnitool
- ${GO} build
+ ${GO} build ${GOBUILDFLAGS}
cd ${B}/src/github.com/containernetworking/plugins
PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/ipam/*; ls -d plugins/main/* | grep -v windows)"
@@ -45,10 +68,12 @@ do_compile() {
for p in $PLUGINS; do
plugin="$(basename "$p")"
echo "building: $p"
- ${GO} build -mod=vendor -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
+ ${GO} build ${GOBUILDFLAGS} -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
done
}
+do_compile[cleandirs] = "${B}/plugins"
+
do_install() {
localbindir="${libexecdir}/cni/"
@@ -63,8 +88,10 @@ do_install() {
ln -sf ${libexecdir}/cni/ ${D}/opt/cni/bin
}
-FILES_${PN} += "${libexecdir}/cni/* /opt/cni/bin"
+FILES:${PN} += "${libexecdir}/cni/* /opt/cni/bin"
-INSANE_SKIP_${PN} += "ldflags already-stripped"
+INSANE_SKIP:${PN} += "ldflags already-stripped"
deltask compile_ptest_base
+
+RDEPENDS:${PN} += " ca-certificates"