diff --git a/.gitignore b/.gitignore index b6827d0..6caa969 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /procs-0.9.11.crate +/procs-0.9.12.crate diff --git a/0001-Fix-test-failure-without-docker-41.patch b/0001-Fix-test-failure-without-docker-41.patch deleted file mode 100644 index 739b4da..0000000 --- a/0001-Fix-test-failure-without-docker-41.patch +++ /dev/null @@ -1,506 +0,0 @@ -From c80c5ec34923b6df2487ef2d7de82800ee6feedf Mon Sep 17 00:00:00 2001 -From: dalance -Date: Tue, 18 Feb 2020 21:47:32 +0900 -Subject: [PATCH] Fix test failure without docker #41 - ---- - src/columns/empty.rs | 38 +++++++++++ - src/columns/os_linux.rs | 133 +++----------------------------------- - src/columns/os_macos.rs | 127 +++--------------------------------- - src/columns/os_windows.rs | 8 +++ - 4 files changed, 66 insertions(+), 240 deletions(-) - create mode 100644 src/columns/empty.rs - -diff --git a/src/columns/empty.rs b/src/columns/empty.rs -new file mode 100644 -index 0000000..d50a0b2 ---- /dev/null -+++ b/src/columns/empty.rs -@@ -0,0 +1,38 @@ -+use crate::process::ProcessInfo; -+use crate::{column_default, Column}; -+use std::cmp; -+use std::collections::HashMap; -+ -+pub struct Empty { -+ header: String, -+ unit: String, -+ fmt_contents: HashMap, -+ raw_contents: HashMap, -+ width: usize, -+} -+ -+impl Empty { -+ pub fn new() -> Self { -+ let header = String::from(""); -+ let unit = String::from(""); -+ Empty { -+ fmt_contents: HashMap::new(), -+ raw_contents: HashMap::new(), -+ width: 0, -+ header, -+ unit, -+ } -+ } -+} -+ -+impl Column for Empty { -+ fn add(&mut self, proc: &ProcessInfo) { -+ let raw_content = String::from(""); -+ let fmt_content = String::from(""); -+ -+ self.fmt_contents.insert(proc.pid, fmt_content); -+ self.raw_contents.insert(proc.pid, raw_content); -+ } -+ -+ column_default!(String); -+} -diff --git a/src/columns/os_linux.rs b/src/columns/os_linux.rs -index 3986a63..6804dee 100644 ---- a/src/columns/os_linux.rs -+++ b/src/columns/os_linux.rs -@@ -4,6 +4,7 @@ pub mod cpu_time; - #[cfg(feature = "docker")] - pub mod docker; - pub mod eip; -+pub mod empty; - pub mod esp; - pub mod gid; - pub mod gid_fs; -@@ -71,6 +72,7 @@ pub use self::cpu_time::CpuTime; - #[cfg(feature = "docker")] - pub use self::docker::Docker; - pub use self::eip::Eip; -+pub use self::empty::Empty; - pub use self::esp::Esp; - pub use self::gid::Gid; - pub use self::gid_fs::GidFs; -@@ -146,9 +148,9 @@ pub enum ConfigColumnKind { - Command, - ContextSw, - CpuTime, -- #[cfg(feature = "docker")] - Docker, - Eip, -+ Empty, - Esp, - Gid, - GidFs, -@@ -229,7 +231,10 @@ pub fn gen_column( - ConfigColumnKind::CpuTime => Box::new(CpuTime::new()), - #[cfg(feature = "docker")] - ConfigColumnKind::Docker => Box::new(Docker::new(_docker_path)), -+ #[cfg(not(feature = "docker"))] -+ ConfigColumnKind::Docker => Box::new(Empty::new()), - ConfigColumnKind::Eip => Box::new(Eip::new()), -+ ConfigColumnKind::Empty => Box::new(Empty::new()), - ConfigColumnKind::Esp => Box::new(Esp::new()), - ConfigColumnKind::Gid => Box::new(Gid::new(abbr_sid)), - ConfigColumnKind::GidFs => Box::new(GidFs::new()), -@@ -312,12 +317,12 @@ lazy_static! { - ConfigColumnKind::CpuTime, - ("CpuTime", "Cumulative CPU time") - ), -- #[cfg(feature = "docker")] - ( - ConfigColumnKind::Docker, - ("Docker", "Docker container name") - ), - (ConfigColumnKind::Eip, ("Eip", "Instruction pointer")), -+ (ConfigColumnKind::Empty, ("Empty", "Empty")), - (ConfigColumnKind::Esp, ("Esp", "Stack pointer")), - (ConfigColumnKind::Gid, ("Gid", "Group ID")), - (ConfigColumnKind::GidFs, ("GidFs", "File system group ID")), -@@ -453,7 +458,6 @@ lazy_static! { - // CONFIG_DEFAULT - // --------------------------------------------------------------------------------------------------------------------- - --#[cfg(feature = "docker")] - pub static CONFIG_DEFAULT: &str = r#" - [[columns]] - kind = "Pid" -@@ -578,126 +582,6 @@ numeric_search = false - nonnumeric_search = true - "#; - --#[cfg(not(feature = "docker"))] --pub static CONFIG_DEFAULT: &str = r#" --[[columns]] --kind = "Pid" --style = "BrightYellow" --numeric_search = true --nonnumeric_search = false --[[columns]] --kind = "User" --style = "BrightGreen" --numeric_search = false --nonnumeric_search = true --[[columns]] --kind = "Separator" --style = "White" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "State" --style = "ByState" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "Nice" --style = "BrightMagenta" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "Tty" --style = "BrightWhite" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "UsageCpu" --style = "ByPercentage" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "UsageMem" --style = "ByPercentage" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "VmPeak" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "VmSize" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "VmRss" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "TcpPort" --style = "BrightCyan" --numeric_search = true --nonnumeric_search = false --max_width = 20 --[[columns]] --kind = "UdpPort" --style = "BrightCyan" --numeric_search = true --nonnumeric_search = false --max_width = 20 --[[columns]] --kind = "ReadBytes" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "WriteBytes" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "Slot" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "Separator" --style = "White" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "CpuTime" --style = "BrightCyan" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "StartTime" --style = "BrightMagenta" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "Separator" --style = "White" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "Command" --style = "BrightWhite" --numeric_search = false --nonnumeric_search = true --"#; -- - // --------------------------------------------------------------------------------------------------------------------- - // CONFIG_ALL - // --------------------------------------------------------------------------------------------------------------------- -@@ -723,6 +607,9 @@ style = "BrightMagenta" - kind = "Eip" - style = "BrightYellow" - [[columns]] -+kind = "Empty" -+style = "BrightYellow" -+[[columns]] - kind = "Esp" - style = "BrightBlue" - [[columns]] -diff --git a/src/columns/os_macos.rs b/src/columns/os_macos.rs -index 1302786..3906950 100644 ---- a/src/columns/os_macos.rs -+++ b/src/columns/os_macos.rs -@@ -3,6 +3,7 @@ pub mod context_sw; - pub mod cpu_time; - #[cfg(feature = "docker")] - pub mod docker; -+pub mod empty; - pub mod gid; - pub mod gid_real; - pub mod gid_saved; -@@ -43,6 +44,7 @@ pub use self::context_sw::ContextSw; - pub use self::cpu_time::CpuTime; - #[cfg(feature = "docker")] - pub use self::docker::Docker; -+pub use self::empty::Empty; - pub use self::gid::Gid; - pub use self::gid_real::GidReal; - pub use self::gid_saved::GidSaved; -@@ -92,8 +94,8 @@ pub enum ConfigColumnKind { - Command, - ContextSw, - CpuTime, -- #[cfg(feature = "docker")] - Docker, -+ Empty, - Gid, - GidReal, - GidSaved, -@@ -148,6 +150,9 @@ pub fn gen_column( - ConfigColumnKind::CpuTime => Box::new(CpuTime::new()), - #[cfg(feature = "docker")] - ConfigColumnKind::Docker => Box::new(Docker::new(_docker_path)), -+ #[cfg(not(feature = "docker"))] -+ ConfigColumnKind::Docker => Box::new(Empty::new()), -+ ConfigColumnKind::Empty => Box::new(Empty::new()), - ConfigColumnKind::Gid => Box::new(Gid::new(abbr_sid)), - ConfigColumnKind::GidReal => Box::new(GidReal::new()), - ConfigColumnKind::GidSaved => Box::new(GidSaved::new()), -@@ -204,11 +209,11 @@ lazy_static! { - ConfigColumnKind::CpuTime, - ("CpuTime", "Cumulative CPU time") - ), -- #[cfg(feature = "docker")] - ( - ConfigColumnKind::Docker, - ("Docker", "Docker container name") - ), -+ (ConfigColumnKind::Empty, ("Empty", "Empty")), - (ConfigColumnKind::Gid, ("Gid", "Group ID")), - (ConfigColumnKind::GidReal, ("GidReal", "Real group ID")), - (ConfigColumnKind::GidSaved, ("GidSaved", "Saved group ID")), -@@ -282,7 +287,6 @@ lazy_static! { - // CONFIG_DEFAULT - // --------------------------------------------------------------------------------------------------------------------- - --#[cfg(feature = "docker")] - pub static CONFIG_DEFAULT: &str = r#" - [[columns]] - kind = "Pid" -@@ -401,120 +405,6 @@ numeric_search = false - nonnumeric_search = true - "#; - --#[cfg(not(feature = "docker"))] --pub static CONFIG_DEFAULT: &str = r#" --[[columns]] --kind = "Pid" --style = "BrightYellow" --numeric_search = true --nonnumeric_search = false --[[columns]] --kind = "User" --style = "BrightGreen" --numeric_search = false --nonnumeric_search = true --[[columns]] --kind = "Separator" --style = "White" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "State" --style = "ByState" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "Nice" --style = "BrightMagenta" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "Tty" --style = "BrightWhite" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "UsageCpu" --style = "ByPercentage" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "UsageMem" --style = "ByPercentage" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "VmSize" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "VmRss" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "TcpPort" --style = "BrightCyan" --numeric_search = true --nonnumeric_search = false --max_width = 20 --[[columns]] --kind = "UdpPort" --style = "BrightCyan" --numeric_search = true --nonnumeric_search = false --max_width = 20 --[[columns]] --kind = "ReadBytes" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "WriteBytes" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "Slot" --style = "ByUnit" --numeric_search = false --nonnumeric_search = false --align = "Right" --[[columns]] --kind = "Separator" --style = "White" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "CpuTime" --style = "BrightCyan" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "StartTime" --style = "BrightMagenta" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "Separator" --style = "White" --numeric_search = false --nonnumeric_search = false --[[columns]] --kind = "Command" --style = "BrightWhite" --numeric_search = false --nonnumeric_search = true --"#; -- - // --------------------------------------------------------------------------------------------------------------------- - // CONFIG_ALL - // --------------------------------------------------------------------------------------------------------------------- -@@ -537,6 +427,9 @@ align = "Center" - kind = "Docker" - style = "BrightMagenta" - [[columns]] -+kind = "Empty" -+style = "BrightYellow" -+[[columns]] - kind = "Gid" - style = "White" - [[columns]] -diff --git a/src/columns/os_windows.rs b/src/columns/os_windows.rs -index 401d33e..357feaa 100644 ---- a/src/columns/os_windows.rs -+++ b/src/columns/os_windows.rs -@@ -1,5 +1,6 @@ - pub mod command; - pub mod cpu_time; -+pub mod empty; - pub mod gid; - pub mod group; - pub mod maj_flt; -@@ -26,6 +27,7 @@ pub mod write_bytes; - - pub use self::command::Command; - pub use self::cpu_time::CpuTime; -+pub use self::empty::Empty; - pub use self::gid::Gid; - pub use self::group::Group; - pub use self::maj_flt::MajFlt; -@@ -63,6 +65,7 @@ use std::collections::HashMap; - pub enum ConfigColumnKind { - Command, - CpuTime, -+ Empty, - Gid, - Group, - MajFlt, -@@ -102,6 +105,7 @@ pub fn gen_column( - match kind { - ConfigColumnKind::Command => Box::new(Command::new()), - ConfigColumnKind::CpuTime => Box::new(CpuTime::new()), -+ ConfigColumnKind::Empty => Box::new(Empty::new()), - ConfigColumnKind::Gid => Box::new(Gid::new(abbr_sid)), - ConfigColumnKind::Group => Box::new(Group::new(abbr_sid)), - ConfigColumnKind::MajFlt => Box::new(MajFlt::new()), -@@ -142,6 +146,7 @@ lazy_static! { - ConfigColumnKind::CpuTime, - ("CpuTime", "Cumulative CPU time") - ), -+ (ConfigColumnKind::Empty, ("Empty", "Empty")), - (ConfigColumnKind::Gid, ("Gid", "Group ID")), - (ConfigColumnKind::Group, ("Group", "Group name")), - ( -@@ -303,6 +308,9 @@ kind = "CpuTime" - style = "BrightGreen" - align = "Center" - [[columns]] -+kind = "Empty" -+style = "BrightYellow" -+[[columns]] - kind = "Gid" - style = "White" - [[columns]] --- -2.25.0 - diff --git a/procs-fix-metadata.diff b/procs-fix-metadata.diff index 0978c44..1d18207 100644 --- a/procs-fix-metadata.diff +++ b/procs-fix-metadata.diff @@ -1,5 +1,5 @@ ---- procs-0.9.11/Cargo.toml 2020-02-16T07:11:09+00:00 -+++ procs-0.9.11/Cargo.toml 2020-02-18T12:13:49.912410+00:00 +--- procs-0.9.12/Cargo.toml 2020-02-25T02:39:04+00:00 ++++ procs-0.9.12/Cargo.toml 2020-02-25T07:10:29.658370+00:00 @@ -106,9 +106,6 @@ [dependencies.unicode-width] version = "0.1" diff --git a/rust-procs.spec b/rust-procs.spec index 6c05203..374d0bb 100644 --- a/rust-procs.spec +++ b/rust-procs.spec @@ -5,7 +5,7 @@ %global crate procs Name: rust-%{crate} -Version: 0.9.11 +Version: 0.9.12 Release: 1%{?dist} Summary: Modern replacement for ps @@ -17,8 +17,6 @@ Source: %{crates_source} # * No windows/macos # * Remove docker feature Patch0: procs-fix-metadata.diff -# https://github.com/dalance/procs/commit/c80c5ec34923b6df2487ef2d7de82800ee6feedf -Patch0001: 0001-Fix-test-failure-without-docker-41.patch ExclusiveArch: %{rust_arches} @@ -63,11 +61,12 @@ License: MIT and ASL 2.0 and BSD and zlib %if %{with check} %check -# One test fails related to docker -# https://github.com/dalance/procs/issues/41#issuecomment-587438247 -%cargo_test -- -- --skip tests::test_run_all +%cargo_test %endif %changelog +* Tue Feb 25 08:10:30 CET 2020 Igor Raits - 0.9.12-1 +- Update to 0.9.12 + * Tue Feb 18 13:11:48 CET 2020 Igor Raits - 0.9.11-1 - Initial package diff --git a/sources b/sources index 8e4f635..5e4a9c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (procs-0.9.11.crate) = 534cb42026ef4c4d94383626859dd9da914ef2a91ea066a775831737385bf646f8bb685f78ea888552b32b42e9f219688dfd12b7a24abd53b419a0af2d1c5a65 +SHA512 (procs-0.9.12.crate) = 1da063d471a70c8bbcdda6b266f4b8ca28147d78aa2d7f73d1727baea862cdb2be4236885f2b3eef96dbd72e99f302860a5efbb030d8e4cefad20b3f5f4ceeee