From 02c05e3b6c9838e0beeddd338be1e4a0f0afd5e6 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 19 Feb 2023 18:13:43 +0100 Subject: [PATCH] Future-proof packaging for rust2rpm v24 --- rust-sysinfo.spec | 7 ++++--- sysinfo-fix-metadata-auto.diff | 2 +- sysinfo-fix-metadata.diff | 12 ++++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/rust-sysinfo.spec b/rust-sysinfo.spec index e42f6a4..8518975 100644 --- a/rust-sysinfo.spec +++ b/rust-sysinfo.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 23 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} @@ -16,13 +16,14 @@ Source: %{crates_source} Patch: sysinfo-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * drop macOS-specific features +# * drop unused cdylib build target Patch: sysinfo-fix-metadata.diff BuildRequires: rust-packaging >= 21 %global _description %{expand: -Library to get system information such as processes, CPUs, disks, components -and networks.} +Library to get system information such as processes, CPUs, disks, +components and networks.} %description %{_description} diff --git a/sysinfo-fix-metadata-auto.diff b/sysinfo-fix-metadata-auto.diff index 8ef7e6a..b198de8 100644 --- a/sysinfo-fix-metadata-auto.diff +++ b/sysinfo-fix-metadata-auto.diff @@ -1,5 +1,5 @@ --- sysinfo-0.27.7/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ sysinfo-0.27.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sysinfo-0.27.7/Cargo.toml 2023-02-16T20:14:29.958242+00:00 @@ -52,51 +52,9 @@ [target."cfg(all(target_os = \"linux\", not(target_os = \"android\")))".dev-dependencies.tempfile] version = "3.2" diff --git a/sysinfo-fix-metadata.diff b/sysinfo-fix-metadata.diff index 035cd17..2795c83 100644 --- a/sysinfo-fix-metadata.diff +++ b/sysinfo-fix-metadata.diff @@ -1,6 +1,14 @@ --- sysinfo-0.27.7/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ sysinfo-0.27.7/Cargo.toml 2023-01-22T21:19:34.354379+00:00 -@@ -41,13 +41,10 @@ ++++ sysinfo-0.27.7/Cargo.toml 2023-02-16T20:14:44.222298+00:00 +@@ -30,7 +30,6 @@ + name = "sysinfo" + crate_type = [ + "rlib", +- "cdylib", + ] + + [dependencies.cfg-if] +@@ -41,13 +40,10 @@ optional = true [features]