Compare commits
10 Commits
940f5f2291
...
94d59fcf7e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94d59fcf7e | ||
|
|
dd4219b77a | ||
|
|
a7d6ba971c | ||
|
|
eb4d3613a8 | ||
|
|
2762316089 | ||
|
|
9e9ddd4c95 | ||
|
|
5a4f8094c7 | ||
|
|
450ba6edfa | ||
|
|
94a8d35152 | ||
|
|
31413d92a6 |
BIN
ad10b6fa91aacd720f1f9ab94341a97a82a24965.tar.gz
Normal file
BIN
ad10b6fa91aacd720f1f9ab94341a97a82a24965.tar.gz
Normal file
Binary file not shown.
156
containernetworking-plugins.spec
Normal file
156
containernetworking-plugins.spec
Normal file
@ -0,0 +1,156 @@
|
||||
%global with_check 0
|
||||
|
||||
Name: containernetworking-plugins
|
||||
Version: 0.8.6
|
||||
Release: 6.gitad10b6f
|
||||
Summary: Library for use by writing CNI plugin
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/containernetworking/plugins
|
||||
Source0: https://github.com/containernetworking/plugins/archive/ad10b6fa91aacd720f1f9ab94341a97a82a24965.tar.gz
|
||||
|
||||
BuildRequires: golang git
|
||||
|
||||
Obsoletes: containernetworking-cni < 0.7.1-2
|
||||
Provides: containernetworking-cni = %{version}-%{release} kubernetes-cni
|
||||
|
||||
%description
|
||||
The CNI (Container Network Interface) project consists of a specification and libraries for
|
||||
writing plugins to configure network interfaces in Linux containers, along with a number of
|
||||
supported plugins. CNI concerns itself only with network connectivity of containers and removing
|
||||
allocated resources when the container is deleted.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Library for use by writing CNI plugin
|
||||
BuildArch:noarch
|
||||
|
||||
%description devel
|
||||
%{name}-devel provides libraries for those packages with the "github.com/containernetworking/plugins"
|
||||
prefix to be used at build time.
|
||||
|
||||
%package unit-test-devel
|
||||
Summary: Unit tests for containernetworking-plugins package
|
||||
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%description unit-test-devel
|
||||
%{name}-devel provides libraries for those packages with the "github.com/containernetworking/plugins"
|
||||
prefix to be used at build time.
|
||||
|
||||
%prep
|
||||
%autosetup -Sgit -n plugins-ad10b6fa91aacd720f1f9ab94341a97a82a24965 -p1
|
||||
rm -rf plugins/main/windows
|
||||
|
||||
%build
|
||||
export ORG_PATH="github.com/containernetworking"
|
||||
export REPO_PATH="github.com/containernetworking/plugins"
|
||||
|
||||
if [ ! -h gopath/src/github.com/containernetworking/plugins ]; then
|
||||
mkdir -p gopath/src/github.com/containernetworking
|
||||
ln -s ../../../.. gopath/src/github.com/containernetworking/plugins || exit 255
|
||||
fi
|
||||
|
||||
export GOPATH=$(pwd)/gopath
|
||||
mkdir -p $(pwd)/bin
|
||||
export GO111MODULE=off
|
||||
export PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample"
|
||||
|
||||
for dirpath in $PLUGINS; do
|
||||
if [ -d "$dirpath" ]; then
|
||||
plugin="$(basename "$dirpath")"
|
||||
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x -o "${PWD}/bin/$plugin" "$@" github.com/containernetworking/plugins/$dirpath
|
||||
fi
|
||||
done
|
||||
|
||||
%install
|
||||
install -d -p %{buildroot}%{_libexecdir}/cni/
|
||||
install -p -m755 bin/* %{buildroot}/%{_libexecdir}/cni
|
||||
install -d -p %{buildroot}/%{gopath}/src/github.com/containernetworking/plugins/
|
||||
|
||||
echo "%%dir %%{gopath}/src/github.com/containernetworking/plugins/." >> devel.file-list
|
||||
for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go" | grep -v "vendor") ; do
|
||||
dirprefix=$(dirname $file)
|
||||
install -d -p %{buildroot}/%{gopath}/src/github.com/containernetworking/plugins/$dirprefix
|
||||
cp -pav $file %{buildroot}/%{gopath}/src/github.com/containernetworking/plugins/$file
|
||||
echo "%%{gopath}/src/github.com/containernetworking/plugins/$file" >> devel.file-list
|
||||
|
||||
while [ "$dirprefix" != "." ]; do
|
||||
echo "%%dir %%{gopath}/src/github.com/containernetworking/plugins/$dirprefix" >> devel.file-list
|
||||
dirprefix=$(dirname $dirprefix)
|
||||
done
|
||||
done
|
||||
|
||||
install -d -p %{buildroot}/%{gopath}/src/github.com/containernetworking/plugins/
|
||||
|
||||
for file in $(find . -iname "*_test.go" | grep -v "vendor") ; do
|
||||
dirprefix=$(dirname $file)
|
||||
install -d -p %{buildroot}/%{gopath}/src/github.com/containernetworking/plugins/$dirprefix
|
||||
cp -pav $file %{buildroot}/%{gopath}/src/github.com/containernetworking/plugins/$file
|
||||
echo "%%{gopath}/src/github.com/containernetworking/plugins/$file" >> unit-test-devel.file-list
|
||||
|
||||
while [ "$dirprefix" != "." ]; do
|
||||
echo "%%dir %%{gopath}/src/github.com/containernetworking/plugins/$dirprefix" >> devel.file-list
|
||||
dirprefix=$(dirname $dirprefix)
|
||||
done
|
||||
done
|
||||
|
||||
sort -u -o devel.file-list devel.file-list
|
||||
|
||||
%check
|
||||
%if 0%(?with_check)
|
||||
ln -s ./ ./vendor/src
|
||||
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
||||
|
||||
%gotest github.com/containernetworking/plugins/libcni
|
||||
%gotest github.com/containernetworking/plugins/pkg/invoke
|
||||
%gotest github.com/containernetworking/plugins/pkg/ip
|
||||
%gotest github.com/containernetworking/plugins/pkg/ipam
|
||||
%gotest github.com/containernetworking/plugins/pkg/ns
|
||||
%gotest github.com/containernetworking/plugins/pkg/skel
|
||||
%gotest github.com/containernetworking/plugins/pkg/types
|
||||
%gotest github.com/containernetworking/plugins/pkg/types/020
|
||||
%gotest github.com/containernetworking/plugins/pkg/types/current
|
||||
%gotest github.com/containernetworking/plugins/pkg/utils
|
||||
%gotest github.com/containernetworking/plugins/pkg/utils/hwaddr
|
||||
%gotest github.com/containernetworking/plugins/pkg/version
|
||||
%gotest github.com/containernetworking/plugins/pkg/version/legacy_examples
|
||||
%gotest github.com/containernetworking/plugins/pkg/version/testhelpers
|
||||
%gotest github.com/containernetworking/plugins/plugins/ipam/dhcp
|
||||
%gotest github.com/containernetworking/plugins/plugins/ipam/host-local
|
||||
%gotest github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator
|
||||
%gotest github.com/containernetworking/plugins/plugins/main/bridge
|
||||
%gotest github.com/containernetworking/plugins/plugins/main/ipvlan
|
||||
%gotest github.com/containernetworking/plugins/plugins/main/loopback
|
||||
%gotest github.com/containernetworking/plugins/plugins/main/macvlan
|
||||
%gotest github.com/containernetworking/plugins/plugins/main/ptp
|
||||
%gotest github.com/containernetworking/plugins/plugins/meta/flannel
|
||||
%gotest github.com/containernetworking/plugins/plugins/test/noop
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc *.md
|
||||
%dir %{_libexecdir}/cni
|
||||
%{_libexecdir}/cni/*
|
||||
|
||||
%files devel -f devel.file-list
|
||||
%license LICENSE
|
||||
%doc *.md
|
||||
%dir %{gopath}/src/github.com/containernetworking
|
||||
|
||||
%files unit-test-devel -f unit-test-devel.file-list
|
||||
%license LICENSE
|
||||
%doc *.md
|
||||
|
||||
%changelog
|
||||
* Thu Dec 28 2023 yaoxin <yao_xin001@hoperun.com> - 0.8.6-6.gitad10b6f
|
||||
- Rebuild for golang cves: CVE-2023-24534,CVE-2023-24536,CVE-2023-24537 and CVE-2023-24538
|
||||
|
||||
* Thu May 6 2021 lingsheng <lingsheng@huawei.com> - 0.8.6-5.gitad10b6f
|
||||
- Change BuildRequires to golang
|
||||
|
||||
* Wed Aug 19 2020 liuzekun <liuzekun@huawei.com> - 0.8.6-3.gitad10b6f
|
||||
- Upgrade cni plugins to v0.8.6
|
||||
|
||||
* Wed Nov 20 2019 duyeyu <duyeyu@huawei.com> - 0.8.2-3.git485be65
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user