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]>
The formula has an archive per platform (macOS and Linux, arm64 and
Intel), each URL and checksum filled in by release.sh from the
SHA256SUMS it wrote, and installs only the binary; no Go dependency.
release.sh --formula-from DIR writes the formula for a published
release from its downloaded SHA256SUMS, checked against minisign.pub.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The maintainer tags main's HEAD (git tag -s vX.Y.Z) and runs
mise exec -- scripts/publish.sh, entering the minisign password once.
It checks the preconditions (release.sh --check for the tag and its
signer, main's HEAD and origin, a clean tree, gh logged in, minisign,
no other release, the tap's checkout clean on main), builds dist/ with
release.sh, prints the version, commit, files with sizes and SHA-256s,
the CHANGELOG entry and the tap's diff, asks once on the terminal, then
pushes main and the tag, makes the GitHub release as a draft with every
file and publishes it, and commits and pushes the tap's formula. Each
step skips what's done, a draft left by a failed run gets its files
again, and a failure says what was and wasn't published. --dry-run
stops before the question; --help.
release.sh gains --check (the tag's checks only, printing its commit),
fills in the formula's @URL@ and @SHA256@ only outside its comments,
and points at publish.sh in its last line.
Tests: testdata/script/publish.txtar (a local bare origin and tap, a
fake gh, SSH-signed tags, a passwordless minisign key): refusals (no
tag, a tag release-signer doesn't pin, a dirty tree, an existing
release without its files, gh logged out, no tap), --dry-run, n, y
failing at gh release create then at publishing the draft, the reruns
and the call order, and a run with everything done.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
release.sh wrote install.sh after it signed SHA256SUMS, so nothing signed
covered the script and checking it by hand with the release key wasn't
possible. It now writes install.sh, adds its checksum to SHA256SUMS, then
signs. install.sh and devvm upgrade look up their archive by name, so the
extra line changes nothing for them. release_head.txtar checks the line.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm is about VMs, and Docker's containers aren't VMs: Lima is the
default backend and smolvm stays experimental. The backend architecture
(Backend, Caps, Require, the registry, backendtest.Fake) stays, so
another backend is an addition.
Removed:
- internal/backend/docker, its registry entry and Names/Experimental's
docker half; devvm _docker-connect and _docker-ports
(internal/cli/dockerssh.go); assets/docker/unpack.sh.
- Test-build overrides DEVVM_DOCKER_KIND, DEVVM_DOCKER_PROC_SYS,
DEVVM_LINUX_BUILD_URL/_SHA256, the registry.linuxURL/linuxSHA256
ldflags vars and the CLI tests' Linux-build archive (linux_release).
- Interfaces only Docker implemented, with their callers:
backend.ProxySocket/ProxySocketOf (the proxy's -listen-unix),
DiskUser (ls's and size's disk-over warning, size's disk_used and
--json disk_used_gib), Reporter (doctor), LeftoverLister and Leftover
(gc --orphans' volumes, networks, containers and images),
DockerLayerVM and VMSpec.DockerLayer, SSHTarget.ProxyCommand and
vmssh.SSH.Proxy, vmssh.SSH.SessionArgs, CacheEntry.Name.
- The docker layer's runtime on a backend that makes VMs for it:
vm/dockerlayer.go, KeyDockerLayer, chooseNet's refusal (chooseNet
returns a bool now), the refusals at start and devvm network on, ls's
"(sysbox)" and --json docker_layer, size_disk_default_unused.
- The proxy's relay mode (relay.go, -relay, -relay-to, -listen-unix).
- paths.Dirs.Docker and paths.VM.Lifeline.
- assets/guest/tools.sh's linked-folder branch; services.sh's
DEVVM_LOOP, DEVVM_DOCKERD and DEVVM_SSHD=inetd.
- Messages: every docker_* the backend used, docker_layer_runtime,
net_docker_layer, net_off_docker_layer, committing_image,
pulling_image, unpacking_tools, disk_over, size_disk_default_unused,
gc_orphan_volume/_network/_container/_image, docker_connect_failed;
gc_orphan_elsewhere reworded.
- Tests: docker.txtar, the docker stub's engine (its --from half
stays), the ssh stub's login-shell branch; e2e's --backend docker,
--engine, the docker host VM and Docker Desktop runs.
- Release: one GoReleaser pass, no Linux-build pin in the macOS builds,
no Linux devvm in the Homebrew formula's libexec. Linux builds stay.
- Docs: backends/docker.md and internals/docker.md, design.md's Docker
notes, the Docker column of the feature table, and every page's
mentions of the Docker backend, Docker Desktop as one, and Sysbox.
Kept: the docker layer in Lima VMs, devcontainer docker-in-docker,
--from with images only a local Docker has, Docker Hub references.
State written by a Docker VM before this reads as an unknown backend
(backend_unknown_vm).
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]>
The docs move into a folder per sidebar section, in the order a new user
needs them: getting-started (install, first-vm, commands), using (images,
customizing, from, devcontainer, coding-agents, ssh, limits), safety
(attack-vectors, network, clone, git-protection, security), backends
(backends.md as the section's _index.md, lima, smolvm, docker), internals
(design), cli, and contributing (contributing.md as its _index.md,
testing, maintaining). Each section has an _index.md listing its pages,
and the docs index is grouped the same way. Commands is now Everyday
commands, SSH is SSH and editors.
New pages:
- safety/attack-vectors.md: Staying safe first (seven habits), then
common attacks sorted into Blocked, Kept inside the VM, Narrowed, not
closed, and Left to you.
- getting-started/first-vm.md: making a VM, the first run, what's in it,
coding agents, coming back to it.
Links to Staying safe from the home page, README, security, install,
coding agents and clone. Every relative link, the home page's, the
README's, SECURITY.md's, CONTRIBUTING.md's, AGENTS.md's, the proxy and
oci READMEs', release.sh's hints and the recording's URL use the new
paths. internal/msg/docs.go names pages by path (using/images#...), and
checkDoc takes a section's _index.md for its folder (backends#...).
contributing/_index.md describes the sections and how links name them.
Also carries the docs edits made alongside the forwarder work in the
tree (backends, images, limits, security, design, commands and the
generated devvm ports page), whose code isn't in this commit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Docker VM with network policy sits alone with a relay container on an
internal network of its own (inhibit_ipv4). The relay, devvm's own Linux
build in an empty imported image (read-only, every capability dropped),
copies the VM's connections to a unix socket of devvm's proxy on the
host, so tokens, the Keychain, the CA key and agents' logins never enter
Docker. On and off is docker network connect/disconnect at the next
start. Desktop builds run on a network and relay of their own, through a
host proxy allowing any host on ports 80 and 443.
- every Docker VM drops NET_RAW; it's in the config hash, so containers
are made again from their commit
- confined: the start's ID, the VM alone on its network with the relay
by its recorded container ID, the network still internal; a foreign
member is docker_network_shared, at start and on removal
- proxy: -listen-unix, -relay/-relay-to; a lifeline pid file written
after the proxy started whose process has gone ends it
- macOS fetches the release's Linux build on first use, checked against
a SHA-256 the two-pass release.sh bakes in; builds without the pin use
devvm-linux-<arch> beside devvm or refuse
- the build proxy is stopped through the process devvm started
- reviewed: design notes and threat check in design.md; e2e on the
Linux engine and Desktop: dropped capabilities, network members and
options, no IPv6 beyond the bridge's link-local, no DNS query leaving
(captured, with an unconfined control), direct connections refused
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]>
scripts/release.sh checks the signed tag (git tag -v) and its signer
against this checkout's packaging/release-signer, then runs goreleaser
release --skip=publish (--snapshot with --head) in a clone of the commit,
so only what's committed goes in. .goreleaser.yaml builds darwin/linux x
arm64/amd64 archives with the binary and its data files, a source
tarball and SHA256SUMS, with -X github.com/w3cj/devvm/internal/cli.version
(VERSION's version, for HEAD too). release.sh checks the host's binary
prints the version, signs SHA256SUMS with minisign and verifies it, fills
in install.sh (release_version, minisign_key) and the Homebrew formula,
which builds from the source tarball with Go (brew audit --strict clean).
--head takes DEVVM_MINISIGN_PUB for a test key, and skips a missing
install.sh; a tag without one is refused.
scripts/bump.sh writes the host mise's pins in internal/tools/mise.go.
VERSION and a fresh CHANGELOG.md. docs: maintaining.md (pins, releasing).
Tests: testdata/script/release.txtar (unsigned tag, no pin, another
signer, the checkout's pin, no install.sh), release_head.txtar (unsigned,
signed and verified, install.sh and formula filled in, only committed
files, wrong key, wrong version, bad install.sh, bad VERSION), bump.txtar
(crane, mise in base.sh and mise.go, hostile and missing values, --check
control characters, unknown tool). The sandbox sets DEVVM_REPO.
Co-Authored-By: Claude Opus 5.5 <[email protected]>