Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>epel9 imports/e9/rust-below-0.7.1-1.el9
parent
ff61de1f4d
commit
b1746f1a24
@ -0,0 +1,62 @@
|
|||||||
|
From a1b257d91677637063c1eb359097d53078f7272a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michel Salim <michel@meta.com>
|
||||||
|
Date: Wed, 2 Aug 2023 12:19:57 -0700
|
||||||
|
Subject: [PATCH] migrate to Clap 4
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
Two `below` crates currently still use Clap 3; update to 4.
|
||||||
|
|
||||||
|
This unblocks updating below in Fedora which has dropped clap 3 from its repos.
|
||||||
|
|
||||||
|
Reviewed By: brianc118
|
||||||
|
|
||||||
|
Differential Revision: D48002223
|
||||||
|
|
||||||
|
fbshipit-source-id: 5f4d02fced4f182098b3ee7627b0af3179d9addb
|
||||||
|
---
|
||||||
|
below/Cargo.toml | 4 ++--
|
||||||
|
below/dump/Cargo.toml | 2 +-
|
||||||
|
below/dump/src/command.rs | 14 +++++++-------
|
||||||
|
below/src/main.rs | 8 ++++----
|
||||||
|
4 files changed, 14 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/below/src/main.rs b/below/src/main.rs
|
||||||
|
index 0cf70e53..0a0aa57f 100644
|
||||||
|
--- a/src/main.rs
|
||||||
|
+++ b/src/main.rs
|
||||||
|
@@ -77,7 +77,7 @@ static LIVE_REMOTE_MAX_LATENCY_SEC: u64 = 10;
|
||||||
|
|
||||||
|
#[derive(Debug, Parser)]
|
||||||
|
struct Opt {
|
||||||
|
- #[clap(long, parse(from_os_str), default_value = config::BELOW_DEFAULT_CONF)]
|
||||||
|
+ #[clap(long, value_parser, default_value = config::BELOW_DEFAULT_CONF)]
|
||||||
|
config: PathBuf,
|
||||||
|
#[clap(short, long)]
|
||||||
|
debug: bool,
|
||||||
|
@@ -104,7 +104,7 @@ struct CompressOpts {
|
||||||
|
///
|
||||||
|
/// With --dict-compress-chunk-size 16, you can expect around
|
||||||
|
/// 20-30x smaller data files.
|
||||||
|
- #[clap(long, requires("compress"), parse(try_from_str = parse_chunk_size))]
|
||||||
|
+ #[clap(long, requires("compress"), value_parser = parse_chunk_size)]
|
||||||
|
dict_compress_chunk_size: Option<u32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -267,7 +267,7 @@ enum Command {
|
||||||
|
duration: Option<String>,
|
||||||
|
/// Output file path.
|
||||||
|
/// Randomized name in current directory if unspecified.
|
||||||
|
- #[clap(short, long, parse(from_os_str))]
|
||||||
|
+ #[clap(short, long, value_parser)]
|
||||||
|
output: Option<PathBuf>,
|
||||||
|
/// Supply hostname to take snapshot from remote
|
||||||
|
#[clap(short = 's', long)]
|
||||||
|
@@ -283,7 +283,7 @@ enum Command {
|
||||||
|
#[clap(short, long, default_value = "bash")]
|
||||||
|
shell: Shell,
|
||||||
|
/// Output file, stdout if not present
|
||||||
|
- #[clap(short, long, parse(from_os_str))]
|
||||||
|
+ #[clap(short, long, value_parser)]
|
||||||
|
output: Option<PathBuf>,
|
||||||
|
},
|
||||||
|
}
|
@ -1,11 +1,23 @@
|
|||||||
--- below-0.6.3/Cargo.toml 1970-01-01T00:00:01+00:00
|
--- below-0.7.1/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||||
+++ below-0.6.3/Cargo.toml 2023-01-26T19:04:17.646384+00:00
|
+++ below-0.7.1/Cargo.toml 2023-08-02T21:21:06.579765+00:00
|
||||||
@@ -51,7 +51,7 @@
|
@@ -37,17 +37,17 @@
|
||||||
package = "below-config"
|
version = "0.7.1"
|
||||||
|
|
||||||
[dependencies.cursive]
|
[dependencies.clap]
|
||||||
-version = "0.19.0"
|
-version = "3.2.25"
|
||||||
+version = "0.20.0"
|
+version = "4"
|
||||||
features = ["crossterm-backend"]
|
features = [
|
||||||
default-features = false
|
"derive",
|
||||||
|
"env",
|
||||||
|
- "regex",
|
||||||
|
+ "string",
|
||||||
|
"unicode",
|
||||||
|
"wrap_help",
|
||||||
|
]
|
||||||
|
|
||||||
|
[dependencies.clap_complete]
|
||||||
|
-version = "3.2.5"
|
||||||
|
+version = "4.3.1"
|
||||||
|
|
||||||
|
[dependencies.common]
|
||||||
|
version = "0.7.1"
|
||||||
|
@ -1 +1 @@
|
|||||||
SHA512 (below-0.6.3.crate) = 4326bb87ba7d2f378fb8e7ecd68332574ef03f6d9f2fdd7994c8813817aeddf649fc5935b46328bc7a4c08ed3f292a881455b8de88fab424c613adb305a75a5e
|
SHA512 (below-0.7.1.crate) = cbbb2f9d908311469dbce99748cf709dd00a97d31c28ac299a8d8a53272772062c9c09ad4eb9dcb69a8b0d15bcdda48e8e3f72e787bb896fc616b1bd538f6065
|
||||||
|
Loading…
Reference in new issue