diff --git a/cni-plugins.changes b/cni-plugins.changes index a9cd2cd..1ad89b9 100644 --- a/cni-plugins.changes +++ b/cni-plugins.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 22 12:13:41 UTC 2024 - Alexandre Vicenzi + +- 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 diff --git a/cni-plugins.conf b/cni-plugins.conf new file mode 100644 index 0000000..fbebebb --- /dev/null +++ b/cni-plugins.conf @@ -0,0 +1,4 @@ +# A rootless user has no permsissions to load kernel modules. +# CNI requires iptables. +ip_tables +ip6_tables diff --git a/cni-plugins.spec b/cni-plugins.spec index 99a0410..dd2642b 100644 --- a/cni-plugins.spec +++ b/cni-plugins.spec @@ -26,11 +26,13 @@ License: Apache-2.0 Group: System/Management URL: https://github.com/containernetworking/plugins Source: %{name}-%{version}.tar.xz +Source1: %{name}.conf BuildRequires: shadow BuildRequires: systemd-rpm-macros BuildRequires: xz BuildRequires: golang(API) >= 1.21 Requires: cni +Requires: iptables Requires(post): %fillup_prereq %{?systemd_requires} @@ -61,6 +63,9 @@ export GOFLAGS="-buildmode=pie" install -m 755 -d "%{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 install -m 755 -d "%{buildroot}%{cni_doc_dir}" @@ -79,6 +84,8 @@ install -m 755 -d "%{buildroot}%{cni_doc_dir}" %license LICENSE %dir %{cni_bin_dir} %{cni_bin_dir}/* +%dir %{_prefix}/lib/modules-load.d +%{_prefix}/lib/modules-load.d/%{name}.conf # %%{cni_doc_dir}/plugins/* %changelog