agent-ctl: Move into root workspace

- Add agent-ctl to be a workspace member to simplify the
dependency management.
- Also add a test target as we've been running it in static-checks
without it doing anything

Assisted-by: IBM Bob
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2026-04-29 11:22:11 +01:00
parent 5474f68168
commit 3466f888db
6 changed files with 77 additions and 3661 deletions

122
Cargo.lock generated
View File

@@ -139,7 +139,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -150,7 +150,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -1963,7 +1963,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -2716,7 +2716,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
"socket2 0.5.10",
"socket2 0.4.10",
"tokio",
"tower-service",
"tracing",
@@ -2904,7 +2904,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
"windows-core 0.62.2",
"windows-core",
]
[[package]]
@@ -3163,7 +3163,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
dependencies = [
"hermit-abi 0.5.2",
"libc",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -3460,6 +3460,35 @@ dependencies = [
"which 4.4.2",
]
[[package]]
name = "kata-agent-ctl"
version = "0.0.1"
dependencies = [
"anyhow",
"byteorder",
"clap",
"hex",
"humantime",
"hypervisor",
"kata-sys-util",
"kata-types",
"lazy_static",
"libc",
"logging",
"nix 0.26.4",
"oci-spec 0.8.4",
"protobuf",
"protocols",
"rand 0.10.1",
"safe-path 0.1.0",
"serde",
"serde_json",
"slog",
"slog-scope",
"tokio",
"ttrpc",
]
[[package]]
name = "kata-agent-policy"
version = "0.1.0"
@@ -4307,18 +4336,6 @@ dependencies = [
"libc",
]
[[package]]
name = "nix"
version = "0.31.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3"
dependencies = [
"bitflags 2.11.1",
"cfg-if 1.0.4",
"cfg_aliases",
"libc",
]
[[package]]
name = "nom"
version = "7.1.3"
@@ -4371,7 +4388,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -5276,7 +5293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52"
dependencies = [
"libc",
"nix 0.31.2",
"nix 0.23.2",
]
[[package]]
@@ -6497,7 +6514,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.12.1",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -6598,7 +6615,7 @@ dependencies = [
"security-framework",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -7279,16 +7296,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "socket2"
version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "socket2"
version = "0.6.3"
@@ -7296,7 +7303,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -7537,7 +7544,7 @@ dependencies = [
"getrandom 0.4.2",
"once_cell",
"rustix 1.1.4",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -7546,7 +7553,7 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -8250,7 +8257,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
dependencies = [
"memoffset 0.9.1",
"tempfile",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -8833,7 +8840,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -8848,7 +8855,7 @@ version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core 0.57.0",
"windows-core",
"windows-targets 0.52.6",
]
@@ -8858,25 +8865,12 @@ version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement 0.57.0",
"windows-interface 0.57.0",
"windows-implement",
"windows-interface",
"windows-result 0.1.2",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
"windows-implement 0.60.2",
"windows-interface 0.59.3",
"windows-link",
"windows-result 0.4.1",
"windows-strings",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
@@ -8888,17 +8882,6 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "windows-implement"
version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "windows-interface"
version = "0.57.0"
@@ -8910,17 +8893,6 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "windows-interface"
version = "0.59.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "windows-link"
version = "0.2.1"

View File

@@ -40,13 +40,10 @@ members = [
"src/dragonball/dbs_utils",
"src/dragonball/dbs_virtio_devices",
# genpolicy
# tools
"src/tools/agent-ctl",
"src/tools/genpolicy",
# kata-ctl
"src/tools/kata-ctl",
# trace-forwarder
"src/tools/trace-forwarder",
# kata-deploy (Kubernetes installer binary)

View File

@@ -24,6 +24,8 @@ allow = [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"bzip2-1.0.6",
"CC0-1.0",
"CDLA-Permissive-2.0",
"ISC",
@@ -33,6 +35,7 @@ allow = [
"Unicode-3.0",
"Zlib",
]
private = { ignore = true }
[sources]

File diff suppressed because it is too large Load Diff

View File

@@ -6,55 +6,51 @@
[package]
name = "kata-agent-ctl"
version = "0.0.1"
authors = ["The Kata Containers community <kata-dev@lists.katacontainers.io>"]
edition = "2018"
license = "Apache-2.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
protocols = { path = "../../libs/protocols", features = ["with-serde"] }
oci-spec = { version = "0.8.1", features = ["runtime"] }
protocols = { workspace = true, features = ["with-serde"] }
oci-spec.workspace = true
clap = { version = "4.5.40", features = ["derive", "cargo"] }
lazy_static = "1.4.0"
anyhow = "1.0.31"
clap = { workspace = true, features = ["derive", "cargo"] }
lazy_static.workspace = true
anyhow.workspace = true
hex = "0.4.2"
byteorder = "1.3.4"
# Note: this crate sets the slog 'max_*' features which allows the log level
# to be modified at runtime.
logging = { path = "../../libs/logging" }
slog = "2.7.0"
slog-scope = "4.4.0"
rand = "0.10.1"
protobuf = "3.2.0"
logging.workspace = true
slog.workspace = true
slog-scope.workspace = true
rand.workspace = true
protobuf.workspace = true
nix = "0.26.4"
libc = "0.2.112"
nix.workspace = true
libc.workspace = true
# XXX: Must be the same as the version used by the agent
ttrpc = "0.8.4"
ttrpc.workspace = true
# For parsing timeouts
humantime = "2.1.0"
# For Options (state passing)
serde = { version = "1.0.131", features = ["derive"] }
serde_json = "1.0.73"
serde.workspace = true
serde_json.workspace = true
kata-types = { path = "../../libs/kata-types" }
kata-types.workspace = true
# hypervisor crate from runtime-rs
hypervisor = { path = "../../runtime-rs/crates/hypervisor", features = [
"cloud-hypervisor",
] }
kata-sys-util = { path = "../../libs/kata-sys-util" }
safe-path = { path = "../../libs/safe-path" }
hypervisor.workspace = true
kata-sys-util.workspace = true
safe-path.workspace = true
tokio = { version = "1.44.2", features = ["signal"] }
tokio.workspace = true
[features]
default = ["cloud-hypervisor"]
# Enable the Cloud Hypervisor driver
cloud-hypervisor = []
[workspace]

View File

@@ -9,7 +9,7 @@ include ../../../utils.mk
default: build
build:
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE)
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo build -p kata-agent-ctl --target $(TRIPLE) --$(BUILD_TYPE)
static-checks-build:
@echo "INFO: static-checks-build do nothing.."
@@ -18,6 +18,7 @@ clean:
cargo clean
test:
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo test -p kata-agent-ctl --target $(TRIPLE)
install:
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo install --locked --target $(TRIPLE) --path .