Skip to content

fix(build): pass apk --usermode for non-root builds (the real "startx… - #676

Merged
Pryancito merged 1 commit into
masterfrom
claude/labwc-eclipse-desktop-08f1ft
Jul 29, 2026
Merged

fix(build): pass apk --usermode for non-root builds (the real "startx…#676
Pryancito merged 1 commit into
masterfrom
claude/labwc-eclipse-desktop-08f1ft

Conversation

@Pryancito

Copy link
Copy Markdown
Owner

…: not found" cause)

The build normally runs as an unprivileged user (make on a dev box). apk 3.x refuses to create a package database as non-root without --usermode, so the build-time apk add --root exited immediately with "ERROR: Use --usermode to allow creating database as non-root" and was warned past -- shipping an image with no X server ("sh: startx: not found"), regardless of network. (This is what the user hit; a direct run of the exact command reproduced the error.)

apk also REFUSES --usermode when run as root ("--usermode not allowed as root"), so the flag can't just always be passed. Detect the euid via id -u (no new crate dep) and pass --usermode only when non-root; a root/CI build keeps the privileged path.

xtask builds; fmt/clippy clean.

Claude-Session: https://claude.ai/code/session_01MHCn5RNRcwR5PY1sYBHY2S

…: not found" cause)

The build normally runs as an unprivileged user (`make` on a dev box). apk 3.x
refuses to create a package database as non-root without --usermode, so the
build-time `apk add --root` exited immediately with
"ERROR: Use --usermode to allow creating database as non-root" and was warned
past -- shipping an image with no X server ("sh: startx: not found"), regardless
of network. (This is what the user hit; a direct run of the exact command
reproduced the error.)

apk also REFUSES --usermode when run as root ("--usermode not allowed as root"),
so the flag can't just always be passed. Detect the euid via `id -u` (no new
crate dep) and pass --usermode only when non-root; a root/CI build keeps the
privileged path.

xtask builds; fmt/clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MHCn5RNRcwR5PY1sYBHY2S
@Pryancito
Pryancito merged commit 0dd921a into master Jul 29, 2026
2 of 14 checks passed
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