From e5d1a7401354cac673d8e7eedc6c0f527e28d386 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 26 Nov 2023 13:28:49 +0100 Subject: [PATCH] Update to version 0.8.2; Fixes RHBZ#2173156 --- .gitignore | 1 + remove_dir_all-fix-metadata-auto.diff | 31 ++++++++++---------- remove_dir_all-fix-metadata.diff | 39 +++++++++++++++++++++++++ rust-remove_dir_all.spec | 41 +++++++++++++++++++++------ rust2rpm.toml | 3 ++ sources | 2 +- 6 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 remove_dir_all-fix-metadata.diff create mode 100644 rust2rpm.toml diff --git a/.gitignore b/.gitignore index 68c260b..d7e524f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /remove_dir_all-0.5.2.crate /remove_dir_all-0.5.3.crate /remove_dir_all-0.7.0.crate +/remove_dir_all-0.8.2.crate diff --git a/remove_dir_all-fix-metadata-auto.diff b/remove_dir_all-fix-metadata-auto.diff index ebb9101..a4a0856 100644 --- a/remove_dir_all-fix-metadata-auto.diff +++ b/remove_dir_all-fix-metadata-auto.diff @@ -1,18 +1,19 @@ ---- remove_dir_all-0.7.0/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ remove_dir_all-0.7.0/Cargo.toml 2023-05-25T19:03:22.357769+00:00 -@@ -32,15 +32,3 @@ - version = "3.1" +--- remove_dir_all-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ remove_dir_all-0.8.2/Cargo.toml 2023-11-04T23:50:51.144272+00:00 +@@ -101,16 +101,3 @@ [target."cfg(not(windows))".dependencies.libc] version = "0.2" --[target."cfg(windows)".dependencies.log] --version = "0.4.11" + +-[target."cfg(windows)".dependencies.aligned] +-version = "0.4.1" - --[target."cfg(windows)".dependencies.num_cpus] --version = "1.13" -- --[target."cfg(windows)".dependencies.rayon] --version = "1.4" -- --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["std", "errhandlingapi", "winerror", "fileapi", "winbase"] +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.45.0" +-features = [ +- "Win32_Foundation", +- "Win32_Storage_FileSystem", +- "Win32_System_IO", +- "Win32_System_Ioctl", +- "Win32_System_SystemServices", +- "Win32_System_Threading", +-] diff --git a/remove_dir_all-fix-metadata.diff b/remove_dir_all-fix-metadata.diff new file mode 100644 index 0000000..54671d6 --- /dev/null +++ b/remove_dir_all-fix-metadata.diff @@ -0,0 +1,39 @@ +--- remove_dir_all-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ remove_dir_all-0.8.2/Cargo.toml 2023-11-04T23:51:34.050434+00:00 +@@ -35,22 +35,10 @@ + categories = ["filesystem"] + license = "MIT OR Apache-2.0" + repository = "https://github.com/XAMPPRocky/remove_dir_all.git" +- +-[[bin]] +-name = "remove-dir-all" +-required-features = ["cli"] ++autobins = false + + [dependencies.cfg-if] + version = "1.0.0" +- +-[dependencies.clap] +-version = "4.1.11" +-features = ["derive"] +-optional = true +- +-[dependencies.env_logger] +-version = "0.10.0" +-optional = true + + [dependencies.fs_at] + version = "0.1.4" +@@ -85,12 +73,6 @@ + version = "0.2" + + [features] +-cli = [ +- "dep:clap", +- "dep:env_logger", +- "log", +- "parallel", +-] + default = [] + log = ["dep:log"] + parallel = ["dep:rayon"] diff --git a/rust-remove_dir_all.spec b/rust-remove_dir_all.spec index d5efcc4..e04eea3 100644 --- a/rust-remove_dir_all.spec +++ b/rust-remove_dir_all.spec @@ -1,23 +1,24 @@ -# Generated by rust2rpm 24 -# * tests seem to be broken with Rust 1.55+ -%bcond_with check +# Generated by rust2rpm 25 +%bcond_without check %global debug_package %{nil} %global crate remove_dir_all Name: rust-remove_dir_all -Version: 0.7.0 +Version: 0.8.2 Release: %autorelease Summary: Safe, reliable implementation of remove_dir_all -# Upstream license specification: MIT/Apache-2.0 License: MIT OR Apache-2.0 URL: https://crates.io/crates/remove_dir_all Source: %{crates_source} -# Automatically generated patch to strip foreign dependencies +# Automatically generated patch to strip dependencies and normalize metadata Patch: remove_dir_all-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * prevent unused remove-dir-all executable from being built and shipped +Patch: remove_dir_all-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: A safe, reliable implementation of remove_dir_all for Windows.} @@ -51,8 +52,32 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+log-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+log-devel %{_description} + +This package contains library source intended for building other packages which +use the "log" feature of the "%{crate}" crate. + +%files -n %{name}+log-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+parallel-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+parallel-devel %{_description} + +This package contains library source intended for building other packages which +use the "parallel" feature of the "%{crate}" crate. + +%files -n %{name}+parallel-devel +%ghost %{crate_instdir}/Cargo.toml + %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..2ac47f4 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,3 @@ +[package] +summary = "Safe, reliable implementation of remove_dir_all" + diff --git a/sources b/sources index ba8dd94..57a0317 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remove_dir_all-0.7.0.crate) = a4a426e7f3e9f4d3925809e22ebb61d06be04703ecabbc07aae80894458f29a146bc6aa6540ab4ac96c74a160a5520ea079ebb6ac6cca489ba036ece6678339c +SHA512 (remove_dir_all-0.8.2.crate) = db20998b6db76ead161b69ad4f92cc7139a67285b1d7cd7a3631b4c46450503b378a597d3e27c618dd5a4f77c0b3f20a25036ad495c88a9a1d134a6af58f0134