Repository navigation
Barn 1.0.0
Released on 2026-11-05. Barn 1.0.0 is the first stable release. GitHub's
releases/latest, the download installer without BARN_VERSION, and the
Homebrew formula select it.
Barn 1.0.0 freezes the command-line contract that 0.9.x converged on and
finishes a pre-release audit of destructive operations, data-disk recovery,
catalog integrity, and process cancellation. It embeds signed image catalog revision 2026110502, including Debian 13
image 20261103.2651.1 for amd64 and arm64.
Changes
- Safer whole-deployment recreate. A
recreatewithout node selectors
refuses an inventory that no longer lists an existing node (conflict,
reasonnodes_removed, exit 4) before any VM stops; earlier releases
destroyed the omitted node without recreating it. Remove a node explicitly
withbarn destroy NODEor add it back to the inventory. The confirmation
lists every node the operation replaces, and the scope is checked again
under the destruction lock (deployment_changedwhen the applied state
changed during preflight). - Destroying the control node keeps the lab usable. The first remaining
node becomes the control node, with a consistent state, sossh-config,
hosts,exec, andprovisionkeep working. Update the inventory's control
role, then runbarn upto install its control SSH access. Barn refuses to
destroy the control node, before deleting anything, when the successor has an
unfinished prepare record that cannot be completed. - Data disks are reset only on recognized corruption. Disks with a
partition table, a signature without a UUID, unsupported filesystem
features, or an unknown checker failure keep their data and report a
warning. An ext4 or XFS filesystem is reset only after the checker reports
recognized corruption. Existing guests receive the updated helper on their
nextbarn upreadiness check. - Confirmations.
- On a terminal,
up,start,restart, andreloadshow the
host-preparation plan and ask once before installing packages or the Barn
network, asbarn setupdoes. Without a terminal they still only report
what is missing; runbarn setup --yesfor unattended preparation. - On a terminal,
barn purgelists its scope and asks you to typepurge.
--yes(or--force) skips the question. Without a terminal it runs
without a prompt, as before. destroy,recreate,mac destroy, andmac recreateaccept--yesas
their confirmation flag.--forcekeeps working, andmac stop --force
still powers the VM off.
- On a terminal,
- Catalog integrity has its own exit code. A catalog signature or signed
revision that does not verify exits 7 (integrity, reason
catalog_signatureorcatalog_equivocation) instead of 1. Permission and
I/O errors on a cached signature remain runtime failures (exit 1). Both
official repositories share the embedded upgrade baseline, a new trusted
signature over identical catalog bytes is accepted, and catalog commands keep
working afterbarn image reseton an earlier version followed by an
upgrade. - Cancellation reaches
sudo. Cancelled commands receive SIGTERM, which
sudoforwards, and Barn waits at most 10 seconds for the process and its
inherited pipes. Descendants that ignore SIGTERM still need external
supervision. - Host networking and Mac images.
barn network uninstallkeeps the
global networkd unit state when other host links exist or exclusive Barn use
cannot be established; the plan reportspreserve_networkdand the applied
report explains the decision inchecks.networkd. Mac image pruning keeps
bases referenced by interrupted recreates; a malformed recovery journal stops
the cleanup until its references are known. - CLI.
- Running
barnwithout a command prints the complete help, as
barn --helpdoes;--jsonand--yamlkeep theactions[]document. - Explicit
--json/--yamland--verboseoverrideBARN_OUTPUTand
BARN_VERBOSE, and help stays available when those variables are invalid.
- Running
- Dependencies. Go 1.27.3,
golang.org/x/net0.62.0, and
go.yaml.in/yaml/v33.0.6.
Compatibility
From 1.0.0, incompatible changes to the following require a new major version:
- command names, aliases, flags, and argument grammar, including
--before a
remote command; - exit codes and the structured
errorandreasonvalues; - existing fields of
--jsonand--yamloutput (new fields may be added); - the inventory format and the meaning of existing
vm_*keys; BARN_*environment variables;- deployment and Mac state under
BARN_HOME: a 1.x release reads the state of
earlier 1.x releases and of 0.9.3 without recreating VMs.
Human-readable text, help wording, progress lines, and log contents may change
in any release. Scripts should use --json or --yaml and exit codes.
Two behaviors that scripts sometimes misread stay as they are in 1.x:
- Without
--yes,networkandhostsinstall/uninstallonly print the
plan and exit 0 when stdin is not a terminal or the output is--jsonor
--yaml. Checkappliedin the structured output, or pass--yes. destroyandrecreatewithout node arguments apply to the whole
deployment.
Upgrade
The installer selects the latest stable release, verifies the archive against
the release's checksums.txt, and installs into ~/.local/bin without sudo:
curl -fLO https://github.com/pgsty/barn/releases/latest/download/install.sh
bash install.shSet BARN_VERSION=1.0.0 to pin this release. On macOS, run
brew upgrade barn (or brew install pgsty/infra/barn). On Linux, install the
DEB or RPM package from the release.
Upgrading from 0.9.3 requires no recreation; VM disks, SSH keys, state, and
configuration stay under ~/.barn. Stop macOS VMs before replacing the native
component. Check scripts for these changes:
- catalog signature failures now exit 7 instead of 1;
- a whole-deployment
recreateexits 4 when the inventory omits an existing
node; - interactive
upasks before preparing the host; purgeasks on a terminal.
The Apple Silicon archive and Homebrew installation include the signed,
notarized Barn.app, CLI, and hosts helper. Linux arm64/amd64 and Intel macOS
provide the CLI and hosts helper; Linux guests use QEMU.
Known limitations
- A malformed Mac recovery journal stops
barn mac image ls, the space
estimate inbarn mac doctor, and image pruning until it is repaired. - One unreadable Mac machine state stops listing all machines; machines are
still usable by name. - Linux guest shares on macOS hosts need a guest kernel with 9p support.
Support
Security fixes land in the latest 1.x patch release. 0.x releases receive no
further fixes; upgrade to 1.0.0. See
SECURITY.md.
See the installation guide,
the Linux quick start, and the
Mac guide.