From 0c0aa6ff67db885b0a42957126ece93be77f6a36 Mon Sep 17 00:00:00 2001 From: Steven Webster Date: Tue, 14 Jun 2022 16:07:58 -0400 Subject: [PATCH] debian: fix issue with bond-cni binary install This commit fixes an issue with the debian install of the bond CNI plugin. It was noticed that the 'bond' source directory was being installed, rather than the built 'bond' binary. Since the build output is a single binary, it will be found in debian/bond-cni/, rather than the standard debian/tmp/ dh_install is instructed where to find the build output installed by dh_auto_install. Testing: - Debian build and install - Confirmed the bond binary is at /var/opt/cni/bin/ - Functional testing to ensure a pod using the bond plugin could be launched Depends-On: https://review.opendev.org/c/starlingx/integ/+/844865 Closes-Bug: 1976111 Signed-off-by: Steven Webster Change-Id: I2a504b8bfc210dc09487a496959da235dec82525 --- kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install | 2 +- kubernetes/cni/bond-cni/debian/deb_folder/rules | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install b/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install index 1eeb9b126..8ac2fccb7 100644 --- a/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install +++ b/kubernetes/cni/bond-cni/debian/deb_folder/bond-cni.install @@ -1 +1 @@ -bond /var/opt/cni/bin/ +usr/bin/* /var/opt/cni/bin/ diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/rules b/kubernetes/cni/bond-cni/debian/deb_folder/rules index f6af93e1e..61ec68ae5 100644 --- a/kubernetes/cni/bond-cni/debian/deb_folder/rules +++ b/kubernetes/cni/bond-cni/debian/deb_folder/rules @@ -3,7 +3,11 @@ export PATH := /usr/lib/go-1.17/bin:$(PATH) export DH_VERBOSE = 1 export DH_GOLANG_GO_GENERATE := 1 +export INSTALL_DIR := $(CURDIR)/debian/bond-cni/ %: dh $@ --buildsystem=golang --with=golang --builddirectory=_build + +override_dh_install: + dh_install --sourcedir=$(INSTALL_DIR)