From de98d744a8f4835d22ea8310381636f733377dfc Mon Sep 17 00:00:00 2001 From: Steven Webster Date: Tue, 22 Mar 2022 12:40:01 -0400 Subject: [PATCH] debian-pkg: Add bond-cni plugin for debian This commit is a follow-on for d900a5b which introduced the bond-cni plugin for Centos. In this commit we introduce the same plugin for Debian. Since there is no existing Debian package for the bond-cni, we build it from source (tar.gz) to create the package. The plugin is installed at /usr/libexec/cni/ to align with where k8s expects plugins to be in StarlingX. Testing: Pass: Build Pass: bond plugin present at /usr/libexec/cni/ Story: 2009800 Task: 44845 Signed-off-by: Steven Webster Change-Id: Ib9e805d587604f9b0a43a685b9b6970e5be1deb4 --- debian_pkg_dirs | 1 + .../debian/deb_folder/bond-cni.install | 1 + .../cni/bond-cni/debian/deb_folder/changelog | 5 ++++ .../cni/bond-cni/debian/deb_folder/control | 23 ++++++++++++++++++ .../cni/bond-cni/debian/deb_folder/copyright | 24 +++++++++++++++++++ .../cni/bond-cni/debian/deb_folder/rules | 8 +++++++ kubernetes/cni/bond-cni/debian/meta_data.yaml | 11 +++++++++ 7 files changed, 73 insertions(+) create mode 100644 kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install create mode 100644 kubernetes/cni/bond-cni/debian/deb_folder/changelog create mode 100644 kubernetes/cni/bond-cni/debian/deb_folder/control create mode 100644 kubernetes/cni/bond-cni/debian/deb_folder/copyright create mode 100644 kubernetes/cni/bond-cni/debian/deb_folder/rules create mode 100644 kubernetes/cni/bond-cni/debian/meta_data.yaml diff --git a/debian_pkg_dirs b/debian_pkg_dirs index a65e35fe9..d812f5bb2 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -39,6 +39,7 @@ grub/grubby kubernetes/armada kubernetes/armada-helm-toolkit kubernetes/chartmuseum +kubernetes/cni/bond-cni kubernetes/cni/plugins kubernetes/containerd kubernetes/crictl diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install b/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install new file mode 100644 index 000000000..29e62716d --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install @@ -0,0 +1 @@ +bond /usr/libexec/cni/ diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/changelog b/kubernetes/cni/bond-cni/debian/deb_folder/changelog new file mode 100644 index 000000000..4c2548b5e --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +bond-cni (1.0-bff6422d7089d988dc1548e6abe0543601f6e1c7) unstable; urgency=medium + + * Initial release. + + -- Steven Webster Fri, 18 Mar 2022 20:41:30 +1000 diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/control b/kubernetes/cni/bond-cni/debian/deb_folder/control new file mode 100644 index 000000000..c4f4a195a --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/control @@ -0,0 +1,23 @@ +Source: bond-cni +Section: golang +Priority: optional +Maintainer: StarlingX Developers +Standards-Version: 4.6.0 +Homepage: https://www.starlingx.io +Build-Depends: debhelper-compat (= 13), + dh-golang, + golang-any, + golang-github-appc-cni-dev, + golang-github-containernetworking-plugins-dev, + golang-github-vishvananda-netlink-dev, + golang-github-coreos-go-iptables-dev (>= 0.4.5~), + golang-github-safchain-ethtool-dev, + golang-golang-x-sys-dev, +XS-Go-Import-Path: github.com/bond + +Package: bond-cni +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Provides a binary for the bond-cni plugin. + Bonding provides a method for aggregating multiple network interfaces + into a single logical "bonded" interface. diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/copyright b/kubernetes/cni/bond-cni/debian/deb_folder/copyright new file mode 100644 index 000000000..acdd9031a --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/copyright @@ -0,0 +1,24 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Upstream-Name: bond-cni +Upstream-Contact: https://github.com/k8snetworkplumbingwg/ +Source: https://github.com/k8snetworkplumbingwg/bond-cni/ +Files: * +Copyright: (C) 2018-2022 https://github.com/k8snetworkplumbingwg/bond-cni/ +License: Apache-2 + +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/rules b/kubernetes/cni/bond-cni/debian/deb_folder/rules new file mode 100644 index 000000000..37c344d2b --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +export DH_VERBOSE = 1 +export DH_GOLANG_GO_GENERATE := 1 + +%: + dh $@ --buildsystem=golang --with=golang --builddirectory=_build + diff --git a/kubernetes/cni/bond-cni/debian/meta_data.yaml b/kubernetes/cni/bond-cni/debian/meta_data.yaml new file mode 100644 index 000000000..0fe6e33a4 --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/meta_data.yaml @@ -0,0 +1,11 @@ +--- +debname: bond-cni +debver: 1.0-bff6422d7089d988dc1548e6abe0543601f6e1c7 +dl_path: + name: bond-cni-1.0-bff6422d7089d988dc1548e6abe0543601f6e1c7.tar.gz + url: https://api.github.com/repos/k8snetworkplumbingwg/bond-cni/tarball/bff6422d7089d988dc1548e6abe0543601f6e1c7 + md5sum: 9c0ae1dad63cf953b5257d3253fda7cb + sha256sum: c20d67e19e5508e12683adfe18252f8b99a8e902980fb08e2de67d1893cabc5b +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true