Skip to content

Commit

Permalink
Merge pull request #2842 from stmcginnis/update-cni
Browse files Browse the repository at this point in the history
packages: Update cni and cni-plugin packages
  • Loading branch information
stmcginnis authored Mar 9, 2023
2 parents 5412ab8 + 1d8b8ef commit 51dace7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/cni-plugins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ path = "pkg.rs"
releases-url = "https://github.com/containernetworking/plugins/releases"

[[package.metadata.build-package.external-files]]
url = "https://github.com/containernetworking/plugins/archive/v0.9.1/plugins-0.9.1.tar.gz"
sha512 = "24e8fcedbff2ae7a83aa96085b546b164de6a0884d593e3b5386e9d2de3c4d9a215db9e9405332020cc45c371709a32b600e263e4f8dee62c51adafdc0180f24"
url = "https://github.com/containernetworking/plugins/archive/v1.2.0/plugins-1.2.0.tar.gz"
sha512 = "fb6fb4f46ac1610b3721f5f3a6ddfb096cbf2e5d5b792306edca5351a3944d2f802170d83e5adec01420395bf64fc8a174ede61ac9b93b5ac6b938a4b48651e6"

# RPM BuildRequires
[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions packages/cni-plugins/cni-plugins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%global gorepo plugins
%global goimport %{goproject}/%{gorepo}

%global gover 0.9.1
%global gover 1.2.0
%global rpmver %{gover}

%global _dwz_low_mem_die_limit 0
Expand Down Expand Up @@ -45,8 +45,8 @@ install -p -m 0755 bin/* %{buildroot}%{_cross_libexecdir}/cni/bin
%{_cross_libexecdir}/cni/bin/bandwidth
%{_cross_libexecdir}/cni/bin/bridge
%{_cross_libexecdir}/cni/bin/dhcp
%{_cross_libexecdir}/cni/bin/dummy
%{_cross_libexecdir}/cni/bin/firewall
%{_cross_libexecdir}/cni/bin/flannel
%{_cross_libexecdir}/cni/bin/host-device
%{_cross_libexecdir}/cni/bin/host-local
%{_cross_libexecdir}/cni/bin/ipvlan
Expand Down
5 changes: 3 additions & 2 deletions packages/cni/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ path = "pkg.rs"
releases-url = "https://github.com/containernetworking/cni/releases"

[[package.metadata.build-package.external-files]]
url = "https://github.com/containernetworking/cni/archive/v0.8.1/cni-0.8.1.tar.gz"
sha512 = "b869e76806c6e259743715831ddf5754a56e79fa7f25435e54e3f0648700e473e5778630e592f5c5d181058e74c7542aeac5c4f3d8cd26b83f7758bb186f43e9"
url = "https://github.com/containernetworking/cni/archive/v1.1.2/cni-1.1.2.tar.gz"
sha512 = "dc4795fb03b8dc9d116692e0dd0feb1b57a481ed7414c8dc376a892725b0b3d9dd8b04b2be09073b95c8c9eec2c0165d0353f6be643647f4c4de0114b9dd5930"
bundle-modules = [ "go" ]

# RPM BuildRequires
[build-dependencies]
Expand Down
13 changes: 9 additions & 4 deletions packages/cni/cni.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%global gorepo cni
%global goimport %{goproject}/%{gorepo}

%global gover 0.8.1
%global gover 1.1.2
%global rpmver %{gover}

%global _dwz_low_mem_die_limit 0
Expand All @@ -14,6 +14,7 @@ Summary: Plugins for container networking
License: Apache-2.0
URL: https://%{goimport}
Source0: https://%{goimport}/archive/v%{gover}/%{gorepo}-%{gover}.tar.gz
Source1: bundled-%{gorepo}-%{gover}.tar.gz
BuildRequires: git
BuildRequires: %{_cross_os}glibc-devel
Requires: %{_cross_os}iptables
Expand All @@ -22,20 +23,24 @@ Requires: %{_cross_os}iptables
%{summary}.

%prep
%autosetup -Sgit -n %{gorepo}-%{gover} -p1
%cross_go_setup %{gorepo}-%{gover} %{goproject} %{goimport}
%setup -n %{gorepo}-%{gover} -q
%setup -T -D -n %{gorepo}-%{gover} -b 1 -q

%build
%cross_go_configure %{goimport}
%set_cross_go_flags

go build -buildmode=pie -ldflags="${GOLDFLAGS}" -o "bin/cnitool" %{goimport}/cnitool

%install
install -d %{buildroot}%{_cross_libexecdir}/cni/bin
install -p -m 0755 bin/cnitool %{buildroot}%{_cross_libexecdir}/cni/bin

%cross_scan_attribution go-vendor vendor

%files
%license LICENSE
%{_cross_attribution_file}
%{_cross_attribution_vendor_dir}
%{_cross_libexecdir}/cni/bin/cnitool

%changelog

0 comments on commit 51dace7

Please sign in to comment.