fix(smolmachines): Linux compat for TSI networking and git-gate paths
Three fixes for Linux smolvm support: 1. Skip force_allowlist DB patch on Linux — patching allowed_cidrs into smolvm's state DB crashes TSI boot on Linux. Per-bottle CIDR isolation is not enforced on Linux until smolvm fixes the --allow-cidr + TSI interaction (known limitation). 2. Patch /etc/git-gate/ references in the staged entrypoint to /bot-bottle-data/git-gate/ so git-daemon finds its hooks and access-hook at the new consolidated mount path. 3. Drop explicit --net-backend tsi — the default on this smolvm build is already TSI; explicitly requesting it is incompatible with -p port mappings on Linux. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -406,15 +406,13 @@ def _stage_sidecar_data(plan: SmolmachinesBottlePlan) -> Path:
|
||||
for name in ("entrypoint.sh", "pre-receive", "access-hook"):
|
||||
(scripts_dir / name).chmod(0o755)
|
||||
|
||||
# Patch credential paths: the rendered entrypoint hardcodes
|
||||
# /git-gate/creds/; rewrite to the in-VM git-gate subdir.
|
||||
# Patch paths: the rendered entrypoint hardcodes /git-gate/creds/
|
||||
# and /etc/git-gate/ for hooks; rewrite both to the in-VM subdir.
|
||||
ep_path = scripts_dir / "entrypoint.sh"
|
||||
ep_path.write_text(
|
||||
ep_path.read_text().replace(
|
||||
"/git-gate/creds/",
|
||||
f"{_GIT_GATE_SCRIPTS_DIR_IN_VM}/creds/",
|
||||
)
|
||||
)
|
||||
text = ep_path.read_text()
|
||||
text = text.replace("/git-gate/creds/", f"{_GIT_GATE_SCRIPTS_DIR_IN_VM}/creds/")
|
||||
text = text.replace("/etc/git-gate/", f"{_GIT_GATE_SCRIPTS_DIR_IN_VM}/")
|
||||
ep_path.write_text(text)
|
||||
|
||||
creds_dir = scripts_dir / "creds"
|
||||
creds_dir.mkdir(exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user