Upgrade to 1.2.5

Signed-off-by: Gris Ge <fge@redhat.com>
This commit is contained in:
Gris Ge 2022-04-12 22:35:45 +08:00
parent 29b991528d
commit 03ac155335
4 changed files with 65 additions and 97 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/nispor-1.1.1.tar.gz
/nispor-1.2.2.tar.gz
/nispor-1.2.3.tar.gz
/nispor-1.2.5.tar.gz

View File

@ -0,0 +1,42 @@
From 174f76ddb7961ffe00c6379bd149f5d7ee6c2390 Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Tue, 12 Apr 2022 20:33:08 +0800
Subject: [PATCH] drop the need of serde_derive
Signed-off-by: Gris Ge <fge@redhat.com>
---
src/cli/Cargo.toml | 3 +--
src/cli/npc.rs | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/cli/Cargo.toml b/src/cli/Cargo.toml
index 645e49c..b945b58 100644
--- a/src/cli/Cargo.toml
+++ b/src/cli/Cargo.toml
@@ -16,9 +16,8 @@ name = "npc"
path = "npc.rs"
[dependencies]
-serde = "1.0"
serde_json = "1.0"
-serde_derive = "1.0"
+serde = { version = "1.0.136", features = ["derive"] }
clap = { version = "3.1.2", features = ["cargo"] }
nispor = { path = "../lib", version="1.2.5" }
serde_yaml = "0.8"
diff --git a/src/cli/npc.rs b/src/cli/npc.rs
index a2b4f70..9f004d0 100644
--- a/src/cli/npc.rs
+++ b/src/cli/npc.rs
@@ -17,7 +17,7 @@ use nispor::{
Iface, IfaceConf, IfaceState, IfaceType, NetConf, NetState, NisporError,
Route, RouteRule,
};
-use serde_derive::Serialize;
+use serde::Serialize;
use std::collections::HashMap;
use std::fmt;
use std::io::{stderr, stdout, Write};
--
2.31.1

View File

@ -2,12 +2,13 @@
%bcond_with check
Name: nispor
Version: 1.2.3
Version: 1.2.5
Release: 1%{?dist}
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
Patch0: 0001-drop-the-need-of-serde_derive.patch
ExclusiveArch: %{rust_arches}
BuildRequires: make
BuildRequires: pkg-config
@ -16,18 +17,20 @@ BuildRequires: python-setuptools
BuildRequires: rust-packaging
BuildRequires: systemd-devel
BuildRequires: systemd-rpm-macros
BuildRequires: patchelf
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/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(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)
BuildRequires: (crate(libc/default) >= 0.2.74 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(clap/default) >= 2.33.3 with crate(clap/default) < 3.0)
BuildRequires: (crate(rtnetlink/default) >= 0.9.1 with crate(rtnetlink/default) < 0.10.0)
BuildRequires: (crate(netlink-packet-route/default) >= 0.11.0 with crate(netlink-packet-route/default) < 0.12.0)
BuildRequires: (crate(netlink-packet-utils/default) >= 0.5.1 with crate(netlink-packet-utils/default) < 0.6.0)
BuildRequires: (crate(netlink-sys/default) >= 0.8.2 with crate(netlink-sys/default) < 0.9.0)
BuildRequires: (crate(ethtool/default) >= 0.2.2 with crate(ethtool/default) < 0.3.0)
BuildRequires: (crate(tokio/macros) >= 1.17 with crate(tokio/macros) < 2.0)
BuildRequires: (crate(tokio/rt) >= 1.17 with crate(tokio/rt) < 2.0)
BuildRequires: (crate(libc/default) >= 0.2.117 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(clap/default) >= 3.1.2 with crate(clap/default) < 4.0)
BuildRequires: (crate(clap/cargo) >= 3.1.2 with crate(clap/cargo) < 4.0)
BuildRequires: (crate(serde_yaml/default) >= 0.8 with crate(serde_yaml/default) < 0.9)
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)
@ -72,34 +75,20 @@ This package contains C binding of %{name}.
%prep
%autosetup -n %{name}-%{version_no_tilde} -p1
# Drop the upstream fix on SONAME as fedora %cargo_xxx marcos override it,
# we use patchelf to set the SONAME.
rm .cargo/config.toml
%cargo_prep
for sub_dir in lib cli clib;do
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
for sub_dir in lib cli clib;do
pushd src/$sub_dir
%cargo_build
popd
done
%cargo_build
pushd src/python
%py3_build
popd
%install
pushd src/lib
%cargo_install
popd
@ -110,6 +99,8 @@ pushd src/python
%py3_install
popd
patchelf --set-soname libnispor.so.1 \
%{buildroot}/%{_libdir}/libnispor.so.%{version}
%if %{with check}
%check
@ -140,70 +131,4 @@ popd
%ghost %{cargo_registry}/%{name}-%{version_no_tilde}/Cargo.toml
%changelog
* Tue Feb 01 2022 Fernando Fernandez Mancera <ffmancera@riseup.net> - 1.2.3-1
- Upgrade to 1.2.3
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Sep 10 2021 Fernando Fernandez Mancera <ffmancera@riseup.net> - 1.1.1-1
- Upgrade to 1.1.1
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0.1-4
- Rebuilt for Python 3.10
* 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.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Nov 10 2020 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.0.1-1
- Upgrade to 1.0.1
* Mon Nov 09 2020 Gris Ge <fge@redhat.com> - 1.0.0-2
- Fix iface type of python bonding
* Mon Nov 09 2020 Gris Ge <fge@redhat.com> - 1.0.0-1
- Upgrade to 1.0.0
* Sat Oct 10 2020 Gris Ge <fge@redhat.com> - 0.6.1-2
- Fix incorrect build requirements.
* Sat Oct 10 2020 Gris Ge <fge@redhat.com> - 0.6.1-1
- Upgrade to 0.6.1
* Sun Sep 20 2020 Gris Ge <fge@redhat.com> - 0.5.1-1
- Upgrade to 0.5.1
* Mon Sep 07 2020 Gris Ge <fge@redhat.com> - 0.5.0-2
- Fix the python3-nispor requirement
* 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
%autochangelog

View File

@ -1 +1 @@
SHA512 (nispor-1.2.3.tar.gz) = 10670962cc168fe5d585e38e6c6835f8417f585262ed8c16066e693874eab614d2dbb4ece015ea01bdea473e0bf3b9733f83478239b50aad57286d2242f48eb6
SHA512 (nispor-1.2.5.tar.gz) = c74ad63b945f0ae14a8388c0ae4049ffc57f64694b8925ba6c92cef08210ead489a55af3a2d3ba1b50290de7668bc8e9f5b72cc8ad8272bc9cdd8b47da38b8f6