agent: make policy feature optional again

This was messed up a little when factoring out the policy crate.
Removing the dependencies no longer used by the agent and making the
import of kata-agent-policy optional again.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
Paul Meyer 2025-02-18 15:28:06 +01:00
parent 1e6cea24c8
commit 80af09aae9
2 changed files with 3 additions and 11 deletions

4
src/agent/Cargo.lock generated
View File

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 4
[[package]] [[package]]
name = "addr2line" name = "addr2line"
@ -3016,7 +3016,6 @@ dependencies = [
"futures", "futures",
"image-rs", "image-rs",
"ipnetwork", "ipnetwork",
"json-patch",
"kata-agent-policy", "kata-agent-policy",
"kata-sys-util", "kata-sys-util",
"kata-types", "kata-types",
@ -3035,7 +3034,6 @@ dependencies = [
"protobuf 3.5.1", "protobuf 3.5.1",
"protocols", "protocols",
"regex", "regex",
"regorus",
"rstest", "rstest",
"rtnetlink", "rtnetlink",
"runtime-spec", "runtime-spec",

View File

@ -81,14 +81,8 @@ strum_macros = "0.26.2"
image-rs = { git = "https://github.com/confidential-containers/guest-components", rev = "514c561d933cb11a0f1628621a0b930157af76cd", default-features = false, optional = true } image-rs = { git = "https://github.com/confidential-containers/guest-components", rev = "514c561d933cb11a0f1628621a0b930157af76cd", default-features = false, optional = true }
# Agent Policy # Agent Policy
regorus = { version = "0.2.6", default-features = false, features = [
"arc",
"regex",
"std",
], optional = true }
cdi = { git = "https://github.com/cncf-tags/container-device-interface-rs", rev = "fba5677a8e7cc962fc6e495fcec98d7d765e332a" } cdi = { git = "https://github.com/cncf-tags/container-device-interface-rs", rev = "fba5677a8e7cc962fc6e495fcec98d7d765e332a" }
json-patch = "2.0.0" kata-agent-policy = { path = "policy", optional = true }
kata-agent-policy = { path = "policy" }
[dev-dependencies] [dev-dependencies]
tempfile = "3.1.0" tempfile = "3.1.0"
@ -108,7 +102,7 @@ lto = true
default-pull = ["guest-pull"] default-pull = ["guest-pull"]
seccomp = ["rustjail/seccomp"] seccomp = ["rustjail/seccomp"]
standard-oci-runtime = ["rustjail/standard-oci-runtime"] standard-oci-runtime = ["rustjail/standard-oci-runtime"]
agent-policy = ["regorus"] agent-policy = [ "kata-agent-policy" ]
guest-pull = ["image-rs/kata-cc-rustls-tls"] guest-pull = ["image-rs/kata-cc-rustls-tls"]
[[bin]] [[bin]]