diff options
Diffstat (limited to 'recipes-networking/cni/cni_git.bb')
-rw-r--r-- | recipes-networking/cni/cni_git.bb | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb index b41b47cf..aa9902e3 100644 --- a/recipes-networking/cni/cni_git.bb +++ b/recipes-networking/cni/cni_git.bb | |||
@@ -14,12 +14,13 @@ SRCREV_plugins = "b6a0e0bc96906f0d3bd6bfcaab0b5ae72292f46c" | |||
14 | SRCREV_flannel_plugin = "6464faacf5c00e25321573225d74638455ef03a0" | 14 | SRCREV_flannel_plugin = "6464faacf5c00e25321573225d74638455ef03a0" |
15 | SRCREV_FORMAT = "cni_plugins" | 15 | SRCREV_FORMAT = "cni_plugins" |
16 | SRC_URI = "\ | 16 | SRC_URI = "\ |
17 | git://github.com/containernetworking/cni.git;branch=main;name=cni;protocol=https \ | 17 | git://github.com/containernetworking/cni.git;branch=main;name=cni;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ |
18 | git://github.com/containernetworking/plugins.git;branch=main;destsuffix=${S}/src/github.com/containernetworking/plugins;name=plugins;protocol=https \ | 18 | file://modules.txt \ |
19 | git://github.com/flannel-io/cni-plugin;branch=main;name=flannel_plugin;protocol=https;destsuffix=${S}/src/github.com/containernetworking/plugins/plugins/meta/flannel \ | ||
20 | file://modules.txt \ | ||
21 | " | 19 | " |
22 | 20 | ||
21 | SRC_URI += "git://github.com/containernetworking/plugins.git;branch=main;destsuffix=${GO_SRCURI_DESTSUFFIX}/src/github.com/containernetworking/plugins;name=plugins;protocol=https" | ||
22 | SRC_URI += "git://github.com/flannel-io/cni-plugin;branch=main;name=flannel_plugin;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX}/src/github.com/containernetworking/plugins/plugins/meta/flannel" | ||
23 | |||
23 | # generated via: | 24 | # generated via: |
24 | # ./scripts/oe-go-mod-autogen.py --repo https://github.com/containernetworking/cni.git --rev <insert your rev here> | 25 | # ./scripts/oe-go-mod-autogen.py --repo https://github.com/containernetworking/cni.git --rev <insert your rev here> |
25 | include src_uri.inc | 26 | include src_uri.inc |
@@ -32,6 +33,7 @@ LICENSE = "Apache-2.0" | |||
32 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" | 33 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" |
33 | 34 | ||
34 | GO_IMPORT = "import" | 35 | GO_IMPORT = "import" |
36 | S = "${WORKDIR}/git" | ||
35 | 37 | ||
36 | PV = "v1.2.0-rc0+git${SRCREV_cni}" | 38 | PV = "v1.2.0-rc0+git${SRCREV_cni}" |
37 | CNI_VERSION = "v1.2.0" | 39 | CNI_VERSION = "v1.2.0" |
@@ -49,11 +51,19 @@ do_compile() { | |||
49 | mkdir -p ${S}/src/github.com/containernetworking | 51 | mkdir -p ${S}/src/github.com/containernetworking |
50 | ln -sfr ${S}/src/import ${S}/src/github.com/containernetworking/cni | 52 | ln -sfr ${S}/src/import ${S}/src/github.com/containernetworking/cni |
51 | 53 | ||
54 | # Fixes: cannot find package "github.com/containernetworking/plugins/plugins/meta/bandwidth" in any of: | ||
55 | # we can't clone the plugin source directly to where it belongs because | ||
56 | # there seems to be an issue in the relocation code from UNPACKDIR to S | ||
57 | # and our LICENSE file is never found. | ||
58 | # This symbolic link arranges for the code to be available where go will | ||
59 | # search during the build | ||
60 | ln -sfr ${S}/src/import/src/github.com/containernetworking/plugins ${B}/src/github.com/containernetworking | ||
61 | |||
52 | # our copied .go files are to be used for the build | 62 | # our copied .go files are to be used for the build |
53 | ln -sf vendor.copy vendor | 63 | ln -sf vendor.copy vendor |
54 | 64 | ||
55 | # inform go that we know what we are doing | 65 | # inform go that we know what we are doing |
56 | cp ${WORKDIR}/modules.txt vendor/ | 66 | cp ${UNPACKDIR}/modules.txt vendor/ |
57 | 67 | ||
58 | export GO111MODULE=off | 68 | export GO111MODULE=off |
59 | 69 | ||
@@ -63,7 +73,7 @@ do_compile() { | |||
63 | cd ${B}/src/github.com/containernetworking/cni/cnitool | 73 | cd ${B}/src/github.com/containernetworking/cni/cnitool |
64 | ${GO} build ${GOBUILDFLAGS} | 74 | ${GO} build ${GOBUILDFLAGS} |
65 | 75 | ||
66 | cd ${B}/src/github.com/containernetworking/plugins | 76 | cd ${B}/src/import/src/github.com/containernetworking/plugins |
67 | PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/ipam/*; ls -d plugins/main/* | grep -v windows)" | 77 | PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/ipam/*; ls -d plugins/main/* | grep -v windows)" |
68 | mkdir -p ${B}/plugins/bin/ | 78 | mkdir -p ${B}/plugins/bin/ |
69 | for p in $PLUGINS; do | 79 | for p in $PLUGINS; do |