2018-12-19 14:12:31 +00:00
|
|
|
%define srcname nmstate
|
|
|
|
%define libname libnmstate
|
|
|
|
|
|
|
|
Name: nmstate
|
2022-07-11 13:01:34 +00:00
|
|
|
Version: 2.1.2
|
2022-07-22 00:38:38 +00:00
|
|
|
Release: 2%{?dist}
|
2018-12-19 14:12:31 +00:00
|
|
|
Summary: Declarative network manager API
|
2019-07-26 12:39:28 +00:00
|
|
|
License: LGPLv2+
|
2018-12-19 14:12:31 +00:00
|
|
|
URL: https://github.com/%{srcname}/%{srcname}
|
2022-04-22 09:08:49 +00:00
|
|
|
Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
Source1: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.asc
|
2022-07-11 13:01:34 +00:00
|
|
|
Source2: https://nmstate.io/nmstate.gpg
|
|
|
|
Patch1: use_uuid_1_1.patch
|
2022-04-13 11:42:20 +00:00
|
|
|
BuildRequires: patchelf
|
2018-12-19 14:12:31 +00:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
2019-01-02 11:47:18 +00:00
|
|
|
BuildRequires: gnupg2
|
2021-04-19 21:33:06 +00:00
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2022-04-13 11:42:20 +00:00
|
|
|
BuildRequires: rust-packaging
|
|
|
|
BuildRequires: (crate(serde/default) >= 1.0 with crate(serde/default) < 2.0)
|
|
|
|
BuildRequires: (crate(serde/derive) >= 1.0 with crate(serde/derive) < 2.0)
|
|
|
|
BuildRequires: (crate(serde_json/default) >= 1.0 with crate(serde_json/default) < 2.0)
|
|
|
|
BuildRequires: (crate(serde_yaml/default) >= 0.8 with crate(serde_yaml/default) < 0.9)
|
2022-07-11 13:01:34 +00:00
|
|
|
BuildRequires: (crate(uuid/v4) >= 1.1 with crate(uuid/v4) < 2.0)
|
|
|
|
BuildRequires: (crate(uuid/v5) >= 1.1 with crate(uuid/v5) < 2.0)
|
2022-04-13 11:42:20 +00:00
|
|
|
BuildRequires: (crate(zbus/default) >= 1.9 with crate(zbus/default) < 2.0)
|
|
|
|
BuildRequires: (crate(zvariant/default) >= 2.10 with crate(zvariant/default) < 3.0)
|
|
|
|
BuildRequires: (crate(log/default) >= 0.4 with crate(log/default) < 0.5)
|
|
|
|
BuildRequires: (crate(libc/default) >= 0.2 with crate(libc/default) < 0.3)
|
|
|
|
BuildRequires: (crate(clap/default) >= 3.1 with crate(clap/default) < 4.0)
|
|
|
|
BuildRequires: (crate(clap/cargo) >= 3.1 with crate(clap/cargo) < 4.0)
|
|
|
|
BuildRequires: (crate(ctrlc/default) >= 3.2 with crate(ctrlc/default) < 4.0)
|
|
|
|
BuildRequires: (crate(env_logger/default) >= 0.9 with crate(env_logger/default) < 1.0)
|
2022-07-11 13:01:34 +00:00
|
|
|
BuildRequires: (crate(nispor/default) >= 1.2.7 with crate(nispor/default) < 2.0)
|
2018-12-19 14:12:31 +00:00
|
|
|
|
|
|
|
%description
|
2019-12-02 10:09:59 +00:00
|
|
|
Nmstate is a library with an accompanying command line tool that manages host
|
2018-12-19 14:12:31 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2022-04-13 11:42:20 +00:00
|
|
|
%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
|
2022-04-19 06:55:38 +00:00
|
|
|
License: ASL 2.0
|
2022-04-13 11:42:20 +00:00
|
|
|
|
|
|
|
%description libs
|
|
|
|
C binding of nmstate.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for nmstate
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
2022-04-19 06:55:38 +00:00
|
|
|
License: ASL 2.0
|
2022-04-13 11:42:20 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development files of nmstate C binding.
|
|
|
|
|
2022-07-11 13:01:34 +00:00
|
|
|
%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.
|
2022-04-13 11:42:20 +00:00
|
|
|
|
2018-12-19 14:12:31 +00:00
|
|
|
%package -n python3-%{libname}
|
|
|
|
Summary: nmstate Python 3 API library
|
2019-01-29 17:19:39 +00:00
|
|
|
# Use Recommends for NetworkManager because only access to NM DBus is required,
|
|
|
|
# but NM could be running on a different host
|
|
|
|
Recommends: NetworkManager
|
2019-12-02 10:09:59 +00:00
|
|
|
# Avoid automatically generated profiles
|
|
|
|
Recommends: NetworkManager-config-server
|
2020-10-12 16:19:53 +00:00
|
|
|
Recommends: (nmstate-plugin-ovsdb if openvswitch)
|
2020-02-04 21:23:10 +00:00
|
|
|
# Use Suggests for NetworkManager-ovs and NetworkManager-team since it is only
|
|
|
|
# required for OVS and team support
|
2019-01-29 17:19:39 +00:00
|
|
|
Suggests: NetworkManager-ovs
|
2020-02-04 21:23:10 +00:00
|
|
|
Suggests: NetworkManager-team
|
2022-04-13 11:42:20 +00:00
|
|
|
Provides: nmstate-plugin-ovsdb = %{version}-%{release}
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
|
Obsoletes: nmstate-plugin-ovsdb < 2.0-1
|
2018-12-19 14:12:31 +00:00
|
|
|
|
|
|
|
%description -n python3-%{libname}
|
2019-12-02 10:09:59 +00:00
|
|
|
This package contains the Python 3 library for Nmstate.
|
2018-12-19 14:12:31 +00:00
|
|
|
|
2022-06-29 04:41:12 +00:00
|
|
|
%package -n rust-%{name}-devel
|
|
|
|
Summary: Rust crate of nmstate
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n rust-%{name}-devel
|
|
|
|
This package contains library source intended for building other packages
|
|
|
|
which use "%{name}" crate.
|
|
|
|
|
|
|
|
%package -n rust-%{name}+default-devel
|
|
|
|
Summary: Rust crate of nmstate with default feature
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n rust-%{name}+default-devel
|
|
|
|
This package contains library source intended for building other packages
|
|
|
|
which use "%{name}" crate with default feature.
|
|
|
|
|
2018-12-19 14:12:31 +00:00
|
|
|
%prep
|
2022-04-13 11:42:20 +00:00
|
|
|
gpg2 --import --import-options import-export,import-minimal \
|
|
|
|
%{SOURCE2} > ./gpgkey-mantainers.gpg
|
2020-05-08 07:06:05 +00:00
|
|
|
gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0}
|
2022-07-11 13:01:34 +00:00
|
|
|
%autosetup -p1
|
2018-12-19 14:12:31 +00:00
|
|
|
|
2022-04-13 11:42:20 +00:00
|
|
|
pushd rust
|
|
|
|
rm .cargo/config.toml
|
|
|
|
%cargo_prep
|
|
|
|
popd
|
|
|
|
|
2018-12-19 14:12:31 +00:00
|
|
|
%build
|
2022-04-13 11:42:20 +00:00
|
|
|
pushd rust
|
|
|
|
%cargo_build
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd rust/src/python
|
2018-12-19 14:12:31 +00:00
|
|
|
%py3_build
|
2022-04-13 11:42:20 +00:00
|
|
|
popd
|
2018-12-19 14:12:31 +00:00
|
|
|
|
|
|
|
%install
|
2022-04-19 06:18:02 +00:00
|
|
|
env SKIP_PYTHON_INSTALL=1 \
|
|
|
|
PREFIX=%{_prefix} \
|
|
|
|
LIBDIR=%{_libdir} \
|
2022-07-11 13:01:34 +00:00
|
|
|
SYSCONFDIR=%{_sysconfdir} \
|
2022-04-19 06:18:02 +00:00
|
|
|
%make_install
|
2022-04-13 11:42:20 +00:00
|
|
|
patchelf --set-soname libnmstate.so.2 \
|
|
|
|
%{buildroot}/%{_libdir}/libnmstate.so.%{version}
|
|
|
|
|
|
|
|
pushd rust/src/python
|
2018-12-19 14:12:31 +00:00
|
|
|
%py3_install
|
2022-04-13 11:42:20 +00:00
|
|
|
popd
|
|
|
|
|
2022-06-29 04:41:12 +00:00
|
|
|
pushd rust/src/lib
|
|
|
|
%cargo_install
|
|
|
|
popd
|
|
|
|
|
2018-12-19 14:12:31 +00:00
|
|
|
%files
|
|
|
|
%doc README.md
|
2019-01-29 17:19:39 +00:00
|
|
|
%doc examples/
|
2019-12-02 10:09:59 +00:00
|
|
|
%{_mandir}/man8/nmstatectl.8*
|
2021-07-27 04:57:56 +00:00
|
|
|
%{_mandir}/man8/nmstate-autoconf.8*
|
2022-07-11 13:01:34 +00:00
|
|
|
%{_mandir}/man8/nmstate.service.8*
|
2018-12-19 14:12:31 +00:00
|
|
|
%{_bindir}/nmstatectl
|
2021-07-27 04:57:56 +00:00
|
|
|
%{_bindir}/nmstate-autoconf
|
2022-07-11 13:01:34 +00:00
|
|
|
%{_unitdir}/nmstate.service
|
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
%{_sysconfdir}/%{name}/README
|
2018-12-19 14:12:31 +00:00
|
|
|
|
2022-04-13 11:42:20 +00:00
|
|
|
%files libs
|
|
|
|
%{_libdir}/libnmstate.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/libnmstate.so
|
|
|
|
%{_includedir}/nmstate.h
|
|
|
|
%{_libdir}/pkgconfig/nmstate.pc
|
|
|
|
|
2018-12-19 14:12:31 +00:00
|
|
|
%files -n python3-%{libname}
|
|
|
|
%license LICENSE
|
|
|
|
%{python3_sitelib}/%{libname}
|
|
|
|
%{python3_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
|
2022-06-29 04:41:12 +00:00
|
|
|
%files -n rust-%{name}-devel
|
|
|
|
%license LICENSE
|
|
|
|
%{cargo_registry}/%{name}-%{version}/
|
2022-06-14 06:29:24 +00:00
|
|
|
|
2022-06-29 04:41:12 +00:00
|
|
|
%files -n rust-%{name}+default-devel
|
|
|
|
%ghost %{cargo_registry}/%{name}-%{version}/Cargo.toml
|
|
|
|
|
2022-07-11 13:01:34 +00:00
|
|
|
%files static
|
|
|
|
%{_libdir}/libnmstate.a
|
|
|
|
|
2022-06-29 04:41:12 +00:00
|
|
|
%changelog
|
2022-07-22 00:38:38 +00:00
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-04-13 11:42:20 +00:00
|
|
|
%autochangelog
|