meta-virtualization/recipes-networking/cni/cni_git.bb
Bruce Ashfield a969b554a6 cni: update to 1.1,2
Bumping cni to version v0.8.0-126-gf024754, which comprises the following commits:

    f024754 refactor: move from io/ioutil to io and os packages
    e18f632 Update email to gmail
    58488a6 Upgrade GitHub actions packages to resolve NodeJS 12 warnings
    62709e0 Removed loxilight as it is not supported anymore
    76aaefb libcni: handle string-type disableCheck values
    04dce8c testhelpers: use `go mod tidy` to ensure all necessary dependencies before building
    be9139d cdc: update email
    dc22d04 go.mod: bump to go1.18
    6996769 github: bump go version to v1.19
    08fb460 go fmt
    dbf33e2 fix 714-plugin add netns validation reinforcement
    8dba382 libcni: add specific type for CHECK not supported
    a710a7b Updated Calico project link
    1c7c696 Fix successfully unmarshalled nil raw result
    58b77bd spec: fix format
    55fe94e invoke: if Result CNIVersion is empty use netconf CNIVersion
    99eac24 cnitool: address golint error

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>

cni-flannel: update to 1.1,2

Bumping flannel-cni-plugin.git to version v1.1.2-2-ga2398ab, which comprises the following commits:

    1537c92 update of GH workflows
    acb770d Make sure the CNI delete function does not fail when the json config is wrong
    e541b70 Allow multiple flannel networks and upgrade to Go 1.19.2
    6e8bb11 upgrade cni and plugins deps
    076c446 add mips64le dockerfile

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-01-10 13:58:07 -05:00

77 lines
2.7 KiB
BlitzBasic

HOMEPAGE = "https://github.com/containernetworking/cni"
SUMMARY = "Container Network Interface - networking for Linux containers"
DESCRIPTION = "CNI (Container Network Interface), a Cloud Native Computing \
Foundation project, consists of a specification and libraries for writing \
plugins to configure network interfaces in Linux containers, along with a \
number of supported plugins. CNI concerns itself only with network connectivity \
of containers and removing allocated resources when the container is deleted. \
Because of this focus, CNI has a wide range of support and the specification \
is simple to implement. \
"
SRCREV_cni = "f024754da8d49bdac31d99d04355ddfe0340f8eb"
SRCREV_plugins = "4744ec27b89c083194e7df498de50f03a8a1d3ec"
SRCREV_flannel_plugin = "a2398ab1a85101d5b2d2180dc731215d65b2be9a"
SRCREV_FORMAT = "cni_plugins"
SRC_URI = "\
git://github.com/containernetworking/cni.git;branch=main;name=cni;protocol=https \
git://github.com/containernetworking/plugins.git;branch=release-1.1;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 \
"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
GO_IMPORT = "import"
PV = "v1.1.2+git${SRCREV_cni}"
inherit go
inherit goarch
# https://github.com/llvm/llvm-project/issues/53999
TOOLCHAIN = "gcc"
do_compile() {
mkdir -p ${S}/src/github.com/containernetworking
ln -sfr ${S}/src/import ${S}/src/github.com/containernetworking/cni
export GO111MODULE=off
cd ${B}/src/github.com/containernetworking/cni/libcni
${GO} build -trimpath
cd ${B}/src/github.com/containernetworking/cni/cnitool
${GO} build -trimpath
cd ${B}/src/github.com/containernetworking/plugins
PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/ipam/*; ls -d plugins/main/* | grep -v windows)"
mkdir -p ${B}/plugins/bin/
for p in $PLUGINS; do
plugin="$(basename "$p")"
echo "building: $p"
${GO} build -trimpath -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
done
}
do_install() {
localbindir="${libexecdir}/cni/"
install -d ${D}${localbindir}
install -d ${D}/${sysconfdir}/cni/net.d
install -m 755 ${S}/src/import/cnitool/cnitool ${D}/${localbindir}
install -m 755 -D ${B}/plugins/bin/* ${D}/${localbindir}
# Parts of k8s expect the cni binaries to be available in /opt/cni
install -d ${D}/opt/cni
ln -sf ${libexecdir}/cni/ ${D}/opt/cni/bin
}
FILES:${PN} += "${libexecdir}/cni/* /opt/cni/bin"
INSANE_SKIP:${PN} += "ldflags already-stripped"
deltask compile_ptest_base
RDEPENDS:${PN} += " ca-certificates"