From f1892e34f6a827c21e4bd19fddf5cbabecb36dbc Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 25 Jan 2024 14:44:26 +0000 Subject: cni: convert recipe to vendor fetched format The latest update to the CNI recipe brings in more vendor dependencies. To fix the build, we convert it to the same format as other vendored recipes in meta-virtualiation. The files in the udpated a recipe were created via: ./scripts/oe-go-mod-autogen.py --repo https://github.com/containernetworking/cni.git --rev b62753aa2bfa365c1ceaff6f25774a8047c896b5 Signed-off-by: Bruce Ashfield --- recipes-networking/cni/cni_git.bb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'recipes-networking/cni/cni_git.bb') diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb index 59b56f6e..fda7af60 100644 --- a/recipes-networking/cni/cni_git.bb +++ b/recipes-networking/cni/cni_git.bb @@ -17,7 +17,17 @@ SRC_URI = "\ 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 \ " + +# generated via: +# ./scripts/oe-go-mod-autogen.py --repo https://github.com/containernetworking/cni.git --rev +include src_uri.inc + +DEPENDS = " \ + rsync-native \ + " + LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" @@ -31,10 +41,19 @@ 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 -- cgit v1.2.3-54-g00ecf