Installation
SOW is a single executable. It needs no daemon, no database server, and no language runtime,
and it parses packages and writes metadata itself, so there is no createrepo_c or dpkg
to install either. Choose a channel:
| Channel | Platforms | Choose it when |
|---|---|---|
| Pigsty repository | Linux, amd64 / arm64 |
You want apt or dnf to install and update SOW |
| RPM or DEB package | Linux, amd64 / arm64 |
You need a specific version, or an offline host |
| Archive | Linux and macOS, amd64 / arm64 |
You are on macOS, or don’t want a system package |
| Source | Linux or macOS (amd64 or arm64) |
You build your own binaries |
Release packages, archives, and SHA256SUMS for SOW 0.9.0 are on the Download page.
From the Pigsty repository
SOW ships in the Pigsty infra repository. This channel is rolling: it installs the SOW version available in the configured repository. Use a tagged release asset when you need an exact version.
These examples skip signature checks for the Pigsty source (trusted=yes, gpgcheck=0).
In mainland China, replace repo.pigsty.io with the repo.pigsty.cc mirror.
Install a Linux package
Download the package for your architecture and SHA256SUMS, check the package against its
line in SHA256SUMS, then install it:
For ARM64, use the RPM ending in .aarch64.rpm or the DEB ending in _arm64.deb. The
packages install the executable at /usr/bin/sow.
Install an archive
Download the archive and SHA256SUMS into an empty directory. For Linux amd64:
On macOS, use darwin_amd64 or darwin_arm64 in the archive name and shasum -a 256 -c -
for the checksum. Without root access, install into your home directory instead:
Build from source
You need Go 1.27.4 or newer and Git. SOW builds with CGO_ENABLED=0, so no C compiler is involved.
Verify the installation
sow version prints the version, platform, and Go toolchain, for example
sow 0.9.0 linux/amd64 go1.27.4. sow help lists the commands, and sow help COMMAND
shows one command’s options as implemented by the binary you have.
Storage and optional tools
The user running SOW needs read access to the input packages and write access to the
repository. Put a workspace on a local POSIX filesystem (APFS on macOS); SOW relies on
file locks, fsync, and atomic rename, which network filesystems do not reliably provide.
Signing is optional. Depending on how you sign, you may need host tools:
| Signing method | Required tools |
|---|---|
| Metadata signing with an OpenPGP key file or key material | None |
| Metadata signing with a GPG key ID or fingerprint | gpg and gpg-agent |
| RPM package signing | rpm with a working GPG signing setup |
Next: the Quick start for a simple repository, or Your first standard repository.
Upgrade to 0.9.0
Workspaces created by SOW 0.5.0 through 0.8.0 already use database schema v13, so there is no
migration: install the new binary, rebuild, and check. Your sow/v3 configuration and public
URLs stay as they are.
Check targets with max_cache_ttl: 0s first. Before 0.9.0, target GC kept superseded
files for at least 30 days whatever the TTL. 0.9.0 uses max_cache_ttl as the grace period
directly. With 0s, a filesystem target may delete eligible files at its next sow gc TARGET.
R2 reports candidates unless you pass --delete. Recorded deadlines still protect older publications.
- Stop everything that writes to the workspace.
- Back up the complete workspace with a tool that preserves hard links, such as
rsync -aHortar. - For each target with
max_cache_ttl: 0s, decide whether clients need a longer window; set the required lifetime insow.ymlbefore the next publication. - Install SOW 0.9.0.
- Build and check each repository listed in
sow.yml:
REPOSITORY is the repository name from sow.yml. A repository with no pending changes
produces a no-op build that keeps its Generation number and metadata timestamps, so clients
see nothing new.
If you changed the TTL of an already published target, use sow publish TARGET --rebind when you are ready to deliver the checked build. A target that has never been published gets its settings on its first sow publish TARGET.
Local GC plans that were interrupted under 0.7.1 with an empty manifest array resume
directly under 0.9.0. Before a downgrade, check the configuration against the target version. Versions through 0.8.0 require the name sow.yml. Versions through 0.6.1 also reject the passfile field.
Workspaces from 0.2, 0.3, or 0.4
Repositories created by 0.2.0, 0.3.0, and 0.4.0 use SQLite schemas v8, v10, and v12 respectively. SOW 0.9.0 can migrate each directly to v13. Stop writers and back up the complete workspace with hard links preserved. After installing 0.9.0, run these commands for each repository.
repo migrate reports the old and new schema versions. build refreshes views that need rebuilding and may report noop=true if they are current. Finish by checking the whole repository. To go back to a version that uses the older schema, restore the backup.
See sow repo migrate and the
0.9.0 release notes.
Upgrade instructions for earlier releases
| Target version | Upgrade notes |
|---|---|
| 0.8.0 | Finish interrupted 0.7.1 local GC before upgrading. |
| 0.7.1 | Existing schema v13 workspaces need no migration. |
| 0.7.0 | Check passfile compatibility before downgrading. |
| 0.6.1 | No migration from 0.5.0 or 0.6.0. |
| 0.6.0 | Check the publication time of simple YUM repositories. |
| 0.5.0 | Migrate standard repositories to schema v13. |
| 0.4.0 | Migrate a 0.3 workspace. |
| 0.3.0 | Migrate a 0.2.0 workspace from schema v8 to v10. |
Upgrade a simple repository
A simple repository keeps no database, so upgrading is just installing the new binary. If you are
switching an existing YUM repository from another generator to SOW, follow
Migrate an existing YUM repository: --metadata-timestamp
still defaults to 0, and clients with cached metadata need a timestamp derived from the
repository’s publication history.