diff --git a/bot_bottle/agent_provider.py b/bot_bottle/agent_provider.py index a5bb084..feb8a50 100644 --- a/bot_bottle/agent_provider.py +++ b/bot_bottle/agent_provider.py @@ -227,6 +227,10 @@ class AgentProvider(ABC): from .backend.util import AGENT_CA_PATH, log_ca_fingerprint, select_ca_cert from .log import die cert_host_path, label = select_ca_cert(plan.egress_plan) + # Ensure the target directory exists. smolvm's pack step may not + # preserve the empty /usr/local/share/ca-certificates/ directory + # on Linux; mkdir -p is idempotent and safe for all backends. + bottle.exec("mkdir -p /usr/local/share/ca-certificates", user="root") bottle.cp_in(str(cert_host_path), AGENT_CA_PATH) r = bottle.exec( f"chmod 644 {AGENT_CA_PATH} && update-ca-certificates",