diff --git a/kubernetes/cni/bond-cni/centos/bond-cni.spec b/kubernetes/cni/bond-cni/centos/bond-cni.spec index 5a40dedd7..3c45c9c42 100644 --- a/kubernetes/cni/bond-cni/centos/bond-cni.spec +++ b/kubernetes/cni/bond-cni/centos/bond-cni.spec @@ -26,9 +26,10 @@ License: ASL 2.0 URL: https://%{provider_prefix} Source0: %{repo}-%{commit}.tar.gz +Patch1: 0001-Add-explicit-vendor-module-dependencies.patch ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 %{ix86} -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.13} +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang = 1.17.5} Provides: bond-cni = %{version}-%{release} %description @@ -37,7 +38,8 @@ bonding of containers and removing any allocated resources when the container is deleted. %prep -%autosetup -n %{repo}-%{commit} +%setup -n %{repo}-%{commit} +%patch1 -p1 %build export ORG_PATH="%{provider}.%{provider_tld}/%{project}" diff --git a/kubernetes/cni/bond-cni/centos/build_srpm.data b/kubernetes/cni/bond-cni/centos/build_srpm.data index 775dd0147..390b3dc00 100644 --- a/kubernetes/cni/bond-cni/centos/build_srpm.data +++ b/kubernetes/cni/bond-cni/centos/build_srpm.data @@ -2,6 +2,6 @@ VERSION=bff6422d7089d988dc1548e6abe0543601f6e1c7 TAR_NAME=bond-cni TAR="${TAR_NAME}-${VERSION}.tar.gz" -COPY_LIST="${CGCS_BASE}/downloads/${TAR}" +COPY_LIST="${CGCS_BASE}/downloads/${TAR} ${FILES_BASE}/*" TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/cni/bond-cni/centos/files/0001-Add-explicit-vendor-module-dependencies.patch b/kubernetes/cni/bond-cni/centos/files/0001-Add-explicit-vendor-module-dependencies.patch new file mode 100644 index 000000000..105b8ecbf --- /dev/null +++ b/kubernetes/cni/bond-cni/centos/files/0001-Add-explicit-vendor-module-dependencies.patch @@ -0,0 +1,68 @@ +From 76ac4271502d6356f5150f6047d9dc05eb2470bd Mon Sep 17 00:00:00 2001 +From: Steven Webster +Date: Fri, 8 Apr 2022 16:01:58 -0400 +Subject: [PATCH] Add explicit vendor module dependencies + +Signed-off-by: Steven Webster +--- + go.mod | 6 ++++++ + vendor/modules.txt | 11 +++++++---- + 2 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/go.mod b/go.mod +index c334299..385a70f 100644 +--- a/go.mod ++++ b/go.mod +@@ -8,3 +8,9 @@ require ( + github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 + github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 + ) ++ ++require ( ++ github.com/coreos/go-iptables v0.6.0 // indirect ++ github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 // indirect ++ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect ++) +diff --git a/vendor/modules.txt b/vendor/modules.txt +index ac4b3f5..d684960 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -1,5 +1,5 @@ + # github.com/containernetworking/cni v1.0.1 +-## explicit ++## explicit; go 1.14 + github.com/containernetworking/cni/pkg/invoke + github.com/containernetworking/cni/pkg/skel + github.com/containernetworking/cni/pkg/types +@@ -11,22 +11,25 @@ github.com/containernetworking/cni/pkg/types/internal + github.com/containernetworking/cni/pkg/utils + github.com/containernetworking/cni/pkg/version + # github.com/containernetworking/plugins v1.0.1 +-## explicit ++## explicit; go 1.16 + github.com/containernetworking/plugins/pkg/ip + github.com/containernetworking/plugins/pkg/ipam + github.com/containernetworking/plugins/pkg/ns + github.com/containernetworking/plugins/pkg/utils/sysctl + # github.com/coreos/go-iptables v0.6.0 ++## explicit; go 1.16 + github.com/coreos/go-iptables/iptables + # github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 ++## explicit + github.com/safchain/ethtool + # github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 +-## explicit ++## explicit; go 1.12 + github.com/vishvananda/netlink + github.com/vishvananda/netlink/nl + # github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 +-## explicit ++## explicit; go 1.12 + github.com/vishvananda/netns + # golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e ++## explicit; go 1.17 + golang.org/x/sys/internal/unsafeheader + golang.org/x/sys/unix +-- +2.29.2 + diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/control b/kubernetes/cni/bond-cni/debian/deb_folder/control index c4f4a195a..6295a19ef 100644 --- a/kubernetes/cni/bond-cni/debian/deb_folder/control +++ b/kubernetes/cni/bond-cni/debian/deb_folder/control @@ -6,7 +6,7 @@ Standards-Version: 4.6.0 Homepage: https://www.starlingx.io Build-Depends: debhelper-compat (= 13), dh-golang, - golang-any, + golang-1.17, golang-github-appc-cni-dev, golang-github-containernetworking-plugins-dev, golang-github-vishvananda-netlink-dev, diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/patches/0001-Add-explicit-vendor-module-dependencies.patch b/kubernetes/cni/bond-cni/debian/deb_folder/patches/0001-Add-explicit-vendor-module-dependencies.patch new file mode 100644 index 000000000..105b8ecbf --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/patches/0001-Add-explicit-vendor-module-dependencies.patch @@ -0,0 +1,68 @@ +From 76ac4271502d6356f5150f6047d9dc05eb2470bd Mon Sep 17 00:00:00 2001 +From: Steven Webster +Date: Fri, 8 Apr 2022 16:01:58 -0400 +Subject: [PATCH] Add explicit vendor module dependencies + +Signed-off-by: Steven Webster +--- + go.mod | 6 ++++++ + vendor/modules.txt | 11 +++++++---- + 2 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/go.mod b/go.mod +index c334299..385a70f 100644 +--- a/go.mod ++++ b/go.mod +@@ -8,3 +8,9 @@ require ( + github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 + github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 + ) ++ ++require ( ++ github.com/coreos/go-iptables v0.6.0 // indirect ++ github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 // indirect ++ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect ++) +diff --git a/vendor/modules.txt b/vendor/modules.txt +index ac4b3f5..d684960 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -1,5 +1,5 @@ + # github.com/containernetworking/cni v1.0.1 +-## explicit ++## explicit; go 1.14 + github.com/containernetworking/cni/pkg/invoke + github.com/containernetworking/cni/pkg/skel + github.com/containernetworking/cni/pkg/types +@@ -11,22 +11,25 @@ github.com/containernetworking/cni/pkg/types/internal + github.com/containernetworking/cni/pkg/utils + github.com/containernetworking/cni/pkg/version + # github.com/containernetworking/plugins v1.0.1 +-## explicit ++## explicit; go 1.16 + github.com/containernetworking/plugins/pkg/ip + github.com/containernetworking/plugins/pkg/ipam + github.com/containernetworking/plugins/pkg/ns + github.com/containernetworking/plugins/pkg/utils/sysctl + # github.com/coreos/go-iptables v0.6.0 ++## explicit; go 1.16 + github.com/coreos/go-iptables/iptables + # github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 ++## explicit + github.com/safchain/ethtool + # github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 +-## explicit ++## explicit; go 1.12 + github.com/vishvananda/netlink + github.com/vishvananda/netlink/nl + # github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 +-## explicit ++## explicit; go 1.12 + github.com/vishvananda/netns + # golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e ++## explicit; go 1.17 + golang.org/x/sys/internal/unsafeheader + golang.org/x/sys/unix +-- +2.29.2 + diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/patches/series b/kubernetes/cni/bond-cni/debian/deb_folder/patches/series new file mode 100644 index 000000000..15fdbe060 --- /dev/null +++ b/kubernetes/cni/bond-cni/debian/deb_folder/patches/series @@ -0,0 +1 @@ +0001-Add-explicit-vendor-module-dependencies.patch diff --git a/kubernetes/cni/bond-cni/debian/deb_folder/rules b/kubernetes/cni/bond-cni/debian/deb_folder/rules index 37c344d2b..f6af93e1e 100644 --- a/kubernetes/cni/bond-cni/debian/deb_folder/rules +++ b/kubernetes/cni/bond-cni/debian/deb_folder/rules @@ -1,5 +1,6 @@ #!/usr/bin/make -f +export PATH := /usr/lib/go-1.17/bin:$(PATH) export DH_VERBOSE = 1 export DH_GOLANG_GO_GENERATE := 1