diff --git a/.gitignore b/.gitignore index b35d05d..c1b0999 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /nispor-1.2.2.tar.gz /nispor-1.2.3.tar.gz /nispor-1.2.5.tar.gz +/nispor-1.2.7.tar.gz diff --git a/0001-drop-the-need-of-serde_derive.patch b/0001-drop-the-need-of-serde_derive.patch deleted file mode 100644 index d50ad2b..0000000 --- a/0001-drop-the-need-of-serde_derive.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 174f76ddb7961ffe00c6379bd149f5d7ee6c2390 Mon Sep 17 00:00:00 2001 -From: Gris Ge -Date: Tue, 12 Apr 2022 20:33:08 +0800 -Subject: [PATCH] drop the need of serde_derive - -Signed-off-by: Gris Ge ---- - 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 - diff --git a/fix_tokio_dep.patch b/fix_tokio_dep.patch new file mode 100644 index 0000000..d9937b0 --- /dev/null +++ b/fix_tokio_dep.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/Cargo.toml b/src/lib/Cargo.toml +index 60400ff..6d27cae 100644 +--- a/src/lib/Cargo.toml ++++ b/src/lib/Cargo.toml +@@ -23,7 +23,7 @@ netlink-packet-route = "0.12.0" + netlink-sys = "0.8.3" + netlink-packet-utils = "0.5.1" + ethtool = "0.2.2" +-tokio = { version = "1.19.2", features = ["macros", "rt"] } ++tokio = { version = "1.18", features = ["macros", "rt"] } + futures = "0.3.21" + libc = "0.2.126" + log = "0.4.17" diff --git a/nispor.spec b/nispor.spec index 3400e56..edfcf5e 100644 --- a/nispor.spec +++ b/nispor.spec @@ -2,13 +2,13 @@ %bcond_with check Name: nispor -Version: 1.2.5 -Release: 2%{?dist} +Version: 1.2.7 +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 +Patch0: fix_tokio_dep.patch ExclusiveArch: %{rust_arches} BuildRequires: make BuildRequires: pkg-config @@ -21,14 +21,15 @@ BuildRequires: patchelf 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(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(rtnetlink/default) >= 0.10.0 with crate(rtnetlink/default) < 0.11.0) +BuildRequires: (crate(netlink-packet-route/default) >= 0.12.0 with crate(netlink-packet-route/default) < 0.13.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(netlink-sys/default) >= 0.8.3 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(mptcp-pm/default) >= 0.1.1 with crate(mptcp-pm/default) < 0.2.0) +BuildRequires: (crate(tokio/macros) >= 1.18 with crate(tokio/macros) < 2.0) +BuildRequires: (crate(tokio/rt) >= 1.18 with crate(tokio/rt) < 2.0) +BuildRequires: (crate(libc/default) >= 0.2.126 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) @@ -131,7 +132,4 @@ patchelf --set-soname libnispor.so.1 \ %ghost %{cargo_registry}/%{name}-%{version_no_tilde}/Cargo.toml %changelog -* Tue Jun 14 2022 Python Maint - 1.2.5-2 -- Rebuilt for Python 3.11 - %autochangelog diff --git a/sources b/sources index fbd9bfb..739cae0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nispor-1.2.5.tar.gz) = c74ad63b945f0ae14a8388c0ae4049ffc57f64694b8925ba6c92cef08210ead489a55af3a2d3ba1b50290de7668bc8e9f5b72cc8ad8272bc9cdd8b47da38b8f6 +SHA512 (nispor-1.2.7.tar.gz) = 397a946c09802d736eb8cfdf177c759c46f64cedf9685161694eab638d939924fcb412b5de27690b76ced421b64dfdad9c623508ef2a3603ba8ac020fa463fb3