diff --git a/.gitignore b/.gitignore index 28bcfce..62579cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /fb_procfs-0.4.1.crate /fb_procfs-0.5.0.crate +/fb_procfs-0.6.3.crate diff --git a/fb_procfs-fix-32bit.patch b/fb_procfs-fix-32bit.patch deleted file mode 100644 index 8abe4e1..0000000 --- a/fb_procfs-fix-32bit.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff '--color=auto' -ruN fb_procfs-0.5.0/src/lib.rs fb_procfs-0.5.0-fix-32bit/src/lib.rs ---- fb_procfs-0.5.0/src/lib.rs 1973-11-29 13:33:09.000000000 -0800 -+++ fb_procfs-0.5.0-fix-32bit/src/lib.rs 2022-02-17 10:01:07.365184992 -0800 -@@ -385,7 +385,7 @@ - if let Ok(stat) = sys::statvfs::statvfs(Path::new(&mount_point)) { - let disk_usage = ((stat.blocks() - stat.blocks_available()) as f32 * 100.0) - / stat.blocks() as f32; -- let partition_size = stat.blocks() * stat.block_size() as u64; -+ let partition_size = stat.blocks() as u64 * stat.block_size() as u64; - return Some((disk_usage, partition_size)); - } - } diff --git a/fb_procfs-fix-metadata.diff b/fb_procfs-fix-metadata.diff new file mode 100644 index 0000000..bd2049b --- /dev/null +++ b/fb_procfs-fix-metadata.diff @@ -0,0 +1,11 @@ +--- fb_procfs-0.6.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ fb_procfs-0.6.3/Cargo.toml 2023-01-19T03:29:51.618270+00:00 +@@ -30,7 +30,7 @@ + version = "0.2.135" + + [dependencies.nix] +-version = "0.25" ++version = "0.26" + + [dependencies.openat] + version = "0.1.21" diff --git a/rust-fb_procfs.spec b/rust-fb_procfs.spec index e61bdc6..ba478a0 100644 --- a/rust-fb_procfs.spec +++ b/rust-fb_procfs.spec @@ -1,24 +1,22 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate fb_procfs -Name: rust-%{crate} -Version: 0.5.0 +Name: rust-fb_procfs +Version: 0.6.3 Release: %autorelease Summary: Crate for reading procfs -# Upstream license specification: Apache-2.0 -License: ASL 2.0 +License: Apache-2.0 URL: https://crates.io/crates/fb_procfs Source: %{crates_source} -# explicit cast for statvfs blocks(), needed on non-64bit arches -Patch: %{crate}-fix-32bit.patch +# Manually created patch for downstream crate metadata changes +# * bump nix from 0.25 to 0.26 +Patch: fb_procfs-fix-metadata.diff -ExclusiveArch: %{rust_arches} - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Crate for reading procfs.} @@ -35,9 +33,9 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE -%doc README -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/README +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -49,7 +47,7 @@ This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index 0e1a2fe..50d85ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fb_procfs-0.5.0.crate) = 1b4ddfb10bf53a602172d2e8e0a59bbb38279aa182eb4de47d647f4247250aa7766ea282779ee6ce1693167c7c5e3337e1234a1bc846e0b9c094d7577433e53a +SHA512 (fb_procfs-0.6.3.crate) = ff57555ef597b8b7d2f0c5da03586292f0ea1cf0b73e78500a35a242a68ea7ce1fe2dead45ea13d03f00ff3992f3deb6e0cb32cb410977da762b2206a1700f67