2020-09-07 06:50:17 +00:00
|
|
|
# The check need root privilege
|
|
|
|
%bcond_with check
|
|
|
|
|
|
|
|
Name: nispor
|
2022-02-01 10:09:54 +00:00
|
|
|
Version: 1.2.3
|
|
|
|
Release: 1%{?dist}
|
2020-09-07 06:50:17 +00:00
|
|
|
Summary: Unified interface for Linux network state querying
|
|
|
|
License: ASL 2.0
|
|
|
|
URL: https://github.com/nispor/nispor
|
|
|
|
Source: https://github.com/nispor/nispor/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
ExclusiveArch: %{rust_arches}
|
2021-01-07 05:53:07 +00:00
|
|
|
BuildRequires: make
|
2020-09-07 06:50:17 +00:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: rust-packaging
|
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
BuildRequires: (crate(serde/default) >= 1.0 with crate(serde/default) < 2.0)
|
|
|
|
BuildRequires: (crate(serde_derive/default) >= 1.0 with crate(serde_derive/default) < 2.0)
|
|
|
|
BuildRequires: (crate(serde_json/default) >= 1.0 with crate(serde_json/default) < 2.0)
|
2022-02-01 10:09:54 +00:00
|
|
|
BuildRequires: (crate(rtnetlink/default) >= 0.9.0 with crate(rtnetlink/default) < 0.10.0)
|
|
|
|
BuildRequires: (crate(netlink-packet-route/default) >= 0.10.0 with crate(netlink-packet-route/default) < 0.11.0)
|
|
|
|
BuildRequires: (crate(netlink-packet-utils/default) >= 0.5.0 with crate(netlink-packet-utils/default) < 0.6.0)
|
|
|
|
BuildRequires: (crate(netlink-sys/default) >= 0.8.0 with crate(netlink-sys/default) < 0.9.0)
|
|
|
|
BuildRequires: (crate(ethtool/default) >= 0.2.0 with crate(ethtool/default) < 0.3.0)
|
|
|
|
BuildRequires: (crate(tokio/macros) >= 1.0 with crate(tokio/macros) < 2.0)
|
|
|
|
BuildRequires: (crate(tokio/rt) >= 1.0 with crate(tokio/rt) < 2.0)
|
2020-09-07 06:50:17 +00:00
|
|
|
BuildRequires: (crate(libc/default) >= 0.2.74 with crate(libc/default) < 0.3.0)
|
2020-11-09 13:46:14 +00:00
|
|
|
BuildRequires: (crate(clap/default) >= 2.33.3 with crate(clap/default) < 3.0)
|
|
|
|
BuildRequires: (crate(serde_yaml/default) >= 0.8 with crate(serde_yaml/default) < 0.9)
|
2022-02-01 10:09:54 +00:00
|
|
|
BuildRequires: (crate(env_logger/default) >= 0.9 with crate(env_logger/default) < 0.10)
|
|
|
|
BuildRequires: (crate(log/default) >= 0.4 with crate(log/default) < 0.5)
|
2020-09-07 06:50:17 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Unified interface for Linux network state querying.
|
|
|
|
|
|
|
|
%package -n rust-%{name}-devel
|
|
|
|
Summary: %{summary}
|
|
|
|
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: %{summary}
|
|
|
|
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.
|
|
|
|
|
|
|
|
%package -n python3-%{name}
|
|
|
|
Summary: %{summary}
|
2020-09-07 07:50:44 +00:00
|
|
|
Requires: nispor = %{?epoch:%{epoch}:}%{version}-%{release}
|
2020-09-07 06:50:17 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n python3-%{name}
|
|
|
|
|
|
|
|
This package contains python3 binding of %{name}.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: %{summary}
|
|
|
|
Requires: nispor%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
|
|
|
This package contains C binding of %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{name}-%{version_no_tilde} -p1
|
|
|
|
|
|
|
|
%cargo_prep
|
2021-08-24 14:46:55 +00:00
|
|
|
for sub_dir in lib cli clib;do
|
2020-09-07 06:50:17 +00:00
|
|
|
pushd src/$sub_dir
|
|
|
|
%cargo_prep
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
_FLAGS=`sed -ne 's/rustflags = "\(.\+\)"/\1/p' .cargo/config.toml`
|
|
|
|
sed -i -e "s/rustflags = \[\(.\+\), \]$/rustflags = [\1, \"$_FLAGS\"]/" \
|
|
|
|
.cargo/config
|
|
|
|
|
|
|
|
%build
|
2021-08-24 14:46:55 +00:00
|
|
|
for sub_dir in lib cli clib;do
|
2020-09-07 06:50:17 +00:00
|
|
|
pushd src/$sub_dir
|
|
|
|
%cargo_build
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
|
|
|
|
pushd src/python
|
|
|
|
%py3_build
|
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
pushd src/lib
|
|
|
|
%cargo_install
|
|
|
|
popd
|
|
|
|
|
|
|
|
env SKIP_PYTHON_INSTALL=1 PREFIX=%{_prefix} LIBDIR=%{_libdir} %make_install
|
|
|
|
|
|
|
|
pushd src/python
|
|
|
|
%py3_install
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
%cargo_test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc AUTHORS CHANGELOG DEVEL.md README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/npc
|
|
|
|
%{_libdir}/libnispor.so.*
|
|
|
|
|
|
|
|
%files -n python3-%{name}
|
|
|
|
%license LICENSE
|
|
|
|
%{python3_sitelib}/nispor*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/libnispor.so
|
|
|
|
%{_includedir}/nispor.h
|
2020-11-09 09:22:25 +00:00
|
|
|
%{_libdir}/pkgconfig/nispor.pc
|
2020-09-07 06:50:17 +00:00
|
|
|
|
|
|
|
%files -n rust-%{name}-devel
|
|
|
|
%license LICENSE
|
|
|
|
%{cargo_registry}/%{name}-%{version_no_tilde}/
|
|
|
|
|
|
|
|
%files -n rust-%{name}+default-devel
|
|
|
|
%ghost %{cargo_registry}/%{name}-%{version_no_tilde}/Cargo.toml
|
|
|
|
|
|
|
|
%changelog
|
2022-02-01 10:09:54 +00:00
|
|
|
* Tue Feb 01 2022 Fernando Fernandez Mancera <ffmancera@riseup.net> - 1.2.3-1
|
|
|
|
- Upgrade to 1.2.3
|
|
|
|
|
2022-01-20 21:14:38 +00:00
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
2021-08-24 14:46:55 +00:00
|
|
|
* Fri Sep 10 2021 Fernando Fernandez Mancera <ffmancera@riseup.net> - 1.1.1-1
|
|
|
|
- Upgrade to 1.1.1
|
|
|
|
|
2021-07-22 16:09:59 +00:00
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-06-04 18:12:59 +00:00
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0.1-4
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
2021-03-02 15:13:19 +00:00
|
|
|
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.1-3
|
|
|
|
- Rebuilt for updated systemd-rpm-macros
|
|
|
|
See https://pagure.io/fesco/issue/2583.
|
|
|
|
|
2021-01-26 21:33:30 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-11-10 14:07:08 +00:00
|
|
|
* Tue Nov 10 2020 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.0.1-1
|
|
|
|
- Upgrade to 1.0.1
|
|
|
|
|
2020-11-09 14:59:57 +00:00
|
|
|
* Mon Nov 09 2020 Gris Ge <fge@redhat.com> - 1.0.0-2
|
|
|
|
- Fix iface type of python bonding
|
|
|
|
|
2020-11-09 09:22:25 +00:00
|
|
|
* Mon Nov 09 2020 Gris Ge <fge@redhat.com> - 1.0.0-1
|
|
|
|
- Upgrade to 1.0.0
|
|
|
|
|
2020-10-10 08:12:17 +00:00
|
|
|
* Sat Oct 10 2020 Gris Ge <fge@redhat.com> - 0.6.1-2
|
|
|
|
- Fix incorrect build requirements.
|
|
|
|
|
2020-10-10 06:16:02 +00:00
|
|
|
* Sat Oct 10 2020 Gris Ge <fge@redhat.com> - 0.6.1-1
|
|
|
|
- Upgrade to 0.6.1
|
|
|
|
|
2020-09-20 09:30:45 +00:00
|
|
|
* Sun Sep 20 2020 Gris Ge <fge@redhat.com> - 0.5.1-1
|
|
|
|
- Upgrade to 0.5.1
|
|
|
|
|
2020-09-07 07:50:44 +00:00
|
|
|
* Mon Sep 07 2020 Gris Ge <fge@redhat.com> - 0.5.0-2
|
|
|
|
- Fix the python3-nispor requirement
|
|
|
|
|
2020-09-07 06:50:17 +00:00
|
|
|
* Mon Sep 07 2020 Gris Ge <fge@redhat.com> - 0.5.0-1
|
|
|
|
- Upgrade to 0.5.0
|
|
|
|
|
|
|
|
* Wed Aug 26 2020 Gris Ge <fge@redhat.com> - 0.4.0-2
|
|
|
|
- The mainpackage is not noarch.
|
|
|
|
- Remove useless-provides.
|
|
|
|
|
|
|
|
* Wed Aug 26 2020 Gris Ge <fge@redhat.com> - 0.4.0-1
|
|
|
|
- Upgrade to 0.4.0
|
|
|
|
|
|
|
|
* Mon Aug 17 2020 Gris Ge <fge@redhat.com> - 0.3.0-2
|
|
|
|
- Fix python linux bridge vlan filter
|
|
|
|
|
|
|
|
* Sun Aug 16 2020 Gris Ge <fge@redhat.com> - 0.3.0-1
|
|
|
|
- Upgrade to 0.3.0
|
|
|
|
|
|
|
|
* Thu Jul 09 2020 Gris Ge <fge@redhat.com> - 0.1.1-2
|
|
|
|
- Include license and documents
|
|
|
|
|
|
|
|
* Wed Jul 08 2020 Gris Ge <fge@redhat.com> - 0.1.1-1
|
|
|
|
- Upgrade to 0.1.1
|
|
|
|
|
|
|
|
* Tue Jul 07 14:50:05 CST 2020 Gris Ge <cnfourt@gmail.com> - 0.1.0-1
|
|
|
|
- Initial package
|