Summary: Calico CNI plugin Name: calico-cni Version: 3.3.1 Release: 1 License: ASL 2.0 URL: http://www.projectcalico.org # Download https://github.com/projectcalico/cni-plugin/archive/v3.3.1.tar.gz # Run glide install --strip-vendor Source0: cni-plugin-3.3.1+vendor.tar.gz Source1: https://github.com/containernetworking/plugins/archive/v0.6.0.tar.gz Patch0: cni-plugin-3.3.1-aix.patch Patch1: plugins-0.6.0-aix.patch Group: Applications/System BuildRequires: golang Requires: criwpar >= 0.2.0 %description This plugin allows you to use Calico networking for any orchestrator which makes use of the CNI networking specification. %post mkwpari -e PATH=/usr/bin:/etc:/usr/sbin:/sbin:/opt/freeware/bin:/opt/cni/bin -c /opt/cni/bin/calico -w /opt/cni/bin /opt/freeware/share/kubernetes/calico-cni.bff ibmcom/calico-cni-aix:v3.3.1 >/dev/null rm -f /opt/freeware/share/kubernetes/calico-cni.bff exit 0 %postun rmwpari ibmcom/calico-cni-aix:v3.3.1 >/dev/null 2>&1 rm -f /opt/cni/bin/calico /opt/cni/bin/calico-ipam /opt/cni/bin/portmap exit 0 %prep %setup -q -c -a 1 cd cni-plugin-3.3.1/ %patch0 -p1 -b .aix cd ../plugins-0.6.0/ %patch1 -p1 -b .aix %build export PATH=/usr/bin:/etc:/usr/sbin:/sbin:/opt/freeware/lib/golang/bin:/opt/freeware/bin mkdir -p ./_build/src/github.com/projectcalico/ ln -s $(pwd)/cni-plugin-3.3.1 ./_build/src/github.com/projectcalico/cni-plugin mkdir -p ./_build/src/github.com/containernetworking/ ln -s $(pwd)/plugins-0.6.0 ./_build/src/github.com/containernetworking/plugins export GOPATH=$(pwd)/_build export GOFLAGS="-gcflags=all=-trimpath=$GOPATH" ulimit -d unlimited ulimit -m unlimited ulimit -s unlimited ulimit -f unlimited # calico go build -v -o dist/calico $GOPATH/src/github.com/projectcalico/cni-plugin/calico.go strip -X64 -t dist/calico # calico-ipam go build -v -o dist/calico-ipam $GOPATH/src/github.com/projectcalico/cni-plugin/ipam/calico-ipam.go strip -X64 -t dist/calico-ipam # portmap go build -v -o dist/portmap github.com/containernetworking/plugins/plugins/meta/portmap strip -X64 -t dist/portmap # calico-cni.bff rm -rf dist/calico-cni-rootfs mkdir -p dist/calico-cni-rootfs cd dist/calico-cni-rootfs mkdir dev etc home tmp var ln -s /usr/bin/ bin ln -s /usr/lib/ lib ln -s /usr/lib/boot/unix_64 unix mkdir -p opt/cni/bin cp ../calico ../calico-ipam ../portmap opt/cni/bin/ cp $GOPATH/src/github.com/projectcalico/cni-plugin/k8s-install/scripts/install-cni.sh . cp $GOPATH/src/github.com/projectcalico/cni-plugin/k8s-install/scripts/calico.conf.default ./calico.conf.tmp find . | backup -iqf ../calico-cni.bff cd - %install mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/kubernetes /usr/bin/install -M 0644 -f ${RPM_BUILD_ROOT}%{_datadir}/kubernetes dist/calico-cni.bff %clean rm -rf ${RPM_BUILD_ROOT} %files %doc cni-plugin-3.3.1/README.md %license cni-plugin-3.3.1/LICENSE %config(missingok) %{_datadir}/kubernetes/calico-cni.bff %changelog * Wed Mar 20 2019 Ayappan P - 3.3.1-1 - AIX Toolbox build * Fri Mar 1 2019 Damien Bergamini - 3.3.1-1 - Initial port of calico-cni 3.3.1 to AIX - Switch from gccgo compiler to golang * Tue Aug 21 2018 Damien Bergamini - 2.0.3-1 - Initial port of calico-cni 2.0.3 to AIX