packaging(cockpit): fix clean-box assemble — bun build + writable work dirs#75
Merged
Conversation
…k dirs Two bugs the brew-install path exposed (the local dev test masked them): 1. build-cockpit.sh ran 'npm ci' — but client-vue is a pnpm project (pnpm-lock.yaml, no package-lock.json), so npm ci can't run on a fresh clone. Build with bun instead (already required for the sidecar; installs straight from package.json regardless of lockfile). Local test passed only because a stray package-lock.json existed. 2. Both build scripts defaulted their clone/WORK dir to $REPO_ROOT/build — which is a read-only Cellar libexec on a package install. Default to TMPDIR (writable). Verified: full FRESH-CLONE assemble (no local src overrides — exactly what the brew CLI does) now completes end-to-end: clone socioprophet → bun-build client-vue (43 files); clone noetica → bun-compile the 68M sidecar (smoke 200); stage. build-cockpit also now errors cleanly if bun is absent.
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.
Found by actually running
brew install+bearbrowser-cockpit-assembleon a clean box (thanks to the real-machine test). Two bugs the local dev path had masked:npm cion a pnpm project.build-cockpit.shrannpm ci, but client-vue shipspnpm-lock.yaml(nopackage-lock.json) — sonpm cibails on a fresh clone. Now builds with bun (already required for the sidecar; installs frompackage.jsonregardless of the committed lockfile). The earlier local test passed only because a straypackage-lock.jsonwas lying around.$REPO_ROOT/build— read-onlylibexecon a package install. Now default toTMPDIR.Verified end-to-end on the real path — a full fresh-clone assemble (no local source overrides, exactly what the installed
bearbrowser-cockpit-assembleruns): clone socioprophet → bun-build client-vue (43 files); clone noetica → bun-compile the 68M sidecar (self-smoke 200); stage. Plus a clean error ifbunis missing.After merge:
brew reinstall --formula sourceos-linux/tap/bearbrowserre-fetchesmainwith the fixed scripts, thenbearbrowser-cockpit-assemble && bearbrowser-cockpit-upstands the whole thing up.