wp-now: Remove a few unused variables, clean up typo#442
Merged
Conversation
wojtekn
approved these changes
May 25, 2023
mho22
added a commit
that referenced
this pull request
May 18, 2026
…("nobody")
The submodule's PR #442 (vfs cutover) deleted the kernel's synthetic
/etc/passwd|group|hosts files. When NodeKernelHost is constructed
without rootfsImage, the new NodePlatformIO reads the host's real
/etc/passwd — on macOS that returns uid=-2 for "nobody", which
musl's getpwnam parses as invalid, so php-fpm and nginx both abort
their pool startup with "cannot get uid for user 'nobody'" /
"getpwnam('nobody') failed".
This commit cuts the playground CLI over to the rootfs-based VFS
model:
- Bumps the wasm-posix-kernel submodule to a tip that adds an
`extraMounts` option on NodeKernelHostOptions (and bundles the
rebuilt rootfs.vfs image alongside the kernel binaries).
- boot.ts now passes `rootfsImage: "default"` so the worker
mounts host/wasm/rootfs.vfs at "/" with the canonical scratch
layout (/tmp, /var/*, /home/user, /root, /srv). rootfs/etc/passwd
in the image carries the standard `nobody:x:65534:65534:...`
line that musl accepts.
- boot.ts also passes extraMounts so the per-boot temp dir
(nginx.conf, php-fpm.conf, router.php, fastcgi/client_body temp
dirs, logs) and the wordPress document root remain reachable
through the kernel VFS — without them, the longest-prefix mount
resolver hits /var/folders/... (macOS) or /tmp/... (Linux) and
falls through to either the scratch /tmp memfs or the rootfs
image, both of which 404 the files nginx and FPM need.
- host-bridge.ts widens the typed surface to mirror the upstream
additions (rootfsImage + extraMounts).
Verified locally on Node 24 (Darwin) — all 11 posix-kernel
run-cli.spec.ts tests pass and getpwnam/getgrnam succeed inside
the kernel without the synthetic /etc fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests should pass.