From 5f54868698f786a00ade00ea50bf8372993ce193 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 15 2022 06:30:48 +0000 Subject: import nmstate-2.1.4-1.el9 --- diff --git a/.gitignore b/.gitignore index 8d49ec2..058eb63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/nmstate-2.0.0.tar.gz -SOURCES/nmstate-rust-vendor-2.0.0.tar.xz +SOURCES/nmstate-2.1.4.tar.gz +SOURCES/nmstate-vendor-2.1.4.tar.xz SOURCES/nmstate.gpg diff --git a/.nmstate.metadata b/.nmstate.metadata index 32e9077..5306f60 100644 --- a/.nmstate.metadata +++ b/.nmstate.metadata @@ -1,3 +1,3 @@ -8be52210e6247ee6d18d8218c185a2968532eb66 SOURCES/nmstate-2.0.0.tar.gz -6415c1d380e3c2e68f92c953cef7cbca094c74b7 SOURCES/nmstate-rust-vendor-2.0.0.tar.xz -b5f872551d434e2c62b30d70471efaeede83ab44 SOURCES/nmstate.gpg +a35f8ea70135883db792e42d8137dd70f4c38699 SOURCES/nmstate-2.1.4.tar.gz +bab6a2cf4190bba15bce5818836c4679d8409e14 SOURCES/nmstate-vendor-2.1.4.tar.xz +5c1d9d65f9db4fedc9dc96e0fb6cac0a86749c88 SOURCES/nmstate.gpg diff --git a/SOURCES/BZ_2100471-ovs-dpdk-add-support-to-rx-queue-parameter.patch b/SOURCES/BZ_2100471-ovs-dpdk-add-support-to-rx-queue-parameter.patch deleted file mode 100644 index 2f43b5d..0000000 --- a/SOURCES/BZ_2100471-ovs-dpdk-add-support-to-rx-queue-parameter.patch +++ /dev/null @@ -1,115 +0,0 @@ -From f9c2d3ad2f3abe948361bf0a79831f38d709c7d3 Mon Sep 17 00:00:00 2001 -From: Fernando Fernandez Mancera -Date: Mon, 16 May 2022 15:59:11 +0200 -Subject: [PATCH 1/5] ovs, dpdk: add support to rx-queue parameter - -``` ---- -interfaces: - - name: ovs-br0 - type: ovs-bridge - state: up - bridge: - options: - datapath: netdev - port: - - name: ovs0 - - name: ovs0 - type: ovs-interface - state: up - dpdk: - devargs: "000:18:00.2" - rx-queue: 10 -``` - -Integration test case added. - -Signed-off-by: Fernando Fernandez Mancera ---- - examples/ovsbridge_dpdk_create.yml | 1 + - libnmstate/ifaces/ovs.py | 15 +++++++++++- - libnmstate/nm/ovs.py | 2 ++ - libnmstate/schema.py | 1 + - tests/integration/ovs_test.py | 23 ++++++++++++++++-- - tests/lib/ifaces/ovs_iface_test.py | 38 +++++++++++++++++++++++++++++- - 6 files changed, 76 insertions(+), 4 deletions(-) - -diff --git a/examples/ovsbridge_dpdk_create.yml b/examples/ovsbridge_dpdk_create.yml -index 8395936e..9acc19cd 100644 ---- a/examples/ovsbridge_dpdk_create.yml -+++ b/examples/ovsbridge_dpdk_create.yml -@@ -13,3 +13,4 @@ interfaces: - state: up - dpdk: - devargs: "000:18:00.2" -+ rx-queue: 10 -diff --git a/libnmstate/ifaces/ovs.py b/libnmstate/ifaces/ovs.py -index 411455ba..447b8326 100644 ---- a/libnmstate/ifaces/ovs.py -+++ b/libnmstate/ifaces/ovs.py -@@ -279,6 +279,14 @@ class OvsInternalIface(BaseIface): - else None - ) - -+ @property -+ def rx_queue(self): -+ return ( -+ self.dpdk_config.get(OVSInterface.Dpdk.RX_QUEUE) -+ if self.dpdk_config -+ else None -+ ) -+ - @property - def peer(self): - return ( -@@ -293,9 +301,14 @@ class OvsInternalIface(BaseIface): - OVSInterface.Patch.PEER, - ) - validate_string( -- self.patch_config.get(OVSInterface.Dpdk.DEVARGS), -+ self.dpdk_config.get(OVSInterface.Dpdk.DEVARGS), - OVSInterface.Dpdk.DEVARGS, - ) -+ validate_integer( -+ self.dpdk_config.get(OVSInterface.Dpdk.RX_QUEUE), -+ OVSInterface.Dpdk.RX_QUEUE, -+ minimum=0, -+ ) - super().pre_edit_validation_and_cleanup() - self._validate_ovs_mtu_mac_confliction() - -diff --git a/libnmstate/nm/ovs.py b/libnmstate/nm/ovs.py -index 9922ffb2..8ddc42d7 100644 ---- a/libnmstate/nm/ovs.py -+++ b/libnmstate/nm/ovs.py -@@ -149,6 +149,7 @@ def create_patch_setting(patch_state): - def create_dpdk_setting(dpdk_state): - dpdk_setting = NM.SettingOvsDpdk.new() - dpdk_setting.props.devargs = dpdk_state[OVSInterface.Dpdk.DEVARGS] -+ dpdk_setting.props.n_rxq = dpdk_state[OVSInterface.Dpdk.RX_QUEUE] - - return dpdk_setting - -@@ -215,6 +216,7 @@ def get_interface_info(act_con): - if dpdk_setting: - info[OVSInterface.DPDK_CONFIG_SUBTREE] = { - OVSInterface.Dpdk.DEVARGS: dpdk_setting.props.devargs, -+ OVSInterface.Dpdk.RX_QUEUE: dpdk_setting.props.n_rxq, - } - - return info -diff --git a/libnmstate/schema.py b/libnmstate/schema.py -index 56a6c187..6bd5d54d 100644 ---- a/libnmstate/schema.py -+++ b/libnmstate/schema.py -@@ -300,6 +300,7 @@ class OVSInterface(OvsDB): - - class Dpdk: - DEVARGS = "devargs" -+ RX_QUEUE = "rx-queue" - - - class OVSBridge(Bridge, OvsDB): --- -2.35.3 - diff --git a/SOURCES/nmstate-2.0.0.tar.gz.asc b/SOURCES/nmstate-2.0.0.tar.gz.asc deleted file mode 100644 index c316152..0000000 --- a/SOURCES/nmstate-2.0.0.tar.gz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEfUQ+BAINyWGvqJXerIciWuEsPqMFAmILbucACgkQrIciWuEs -PqPiURAAkvgC74BcGgRh6s17VEGyZfQIDFDp2vzqDHraQR7wB2+sLhoLb/txM0eB -rMTsbBI945BP12kN9nVDbmmFar3ibFg/JWcwb3XDxIc4xEnozzDcpCHlX/hLuMcJ -Z3gXKlxPCgUv19SiNPWuxXhQIN3ij0NpaUhSOZ+eBnVeX8M9N9xviMwpQUIbqMOM -HACX6NpMKZDZywpuZ16eWf7AE1TWEkv1Go5bvra3ue47RZO67RNJNVYFML/SfbgD -Qj82bVL4Y9JjoBrKJ10sJN3xDBvI2w6aaga1gsqNowHPAR7FaTlqNyJT6fP1qrFO -qWTi4+bBWWBE3C/MEPvxP8BFMJmLalPBBXpdPyHAn0IB9Njl3zsDhYQyknmXgYpU -HYSGWMIG0g1jqI1vA8dKE476ZVaovQuC16pQcrxmoC5w4d+Ba6IXyNouvh/UmPTa -Z5O09mpm2NR9EKmSRpdFpn3cVOXSx3DlkGGjWDmpHil1MSO2gNyO4RJnvTo89Hj6 -JCx+68WSzRYyEWoCYJSulS21rDt1M0aU99f63CqxLMwOQ2I+Whe9gKA6sybvRqu0 -GOjUHvuuFNKtlof0zkIvjZBEjQuOwZZxVZh6IGtYiI2o4ZlnVJxeDfGANnrcFd9r -nM0owbwFxwSaeN7yWbc5YafkCPXXzOwszbQhZ9fVDlKU0fpASaI= -=TfNK ------END PGP SIGNATURE----- diff --git a/SOURCES/nmstate-2.1.4.tar.gz.asc b/SOURCES/nmstate-2.1.4.tar.gz.asc new file mode 100644 index 0000000..c5eb881 --- /dev/null +++ b/SOURCES/nmstate-2.1.4.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEfUQ+BAINyWGvqJXerIciWuEsPqMFAmL1HPsACgkQrIciWuEs +PqMATQ/7BNE44Uy4/TU5d3I3CIGADWxWtoAT+xeTydDi2ohRKI23nKLzVvBgUXXu +thnn8trzGv8i4dKmFif2ZmM83Tgo8chYmpHuDkT7x/W21/BAaz9+CpX/O+vdibV3 +BdGCqDiAJ2zOrVsYHooMplgydUumlkBxHwm8suOHm3fMROPLRsIZD7643PGXKHtY ++u1moRTwwIVRrgLLu6wCYjNaXv96qycusrKRnVhN2EQ4Kg1W/aoWbVUJiOCHKr83 +KSa67yWJkA1w/xuSxXOuC9Ci1PZ42x25B56VyHazoHFwUcZhNXN325a5mU3cNM9A +SeAkNL9cajutGgIIemtiGpteB+1fElg3jDBIJKldnpO6gnr4VJB/kREMz61hUHFu +Gz+007GuYh22gzUFPAD7nChx4+BJWHpms+1gVMOJhN7Q32ch4+7wT1ZRPu1C6G8J +UR0MGl3r9hFiCWSRRlY//hFZwg96Vy16eiwTSrRchb71+4txEl8EEDGOiFLi2hj0 +jQUF5D9FAURwQ1eSqEl6hiALZGVO2Ld2VcKipDgOK1YgppIojeNOq4rWyhwRfpBX +JzhcAKDhPFvLpNuum6Icdkg2o/gRjlf3X2+KBIAY/16ZkGg5156snWExmXwpvTx7 +4o/biIFXixxWQG5S9PUFfvmbLDrG+KTUS92UQcxl2w3P/PsK6sY= +=fZcn +-----END PGP SIGNATURE----- diff --git a/SPECS/nmstate.spec b/SPECS/nmstate.spec index d619858..2240bdb 100644 --- a/SPECS/nmstate.spec +++ b/SPECS/nmstate.spec @@ -3,23 +3,21 @@ %define libname libnmstate Name: nmstate -Version: 2.0.0 -Release: 5%{?dist} +Version: 2.1.4 +Release: 1%{?dist} Summary: Declarative network manager API License: LGPLv2+ URL: https://github.com/%{srcname}/%{srcname} -Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz -Source1: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.asc -Source2: nmstate.gpg -Source3: nmstate-rust-vendor-%{version}.tar.xz -Patch0: BZ_2100471-ovs-dpdk-add-support-to-rx-queue-parameter.patch +Source0: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-%{version}.tar.gz +Source1: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-%{version}.tar.gz.asc +Source2: https://nmstate.io/nmstate.gpg +Source3: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-vendor-%{version}.tar.xz BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: gnupg2 BuildRequires: rust-toolset BuildRequires: pkg-config -Requires: python3-setuptools -Requires: python3-%{libname} = %{?epoch:%{epoch}:}%{version}-%{release} +BuildRequires: systemd %description Nmstate is a library with an accompanying command line tool that manages host @@ -28,45 +26,44 @@ needs to manage host networking through a northbound declarative API and multi provider support on the southbound. +%package libs +Summary: C binding of nmstate +# Use Recommends for NetworkManager because only access to NM DBus is required, +# but NM could be running on a different host +Recommends: NetworkManager +# Avoid automatically generated profiles +Recommends: NetworkManager-config-server +License: ASL 2.0 + %package -n python3-%{libname} Summary: nmstate Python 3 API library -BuildArch: noarch -Requires: NetworkManager-libnm >= 1:1.26.0 # Use Recommends for NetworkManager because only access to NM DBus is required, # but NM could be running on a different host Recommends: NetworkManager # Avoid automatically generated profiles Recommends: NetworkManager-config-server -Recommends: (nmstate-plugin-ovsdb if openvswitch) # Use Suggests for NetworkManager-ovs and NetworkManager-team since it is only # required for OVS and team support Suggests: NetworkManager-ovs Suggests: NetworkManager-team # FIXME: Once upstream included nispor into requirement.txt, remove below line -Requires: python3dist(nispor) - -%package -n nmstate-plugin-ovsdb -Summary: nmstate plugin for OVS database manipulation -BuildArch: noarch -Requires: python3-%{libname} = %{?epoch:%{epoch}:}%{version}-%{release} -%if 0%{?rhel} -# The python-openvswitch rpm package is not in the same repo with nmstate, -# require only if openvswitch is installed. -Requires: (python3dist(ovs) if openvswitch) -Recommends: python3dist(ovs) -%else -Requires: python3dist(ovs) -%endif - -%package libs -Summary: C binding of nmstate -License: ASL 2.0 +Provides: nmstate-plugin-ovsdb = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Obsoletes: nmstate-plugin-ovsdb < 2.1-1 %package devel Summary: C binding development files of nmstate License: ASL 2.0 Requires: nmstate-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +%package static +Summary: Static development files for nmstate +Group: Development/Libraries +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +Static C library bindings for nmstate. + %description libs This package contains the C binding of nmstate. @@ -77,18 +74,15 @@ This package contains the C binding development files of nmstate. %description -n python3-%{libname} This package contains the Python 3 library for Nmstate. -%description -n nmstate-plugin-ovsdb -This package contains the nmstate plugin for OVS database manipulation. - %prep gpg2 --import --import-options import-export,import-minimal %{SOURCE2} > ./gpgkey-mantainers.gpg gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0} %setup -q -%patch0 -p1 pushd rust # Source3 is vendored dependencies %cargo_prep -V 3 + # The cargo_prep will create `.cargo/config` which take precedence over # `.cargo/config.toml` shipped by upstream which fix the SONAME of cdylib. # To workaround that, merge upstream rustflags into cargo_prep created one. @@ -100,38 +94,41 @@ rm .cargo/config.toml popd %build +pushd rust/src/python %py3_build - +popd pushd rust -make +%cargo_build popd %install +env SKIP_PYTHON_INSTALL=1 \ + PREFIX=%{_prefix} \ + LIBDIR=%{_libdir} \ + SYSCONFDIR=%{_sysconfdir} \ + %make_install + +pushd rust/src/python %py3_install -pushd rust -env SKIP_PYTHON_INSTALL=1 PREFIX=%{_prefix} LIBDIR=%{_libdir} %make_install popd + %files %doc README.md %doc examples/ +%{_mandir}/man8/nmstate.service.8* %{_mandir}/man8/nmstatectl.8* %{_mandir}/man8/nmstate-autoconf.8* -%{python3_sitelib}/nmstatectl %{_bindir}/nmstatectl %{_bindir}/nmstate-autoconf -%{_bindir}/nmstatectl-rust +%{_unitdir}/nmstate.service +%dir %{_sysconfdir}/%{name} +%{_sysconfdir}/%{name}/README %files -n python3-%{libname} %license LICENSE %{python3_sitelib}/%{libname} %{python3_sitelib}/%{srcname}-*.egg-info/ -%exclude %{python3_sitelib}/%{libname}/plugins/nmstate_plugin_* -%exclude %{python3_sitelib}/%{libname}/plugins/__pycache__/nmstate_plugin_* - -%files -n nmstate-plugin-ovsdb -%{python3_sitelib}/%{libname}/plugins/nmstate_plugin_ovsdb* -%{python3_sitelib}/%{libname}/plugins/__pycache__/nmstate_plugin_ovsdb* %files libs %license rust/LICENSE @@ -143,6 +140,9 @@ popd %{_includedir}/nmstate.h %{_libdir}/pkgconfig/nmstate.pc +%files static +%{_libdir}/libnmstate.a + %post libs /sbin/ldconfig @@ -150,14 +150,41 @@ popd /sbin/ldconfig %changelog -* Fri Jul 22 2022 Fernando Fernandez Mancera - 2.0.0-5 -- Fix missing %patchN macro. RHBZ#2100471 +* Mon Aug 15 2022 Gris Ge - 2.1.4-1 +- Upgrade to 2.1.4 + +* Thu Jul 28 2022 Gris Ge - 2.1.3-1 +- Upgraded to 2.1.3 + +* Wed Jul 20 2022 Fernando Fernandez Mancera - 2.1.3-20220720.cf972e4d +- Upgrade to nmstate-2.1.3-20220720.cf972e4d + +* Thu Jul 14 2022 Gris Ge - 2.1.3-20220714.81d80992 +- Upgrade to nmstate-2.1.3-20220714.81d80992 + +* Thu Jun 30 2022 Fernando Fernandez Mancera - 2.1.2-1 +- Upgrade to 2.1.2 + +* Mon Jun 13 2022 Fernando Fernandez Mancera - 2.1.1-1 +- Upgrade to 2.1.1 + +* Thu Jun 02 2022 Fernando Fernandez Mancera - 2.1.1-0.alpha.20220602.5accbd1 +- Upgrade to nmstate-2.1.1-0.alpha.20220602.5accbd1 + +* Thu May 19 2022 Fernando Fernandez Mancera - 2.1.1-0.alpha.20220519.437e4a9 +- Upgrade to nmstate-2.1.1-0.alpha.20220519.437e4a9 + +* Fri Apr 22 2022 Gris Ge - 2.1.0-1 +- Upgrade to 2.1.0 + +* Tue Apr 19 2022 Gris Ge - 2.1.0-0.alpha.20220419.d613311d +- Upgrade to nmstate-2.1.0-0.alpha.20220419.d613311d -* Fri Jul 08 2022 Fernando Fernandez Mancera - 2.0.0-4 -- Support OVS rx_queue. RHBZ#2100471 +* Thu Apr 07 2022 Fernando Fernandez Mancera - 2.1.0-0.alpha.20220407 +- Upgrade to nmstate-2.1.0-0.alpha.20220407 -* Wed Jun 15 2022 Fernando Fernandez Mancera - 2.0.0-3 -- Rebuild in order to fix errata product listing. RHBZ#2097241 +* Fri Mar 11 2022 Gris Ge - 2.1.0-0.alpha.20220311.6f7c2be +- Upgrade to nmstate-2.1.0-0.alpha.20220311.6f7c2be * Thu Feb 24 2022 Gris Ge - 2.0.0-2 - Force python3-libnmstate and nmstate-plugin-ovsdb as noarch. RHBZ#1996575