Skip to content

v0.1.1

@snomiao snomiao tagged this 04 Jun 12:00
`codehost setup`/`serve -d` run the server under oxmgr, whose installer
downloads the `*-linux-gnu` prebuilt whenever it detects glibc — but that
binary is built against a recent glibc (GLIBC_2.39, from Ubuntu 24.04 CI).
On Debian <=12, Ubuntu <=22.04, RHEL/Alma 8-9, Amazon Linux 2, etc. it dies
at startup with `GLIBC_x.y not found`. Worse, hasOxmgr() saw the non-zero
exit and reported "oxmgr not found", so users reinstalled into the same
crash forever.

Mirror the node-datachannel self-heal (try -> repair -> retry):

- oxmgr.ts: probeOxmgr() now distinguishes ok / broken / missing (ENOENT).
  ensureOxmgr() heals the "broken" case by fetching oxmgr's portable
  *-linux-musl static build (no libc dependency) from its own GitHub
  release and swapping it into vendor/, then re-probing. Daemon entry
  points (start/list/stop) are now async and route through it.
- oxmgr-heal.ts (new): locate the install from PATH, pick the musl target
  for the arch, download (following GitHub's redirect), extract, and swap.
  Unlinks the target before copy so it can replace an in-use binary
  (ETXTBSY) — e.g. when a daemon is already running.

Verified on Debian 12 (glibc 2.36): a binary that fails with
`GLIBC_2.39 not found` is auto-replaced with the static musl build and
runs. No-op on platforms/arches without a musl split, and when oxmgr is
genuinely absent the install hint is shown instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Assets 2
Loading