Skip to content

wp-now: Remove a few unused variables, clean up typo#442

Merged
danielbachhuber merged 1 commit into
trunkfrom
improve/wp-now-code-cleanup
May 25, 2023
Merged

wp-now: Remove a few unused variables, clean up typo#442
danielbachhuber merged 1 commit into
trunkfrom
improve/wp-now-code-cleanup

Conversation

@danielbachhuber
Copy link
Copy Markdown
Member

Tests should pass.

@danielbachhuber danielbachhuber merged commit a894355 into trunk May 25, 2023
@danielbachhuber danielbachhuber deleted the improve/wp-now-code-cleanup branch May 25, 2023 10:40
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.
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