diff options
Diffstat (limited to 'recipes-extended/rootlesskit/relocation.inc')
-rw-r--r-- | recipes-extended/rootlesskit/relocation.inc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-extended/rootlesskit/relocation.inc b/recipes-extended/rootlesskit/relocation.inc new file mode 100644 index 00000000..6c64233d --- /dev/null +++ b/recipes-extended/rootlesskit/relocation.inc | |||
@@ -0,0 +1,37 @@ | |||
1 | export sites = "gotest.tools/v3:gotest.tools/v3:force \ | ||
2 | golang.org/x/sys:golang.org/x/sys:force \ | ||
3 | golang.org/x/net:golang.org/x/net:force \ | ||
4 | github.com/gofrs/flock:github.com/gofrs/flock:force \ | ||
5 | github.com/google/uuid:github.com/google/uuid:force \ | ||
6 | github.com/gorilla/mux:github.com/gorilla/mux:force \ | ||
7 | github.com/moby/vpnkit:github.com/moby/vpnkit:force \ | ||
8 | github.com/u-root/uio:github.com/u-root/uio:force \ | ||
9 | github.com/songgao/water:github.com/songgao/water:force \ | ||
10 | github.com/urfave/cli/v2:github.com/urfave/cli/v2:force \ | ||
11 | github.com/google/go-cmp:github.com/google/go-cmp:force \ | ||
12 | github.com/pierrec/lz4/v4:github.com/pierrec/lz4/v4:force \ | ||
13 | github.com/xrash/smetrics:github.com/xrash/smetrics:force \ | ||
14 | github.com/sirupsen/logrus:github.com/sirupsen/logrus:force \ | ||
15 | github.com/insomniacslk/dhcp:github.com/insomniacslk/dhcp:force \ | ||
16 | github.com/Masterminds/semver/v3:github.com/Masterminds/semver/v3:force \ | ||
17 | github.com/cpuguy83/go-md2man/v2:github.com/cpuguy83/go-md2man/v2:force \ | ||
18 | github.com/moby/sys/mountinfo:github.com/moby/sys/mountinfo/mountinfo:force \ | ||
19 | github.com/russross/blackfriday/v2:github.com/russross/blackfriday/v2:force \ | ||
20 | github.com/containernetworking/plugins:github.com/containernetworking/plugins:force" | ||
21 | |||
22 | do_compile:prepend() { | ||
23 | cd ${S}/src/import | ||
24 | for s in $sites; do | ||
25 | site_dest=$(echo $s | cut -d: -f1) | ||
26 | site_source=$(echo $s | cut -d: -f2) | ||
27 | force_flag=$(echo $s | cut -d: -f3) | ||
28 | mkdir -p vendor.copy/$site_dest | ||
29 | if [ -n "$force_flag" ]; then | ||
30 | echo "[INFO] $site_dest: force copying .go files" | ||
31 | rm -rf vendor.copy/$site_dest | ||
32 | rsync -a --exclude='vendor/' --exclude='.git/' vendor.fetch/$site_source/ vendor.copy/$site_dest | ||
33 | else | ||
34 | [ -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 ; } | ||
35 | fi | ||
36 | done | ||
37 | } | ||