You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the full elfuse OCI image lifecycle as a self-contained
`elfuse oci` subcommand. Image distribution never touches
Hypervisor.framework, so the subcommand dispatches in main() before any
guest setup; only `oci run` enters the VM bring-up path.
- pull / inspect: content-addressable blob store over HTTPS with
bearer-token + Basic auth, OCI index walk to the linux/arm64 leaf,
parallel blob fetch with HTTP Range resume, offline inspect renderer.
- unpack: tar reader (ustar + PAX x/g records), gzip + system libzstd
(decode path), whiteout-aware layer apply, per-image case-sensitive
APFS sysroot; cross-volume unpack via copyfile(2) with clone fallback.
- run: clonefile(2) per-run rootfs; Entrypoint / Cmd / Env / WorkingDir
and symbolic/numeric User honoured; reuses the shared elfuse_launch
bring-up so a dynamic guest runs through the same shim + syscall path.
- lifecycle: prune (--older-than / --keep-bytes), per-layer + ChainID
stack snapshot caches, oci status (text + --json), rebuild-cache.
- policy: podman/skopeo-style policy.json + registries.d overlay;
loopback-gated --insecure; CLI flags override.
Extract the VM bring-up from main() into core/launch.c (elfuse_launch)
so oci run and the positional-ELF main share one path; the host-path
resolution now lives in the caller per the guest_bootstrap_prepare split.
zstd and cJSON are consumed as system shared libraries (pkg-config
libzstd / libcjson), mirroring the existing system zlib and libcurl;
nothing is vendored under externals/. Adds 25 native test-oci-* unit
suites plus an opt-in heavy compat mode.
|`-u USER[:GROUP]`, `--user USER[:GROUP]`| Override image User; numeric `UID[:GID]` or symbolic `name[:group]` resolved from the rootfs `/etc/passwd` and `/etc/group` (see [User and WorkingDir](#user-and-workingdir)) |
136
+
|`--keep`| Keep the per-run cloned rootfs after exit |
ships with the image. `elfuse` does not transcode macOS
250
+
`/var/db/timezone/zoneinfo` into the tzdata format; if the image is
251
+
missing the needed zone, glibc / musl fall back to UTC. The `TZ`
252
+
environment variable is honored as-is and is not rewritten by the
253
+
Env merge policy.
254
+
-**`/usr/lib/locale/locale-archive`** is not regenerated. glibc
255
+
images without a built archive (or the matching `<lang>.UTF-8/`
256
+
directory) fall back to the `C` locale; locale-aware sort / printf
257
+
/ strcoll outputs ASCII order. musl images do not use the archive
258
+
and are unaffected.
259
+
-**`/usr/lib/<triple>/gconv/`** modules and the `gconv-modules`
260
+
index ship with the image. Missing modules surface as `EILSEQ` from
261
+
`iconv` / glibc's character-set conversion; this most often shows
262
+
up when an image ships a stripped glibc layer.
263
+
-**`ld.so.cache`** is not rebuilt. The guest dynamic linker reads
264
+
whatever cache the image carries; missing entries fall through to
265
+
the linker's library-path search, which is the normal slow path.
266
+
267
+
Common workloads and the symptom-to-workaround mapping:
268
+
269
+
| Symptom | Trigger | Workaround |
270
+
|--|--|--|
271
+
|`getaddrinfo` returns `EAI_AGAIN` or an empty result |`/etc/nsswitch.conf` lists a backend (`systemd`, `sss`, ...) that needs a daemon | use a distro whose `nsswitch.conf` is `files dns` (alpine ships this by default; debian needs the file edited) |
272
+
|`date`, `strftime` show UTC instead of the expected zone | the image does not contain `/usr/share/zoneinfo/<Zone>`| install tzdata in the image (`apk add tzdata` / `apt install tzdata`), or pass `-e TZ=UTC` to acknowledge UTC |
273
+
|`sort`, `printf`, `strcoll` collate in ASCII order | the image is missing `/usr/lib/locale/locale-archive` or the matching `<lang>.UTF-8/` directory | accept the C-locale fallback, run `locale-gen` during the image build, or use a musl-based image (alpine), which does not depend on the archive |
274
+
102
275
## Guest Compatibility Model
103
276
104
277
`elfuse` is designed for Linux user-space workloads, not for booting a Linux
0 commit comments