From afd943c4f9882e846a9a392f4e1e397840a0b536 Mon Sep 17 00:00:00 2001 From: didericis Date: Wed, 8 Jul 2026 22:01:30 -0400 Subject: [PATCH] fix(smolmachines): fix CA provisioning and git-http startup on Linux Two fixes for the Linux smolmachines backend: - provision_ca: add mkdir -p before cp_in so the /usr/local/share/ca-certificates/ directory exists in the smolvm guest even when smolvm pack omits it (empty dir on Linux). - git_http_backend: the fallback import in the except ImportError block tried `from git_gate import ...`, but git_gate.py is not deployed to the sidecar container and has its own package-relative imports; use the literal value 15 directly instead. Co-Authored-By: Claude Sonnet 4.6 --- bot_bottle/agent_provider.py | 4 ++++ 1 file changed, 4 insertions(+) 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",