SHA256
1
0
forked from pool/cni-plugins

Accepting request 1226589 from devel:microos

OBS-URL: https://build.opensuse.org/request/show/1226589
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cni-plugins?expand=0&rev=23
This commit is contained in:
Ana Guerrero 2024-11-26 19:57:23 +00:00 committed by Git OBS Bridge
commit 2a04b33f0b
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Oct 22 12:13:41 UTC 2024 - Alexandre Vicenzi <alexandre.vicenzi@suse.com>
- Require iptables (bsc#1231424)
* Add cni-iptables.conf to load required kernel modules
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 22 05:29:37 UTC 2024 - madhankumar.chellamuthu@suse.com Tue Oct 22 05:29:37 UTC 2024 - madhankumar.chellamuthu@suse.com

4
cni-plugins.conf Normal file
View File

@ -0,0 +1,4 @@
# A rootless user has no permsissions to load kernel modules.
# CNI requires iptables.
ip_tables
ip6_tables

View File

@ -26,11 +26,13 @@ License: Apache-2.0
Group: System/Management Group: System/Management
URL: https://github.com/containernetworking/plugins URL: https://github.com/containernetworking/plugins
Source: %{name}-%{version}.tar.xz Source: %{name}-%{version}.tar.xz
Source1: %{name}.conf
BuildRequires: shadow BuildRequires: shadow
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
BuildRequires: xz BuildRequires: xz
BuildRequires: golang(API) >= 1.21 BuildRequires: golang(API) >= 1.21
Requires: cni Requires: cni
Requires: iptables
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
%{?systemd_requires} %{?systemd_requires}
@ -61,6 +63,9 @@ export GOFLAGS="-buildmode=pie"
install -m 755 -d "%{buildroot}%{cni_bin_dir}" install -m 755 -d "%{buildroot}%{cni_bin_dir}"
cp bin/* "%{buildroot}%{cni_bin_dir}/" cp bin/* "%{buildroot}%{cni_bin_dir}/"
mkdir -p %{buildroot}%{_prefix}/lib/modules-load.d
install -m 0644 -t %{buildroot}%{_prefix}/lib/modules-load.d/ %{SOURCE1}
# documentation # documentation
install -m 755 -d "%{buildroot}%{cni_doc_dir}" install -m 755 -d "%{buildroot}%{cni_doc_dir}"
@ -79,6 +84,8 @@ install -m 755 -d "%{buildroot}%{cni_doc_dir}"
%license LICENSE %license LICENSE
%dir %{cni_bin_dir} %dir %{cni_bin_dir}
%{cni_bin_dir}/* %{cni_bin_dir}/*
%dir %{_prefix}/lib/modules-load.d
%{_prefix}/lib/modules-load.d/%{name}.conf
# %%{cni_doc_dir}/plugins/* # %%{cni_doc_dir}/plugins/*
%changelog %changelog