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 <noreply@anthropic.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user