diff --git a/.gitignore b/.gitignore index 1de71d4..417f3b7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /dua-cli-2.10.7.crate /dua-cli-2.10.9.crate /dua-cli-2.11.1.crate +/dua-cli-2.17.0.crate diff --git a/0001-port-to-clap-3.0.0-beta.5.patch b/0001-port-to-clap-3.0.0-beta.5.patch deleted file mode 100644 index bec2222..0000000 --- a/0001-port-to-clap-3.0.0-beta.5.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 946a6a3547d1f6ca7347bed9d77c750d686ad505 Mon Sep 17 00:00:00 2001 -From: Fabio Valentini -Date: Mon, 22 Nov 2021 20:58:46 +0100 -Subject: [PATCH] port to clap 3.0.0-beta.5 - ---- - src/main.rs | 2 +- - src/options.rs | 11 +++++------ - 2 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/src/main.rs b/src/main.rs -index d45672f..0b86049 100644 ---- a/src/main.rs -+++ b/src/main.rs -@@ -1,6 +1,6 @@ - #![forbid(unsafe_code)] - use anyhow::Result; --use clap::Clap; -+use clap::Parser; - use dua::{ByteFormat, TraversalSorting}; - use std::{fs, io, io::Write, path::PathBuf, process}; - -diff --git a/src/options.rs b/src/options.rs -index d8167c5..dce3af6 100644 ---- a/src/options.rs -+++ b/src/options.rs -@@ -1,4 +1,4 @@ --use clap::Clap; -+use clap::Parser; - use dua::ByteFormat as LibraryByteFormat; - use std::path::PathBuf; - use std::str::FromStr; -@@ -50,10 +50,9 @@ impl From for LibraryByteFormat { - } - } - --#[derive(Debug, Clap)] -+#[derive(Debug, Parser)] - #[clap(name = "dua", about = "A tool to learn about disk usage, fast!", version = clap::crate_version!())] --#[clap(setting = clap::AppSettings::ColoredHelp)] --#[clap(setting = clap::AppSettings::GlobalVersion)] -+#[clap(setting = clap::AppSettings::PropagateVersion)] - #[clap(override_usage = "dua [FLAGS] [OPTIONS] [SUBCOMMAND] [input]...")] - pub struct Args { - #[clap(subcommand)] -@@ -85,7 +84,7 @@ pub struct Args { - /// GiB - only gibibytes - /// MB - only megabytes - /// MiB - only mebibytes -- #[clap(short = 'f', long, case_insensitive = true, possible_values(&ByteFormat::VARIANTS))] -+ #[clap(short = 'f', long, case_insensitive = true, possible_values(ByteFormat::VARIANTS))] - pub format: Option, - - /// Display apparent size instead of disk usage. -@@ -105,7 +104,7 @@ pub struct Args { - pub input: Vec, - } - --#[derive(Debug, Clap)] -+#[derive(Debug, Parser)] - pub enum Command { - /// Launch the terminal user interface - #[cfg(any(feature = "tui-unix", feature = "tui-crossplatform"))] --- -2.33.1 - diff --git a/dua-cli-fix-metadata.diff b/dua-cli-fix-metadata.diff index f535d2b..cee6566 100644 --- a/dua-cli-fix-metadata.diff +++ b/dua-cli-fix-metadata.diff @@ -1,26 +1,49 @@ ---- dua-cli-2.11.1/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ dua-cli-2.11.1/Cargo.toml 2021-08-23T09:45:50.357053+00:00 -@@ -52,7 +52,7 @@ +--- dua-cli-2.17.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ dua-cli-2.17.0/Cargo.toml 2022-02-07T20:11:48.200184+00:00 +@@ -45,14 +45,14 @@ + version = "4" + + [dependencies.clap] +-version = "=3.0.0-rc.8" ++version = "3.0.0" + features = ["derive", "cargo"] + + [dependencies.colored] version = "2.0.0" [dependencies.crosstermion] --version = "0.6.0" +-version = "0.8.1" +version = "0.7.0" optional = true default-features = false -@@ -76,12 +76,12 @@ - version = "0.5" +@@ -73,19 +73,19 @@ + optional = true + + [dependencies.petgraph] +-version = "0.6" ++version = "0.5.1" + + [dependencies.trash] + version = "2.0.1" + optional = true [dependencies.tui] --version = "0.14.0" +-version = "0.16.0" +version = "0.15.0" optional = true default-features = false [dependencies.tui-react] --version = "0.14" -+version = "0.15" +-version = "0.16.0" ++version = "0.15.0" optional = true [dependencies.unicode-segmentation] +@@ -104,6 +104,3 @@ + tui-crossplatform = ["crosstermion/tui-react-crossterm", "tui-shared"] + tui-shared = ["tui", "tui-react", "open", "unicode-segmentation"] + tui-unix = ["crosstermion/tui-react-termion", "tui-shared"] +-[target."cfg(all(target_os = \"macos\", target_arch = \"aarch64\"))".dependencies.sysinfo] +-version = "0.22.3" +-default-features = false diff --git a/rust-dua-cli.spec b/rust-dua-cli.spec index 5596135..52682ae 100644 --- a/rust-dua-cli.spec +++ b/rust-dua-cli.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 18 +# Generated by rust2rpm 20 # * neither test files nor test code is included in published crates %bcond_with check %global crate dua-cli Name: rust-%{crate} -Version: 2.11.1 +Version: 2.17.0 Release: %autorelease Summary: Tool to conveniently learn about the disk usage of directories @@ -14,17 +14,15 @@ License: MIT URL: https://crates.io/crates/dua-cli Source: %{crates_source} # Initial patched metadata -# * bump crosstermion from 0.6 to 0.7 -# * bump tui from 0.14 to 0.15 -# * bump tui-react from 0.14 to 0.15 +# * bump to clap 3.0.0 +# * temporarily downgrade crosstermion from 0.8.1 to 0.7 +# * temporarily downgrade petgraph from 0.6.0 to 0.5.1 +# * temporarily downgrade tui from 0.16.0 to 0.15.0 +# * temporarily downgrade tui-react from 0.16.0 to 0.15.0 +# * drop macos-specific dependencies Patch0: dua-cli-fix-metadata.diff -# * port to clap 3.0.0-beta.5 -Patch1: 0001-port-to-clap-3.0.0-beta.5.patch ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif BuildRequires: rust-packaging @@ -33,24 +31,24 @@ Tool to conveniently learn about the disk usage of directories, fast!.} %description %{_description} -%if ! %{__cargo_skip_build} %package -n %{crate} Summary: %{summary} # ASL 2.0 or MIT # BSD # MIT # MIT or ASL 2.0 +# MIT or ASL 2.0 or zlib # MPLv2.0 # Unlicense or MIT +# zlib or ASL 2.0 or MIT License: MIT and BSD and MPLv2.0 %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE -%doc README.md CHANGELOG.md +%doc CHANGELOG.md README.md %{_bindir}/dua -%endif %package devel Summary: %{summary} @@ -58,12 +56,12 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel %license LICENSE -%doc README.md CHANGELOG.md +%doc CHANGELOG.md README.md %{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel @@ -72,20 +70,32 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +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 +%package -n %{name}+aggregate-scan-progress-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+aggregate-scan-progress-devel %{_description} + +This package contains library source intended for building other packages which +use the "aggregate-scan-progress" feature of the "%{crate}" crate. + +%files -n %{name}+aggregate-scan-progress-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + %package -n %{name}+crosstermion-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+crosstermion-devel %{_description} -This package contains library source intended for building other packages -which use "crosstermion" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "crosstermion" feature of the "%{crate}" crate. %files -n %{name}+crosstermion-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -96,20 +106,44 @@ BuildArch: noarch %description -n %{name}+open-devel %{_description} -This package contains library source intended for building other packages -which use "open" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "open" feature of the "%{crate}" crate. %files -n %{name}+open-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%package -n %{name}+trash-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+trash-devel %{_description} + +This package contains library source intended for building other packages which +use the "trash" feature of the "%{crate}" crate. + +%files -n %{name}+trash-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+trash-move-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+trash-move-devel %{_description} + +This package contains library source intended for building other packages which +use the "trash-move" feature of the "%{crate}" crate. + +%files -n %{name}+trash-move-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + %package -n %{name}+tui-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+tui-devel %{_description} -This package contains library source intended for building other packages -which use "tui" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tui" feature of the "%{crate}" crate. %files -n %{name}+tui-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -120,8 +154,8 @@ BuildArch: noarch %description -n %{name}+tui-crossplatform-devel %{_description} -This package contains library source intended for building other packages -which use "tui-crossplatform" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tui-crossplatform" feature of the "%{crate}" crate. %files -n %{name}+tui-crossplatform-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -132,8 +166,8 @@ BuildArch: noarch %description -n %{name}+tui-react-devel %{_description} -This package contains library source intended for building other packages -which use "tui-react" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tui-react" feature of the "%{crate}" crate. %files -n %{name}+tui-react-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -144,8 +178,8 @@ BuildArch: noarch %description -n %{name}+tui-shared-devel %{_description} -This package contains library source intended for building other packages -which use "tui-shared" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tui-shared" feature of the "%{crate}" crate. %files -n %{name}+tui-shared-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -156,8 +190,8 @@ BuildArch: noarch %description -n %{name}+tui-unix-devel %{_description} -This package contains library source intended for building other packages -which use "tui-unix" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tui-unix" feature of the "%{crate}" crate. %files -n %{name}+tui-unix-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -168,8 +202,8 @@ BuildArch: noarch %description -n %{name}+unicode-segmentation-devel %{_description} -This package contains library source intended for building other packages -which use "unicode-segmentation" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "unicode-segmentation" feature of the "%{crate}" crate. %files -n %{name}+unicode-segmentation-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml diff --git a/sources b/sources index 0af7323..1103f26 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dua-cli-2.11.1.crate) = 68cd6e24c5580708ba65b4d4be39002dd06e7ff515808cfb46245c14f46b265858596a8aa06e17c688578b684e288a8908bc1ef9b1abb603a467ff075e6f2ff5 +SHA512 (dua-cli-2.17.0.crate) = 8c24449c57ac4d4664a8839287bd58154df510c1cdf133cace9d013da63c6b64e88afa3c99d9f922e092583a7267cf348ba4c0b61097075f14cbd71593391102