commit
945dd5d4af
Binary file not shown.
@ -0,0 +1,89 @@
|
|||||||
|
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/dump/src/command.rs b/below/dump/src/command.rs
|
||||||
|
index 50aa60a0..aca370ec 100644
|
||||||
|
--- a/src/command.rs
|
||||||
|
+++ b/src/command.rs
|
||||||
|
@@ -1045,7 +1045,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = SYSTEM_ABOUT, long_about = SYSTEM_LONG_ABOUT.as_str())]
|
||||||
|
System {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<SystemOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
||||||
|
@@ -1056,7 +1056,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = DISK_ABOUT, long_about = DISK_LONG_ABOUT.as_str())]
|
||||||
|
Disk {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<DiskOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
||||||
|
@@ -1084,7 +1084,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = PROCESS_ABOUT, long_about = PROCESS_LONG_ABOUT.as_str())]
|
||||||
|
Process {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<ProcessOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
||||||
|
@@ -1098,7 +1098,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = CGROUP_ABOUT, long_about = CGROUP_LONG_ABOUT.as_str())]
|
||||||
|
Cgroup {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<CgroupOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
||||||
|
@@ -1112,7 +1112,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = IFACE_ABOUT, long_about = IFACE_LONG_ABOUT.as_str())]
|
||||||
|
Iface {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<IfaceOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
||||||
|
@@ -1126,7 +1126,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = NETWORK_ABOUT, long_about = NETWORK_LONG_ABOUT.as_str())]
|
||||||
|
Network {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<NetworkOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
||||||
|
@@ -1137,7 +1137,7 @@ pub enum DumpCommand {
|
||||||
|
#[clap(about = TRANSPORT_ABOUT, long_about = TRANSPORT_LONG_ABOUT.as_str())]
|
||||||
|
Transport {
|
||||||
|
/// Select which fields to display and in what order.
|
||||||
|
- #[clap(short, long, multiple_values = true)]
|
||||||
|
+ #[clap(short, long, num_args = 1..)]
|
||||||
|
fields: Option<Vec<TransportOptionField>>,
|
||||||
|
#[clap(flatten)]
|
||||||
|
opts: GeneralOpt,
|
@ -0,0 +1,16 @@
|
|||||||
|
--- below-dump-0.7.1/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||||
|
+++ below-dump-0.7.1/Cargo.toml 2023-08-02T20:57:58.073673+00:00
|
||||||
|
@@ -29,11 +29,11 @@
|
||||||
|
version = "0.7.1"
|
||||||
|
|
||||||
|
[dependencies.clap]
|
||||||
|
-version = "3.2.25"
|
||||||
|
+version = "4"
|
||||||
|
features = [
|
||||||
|
"derive",
|
||||||
|
"env",
|
||||||
|
- "regex",
|
||||||
|
+ "string",
|
||||||
|
"unicode",
|
||||||
|
"wrap_help",
|
||||||
|
]
|
@ -0,0 +1,130 @@
|
|||||||
|
## START: Set by rpmautospec
|
||||||
|
## (rpmautospec version 0.3.5)
|
||||||
|
## RPMAUTOSPEC: autorelease, autochangelog
|
||||||
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||||
|
release_number = 1;
|
||||||
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||||
|
print(release_number + base_release_number - 1);
|
||||||
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||||
|
## END: Set by rpmautospec
|
||||||
|
|
||||||
|
# Generated by rust2rpm 24
|
||||||
|
%bcond_without check
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%global crate below-dump
|
||||||
|
|
||||||
|
Name: rust-below-dump
|
||||||
|
Version: 0.7.1
|
||||||
|
Release: %autorelease
|
||||||
|
Summary: Dump crate for below
|
||||||
|
|
||||||
|
License: Apache-2.0
|
||||||
|
URL: https://crates.io/crates/below-dump
|
||||||
|
Source: %{crates_source}
|
||||||
|
# Manually created patch for downstream crate metadata changes
|
||||||
|
# * bump clap dependency from 3.2.25 to 4
|
||||||
|
Patch: below-dump-fix-metadata.diff
|
||||||
|
# Migrate to clap 4
|
||||||
|
# based on https://github.com/facebookincubator/below/commit/a1b257d91677637063c1eb359097d53078f7272a
|
||||||
|
Patch: below-dump-clap4.diff
|
||||||
|
|
||||||
|
# below-btrfs and below-model are not available
|
||||||
|
ExcludeArch: %{arm32} %{ix86}
|
||||||
|
|
||||||
|
BuildRequires: rust-packaging >= 21
|
||||||
|
|
||||||
|
%global _description %{expand:
|
||||||
|
Dump crate for below.}
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages which
|
||||||
|
use the "%{crate}" crate.
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%license %{crate_instdir}/LICENSE
|
||||||
|
%{crate_instdir}/
|
||||||
|
|
||||||
|
%package -n %{name}+default-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+default-devel %{_description}
|
||||||
|
|
||||||
|
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 %{crate_instdir}/Cargo.toml
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||||
|
%cargo_prep
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%cargo_generate_buildrequires
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%cargo_test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Jan 15 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.7.1-1
|
||||||
|
- Rebuilt for MSVSphere 9.3
|
||||||
|
|
||||||
|
* Wed Aug 02 2023 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.7.1-1
|
||||||
|
- Update to 0.7.1
|
||||||
|
|
||||||
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 29 2023 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.6.3-3
|
||||||
|
- Also exclude builds on 32-bit ARM architectures
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.6.3-1
|
||||||
|
- Update to 0.6.3
|
||||||
|
|
||||||
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 01 2022 Fabio Valentini <decathorpe@gmail.com> - 0.5.0-2
|
||||||
|
- Relax toml dependency from =0.5.8 to ^0.5.8
|
||||||
|
|
||||||
|
* Thu Feb 17 2022 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.5.0-1
|
||||||
|
- Update to 0.5.0 (resolves: rhbz#2047961)
|
||||||
|
|
||||||
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Nov 11 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.4.1-1
|
||||||
|
- Update to 0.4.1; Fixes: RHBZ#2022242
|
||||||
|
|
||||||
|
* Fri Oct 22 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.4.0-1
|
||||||
|
- Update to 0.4.0; Fixes: RHBZ#2016560
|
||||||
|
|
||||||
|
* Thu Jul 29 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.3.0-1
|
||||||
|
- Update to 0.3.0; Fixes: RHBZ#1983805
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 16 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.2.0-1
|
||||||
|
- Initial package
|
||||||
|
|
Loading…
Reference in new issue