From 553a36915878d6bf9d215ed88be6d7453be2783b Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Sat, 21 Nov 2020 23:13:55 +0800 Subject: [PATCH] Fix reference to vendor.conf in scripts Signed-off-by: Shengjing Zhu --- contrib/Dockerfile.test | 2 +- script/setup/install-cni | 5 +++-- script/setup/install-runc | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/Dockerfile.test b/contrib/Dockerfile.test index bb5a01e96..6063e130e 100644 --- a/contrib/Dockerfile.test +++ b/contrib/Dockerfile.test @@ -32,7 +32,7 @@ RUN apt-get update && apt-get install -y \ libseccomp-dev \ --no-install-recommends -COPY vendor.conf vendor.conf +COPY go.mod go.mod COPY script/setup/install-runc install-runc ARG GOPROXY=direct ARG GO111MODULE=off diff --git a/script/setup/install-cni b/script/setup/install-cni index c9cf02793..7ed2ba00f 100755 --- a/script/setup/install-cni +++ b/script/setup/install-cni @@ -17,14 +17,15 @@ # # Builds and installs cni plugins to /opt/cni/bin, # and create basic cni config in /etc/cni/net.d. -# The commit defined in vendor.conf +# The commit defined in go.mod # set -eu -o pipefail -CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}') +CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/containerd/containerd/go.mod | awk '{print $2}') CNI_DIR=${DESTDIR:=''}/opt/cni CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d +cd "$GOPATH" go get -d github.com/containernetworking/plugins/... cd "$GOPATH"/src/github.com/containernetworking/plugins git checkout $CNI_COMMIT diff --git a/script/setup/install-runc b/script/setup/install-runc index d0efb3724..e521980c6 100755 --- a/script/setup/install-runc +++ b/script/setup/install-runc @@ -16,13 +16,14 @@ # # Builds and installs runc to /usr/local/go/bin based off -# the commit defined in vendor.conf +# the commit defined in go.mod # set -eu -o pipefail function install_runc() { - RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/vendor.conf | awk '{print $2}') + RUNC_COMMIT=$(grep opencontainers/runc "$GOPATH"/src/github.com/containerd/containerd/go.mod | awk '{print $2}') + cd "$GOPATH" go get -d github.com/opencontainers/runc cd "$GOPATH"/src/github.com/opencontainers/runc git checkout $RUNC_COMMIT