Skip to content

patches: loadpath_mount_root + the override capability manifest - #52

Merged
ronaldtse merged 1 commit into
mainfrom
feat/loadpath-mount-root
Aug 8, 2026
Merged

patches: loadpath_mount_root + the override capability manifest#52
ronaldtse merged 1 commit into
mainfrom
feat/loadpath-mount-root

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

The C-side half of the run-time mount-root override: v0.2.17's rbconfig fallback made RbConfig follow TEBAKO_MOUNT_ROOT, but ruby_init_loadpath builds the initial $LOAD_PATH from the compiled exec prefix — an override-mounted image left $: dangling (caught end-to-end by the factory's new override boot smoke). loadpath_mount_root.patch re-roots the baked paths at init (all 5 series; two anchor variants, git-diff generated). SourcePrep emits the tebako-mount-root-override capability manifest when the applied tree carries the patch — the factory's layout grant derives from it (absent ⇒ closed). lint green on 3.1.7/3.2.11/3.3.12/3.4.10/4.0.6; manifests valid; rspec 110/0. Rolls as v0.2.18.

… manifest

The second half of the run-time mount-root override (spec 17 §1): the
v0.2.17 rbconfig fallback made RbConfig follow TEBAKO_MOUNT_ROOT, but
the interpreter's initial $LOAD_PATH is built C-side from the compiled
exec prefix (ruby_init_loadpath, the non-LOAD_RELATIVE branch) — an
override-mounted image left $: pointing at the unmounted baked root.
The factory's v0.2.17 boot smoke caught it end-to-end
(load_path_default_gem: fail on every POSIX leg).

loadpath_mount_root.patch re-roots the baked load paths onto the
override at init (strncmp on the exec prefix, rb_str_cat the tail;
unset/empty is byte-identical upstream; LOAD_RELATIVE builds keep the
other branch and the helper is guarded out of their compile). One
canonical file per anchor shape: 3.3's covers 3.3/3.4/4.0, 3.1's covers
3.1/3.2 (the rb_libruby_selfpath block differs). Patches generated by
git diff against the pristine tarballs, never hand-counted.

SourcePrep now also emits tebako-mount-root-override when the applied
tree's ruby.c carries the patch's symbol — the factory's layout grant
derives from this manifest (absent patch ⇒ absent manifest ⇒ closed,
the fail-closed direction). tools/lint green on 3.1.7/3.2.11/3.3.12/
3.4.10/4.0.6 (30-31 patches each); validate_manifests OK; rspec 110/0.
@ronaldtse
ronaldtse merged commit 793e1c3 into main Aug 8, 2026
3 checks passed
@ronaldtse
ronaldtse deleted the feat/loadpath-mount-root branch August 8, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants