103 lines
3.8 KiB
RPMSpec
103 lines
3.8 KiB
RPMSpec
%?python_enable_dependency_generator
|
|
%define srcname nmstate
|
|
%define libname libnmstate
|
|
|
|
Name: nmstate
|
|
Version: 1.0.2
|
|
Release: 11
|
|
Summary: Declarative network manager API
|
|
License: LGPLv2+
|
|
URL: https://github.com/%{srcname}/%{srcname}
|
|
#from %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
|
|
Source0: %{srcname}-%{version}.tar.gz
|
|
#from %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.asc
|
|
Source1: %{srcname}-%{version}.tar.gz.asc
|
|
#from https://www.nmstate.io/nmstate.gpg
|
|
Source2: nmstate.gpg
|
|
Patch1: BZ_1931751-nmstate-fix-return-code.patch
|
|
Patch2: BZ_1931355-SRIOV-wait-VF-mount-decrease.patch
|
|
Patch3: BZ_1932247-nm-Don-t-touch-unmanaged-interface-unless-desired.patch
|
|
Patch4: BZ_1961914-do-not-use-unmanaged-interface-for-dns.patch
|
|
Patch5: BZ_1961912-fix-ovs-interface-activation.patch
|
|
Patch6: BZ_1964439-ovs-Fix-is_ovs_running-in-container-environment.patch
|
|
Patch7: BZ_1964440-nm-ipv4-Deactivate-profile-when-route-removed.patch
|
|
Patch8: BZ_1966379_fix_bond_opt_tlb_dynamic_lb.patch
|
|
Patch9: BZ_1966457_Fix_bond_fail_over_mac.patch
|
|
Patch10: BZ_1966457_only_validate_desired_bond.patch
|
|
BuildArch: noarch
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: gnupg2
|
|
Requires: python3-setuptools
|
|
Requires: python3-%{libname} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
%description
|
|
Nmstate is a library with an accompanying command line tool that manages host
|
|
networking settings in a declarative manner and aimed to satisfy enterprise
|
|
needs to manage host networking through a northbound declarative API and multi
|
|
provider support on the southbound.
|
|
|
|
|
|
%package -n python3-%{libname}
|
|
Summary: nmstate Python 3 API library
|
|
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
|
|
# Use Suggests for NetworkManager-ovs and NetworkManager-team since it is only
|
|
# required for OVS and team support
|
|
Suggests: NetworkManager-ovs
|
|
Suggests: NetworkManager-team
|
|
Requires: nispor
|
|
Requires: python3dist(varlink)
|
|
|
|
%package -n nmstate-plugin-ovsdb
|
|
Summary: nmstate plugin for OVS database manipulation
|
|
Requires: python3-%{libname} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
# The python-openvswitch rpm pacakge is not in the same repo with nmstate,
|
|
# hence state it as Recommends, no requires.
|
|
Recommends: python3dist(ovs)
|
|
|
|
%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}
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
|
|
%files
|
|
%doc README.md
|
|
%doc examples/
|
|
%{_mandir}/man8/nmstatectl.8*
|
|
%{python3_sitelib}/nmstatectl
|
|
%{_bindir}/nmstatectl
|
|
|
|
%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*
|
|
|
|
%changelog
|
|
* Thu Jul 8 2021 kymayl<mayilin@kylinos.cn> - 1.0.2-11
|
|
- Package upgrade
|
|
* Fri Jul 2 2021 kymayl<mayilin@kylinos.cn> - 0.2.7-1
|
|
- Package init with version 0.2.7-1
|