Skip to content

chore(dev): mix firecracker.install#34

Merged
markovejnovic merged 1 commit into
mainfrom
feat/mix-installers
Jun 27, 2026
Merged

chore(dev): mix firecracker.install#34
markovejnovic merged 1 commit into
mainfrom
feat/mix-installers

Conversation

@markovejnovic

Copy link
Copy Markdown
Contributor

Extracted from chore/get-a-vm-running as a self-contained feature: the
operator-facing install tooling, with no dependency on the VM-boot core.

Tasks

  • mix firecracker.install [--prefix DIR] — downloads the pinned Firecracker
    release for the host arch, verifies its SHA-256, installs firecracker +
    jailer under the bare basenames the suidhelper's SafeBin validation
    requires (version-stamped names are rejected), and prints the
    /etc/hyper/config.toml [tools] snippet plus the chown root:root /
    chmod 0755 commands the helper insists on.
  • mix suidhelper.install — wraps cargo xtask stamp to build + stamp the
    setuid helper, then prints the sudo install -o root -g root -m 4755 step
    (Mix captures cargo's output, so it can't prompt for sudo without a tty).

Notes

  • Adds plt_add_apps: [:mix] to the Dialyzer config so the Mix.Task behaviour
    these tasks implement resolves.
  • Deps used (Redist.Targz, Sys.Arch, the native/suidhelper xtask) are all
    already on main.

Gate green: compile --warnings-as-errors, format, tests, dialyzer 0, credo clean.

Two unprivileged installer tasks:

- mix firecracker.install [--prefix DIR]: downloads the pinned Firecracker
  release for the host arch, verifies its SHA-256, installs firecracker+jailer
  under the bare basenames the suidhelper's SafeBin validation requires, and
  prints the /etc/hyper/config.toml [tools] snippet (with the chown/chmod root
  commands the helper needs).
- mix suidhelper.install: wraps 'cargo xtask stamp' to build + stamp the setuid
  helper, then prints the 'sudo install -m 4755' step (Mix can't prompt for
  sudo without a tty).

Adds plt_add_apps: [:mix] so Dialyzer resolves the Mix.Task behaviour these
tasks implement.
@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/mix/tasks/firecracker.install.ex 0.00% 34 Missing ⚠️
lib/mix/tasks/suidhelper.install.ex 0.00% 14 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Test Results

296 tests  ±0   295 ✅ ±0   7s ⏱️ +4s
 55 suites ±0     1 💤 ±0 
  2 files   ±0     0 ❌ ±0 

Results for commit 7fc62df. ± Comparison against base commit 9ee5de4.

@markovejnovic markovejnovic changed the title feat(mix): operator install tasks for firecracker + suidhelper chore(dev): mix firecracker.install Jun 27, 2026
@markovejnovic markovejnovic merged commit 47dec42 into main Jun 27, 2026
6 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.

1 participant