summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-05-24 03:43:09 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-05-29 13:16:56 +0000
commit3653862e5b2003c2ff780de136660c1b3967c915 (patch)
tree0d57270a736fbe9054d89d62b6d7b6ce60a57ebf
parentf12df6ce27607530886fda8194e8956312be72cd (diff)
downloadmeta-virtualization-3653862e5b2003c2ff780de136660c1b3967c915.tar.gz
cni: adapt SRC_URI to include destsuffix=${GO_SRCURI_DESTSUFFIX}
As of commit cc4ec43a2b657fb4c58429ab14f1edc2473c1327 [go: Drop fork of unpack code, mandate GO_SRCURI_DESTSUFFIX] we require this variable in our go recipes. We also must adjust to UNPACKDIR changes which requires rework of the directories for the clones and source layout. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-networking/cni/cni_git.bb22
-rw-r--r--recipes-networking/cni/src_uri.inc26
2 files changed, 29 insertions, 19 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"
14SRCREV_flannel_plugin = "6464faacf5c00e25321573225d74638455ef03a0" 14SRCREV_flannel_plugin = "6464faacf5c00e25321573225d74638455ef03a0"
15SRCREV_FORMAT = "cni_plugins" 15SRCREV_FORMAT = "cni_plugins"
16SRC_URI = "\ 16SRC_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
21SRC_URI += "git://github.com/containernetworking/plugins.git;branch=main;destsuffix=${GO_SRCURI_DESTSUFFIX}/src/github.com/containernetworking/plugins;name=plugins;protocol=https"
22SRC_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>
25include src_uri.inc 26include src_uri.inc
@@ -32,6 +33,7 @@ LICENSE = "Apache-2.0"
32LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" 33LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
33 34
34GO_IMPORT = "import" 35GO_IMPORT = "import"
36S = "${WORKDIR}/git"
35 37
36PV = "v1.2.0-rc0+git${SRCREV_cni}" 38PV = "v1.2.0-rc0+git${SRCREV_cni}"
37CNI_VERSION = "v1.2.0" 39CNI_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
diff --git a/recipes-networking/cni/src_uri.inc b/recipes-networking/cni/src_uri.inc
index 6cda91ab..fe90f20f 100644
--- a/recipes-networking/cni/src_uri.inc
+++ b/recipes-networking/cni/src_uri.inc
@@ -1,65 +1,65 @@
1# golang.org/x/net v0.17.0 1# golang.org/x/net v0.17.0
2# [1] git ls-remote https://go.googlesource.com/net b225e7ca6dde1ef5a5ae5ce922861bda011cfabd 2# [1] git ls-remote https://go.googlesource.com/net b225e7ca6dde1ef5a5ae5ce922861bda011cfabd
3SRCREV_net="b225e7ca6dde1ef5a5ae5ce922861bda011cfabd" 3SRCREV_net="b225e7ca6dde1ef5a5ae5ce922861bda011cfabd"
4SRC_URI += "git://go.googlesource.com/net;name=net;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/golang.org/x/net" 4SRC_URI += "git://go.googlesource.com/net;name=net;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/golang.org/x/net"
5 5
6# golang.org/x/sys v0.14.0 6# golang.org/x/sys v0.14.0
7# [1] git ls-remote https://go.googlesource.com/sys cb378ae1ff8cd45e69d4f172df8370bc844e1f86 7# [1] git ls-remote https://go.googlesource.com/sys cb378ae1ff8cd45e69d4f172df8370bc844e1f86
8SRCREV_sys="cb378ae1ff8cd45e69d4f172df8370bc844e1f86" 8SRCREV_sys="cb378ae1ff8cd45e69d4f172df8370bc844e1f86"
9SRC_URI += "git://go.googlesource.com/sys;name=sys;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/golang.org/x/sys" 9SRC_URI += "git://go.googlesource.com/sys;name=sys;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/golang.org/x/sys"
10 10
11# gopkg.in/yaml.v3 v3.0.1 11# gopkg.in/yaml.v3 v3.0.1
12# [1] git ls-remote https://github.com/go-yaml/yaml f6f7691b1fdeb513f56608cd2c32c51f8194bf51 12# [1] git ls-remote https://github.com/go-yaml/yaml f6f7691b1fdeb513f56608cd2c32c51f8194bf51
13SRCREV_yaml.v3="f6f7691b1fdeb513f56608cd2c32c51f8194bf51" 13SRCREV_yaml.v3="f6f7691b1fdeb513f56608cd2c32c51f8194bf51"
14SRC_URI += "git://github.com/go-yaml/yaml;name=yaml.v3;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/gopkg.in/yaml.v3" 14SRC_URI += "git://github.com/go-yaml/yaml;name=yaml.v3;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/gopkg.in/yaml.v3"
15 15
16# golang.org/x/text v0.13.0 16# golang.org/x/text v0.13.0
17# [1] git ls-remote https://go.googlesource.com/text f488e191e67ed95a5b9b7b39024e5a5f5f1ffd02 17# [1] git ls-remote https://go.googlesource.com/text f488e191e67ed95a5b9b7b39024e5a5f5f1ffd02
18SRCREV_text="f488e191e67ed95a5b9b7b39024e5a5f5f1ffd02" 18SRCREV_text="f488e191e67ed95a5b9b7b39024e5a5f5f1ffd02"
19SRC_URI += "git://go.googlesource.com/text;name=text;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/golang.org/x/text" 19SRC_URI += "git://go.googlesource.com/text;name=text;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/golang.org/x/text"
20 20
21# golang.org/x/tools v0.14.0 21# golang.org/x/tools v0.14.0
22# [1] git ls-remote https://go.googlesource.com/tools 3f4194ee29d7db9b59757dfff729ef55cf89661c 22# [1] git ls-remote https://go.googlesource.com/tools 3f4194ee29d7db9b59757dfff729ef55cf89661c
23SRCREV_tools="3f4194ee29d7db9b59757dfff729ef55cf89661c" 23SRCREV_tools="3f4194ee29d7db9b59757dfff729ef55cf89661c"
24SRC_URI += "git://go.googlesource.com/tools;name=tools;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/golang.org/x/tools" 24SRC_URI += "git://go.googlesource.com/tools;name=tools;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/golang.org/x/tools"
25 25
26# github.com/onsi/gomega v1.30.0 26# github.com/onsi/gomega v1.30.0
27# [1] git ls-remote https://github.com/onsi/gomega f804ac6ada8d36164ecae0513295de8affce1245 27# [1] git ls-remote https://github.com/onsi/gomega f804ac6ada8d36164ecae0513295de8affce1245
28SRCREV_gomega="f804ac6ada8d36164ecae0513295de8affce1245" 28SRCREV_gomega="f804ac6ada8d36164ecae0513295de8affce1245"
29SRC_URI += "git://github.com/onsi/gomega;name=gomega;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/onsi/gomega" 29SRC_URI += "git://github.com/onsi/gomega;name=gomega;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/onsi/gomega"
30 30
31# github.com/go-logr/logr v1.3.0 31# github.com/go-logr/logr v1.3.0
32# [1] git ls-remote https://github.com/go-logr/logr 8adefbede0fe82bdee4fb8c9c9bdc7bc5d91388f 32# [1] git ls-remote https://github.com/go-logr/logr 8adefbede0fe82bdee4fb8c9c9bdc7bc5d91388f
33SRCREV_logr="8adefbede0fe82bdee4fb8c9c9bdc7bc5d91388f" 33SRCREV_logr="8adefbede0fe82bdee4fb8c9c9bdc7bc5d91388f"
34SRC_URI += "git://github.com/go-logr/logr;name=logr;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/go-logr/logr" 34SRC_URI += "git://github.com/go-logr/logr;name=logr;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/go-logr/logr"
35 35
36# github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 36# github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
37# [1] git ls-remote https://github.com/google/pprof 94a9f03dee38882adc8bdfc42cdd6a04f8e7056e 37# [1] git ls-remote https://github.com/google/pprof 94a9f03dee38882adc8bdfc42cdd6a04f8e7056e
38SRCREV_pprof="94a9f03dee38882adc8bdfc42cdd6a04f8e7056e" 38SRCREV_pprof="94a9f03dee38882adc8bdfc42cdd6a04f8e7056e"
39SRC_URI += "git://github.com/google/pprof;name=pprof;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/google/pprof" 39SRC_URI += "git://github.com/google/pprof;name=pprof;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/google/pprof"
40 40
41# github.com/google/go-cmp v0.6.0 41# github.com/google/go-cmp v0.6.0
42# [1] git ls-remote https://github.com/google/go-cmp c3ad8435e7bef96af35732bc0789e5a2278c6d5f 42# [1] git ls-remote https://github.com/google/go-cmp c3ad8435e7bef96af35732bc0789e5a2278c6d5f
43SRCREV_go-cmp="c3ad8435e7bef96af35732bc0789e5a2278c6d5f" 43SRCREV_go-cmp="c3ad8435e7bef96af35732bc0789e5a2278c6d5f"
44SRC_URI += "git://github.com/google/go-cmp;name=go-cmp;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/google/go-cmp" 44SRC_URI += "git://github.com/google/go-cmp;name=go-cmp;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/google/go-cmp"
45 45
46# github.com/onsi/ginkgo/v2 v2.13.2 46# github.com/onsi/ginkgo/v2 v2.13.2
47# [1] git ls-remote https://github.com/onsi/ginkgo 931dc0b144749710bd085d4eb7cd4192a22972d7 47# [1] git ls-remote https://github.com/onsi/ginkgo 931dc0b144749710bd085d4eb7cd4192a22972d7
48SRCREV_v2="931dc0b144749710bd085d4eb7cd4192a22972d7" 48SRCREV_v2="931dc0b144749710bd085d4eb7cd4192a22972d7"
49SRC_URI += "git://github.com/onsi/ginkgo;name=v2;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/onsi/ginkgo/v2" 49SRC_URI += "git://github.com/onsi/ginkgo;name=v2;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/onsi/ginkgo/v2"
50 50
51# github.com/vishvananda/netns v0.0.4 51# github.com/vishvananda/netns v0.0.4
52# [1] git ls-remote https://github.com/vishvananda/netns 7a452d2d15292b2bfb2a2d88e6bdeac156a761b9 52# [1] git ls-remote https://github.com/vishvananda/netns 7a452d2d15292b2bfb2a2d88e6bdeac156a761b9
53SRCREV_netns="7a452d2d15292b2bfb2a2d88e6bdeac156a761b9" 53SRCREV_netns="7a452d2d15292b2bfb2a2d88e6bdeac156a761b9"
54SRC_URI += "git://github.com/vishvananda/netns;name=netns;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/vishvananda/netns" 54SRC_URI += "git://github.com/vishvananda/netns;name=netns;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/vishvananda/netns"
55 55
56# github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 56# github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
57# [1] git ls-remote https://github.com/go-task/slim-sprig 52ccab3ef572c7e1a2c258be183f9a9296d60152 57# [1] git ls-remote https://github.com/go-task/slim-sprig 52ccab3ef572c7e1a2c258be183f9a9296d60152
58SRCREV_slim-sprig="52ccab3ef572c7e1a2c258be183f9a9296d60152" 58SRCREV_slim-sprig="52ccab3ef572c7e1a2c258be183f9a9296d60152"
59SRC_URI += "git://github.com/go-task/slim-sprig;name=slim-sprig;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/go-task/slim-sprig" 59SRC_URI += "git://github.com/go-task/slim-sprig;name=slim-sprig;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/go-task/slim-sprig"
60 60
61# github.com/Masterminds/semver/v3 v3.2.1 61# github.com/Masterminds/semver/v3 v3.2.1
62# [1] git ls-remote https://github.com/Masterminds/semver e06051f8fcc4c8b4a4990c337b9862a2448722e5 62# [1] git ls-remote https://github.com/Masterminds/semver e06051f8fcc4c8b4a4990c337b9862a2448722e5
63SRCREV_v3="e06051f8fcc4c8b4a4990c337b9862a2448722e5" 63SRCREV_v3="e06051f8fcc4c8b4a4990c337b9862a2448722e5"
64SRC_URI += "git://github.com/Masterminds/semver;name=v3;protocol=https;nobranch=1;destsuffix=${WORKDIR}/${BP}/src/import/vendor.fetch/github.com/Masterminds/semver/v3" 64SRC_URI += "git://github.com/Masterminds/semver;name=v3;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/Masterminds/semver/v3"
65 65