From 106f2e8d6276f3aa78c6acab1707f5ec71f77e4a Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 15 Dec 2022 15:22:25 +0100 Subject: [PATCH] Update to version 0.24.7 --- .gitignore | 1 + rust-sysinfo.spec | 24 +++++++--------- sources | 2 +- sysinfo-fix-metadata-auto.diff | 52 ++++++++++++++++++++++++++++++++++ sysinfo-fix-metadata.diff | 46 ++---------------------------- 5 files changed, 68 insertions(+), 57 deletions(-) create mode 100644 sysinfo-fix-metadata-auto.diff diff --git a/.gitignore b/.gitignore index 3ed2b93..0b640ea 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /sysinfo-0.18.2.crate /sysinfo-0.19.2.crate /sysinfo-0.23.13.crate +/sysinfo-0.24.7.crate diff --git a/rust-sysinfo.spec b/rust-sysinfo.spec index 69e74b4..3ba8470 100644 --- a/rust-sysinfo.spec +++ b/rust-sysinfo.spec @@ -1,30 +1,28 @@ -# Generated by rust2rpm 21 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate sysinfo -Name: rust-%{crate} -Version: 0.23.13 +Name: rust-sysinfo +Version: 0.24.7 Release: %autorelease Summary: Library to get system information -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/sysinfo Source: %{crates_source} -# Initial patched metadata -# * drop Windows-specific dependencies -# * drop AppleOS-specific dependencies and features -Patch0: sysinfo-fix-metadata.diff - -ExclusiveArch: %{rust_arches} +# Automatically generated patch to strip foreign dependencies +Patch: sysinfo-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop macOS-specific features +Patch: sysinfo-fix-metadata.diff BuildRequires: rust-packaging >= 21 %global _description %{expand: -Library to get system information such as processes, processors, disks, -components and networks.} +Library to get system information such as processes, CPUs, disks, components +and networks.} %description %{_description} @@ -120,7 +118,7 @@ use the "rayon" feature of the "%{crate}" crate. %if %{with check} %check # * skip tests that fail when run on VMs, on tmpfs, or in systemd-nspawn -%cargo_test -- -- --skip test::check_processes_cpu_usage --skip test::check_processors_number --skip test_disks +%cargo_test -- -- --skip test::check_processes_cpu_usage --skip test::check_cpus_number %endif %changelog diff --git a/sources b/sources index 1c971d7..31906e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sysinfo-0.23.13.crate) = 9aab3bccb6dab2a2b82dc0abe23924d0993c67c06b8c2748fff61825f78c4e783f821d7f0a4b1bb8ac82f816e3542caf20f59868e5122b03086b958ed68e6cb6 +SHA512 (sysinfo-0.24.7.crate) = d566701996b55cd54e656f196a824025a23b3c8e647594108aca751c97ec1c35bb32333500c86d2335e9f35c626bcea5dce54340244a9ffdd88411fe4634e8e3 diff --git a/sysinfo-fix-metadata-auto.diff b/sysinfo-fix-metadata-auto.diff new file mode 100644 index 0000000..161af6f --- /dev/null +++ b/sysinfo-fix-metadata-auto.diff @@ -0,0 +1,52 @@ +--- sysinfo-0.24.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sysinfo-0.24.7/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -53,49 +53,9 @@ + [target."cfg(all(target_os = \"linux\", not(target_os = \"android\")))".dev-dependencies.tempfile] + version = "3.2" + +-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.core-foundation-sys] +-version = "0.8" +- + [target."cfg(any(windows, target_os = \"linux\", target_os = \"android\"))".dependencies.once_cell] + version = "1.0" + + [target."cfg(not(any(target_os = \"unknown\", target_arch = \"wasm32\")))".dependencies.libc] + version = "^0.2.112" + +-[target."cfg(windows)".dependencies.ntapi] +-version = "0.3" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = [ +- "errhandlingapi", +- "fileapi", +- "handleapi", +- "heapapi", +- "ifdef", +- "ioapiset", +- "minwindef", +- "pdh", +- "psapi", +- "synchapi", +- "sysinfoapi", +- "winbase", +- "winerror", +- "winioctl", +- "winnt", +- "oleauto", +- "wbemcli", +- "rpcdce", +- "combaseapi", +- "objidl", +- "powerbase", +- "netioapi", +- "lmcons", +- "lmaccess", +- "lmapibuf", +- "memoryapi", +- "ntlsa", +- "securitybaseapi", +- "shellapi", +- "std", +-] diff --git a/sysinfo-fix-metadata.diff b/sysinfo-fix-metadata.diff index 3e89a0c..ae79010 100644 --- a/sysinfo-fix-metadata.diff +++ b/sysinfo-fix-metadata.diff @@ -1,6 +1,6 @@ ---- sysinfo-0.23.13/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ sysinfo-0.23.13/Cargo.toml 2022-07-21T09:06:18.427214+00:00 -@@ -45,53 +45,13 @@ +--- sysinfo-0.24.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sysinfo-0.24.7/Cargo.toml 2022-12-15T13:46:46.677312+00:00 +@@ -42,13 +42,10 @@ optional = true [features] @@ -14,43 +14,3 @@ [target."cfg(all(target_os = \"linux\", not(target_os = \"android\")))".dev-dependencies.tempfile] version = "3.2" - --[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.core-foundation-sys] --version = "0.8" -- - [target."cfg(not(any(target_os = \"unknown\", target_arch = \"wasm32\")))".dependencies.libc] - version = "^0.2.112" -- --[target."cfg(windows)".dependencies.ntapi] --version = "0.3" -- --[target."cfg(windows)".dependencies.winapi] --version = "0.3.9" --features = [ -- "fileapi", -- "handleapi", -- "ifdef", -- "ioapiset", -- "minwindef", -- "pdh", -- "psapi", -- "synchapi", -- "sysinfoapi", -- "winbase", -- "winerror", -- "winioctl", -- "winnt", -- "oleauto", -- "wbemcli", -- "rpcdce", -- "combaseapi", -- "objidl", -- "powerbase", -- "netioapi", -- "lmcons", -- "lmaccess", -- "lmapibuf", -- "memoryapi", -- "shellapi", -- "std", --]