devvm upgrade and install.sh accept a release's SHA256SUMS when any two
of three release keys signed it (CI's, the co-signer's and an offline
recovery key's), each in SHA256SUMS.<role>.minisig, checked only against
its own role's key, with the trusted comment devvm-release <version>
compared exactly; one signer counts once. While releases bridge from it,
the old release key's single SHA256SUMS.minisig (devvm <version>) still
passes alone, so 0.1 and 0.2 keep upgrading and --to/--version can
install them; install.sh now checks that key's trusted comment too.
The keys themselves aren't made yet, so packaging/keys holds none and
install.sh's three key lines are empty: a devvm built so checks each
release with the old release key alone, and a release that only the
release keys signed is refused. Releases go out as before, signed with
the old key, until the keys are made and added, all three at once.
- internal/minisign: the one owner of signature checks (moved from
internal/upgrade): ParsePublicKey, PublicKey.Check (comment always
compared), Role (CI, Cosign, Recovery), Kind (Release, Base),
Kind.Comment, SigName, KeyFile, Keys/NewKeys/Keys.Check (two of three,
distinct keys and key IDs). minisigntest/ signs for tests. Stdlib and
blake2b only (depguard), a leaf; FuzzCheck, FuzzKeysCheck,
FuzzParsePublicKey.
- The structure test's signatures rule: outside internal/minisign no
code calls ed25519/rsa/ecdsa's Verify functions or imports blake2b,
but signatureFree's files (ubuntu/pgp.go, proxy/nixcache.go).
- internal/upgrade: Source.Keys, checkSums (signatures.go); the bridge
in legacy.go (checkLegacy, legacyKey, Source.Key); FuzzSumOf.
- packaging/keys/release-{ci,cosign,recovery}.pub, none yet;
packaging.Key ("" without one). TestReleaseKeys (checkReleaseKeys:
none, or three distinct minisign keys, none the old key),
TestCheckReleaseKeys (fixture keys from minisigntest),
TestInstallScriptKeys (checkInstallScriptKeys: one line per role,
empty without keys), TestReleaseRefusesPlaceholders (no key in keys/
marked PLACEHOLDER).
- scripts/release.sh (a tag, --check, --tag; never a snapshot) needs
none or all three of packaging/keys' release keys. With none,
install.sh's release_<role>_key lines are empty or missing; with all
three, each is a minisign key, distinct, not the old release key, not
marked PLACEHOLDER (placeholder), and equal to its install.sh line.
- install.sh checks with minisign -VHQm: prehashed signatures only.
- The structure guard also flags dot imports of the verifier packages
and calls of x509's CheckSignature* method names.
- install.sh: release_<role>_key lines, download_signatures (a role's
signature only when the script has its key), check_signature,
signed_by_two, check_legacy; plainer warning without minisign, with
the commands to check by hand.
- Tests: signatures_test.go (TestFetchWithoutReleaseKeys among them),
upgrade.txtar (-legacy, -keys, and the keys built in, none),
install.txtar (stub minisign with -Q; NO_KEYS), install_minisign.txtar
(real minisign), release.txtar (none, nolines, nokeyline, old, marked
and the rest); DEVVM_RELEASE_KEYS override.
- Docs: internals/install.md, using/upgrading.md, maintaining.md's
Release keys, structure, tests, testing, SECURITY.md, CHANGELOG,
releases/0.2.0.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Prereleases now reach the Homebrew tap through a second formula, `devvm-rc`. The stable `devvm` formula stays on the last final release.
Co-authored-by: Claude Opus 5.5 <[email protected]>
devvm can ship prereleases, such as release candidates and betas, for
people to try before a release is out. A prerelease's version is
`x.y.z-<word>.N`, such as `0.2.0-rc.1` or `0.2.0-beta.2`. `VERSION`
holds it, the tag is `v0.2.0-rc.1`, and it gets a `CHANGELOG.md` entry
as usual.
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
CI's e2e workflow installs Lima 2.3.0, its tarball's checksum taken from the release's SHA256SUMS, checked against the sha256 Lima's release notes publish. scripts/bump.sh e2e-lima moves that pin the same way. devvm's doctor, install.sh, the README and the Lima page ask for Lima 2.2 or newer, compared by major and minor.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fedora 43 has sha256sum but no shasum (Perl's Digest::SHA), and its /bin/sh
is bash 5.3, which runs the last command of an `a && b` -c string in sh's
place.
- install.sh's check_host stops with "needs sha256sum or shasum" before
downloading; its sha256 already used either. install.txtar covers
shasum alone, both, sha256sum alone and neither, with made-up sums.
- scripts/release.sh and scripts/bump.sh get a sha256 helper (sha256sum,
else shasum -a 256) in place of four shasum calls.
- gc_orphans, release, release_head and tools scripts hash with sha256sum,
else shasum. tools' old fallback never fell back (the pipeline's
status was cut's).
- ls and existing_agents restart a VM outside devvm with
`sh -c '... && limactl start ...; exit $?'`: without the exit, bash's
sh exec'd the stub, whose ha.pid then named the test runner (the pid
devvm recorded), so the VM still looked confined.
- The install page lists sha256sum or shasum among the script's needs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ls, images, tools, size, ports, network (and -g), network log (and
--blocked), ssh-agent, git-protect, secret, history, space, retention and
doctor take --json: one JSON object on stdout with "version": 1 first,
messages on stderr (ui.DataOnly), lists [] when empty. Settings commands
only show with --json and refuse a value (json_shows_only). doctor --json
replaces --fixes: problems with key, fix (null without one) and message,
warnings, docker and every backend's features; it prints nothing else and
succeeds whatever is missing, and install.sh reads its problems with awk.
TestJSONShapes holds each command's field names and types. Each shape is
documented on its command's page, with the contract under Everyday
commands' Output for scripts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
check_brew ran brew list --formula devvm on every install, and Homebrew's
wrapper can download its own Ruby when it runs. The script now looks for
a devvm keg (Cellar/devvm/<version>) in the Cellar next to the brew on
PATH, in HOMEBREW_CELLAR and HOMEBREW_PREFIX/Cellar, and in
/opt/homebrew, /usr/local and /home/linuxbrew/.linuxbrew (brew_prefixes,
which the tests set). --force and the refusal stay as they were.
path_hint resolves paths with readlink -f --, so a PATH entry starting
with a dash isn't read as an option.
Tests: install.txtar's brew stub only logs; a Cellar folder fixture
stands for the keg (next to brew, HOMEBREW_CELLAR, HOMEBREW_PREFIX, a
usual prefix, an empty rack, no brew on PATH), and brew is never run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm doctor warns when this machine has less than 8 GiB of memory or
fewer than 4 CPUs, the host devvm recommends. The warnings go to stderr
in doctor's normal output only: doctor's exit status and --fixes are
unchanged. Its checks move into a doctor type with field seams (Path,
Free, Host) and a run method returning the last problem, which the
command dies with as before. Long also names the warning about another
devvm first on PATH.
When fitting base to the host gives it fewer CPUs or less memory than
base.yaml's, the backend returns that size in backend.Built's Fitted
(backend.Fitted), and the build says so once (base_fitted) before
image ready. Lima's buildSize returns base.yaml's size and the fitted
one; smolvm's and Docker's base.yaml reading becomes baseYAML(fs.FS),
with fitted(fs.FS, cpus, mem), as functions to keep their types' method
counts.
install.sh runs devvm doctor when nothing is missing too, so a new user
sees its warnings.
- messages: host_memory_low, host_cpus_few (doc link
getting-started/install#requirements), base_fitted
(using/ports-size#size-and-ports)
- docs: install's Requirements (a recommended-host row in both tables,
what devvm does on less) and Checking what devvm needs; internals'
install (doctor after the fixes, warnings have no --fixes keys);
ports-size's size paragraph; the doctor CLI page
- tests: TestSmallHost, TestDoctorSmallHostWarnsOnly, TestFitted,
TestBuildSaysFitted; Lima's TestBuildImageSmallHost, smolvm's
TestSmallHost and Docker's TestBaseSize check Fitted; install.txtar
checks doctor runs when nothing is missing
- smolvm.txtar: the ports check matches only forwards of 22 and 3000,
not a random ssh port starting with 22
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Installing with both Homebrew and the install script left two devvms, and
the one first on PATH ran without a word while brew upgrade might update
the other.
- install.sh: before downloading, check_brew stops (exit 1, in a terminal
or not) when brew is on PATH and brew list --formula devvm succeeds;
brew runs with stdin from /dev/null and its output discarded, only its
exit status read. --force (in the usage, the header and the parser)
installs anyway.
- install.sh: path_hint, after installing, warns when ~/.local/bin is on
PATH but command -v devvm resolves (readlink -f) to another copy, naming
it and what to do; it only looks the path up, never runs it. When
~/.local/bin isn't on PATH it prints only the existing hint.
- devvm doctor: warns (u.Warn, not a backend.Problem) when the devvm first
on PATH isn't this binary, both resolved with filepath.EvalSymlinks;
skipped when devvm isn't on PATH, and never with --fixes; exit status
unchanged. Seams: onPath's LookPath and Executable fields.
- Message devvm_other_first (first, self), linked to
getting-started/install#one-devvm.
- Tests: TestOnPathOther (this copy by either link, another copy, none on
PATH, a broken link); install.txtar: a stub brew reporting devvm makes
the script refuse before downloading, --force goes on, another devvm
earlier on PATH gets the warning and isn't run, a link to the installed
copy gets none; the stub brew answers list from $BREW_DEVVM.
- Docs: Installing's One devvm section (one way, the refusal, --force,
switching through Uninstalling's step 4, the PATH warnings), --force in
the options, doctor's warning; Installing and updating: the Homebrew
check, the PATH check and doctor's check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm is one file: assets/ (base.yaml, layers/, features/,
shared-tools/, guest/, oci/, smolvm/) is embedded as assets.FS, which
cli passes to every constructor; backends, the builder, the shared
tools, the proxy and Ubuntu's key check read it as an fs.FS. Scripts
reach VMs on stdin (backend.Script carries their contents). What needs
a path (limactl create's base.yaml, oci/ mounted into the conversion
VM, the proxies' policy files) is written out to
~/.local/share/devvm/assets/<hash>, atomically, files 600 and folders
700; devvm gc deletes older copies no VM's proxy was started with
(gc_assets, deleted_assets). Release archives hold the binary with
README.md, CHANGELOG.md and LICENSE, and the formula installs the
binary alone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
install.sh picks this host's archive (devvm-<version>-<os>-<arch>.tar.gz:
darwin or linux, arm64 or amd64; Apple silicon's under Rosetta, from
sysctl hw.optional.arm64), checks SHA256SUMS's minisign signature (an
empty key still skips it, with a warning; no minisign prints the command
to check by hand), then the archive's checksum, and installs the binary
with its data files in <prefix>/lib/devvm/<version>, linked from
<prefix>/bin/devvm. Older versions go, except one a running process
names in its arguments (a VM's proxy, QEMU's guestfwd on Linux): it's
kept until a later install. Then it offers devvm doctor --fixes' fixes,
asking first (Homebrew's Lima or Lima's checked release tarball, QEMU,
the kvm group), and runs devvm doctor. Downloads are HTTPS only. Its text
isn't messages: it runs before devvm is there.
release.sh --head now needs install.sh too.
Tests: testdata/script/install.txtar sources install.sh (host and archive
names, Rosetta, version choice and validation, HTTPS-only fetch, run_fix
as words, install and links, reinstall, an older version in use kept
(and the real ps), signature good, bad, missing, no minisign, a bad
checksum, no archive for this host, Lima's tarball for the host and
arch and a bad checksum, the PATH hint, the fixes with --yes, the kvm
re-login, no yes, Lima's release once allowed, nothing missing, main's
options, and the tests' devvm binary installed and finding its files);
release_head.txtar: a HEAD without install.sh is refused.
docs: install.md (Homebrew and the install script, upgrading,
uninstalling), maintaining.md (trying install.sh on a --head build),
README.
Co-Authored-By: Claude Opus 5.5 <[email protected]>