genpolicy: add to Cargo workspace

This commit adds the genpolicy utility to the root workspace. For now,
only dependencies that are already in the root workspace are consumed
from there, the genpolicy-specific ones should be added later.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
This commit is contained in:
Markus Rudy
2026-03-07 11:30:17 +01:00
parent fc4eaf8b66
commit 8dfeeea924
5 changed files with 997 additions and 4120 deletions

1014
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,9 @@ members = [
"src/dragonball/dbs_utils",
"src/dragonball/dbs_virtio_devices",
# genpolicy
"src/tools/genpolicy",
# runtime-rs
"src/runtime-rs",
"src/runtime-rs/crates/agent",
@@ -107,6 +110,9 @@ safe-path = { path = "src/libs/safe-path" }
shim-interface = { path = "src/libs/shim-interface" }
test-utils = { path = "src/libs/test-utils" }
# Local dependencies from `src/agent`
kata-agent-policy = { path = "src/agent/policy" }
# Outside dependencies
actix-rt = "2.7.0"
anyhow = "1.0"

File diff suppressed because it is too large Load Diff

View File

@@ -6,21 +6,21 @@
[package]
name = "genpolicy"
version = "0.1.0"
authors = ["The Kata Containers community <kata-dev@lists.katacontainers.io>"]
authors.workspace = true
edition = "2021"
license = "Apache-2.0"
license.workspace = true
[dependencies]
# Logging.
env_logger = "0.10.0"
log = "0.4.17"
log.workspace = true
# Command line parsing.
clap = { version = "4.5.40", features = ["derive"] }
# YAML file serialization/deserialization.
base64 = "0.21.0"
serde = { version = "1.0.159", features = ["derive"] }
serde.workspace = true
regex = "1.10.5"
# Newer serde_yaml versions are using unsafe-libyaml instead of yaml-rust,
@@ -37,25 +37,25 @@ regex = "1.10.5"
serde_yaml = "0.8"
# Container repository.
anyhow = "1.0.32"
async-trait = "0.1.68"
anyhow.workspace = true
async-trait.workspace = true
docker_credential = "1.3.1"
flate2 = "1.1.5"
fs2 = "0.4.3"
oci-client = { version = "0.12.0" }
openssl = { version = "0.10.73", features = ["vendored"] }
serde_ignored = "0.1.7"
serde_json = "1.0.39"
serde_json.workspace = true
json-patch = "4.1"
tempfile = "3.19.1"
tokio = { version = "1.38.0", features = ["rt-multi-thread"] }
tempfile.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
# OCI container specs.
oci-spec = { version = "0.8.1", features = ["runtime"] }
oci-spec.workspace = true
# Kata Agent protocol.
protocols = { path = "../../libs/protocols", features = ["with-serde"] }
protobuf = "3.2.0"
protocols = { workspace = true, features = ["with-serde"] }
protobuf.workspace = true
# containerd image pull support
k8s-cri = "0.7.0"
@@ -67,11 +67,11 @@ containerd-client = "0.4.0"
tar = "0.4.41"
# init data support
kata-types = { path = "../../libs/kata-types" }
kata-types = { path = "../../libs/kata-types" } # TODO(burgerdev): figure out how to use this from workspace without including safe-path.
[dev-dependencies]
kata-agent-policy = { path = "../../agent/policy" }
slog = "2.5.2"
kata-agent-policy.workspace = true
slog.workspace = true
assert_cmd = "2.0.14"
[package.metadata.cargo-machete]

View File

@@ -37,7 +37,7 @@ vendor:
cargo vendor
test: $(GENERATED_FILES)
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo test --all-targets --all-features --target $(TRIPLE)
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo test -p genpolicy --all-targets --all-features --target $(TRIPLE)
install: $(GENERATED_FILES)
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo install --locked --target $(TRIPLE) --path .