From 0aa80313eb04d4e498566748bfcc00c0969702a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 15:56:56 +0000 Subject: [PATCH 1/4] build(deps): bump the clap group across 6 directories with 1 update Bumps the clap group with 1 update in the /src/agent directory: [clap](https://github.com/clap-rs/clap). Bumps the clap group with 1 update in the /src/tools/agent-ctl directory: [clap](https://github.com/clap-rs/clap). Bumps the clap group with 1 update in the /src/tools/genpolicy directory: [clap](https://github.com/clap-rs/clap). Bumps the clap group with 1 update in the /src/tools/kata-ctl directory: [clap](https://github.com/clap-rs/clap). Bumps the clap group with 1 update in the /src/tools/runk directory: [clap](https://github.com/clap-rs/clap). Bumps the clap group with 1 update in the /src/tools/trace-forwarder directory: [clap](https://github.com/clap-rs/clap). Updates `clap` from 3.2.25 to 4.5.37 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.37 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.37 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.37 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.37 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.37 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.1.8 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.1.8 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.1.8 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.1.8 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.1.8 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.1.8 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.4.10 to 4.5.13 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.4.10 to 4.5.13 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.4.10 to 4.5.13 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.4.10 to 4.5.13 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.4.10 to 4.5.13 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 4.4.10 to 4.5.13 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 3.2.25 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) Updates `clap` from 2.34.0 to 4.5.40 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.25...clap_complete-v4.5.37) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.37 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.37 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.37 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.37 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.37 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.37 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.13 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.13 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.13 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.13 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.13 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.13 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap - dependency-name: clap dependency-version: 4.5.40 dependency-type: direct:production update-type: version-update:semver-major dependency-group: clap ... Signed-off-by: dependabot[bot] --- src/agent/Cargo.lock | 102 ++---------------- src/agent/Cargo.toml | 2 +- src/tools/agent-ctl/Cargo.lock | 126 ++++++++++++++-------- src/tools/agent-ctl/Cargo.toml | 2 +- src/tools/genpolicy/Cargo.lock | 128 +++++++++++++++++------ src/tools/genpolicy/Cargo.toml | 2 +- src/tools/kata-ctl/Cargo.lock | 61 +++++++---- src/tools/kata-ctl/Cargo.toml | 2 +- src/tools/runk/Cargo.lock | 149 +++++++++++++++++++-------- src/tools/runk/Cargo.toml | 2 +- src/tools/trace-forwarder/Cargo.lock | 123 ++++++++++++++++------ src/tools/trace-forwarder/Cargo.toml | 2 +- 12 files changed, 435 insertions(+), 266 deletions(-) diff --git a/src/agent/Cargo.lock b/src/agent/Cargo.lock index c5fe85543b..629f86d0f9 100644 --- a/src/agent/Cargo.lock +++ b/src/agent/Cargo.lock @@ -405,17 +405,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -661,7 +650,7 @@ version = "0.1.0" source = "git+https://github.com/cncf-tags/container-device-interface-rs?rev=fba5677a8e7cc962fc6e495fcec98d7d765e332a#fba5677a8e7cc962fc6e495fcec98d7d765e332a" dependencies = [ "anyhow", - "clap 4.5.37", + "clap", "const_format", "jsonschema", "lazy_static", @@ -717,23 +706,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim 0.10.0", - "termcolor", - "textwrap", -] - [[package]] name = "clap" version = "4.5.37" @@ -741,7 +713,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", - "clap_derive 4.5.32", + "clap_derive", ] [[package]] @@ -752,21 +724,8 @@ checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.4", - "strsim 0.11.1", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "clap_lex", + "strsim", ] [[package]] @@ -781,15 +740,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clap_lex" version = "0.7.4" @@ -970,7 +920,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.101", ] @@ -1525,27 +1475,12 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -1997,7 +1932,7 @@ dependencies = [ "anyhow", "base64 0.22.1", "bytecount", - "clap 4.5.37", + "clap", "fancy-regex", "fraction", "getrandom 0.2.16", @@ -2031,7 +1966,7 @@ dependencies = [ "cdi", "cfg-if", "cgroups-rs", - "clap 3.2.25", + "clap", "const_format", "derivative", "futures", @@ -4117,12 +4052,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -4249,15 +4178,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "termtree" version = "0.5.1" @@ -4271,12 +4191,6 @@ dependencies = [ "nix 0.24.3", ] -[[package]] -name = "textwrap" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" - [[package]] name = "thiserror" version = "1.0.69" @@ -4948,7 +4862,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] diff --git a/src/agent/Cargo.toml b/src/agent/Cargo.toml index 88c7ac3d67..4d127f9c1d 100644 --- a/src/agent/Cargo.toml +++ b/src/agent/Cargo.toml @@ -66,7 +66,7 @@ opentelemetry = { version = "0.14.0", features = ["rt-tokio-current-thread"] } serde = { version = "1.0.129", features = ["derive"] } serde_json = "1.0.39" toml = "0.5.8" -clap = { version = "3.0.1", features = ["derive"] } +clap = { version = "4.5.40", features = ["derive"] } strum = "0.26.2" strum_macros = "0.26.2" diff --git a/src/tools/agent-ctl/Cargo.lock b/src/tools/agent-ctl/Cargo.lock index 132342761a..7361b91408 100644 --- a/src/tools/agent-ctl/Cargo.lock +++ b/src/tools/agent-ctl/Cargo.lock @@ -80,12 +80,18 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "anstream" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" dependencies = [ - "winapi", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", ] [[package]] @@ -94,6 +100,35 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.59.0", +] + [[package]] name = "anyhow" version = "1.0.71" @@ -681,19 +716,37 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", + "clap_builder", ] +[[package]] +name = "clap_builder" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "combine" version = "4.6.7" @@ -931,7 +984,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.87", ] @@ -1933,6 +1986,12 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -2738,6 +2797,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -4239,12 +4304,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.11.1" @@ -4393,15 +4452,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.40" @@ -4824,12 +4874,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "universal-hash" version = "0.5.1" @@ -4869,18 +4913,18 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" diff --git a/src/tools/agent-ctl/Cargo.toml b/src/tools/agent-ctl/Cargo.toml index b6d4b8cd94..5c6a757cee 100644 --- a/src/tools/agent-ctl/Cargo.toml +++ b/src/tools/agent-ctl/Cargo.toml @@ -15,7 +15,7 @@ protocols = { path = "../../libs/protocols", features = ["with-serde"] } rustjail = { path = "../../agent/rustjail" } oci-spec = { version = "0.6.8", features = ["runtime"] } -clap = "2.33.0" +clap = "4.5.40" lazy_static = "1.4.0" anyhow = "1.0.31" hex = "0.4.2" diff --git a/src/tools/genpolicy/Cargo.lock b/src/tools/genpolicy/Cargo.lock index 055871877b..7829dcbda0 100644 --- a/src/tools/genpolicy/Cargo.lock +++ b/src/tools/genpolicy/Cargo.lock @@ -41,12 +41,56 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstyle" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.59.0", +] + [[package]] name = "anyhow" version = "1.0.69" @@ -249,40 +293,43 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ - "bitflags 1.3.2", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "is-terminal", - "once_cell", - "strsim 0.10.0", - "termcolor", + "strsim", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ - "heck 0.4.1", - "proc-macro-error", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.58", ] [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" -dependencies = [ - "os_str_bytes", -] +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "cmake" @@ -293,6 +340,12 @@ dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "containerd-client" version = "0.4.0" @@ -427,7 +480,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.58", ] @@ -1134,6 +1187,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -1452,6 +1511,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + [[package]] name = "openssl" version = "0.10.72" @@ -1506,12 +1571,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "parking_lot" version = "0.12.3" @@ -2273,12 +2332,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -2728,6 +2781,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "vcpkg" version = "0.2.15" @@ -2962,6 +3021,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.1" diff --git a/src/tools/genpolicy/Cargo.toml b/src/tools/genpolicy/Cargo.toml index d789a8e4ea..1bebc78469 100644 --- a/src/tools/genpolicy/Cargo.toml +++ b/src/tools/genpolicy/Cargo.toml @@ -16,7 +16,7 @@ env_logger = "0.10.0" log = "0.4.17" # Command line parsing. -clap = { version = "4.1.8", features = ["derive"] } +clap = { version = "4.5.40", features = ["derive"] } # YAML file serialization/deserialization. base64 = "0.21.0" diff --git a/src/tools/kata-ctl/Cargo.lock b/src/tools/kata-ctl/Cargo.lock index a428af89c0..4c99596128 100644 --- a/src/tools/kata-ctl/Cargo.lock +++ b/src/tools/kata-ctl/Cargo.lock @@ -77,15 +77,16 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] @@ -115,12 +116,13 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "once_cell_polyfill", + "windows-sys 0.59.0", ] [[package]] @@ -346,9 +348,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.10" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" dependencies = [ "clap_builder", "clap_derive", @@ -356,23 +358,23 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.9" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.10.0", + "strsim", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.39", @@ -380,9 +382,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "colorchoice" @@ -541,7 +543,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.39", ] @@ -1167,6 +1169,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -1612,6 +1620,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + [[package]] name = "openssl" version = "0.10.72" @@ -2778,12 +2792,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -3567,6 +3575,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.2" diff --git a/src/tools/kata-ctl/Cargo.toml b/src/tools/kata-ctl/Cargo.toml index 4537731d28..f0194bde6b 100644 --- a/src/tools/kata-ctl/Cargo.toml +++ b/src/tools/kata-ctl/Cargo.toml @@ -14,7 +14,7 @@ edition = "2018" [dependencies] anyhow = "1.0.31" -clap = { version = "4.1.13", features = ["derive", "cargo"] } +clap = { version = "4.5.13", features = ["derive", "cargo"] } serde_json = "1.0.85" thiserror = "1.0.35" privdrop = "0.5.2" diff --git a/src/tools/runk/Cargo.lock b/src/tools/runk/Cargo.lock index e078fff00e..3f34475555 100644 --- a/src/tools/runk/Cargo.lock +++ b/src/tools/runk/Cargo.lock @@ -52,12 +52,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstyle" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.86" @@ -251,17 +294,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.3.0" @@ -514,17 +546,37 @@ version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ - "atty", "bitflags 1.3.2", - "clap_derive", - "clap_lex", + "clap_derive 3.2.25", + "clap_lex 0.2.4", "indexmap 1.9.3", "once_cell", "strsim 0.10.0", - "termcolor", "textwrap", ] +[[package]] +name = "clap" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" +dependencies = [ + "clap_builder", + "clap_derive 4.5.40", +] + +[[package]] +name = "clap_builder" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +dependencies = [ + "anstream", + "anstyle", + "clap_lex 0.7.5", + "strsim 0.11.1", +] + [[package]] name = "clap_derive" version = "3.2.25" @@ -538,6 +590,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "clap_derive" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.68", +] + [[package]] name = "clap_lex" version = "0.2.4" @@ -547,6 +611,18 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "common-path" version = "1.0.0" @@ -1237,15 +1313,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -1384,6 +1451,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -1504,7 +1577,7 @@ version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f707717247a34421d9c8aa0448452cde6d5d2ac455257f5fc4d53ec607264a4" dependencies = [ - "clap", + "clap 3.2.25", ] [[package]] @@ -2407,7 +2480,7 @@ version = "0.0.1" dependencies = [ "anyhow", "chrono", - "clap", + "clap 4.5.40", "libc", "libcontainer", "liboci-cli", @@ -2929,15 +3002,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "termtree" version = "0.5.1" @@ -3231,6 +3295,12 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.9.1" @@ -3366,15 +3436,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/src/tools/runk/Cargo.toml b/src/tools/runk/Cargo.toml index 2717f7f45d..de96664127 100644 --- a/src/tools/runk/Cargo.toml +++ b/src/tools/runk/Cargo.toml @@ -15,7 +15,7 @@ runtime-spec = { path = "../../libs/runtime-spec" } oci-spec = { version = "0.6.8", features = ["runtime"] } logging = { path = "../../libs/logging" } liboci-cli = "0.0.4" -clap = { version = "3.0.6", features = ["derive", "cargo"] } +clap = { version = "4.5.40", features = ["derive", "cargo"] } libc = "0.2.108" nix = "0.23.0" anyhow = "1.0.52" diff --git a/src/tools/trace-forwarder/Cargo.lock b/src/tools/trace-forwarder/Cargo.lock index 95f6395c82..4dea6759b6 100644 --- a/src/tools/trace-forwarder/Cargo.lock +++ b/src/tools/trace-forwarder/Cargo.lock @@ -11,6 +11,56 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys", +] + [[package]] name = "anyhow" version = "1.0.51" @@ -112,19 +162,37 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim", - "textwrap", - "unicode-width", - "vec_map", + "clap_builder", ] +[[package]] +name = "clap_builder" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -318,6 +386,12 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48dc51180a9b377fd75814d0cc02199c20f8e99433d6762f650d39cdbbd3b56f" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itoa" version = "1.0.1" @@ -477,6 +551,12 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + [[package]] name = "opentelemetry" version = "0.14.0" @@ -823,9 +903,9 @@ checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "strsim" -version = "0.8.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" @@ -879,15 +959,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.30" @@ -1058,12 +1129,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - [[package]] name = "unicode-xid" version = "0.2.2" @@ -1077,10 +1142,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] -name = "vec_map" -version = "0.8.2" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vsock" diff --git a/src/tools/trace-forwarder/Cargo.toml b/src/tools/trace-forwarder/Cargo.toml index 527e938bd2..858afacb6e 100644 --- a/src/tools/trace-forwarder/Cargo.toml +++ b/src/tools/trace-forwarder/Cargo.toml @@ -12,7 +12,7 @@ license = "Apache-2.0" [dependencies] futures = "0.3.15" -clap = "2.33.0" +clap = "4.5.40" vsock = "0.2.3" nix = "0.23.0" libc = "0.2.94" From e11fc3334e88b16910552f97ab6b93387c641390 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 11 Jun 2025 14:23:25 +0100 Subject: [PATCH 2/4] agent: Clap v4 updates AppSettings was removed, so refactor based on new documentation Signed-off-by: stevenhorsman --- src/agent/Cargo.lock | 14 +++++++------- src/agent/src/main.rs | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/agent/Cargo.lock b/src/agent/Cargo.lock index 629f86d0f9..70ac1e42f2 100644 --- a/src/agent/Cargo.lock +++ b/src/agent/Cargo.lock @@ -708,9 +708,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", "clap_derive", @@ -718,9 +718,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ "anstream", "anstyle", @@ -730,9 +730,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -4862,7 +4862,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/src/agent/src/main.rs b/src/agent/src/main.rs index 13c48f4104..82d9798d3b 100644 --- a/src/agent/src/main.rs +++ b/src/agent/src/main.rs @@ -21,7 +21,7 @@ extern crate slog; use anyhow::{anyhow, bail, Context, Result}; use base64::Engine; use cfg_if::cfg_if; -use clap::{AppSettings, Parser}; +use clap::Parser; use const_format::concatcp; use initdata::{InitdataReturnValue, AA_CONFIG_PATH, CDH_CONFIG_PATH}; use nix::fcntl::OFlag; @@ -128,7 +128,7 @@ lazy_static! { #[derive(Parser)] // The default clap version info doesn't match our form, so we need to override it -#[clap(global_setting(AppSettings::DisableVersionFlag))] +#[clap(disable_version_flag = true)] struct AgentOpts { /// Print the version information #[clap(short, long)] From e204847df55a72fa8e136378827218bc9aa55fd1 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 11 Jun 2025 14:47:39 +0100 Subject: [PATCH 3/4] agent-ctl: Replace removed clap functions When moving from clap v2 to v4 a bunch of functions have been removed, so update the code to handle these replacements Signed-off-by: stevenhorsman --- src/tools/agent-ctl/Cargo.lock | 17 ++++++- src/tools/agent-ctl/Cargo.toml | 8 +++- src/tools/agent-ctl/src/main.rs | 80 +++++++++++++++++---------------- 3 files changed, 62 insertions(+), 43 deletions(-) diff --git a/src/tools/agent-ctl/Cargo.lock b/src/tools/agent-ctl/Cargo.lock index 7361b91408..df5c65f72f 100644 --- a/src/tools/agent-ctl/Cargo.lock +++ b/src/tools/agent-ctl/Cargo.lock @@ -721,6 +721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", + "clap_derive", ] [[package]] @@ -735,6 +736,18 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_derive" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "clap_lex" version = "0.7.5" @@ -2292,7 +2305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.0", ] [[package]] @@ -5122,7 +5135,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/src/tools/agent-ctl/Cargo.toml b/src/tools/agent-ctl/Cargo.toml index 5c6a757cee..284b5b9c74 100644 --- a/src/tools/agent-ctl/Cargo.toml +++ b/src/tools/agent-ctl/Cargo.toml @@ -15,7 +15,7 @@ protocols = { path = "../../libs/protocols", features = ["with-serde"] } rustjail = { path = "../../agent/rustjail" } oci-spec = { version = "0.6.8", features = ["runtime"] } -clap = "4.5.40" +clap = { version = "4.5.40", features = ["derive", "cargo"] } lazy_static = "1.4.0" anyhow = "1.0.31" hex = "0.4.2" @@ -43,7 +43,11 @@ serde = { version = "1.0.131", features = ["derive"] } serde_json = "1.0.73" # Image pull/unpack -image-rs = { git = "https://github.com/confidential-containers/guest-components", rev = "v0.10.0", features = ["snapshot-overlayfs", "oci-client-rustls", "signature-cosign-rustls"] } +image-rs = { git = "https://github.com/confidential-containers/guest-components", rev = "v0.10.0", features = [ + "snapshot-overlayfs", + "oci-client-rustls", + "signature-cosign-rustls", +] } safe-path = { path = "../../libs/safe-path" } diff --git a/src/tools/agent-ctl/src/main.rs b/src/tools/agent-ctl/src/main.rs index 058ed504e2..08a3bf82bc 100644 --- a/src/tools/agent-ctl/src/main.rs +++ b/src/tools/agent-ctl/src/main.rs @@ -1,14 +1,14 @@ // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2025 IBM Corporation // // SPDX-License-Identifier: Apache-2.0 // #[macro_use] extern crate lazy_static; - use crate::types::Config; use anyhow::{anyhow, Result}; -use clap::{crate_name, crate_version, App, Arg, SubCommand}; +use clap::{crate_name, crate_version, Arg, Command}; use std::io; use std::process::exit; @@ -137,11 +137,12 @@ fn connect(name: &str, global_args: clap::ArgMatches) -> Result<()> { .subcommand_matches("connect") .ok_or_else(|| anyhow!("BUG: missing sub-command arguments"))?; - let interactive = args.is_present("interactive"); - let ignore_errors = args.is_present("ignore-errors"); + let interactive = args.contains_id("interactive"); + let ignore_errors = args.contains_id("ignore-errors"); let server_address = args - .value_of("server-address") + .get_one::("server-address") + .map(|s| s.as_str()) .ok_or_else(|| anyhow!("need server adddress"))? .to_string(); @@ -149,13 +150,15 @@ fn connect(name: &str, global_args: clap::ArgMatches) -> Result<()> { if !interactive { commands = args - .values_of("cmd") + .get_many::("cmd") .ok_or_else(|| anyhow!("need commands to send to the server"))? + .map(|s| s.as_str()) .collect(); } let log_level_name = global_args - .value_of("log-level") + .get_one::("log-level") + .map(|s| s.as_str()) .ok_or_else(|| anyhow!("cannot get log level"))?; let log_level = logging::level_name_to_slog_level(log_level_name).map_err(|e| anyhow!(e))?; @@ -163,21 +166,26 @@ fn connect(name: &str, global_args: clap::ArgMatches) -> Result<()> { let writer = io::stdout(); let (logger, _guard) = logging::create_logger(name, crate_name!(), log_level, writer); - let timeout_nano: i64 = match args.value_of("timeout") { + let timeout_nano: i64 = match args.get_one::("timeout").map(|s| s.as_str()) { Some(t) => utils::human_time_to_ns(t)?, None => 0, }; let hybrid_vsock_port = args - .value_of("hybrid-vsock-port") + .get_one::("hybrid-vsock-port") + .map(|s| s.as_str()) .ok_or_else(|| anyhow!("Need Hybrid VSOCK port number"))? .parse::() .map_err(|e| anyhow!("VSOCK port number must be an integer: {:?}", e))?; - let bundle_dir = args.value_of("bundle-dir").unwrap_or("").to_string(); + let bundle_dir = args + .get_one::("bundle-dir") + .map(|s| s.as_str()) + .unwrap_or("") + .to_string(); - let hybrid_vsock = args.is_present("hybrid-vsock"); - let no_auto_values = args.is_present("no-auto-values"); + let hybrid_vsock = args.contains_id("hybrid-vsock"); + let no_auto_values = args.contains_id("no-auto-values"); let cfg = Config { server_address, @@ -203,95 +211,89 @@ fn real_main() -> Result<()> { DEFAULT_KATA_AGENT_API_VSOCK_PORT ); - let app = App::new(name) + let app = Command::new(name) .version(crate_version!()) .about(ABOUT_TEXT) .long_about(DESCRIPTION_TEXT) .after_help(WARNING_TEXT) .arg( - Arg::with_name("log-level") + Arg::new("log-level") .long("log-level") - .short("l") + .short('l') .help("specific log level") .default_value(logging::slog_level_to_level_name(DEFAULT_LOG_LEVEL).map_err(|e| anyhow!(e))?) - .possible_values(&logging::get_log_levels()) - .takes_value(true) + .value_parser(logging::get_log_levels()) .required(false), ) .subcommand( - SubCommand::with_name("connect") + Command::new("connect") .about("Connect to agent") .after_help(WARNING_TEXT) .arg( - Arg::with_name("bundle-dir") + Arg::new("bundle-dir") .long("bundle-dir") .help("OCI bundle directory") - .takes_value(true) .value_name("directory"), ) .arg( - Arg::with_name("cmd") + Arg::new("cmd") .long("cmd") - .short("c") - .takes_value(true) - .multiple(true) + .short('c') + .num_args(0..) .help("API command (with optional arguments) to send to the server"), ) .arg( - Arg::with_name("ignore-errors") + Arg::new("ignore-errors") .long("ignore-errors") .help("Don't exit on first error"), ) .arg( - Arg::with_name("hybrid-vsock") + Arg::new("hybrid-vsock") .long("hybrid-vsock") .help("Treat a unix:// server address as a Hybrid VSOCK one"), ) .arg( - Arg::with_name("hybrid-vsock-port") + Arg::new("hybrid-vsock-port") .long("hybrid-vsock-port") .help(&hybrid_vsock_port_help) .default_value(DEFAULT_KATA_AGENT_API_VSOCK_PORT) - .takes_value(true) .value_name("PORT") ) .arg( - Arg::with_name("interactive") - .short("i") + Arg::new("interactive") + .short('i') .long("interactive") .help("Allow interactive client"), ) .arg( - Arg::with_name("no-auto-values") - .short("n") + Arg::new("no-auto-values") + .short('n') .long("no-auto-values") .help("Disable automatic generation of values for sandbox ID, container ID, etc"), ) .arg( - Arg::with_name("server-address") + Arg::new("server-address") .long("server-address") .help("server URI (vsock:// or unix://)") - .takes_value(true) .value_name("URI"), ) .arg( - Arg::with_name("timeout") + Arg::new("timeout") .long("timeout") .help("timeout value as nanoseconds or using human-readable suffixes (0 [forever], 99ns, 30us, 2ms, 5s, 7m, etc)") - .takes_value(true) .value_name("human-time"), ) ) .subcommand( - SubCommand::with_name("generate-cid") + Command::new("generate-cid") .about("Create a random container ID") ) .subcommand( - SubCommand::with_name("generate-sid") + Command::new("generate-sid") .about("Create a random sandbox ID") ) .subcommand( - SubCommand::with_name("examples") + Command::new("examples") .about("Show usage examples") ); From 9685e2aecad0b350a1ffd36e22962d96471129ee Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Fri, 13 Jun 2025 10:51:11 +0100 Subject: [PATCH 4/4] trace-forwarder: Replace removed clap functions When moving from clap v2 to v4 a bunch of functions have been removed, so update the code to handle these replacements Signed-off-by: stevenhorsman --- src/tools/trace-forwarder/Cargo.toml | 4 +- src/tools/trace-forwarder/src/main.rs | 70 +++++++++++++++------------ 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/tools/trace-forwarder/Cargo.toml b/src/tools/trace-forwarder/Cargo.toml index 858afacb6e..1bb87f12ac 100644 --- a/src/tools/trace-forwarder/Cargo.toml +++ b/src/tools/trace-forwarder/Cargo.toml @@ -12,7 +12,7 @@ license = "Apache-2.0" [dependencies] futures = "0.3.15" -clap = "4.5.40" +clap = { version = "4.5.40", features = ["cargo"] } vsock = "0.2.3" nix = "0.23.0" libc = "0.2.94" @@ -21,7 +21,7 @@ bincode = "1.3.3" byteorder = "1.4.3" serde_json = "1.0.44" anyhow = "1.0.31" -opentelemetry = { version = "0.14.0", features=["serialize"] } +opentelemetry = { version = "0.14.0", features = ["serialize"] } opentelemetry-jaeger = "0.13.0" tracing-opentelemetry = "0.16.0" tracing = "0.1.41" diff --git a/src/tools/trace-forwarder/src/main.rs b/src/tools/trace-forwarder/src/main.rs index 482bbdda80..a8828e1842 100644 --- a/src/tools/trace-forwarder/src/main.rs +++ b/src/tools/trace-forwarder/src/main.rs @@ -1,11 +1,12 @@ // Copyright (c) 2020-2021 Intel Corporation +// Copyright (c) 2025 IBM Corporation // // SPDX-License-Identifier: Apache-2.0 // #![warn(unused_extern_crates)] use anyhow::{anyhow, Result}; -use clap::{crate_name, crate_version, App, Arg}; +use clap::{crate_name, crate_version, Arg, Command}; use slog::{error, info, Logger}; use std::env; use std::io; @@ -136,78 +137,73 @@ fn real_main() -> Result<()> { let version = crate_version!(); let name = crate_name!(); - let args = App::new(name) + let args = Command::new(name) .version(version) - .version_short("v") .about(ABOUT_TEXT) - .long_about(&*make_description_text()) - .after_help(&*make_examples_text(name)) + .long_about(make_description_text()) + .after_help(make_examples_text(name)) .arg( - Arg::with_name("dump-only") + Arg::new("dump-only") .long("dump-only") .help("Disable forwarding of spans and write to stdout (for testing)"), ) .arg( - Arg::with_name("trace-name") + Arg::new("trace-name") .long("trace-name") .help("Specify name for traces") .required(false) - .takes_value(true) .default_value(DEFAULT_TRACE_NAME), ) .arg( - Arg::with_name("jaeger-host") + Arg::new("jaeger-host") .long("jaeger-host") .help("Jaeger host address") - .takes_value(true) .default_value(DEFAULT_JAEGER_HOST), ) .arg( - Arg::with_name("jaeger-port") + Arg::new("jaeger-port") .long("jaeger-port") .help("Jaeger port number") - .takes_value(true) .default_value(DEFAULT_JAEGER_PORT), ) .arg( - Arg::with_name("log-level") + Arg::new("log-level") .long("log-level") - .short("l") + .short('l') .help("specific log level") .default_value(logging::slog_level_to_level_name(DEFAULT_LOG_LEVEL).unwrap()) - .possible_values(&logging::get_log_levels()) - .takes_value(true) + .value_parser(logging::get_log_levels()) .required(false), ) .arg( - Arg::with_name("socket-path") + Arg::new("socket-path") .long("socket-path") .help("Full path to hypervisor socket (needs root! cloud-hypervisor and firecracker hypervisors only)") - .takes_value(true) .required(false), ) .arg( - Arg::with_name("vsock-cid") + Arg::new("vsock-cid") .long("vsock-cid") - .help(&format!( + .help(format!( "VSOCK CID number (or {:?}) (QEMU hypervisor only)", VSOCK_CID_ANY_STR )) - .takes_value(true) .required(false) .default_value(VSOCK_CID_ANY_STR), ) .arg( - Arg::with_name("vsock-port") + Arg::new("vsock-port") .long("vsock-port") .help("VSOCK port number (QEMU hypervisor only)") - .takes_value(true) .default_value(DEFAULT_KATA_VSOCK_TRACING_PORT), ) .get_matches(); // Cannot fail as a default has been specified - let log_level_name = args.value_of("log-level").unwrap(); + let log_level_name = args + .get_one::("log-level") + .map(|s| s.as_str()) + .unwrap(); let log_level = logging::level_name_to_slog_level(log_level_name).map_err(|e| anyhow!(e))?; @@ -215,12 +211,13 @@ fn real_main() -> Result<()> { let writer = io::stdout(); let (logger, _logger_guard) = logging::create_logger(name, name, log_level, writer); - let dump_only = args.is_present("dump-only"); + let dump_only = args.contains_id("dump-only"); announce(&logger, version, dump_only); let trace_name: &str = args - .value_of("trace-name") + .get_one::("trace-name") + .map(|s| s.as_str()) .ok_or(anyhow!("BUG: trace name not set")) .map_or_else( |e| Err(anyhow!(e)), @@ -234,15 +231,23 @@ fn real_main() -> Result<()> { )?; // Handle the Hybrid VSOCK option first (since it cannot be defaulted). - let vsock = if let Some(socket_path) = args.value_of("socket-path") { - handle_hybrid_vsock(socket_path, args.value_of("vsock-port")) + let vsock = if let Some(socket_path) = args.get_one::("socket-path").map(|s| s.as_str()) + { + handle_hybrid_vsock( + socket_path, + args.get_one::("vsock-port").map(|s| s.as_str()), + ) } else { // The default is standard VSOCK - handle_standard_vsock(args.value_of("vsock-cid"), args.value_of("vsock-port")) + handle_standard_vsock( + args.get_one::("vsock-cid").map(|s| s.as_str()), + args.get_one::("vsock-port").map(|s| s.as_str()), + ) }?; let jaeger_port: u32 = args - .value_of("jaeger-port") + .get_one::("jaeger-port") + .map(|s| s.as_str()) .ok_or("Need Jaeger port number") .map(|p| p.parse::().unwrap()) .map_err(|e| anyhow!("Jaeger port number must be an integer: {:?}", e))?; @@ -252,9 +257,10 @@ fn real_main() -> Result<()> { } let jaeger_host = args - .value_of("jaeger-host") + .get_one::("jaeger-host") + .map(|s| s.as_str()) .ok_or("Need Jaeger host") - .map_err(|e| anyhow!(e))?; + .map_err(|e: &str| anyhow!(e))?; if jaeger_host.is_empty() { return Err(anyhow!("Jaeger host cannot be blank"));