Skip to content

Make Coreutils runtime aliases match built programs - #878

Closed
brandonpayton wants to merge 1 commit into
mainfrom
fix/coreutils-multicall-members
Closed

Make Coreutils runtime aliases match built programs#878
brandonpayton wants to merge 1 commit into
mainfrom
fix/coreutils-multicall-members

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 11, 2026

Copy link
Copy Markdown
Member

Purpose

Make the Coreutils package's built multicall members, runtime command maps, and rootfs aliases describe the same executable surface.

The registry previously built a default Coreutils 9.5 source tree despite declaring 9.6, exposed arch even though upstream excludes it unless explicitly enabled, and omitted the already-built kill member. Several VFS builders also mapped non-Coreutils names such as hostname, rev, hexdump, xxd, and sed to the Coreutils binary, which could only fail at argv0 dispatch.

Changes

  • Build the declared Coreutils 9.6 source in a version-keyed directory, rerun configure on every invocation so stale Makefiles cannot hide recipe changes, use upstream's recognized --without-libgmp option, and explicitly enable the normally opt-in arch program.
  • Add kill to the canonical 101-member Coreutils command list and to rootfs aliases.
  • Reuse that canonical list in the browser test runner, shell demo, examples, and SQLite/MariaDB VFS builders instead of maintaining divergent copies.
  • Remove false Coreutils mappings for programs supplied by other packages or not supplied at all.
  • Make Coreutils a strict direct dependency of both MariaDB VFS packages and bind their cache keys to the complete builder/helper input set, preventing dangling command symlinks or stale images.
  • Cover arch and kill argv0 dispatch in the package runtime suite.
  • Bump Coreutils and every package revision whose declared input or emitted VFS image changed.

No kernel/host ABI surface changes in this PR.

Validation

Run through scripts/dev-shell.sh:

  • Clean Coreutils 9.6 source build on an ABI 18 integration stack containing Fix pthread fork continuation buffer corruption #867, sdk: centralize cross-compile function availability #874, and Build fork instrumentation from the repository workspace #873. The populated legacy coreutils-src tree was ignored in favor of a new coreutils-9.6-src tree.
  • A second invocation against the populated 9.6 tree explicitly reran configure and rebuilt successfully, proving same-version recipe changes do not reuse a stale member list.
  • The installed 3,990,461-byte artifact reports ABI 18, uses 4-byte pointers, exports _start, __abi_version, and all five wpk_fork_* continuation functions, and contains no legacy Asyncify marker.
  • Focused package Vitest: 1 file / 22 tests passed, including /bin/arch and /bin/kill execution through dash's alias/exec path.
  • Exhaustive argv0 probe: all 101 canonical names plus [ dispatched without unknown program.
  • Shell integration: /bin/kill --version executed GNU Coreutils 9.6; removed false alias /bin/hostname truthfully returned 127/not found.
  • Chromium BrowserKernel ran the exact rebuilt artifact: arch returned wasm32, kill --version identified the correct member, false returned 1, and printf returned exact formatted output.
  • build-deps parse recognized coreutils@9.6 for both MariaDB packages and build-deps check passed.
  • bash -n, focused Prettier, structured TOML parsing for all changed manifests, Git whitespace checks, and scripts/check-abi-version.sh passed.

scripts/ci-check-browser-assets.sh was attempted but could not complete in the isolated integration worktree because 82 unrelated package binaries were not materialized. The focused Chromium page had all of its imports and passed. Full downstream rootfs/MariaDB/SQLite image rebuilds were not run locally; their revisions are bumped for CI rebuilds.

Current CI status

Browser smoke, change-scope, preflight, and toolchain-cache checks are green. The Coreutils staging build on current main reaches compilation and fails in gnulib strftime.c on unknown timezone_t and undeclared mktime_z; this is the exact SDK target-facts gap fixed by #874. The package does not duplicate those platform facts locally. Re-run staging after #874 lands.

Build gates

Build the declared Coreutils 9.6 source from version-keyed state, rerun configure so recipe changes cannot reuse stale member lists, explicitly include arch, and expose the built kill member through shared runtime and rootfs aliases.

Remove image-local lists that mapped unsupported names to the multicall binary, declare Coreutils and source inputs for MariaDB VFS consumers, and bump every affected package revision.
@github-actions

Copy link
Copy Markdown
Contributor

Phase B-1 matrix build status — pr-878-staging

ABI v16. 0 built, 9 failed, 9 total.

Package Arch Status Sha
coreutils wasm32 failed
mariadb-test wasm32 failed
mariadb-vfs wasm32 failed
mariadb-vfs wasm64 failed
rootfs wasm32 failed
shell wasm32 failed
lamp wasm32 failed
node-vfs wasm32 failed
wordpress wasm32 failed

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

@brandonpayton

Copy link
Copy Markdown
Member Author

Closing because Coreutils build ownership and installed command links are moving to the Homebrew Formula and generated Kandelo sidecars in kandelo-dev/homebrew-tap-core. The correctness requirements here remain important: enable the intended members, include kill, and never advertise false aliases. Those requirements should be carried into the Formula and Homebrew VFS acceptance tests. The branch and PR history are retained.

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.

1 participant