diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-01-25 14:44:26 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-03-15 17:17:19 +0000 |
commit | f1892e34f6a827c21e4bd19fddf5cbabecb36dbc (patch) | |
tree | 3bf8891f7fe70a1f50b6322f46955017d940aee8 /recipes-networking/cni/relocation.inc | |
parent | 2a217f7e9177665f1c0fb10f98eb58af91c7d01c (diff) | |
download | meta-virtualization-f1892e34f6a827c21e4bd19fddf5cbabecb36dbc.tar.gz |
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-networking/cni/relocation.inc')
-rw-r--r-- | recipes-networking/cni/relocation.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/recipes-networking/cni/relocation.inc b/recipes-networking/cni/relocation.inc new file mode 100644 index 00000000..456e2c8a --- /dev/null +++ b/recipes-networking/cni/relocation.inc | |||
@@ -0,0 +1,30 @@ | |||
1 | export sites="golang.org/x/net:golang.org/x/net:force \ | ||
2 | golang.org/x/sys:golang.org/x/sys:force \ | ||
3 | gopkg.in/yaml.v3:gopkg.in/yaml.v3:force \ | ||
4 | golang.org/x/text:golang.org/x/text:force \ | ||
5 | golang.org/x/tools:golang.org/x/tools:force \ | ||
6 | github.com/onsi/gomega:github.com/onsi/gomega:force \ | ||
7 | github.com/go-logr/logr:github.com/go-logr/logr:force \ | ||
8 | github.com/google/pprof:github.com/google/pprof:force \ | ||
9 | github.com/google/go-cmp:github.com/google/go-cmp:force \ | ||
10 | github.com/onsi/ginkgo/v2:github.com/onsi/ginkgo/v2:force \ | ||
11 | github.com/vishvananda/netns:github.com/vishvananda/netns:force \ | ||
12 | github.com/go-task/slim-sprig:github.com/go-task/slim-sprig:force \ | ||
13 | github.com/Masterminds/semver/v3:github.com/Masterminds/semver/v3:force" | ||
14 | |||
15 | do_compile:prepend() { | ||
16 | cd ${S}/src/import | ||
17 | for s in $sites; do | ||
18 | site_dest=$(echo $s | cut -d: -f1) | ||
19 | site_source=$(echo $s | cut -d: -f2) | ||
20 | force_flag=$(echo $s | cut -d: -f3) | ||
21 | mkdir -p vendor.copy/$site_dest | ||
22 | if [ -n "$force_flag" ]; then | ||
23 | echo "[INFO] $site_dest: force copying .go files" | ||
24 | rm -rf vendor.copy/$site_dest | ||
25 | rsync -a --exclude='vendor/' --exclude='.git/' vendor.fetch/$site_source/ vendor.copy/$site_dest | ||
26 | else | ||
27 | [ -n "$(ls -A vendor.copy/$site_dest/*.go 2> /dev/null)" ] && { echo "[INFO] vendor.fetch/$site_source -> $site_dest: go copy skipped (files present)" ; true ; } || { echo "[INFO] $site_dest: copying .go files" ; rsync -a --exclude='vendor/' --exclude='.git/' vendor.fetch/$site_source/ vendor.copy/$site_dest ; } | ||
28 | fi | ||
29 | done | ||
30 | } | ||