[main] Upgrade cni to v1.0.1 (#2167)
* update cni * upgrade cni Co-authored-by: Henry Li <lihl@microsoft.com>
This commit is contained in:
Родитель
c1a1b56484
Коммит
b1c95594c5
|
@ -9,14 +9,14 @@ if [ ! -h gopath/src/${REPO_PATH} ]; then
|
|||
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
|
||||
fi
|
||||
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
export GO17VENDOREXPERIMENT=1
|
||||
export GOPATH=${PWD}/gopath
|
||||
|
||||
echo "Building API"
|
||||
go build -buildmode=pie "$@" ${REPO_PATH}/libcni
|
||||
go build -mod vendor -v -buildmode=pie "$@" ${REPO_PATH}/libcni
|
||||
|
||||
echo "Building reference CLI"
|
||||
go build -buildmode=pie -o ${PWD}/bin/cnitool "$@" ${REPO_PATH}/cnitool
|
||||
go build -mod vendor -v -buildmode=pie -o ${PWD}/bin/cnitool "$@" ${REPO_PATH}/cnitool
|
||||
|
||||
echo "Building plugins"
|
||||
PLUGINS="plugins/test/*"
|
||||
|
@ -24,6 +24,6 @@ for d in $PLUGINS; do
|
|||
if [ -d $d ]; then
|
||||
plugin=$(basename $d)
|
||||
echo " " $plugin
|
||||
go build -buildmode=pie -o ${PWD}/bin/$plugin "$@" ${REPO_PATH}/$d
|
||||
go build -mod vendor -v -buildmode=pie -o ${PWD}/bin/$plugin "$@" ${REPO_PATH}/$d
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"99-loopback.conf": "82e03a3292ca327bcc86af3664a0d7b110cb1c39bca16d3cc703abd49c3c9a1b",
|
||||
"build.sh": "0626c2cc6371866f489ec1215e48a4192ece3e3019794ba7292e8d637d90eedc",
|
||||
"cni-0.8.1.tar.gz": "6242e7905b5f8f7561a21f595209b569998727927380a8cdf5ab58e7fd5ac2d5"
|
||||
"build.sh": "1fc4529fae5bdf52cf6b9e5eb603c7703046f35e76c6c3a525085c63ef55a7ff",
|
||||
"cni-1.0.1-vendor.tar.gz": "c837529a293115a9d2c7ac59eaf4600c62c7597dd998cf51e851eb5e1016ebf1",
|
||||
"cni-1.0.1.tar.gz": "0e5376f70fb36c26935ddfb90b0da69736592ba8b577fbfb904750034c053d3b"
|
||||
}
|
||||
}
|
|
@ -23,8 +23,8 @@
|
|||
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
|
||||
Summary: Container Network Interface - networking for Linux containers
|
||||
Name: cni
|
||||
Version: 0.8.1
|
||||
Release: 2%{?dist}
|
||||
Version: 1.0.1
|
||||
Release: 1%{?dist}
|
||||
License: Apache-2.0
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
|
@ -34,6 +34,20 @@ URL: https://github.com/containernetworking/cni
|
|||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: 99-loopback.conf
|
||||
Source2: build.sh
|
||||
# Below is a manually created tarball, no download link.
|
||||
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
|
||||
# How to re-build this file:
|
||||
# 1. wget https://github.com/containernetworking/cni/archive/refs/tags/v1.0.1.tar.gz -o %%{name}-%%{version}.tar.gz
|
||||
# 2. tar -xf %%{name}-%%{version}.tar.gz
|
||||
# 3. cd %%{name}-%%{version}
|
||||
# 4. go mod vendor
|
||||
# 5. tar --sort=name \
|
||||
# --mtime="2021-04-26 00:00Z" \
|
||||
# --owner=0 --group=0 --numeric-owner \
|
||||
# --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
|
||||
# -cf %%{name}-%%{version}-vendor.tar.gz vendor
|
||||
#
|
||||
Source3: %{name}-%{version}-vendor.tar.gz
|
||||
BuildRequires: golang
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: xz
|
||||
|
@ -55,6 +69,9 @@ range of support and the specification is simple to implement.
|
|||
cp %{SOURCE2} build.sh
|
||||
|
||||
%build
|
||||
# create vendor folder from the vendor tarball and set vendor mode
|
||||
tar -xf %{SOURCE3} --no-same-owner
|
||||
|
||||
# go1.16+ default is GO111MODULE=on set to auto temporarily
|
||||
# until using upstream release with go.mod
|
||||
export GO111MODULE=auto
|
||||
|
@ -96,6 +113,11 @@ install -m 755 -d "%{buildroot}%{cni_doc_dir}"
|
|||
%{_sbindir}/cnitool
|
||||
|
||||
%changelog
|
||||
* Wed Feb 09 2022 Henry Li <lihl@microsoft.com> - 1.0.1-1
|
||||
- Upgrade to version 1.0.1
|
||||
- Add vendor source, which is required to build
|
||||
- Modify build.sh to build using vendor source
|
||||
|
||||
* Tue Aug 17 2021 Henry Li <lihl@microsoft.com> - 0.8.1-2
|
||||
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
|
||||
- License Verified
|
||||
|
|
|
@ -1987,8 +1987,8 @@
|
|||
"type": "other",
|
||||
"other": {
|
||||
"name": "cni",
|
||||
"version": "0.8.1",
|
||||
"downloadUrl": "https://github.com/containernetworking/cni/archive/refs/tags/v0.8.1.tar.gz"
|
||||
"version": "1.0.1",
|
||||
"downloadUrl": "https://github.com/containernetworking/cni/archive/refs/tags/v1.0.1.tar.gz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче