make install fails on systems without doas installed #32

Closed
opened 2026-03-16 14:08:17 +00:00 by mahmoud · 1 comment
Owner

Problem

make install fails on systems without doas installed:

doas mkdir -p ~/.chvm/bin
/bin/sh: 1: doas: not found
make: *** [Makefile:51: install] Error 127

Environment

  • Ubuntu 24.04 (fresh server)
  • Running as root
  • doas not installed (not a default package)

Suggested fix

Replace doas with a portable fallback in the Makefile:

ELEVATE := $(shell command -v doas 2>/dev/null || command -v sudo 2>/dev/null || echo "")

Or since ~/.chvm/bin is a user directory, no privilege escalation is needed at all — just use plain mkdir -p:

install:
    - mkdir -p ~/.cargo/bin ~/.chvm/bin
    - cp target/$(TARGET)/release/chvm ~/.cargo/bin/chvm
    - cp target/$(TARGET)/release/chvm-init ~/.chvm/bin/chvm-init

https://forge.ourworld.tf/geomind_code/my_hypervisor/src/branch/development/Makefile#L51-L52

## Problem `make install` fails on systems without `doas` installed: ``` doas mkdir -p ~/.chvm/bin /bin/sh: 1: doas: not found make: *** [Makefile:51: install] Error 127 ``` ## Environment - Ubuntu 24.04 (fresh server) - Running as root - `doas` not installed (not a default package) ## Suggested fix Replace `doas` with a portable fallback in the Makefile: ```makefile ELEVATE := $(shell command -v doas 2>/dev/null || command -v sudo 2>/dev/null || echo "") ``` Or since `~/.chvm/bin` is a user directory, no privilege escalation is needed at all — just use plain `mkdir -p`: ```makefile install: - mkdir -p ~/.cargo/bin ~/.chvm/bin - cp target/$(TARGET)/release/chvm ~/.cargo/bin/chvm - cp target/$(TARGET)/release/chvm-init ~/.chvm/bin/chvm-init ``` https://forge.ourworld.tf/geomind_code/my_hypervisor/src/branch/development/Makefile#L51-L52
mahmoud added this to the ACTIVE project 2026-03-16 14:38:25 +00:00
Author
Owner

Done by @thabeta

Done by @thabeta
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_hypervisor#32
No description provided.