This is the multi-page printable view of this section.
Get Started
- 1: Installation
- 2: Quick Start
- 3: Your First Workspace
- 4: Core Concepts
SOW turns RPM and DEB files into static YUM and APT repositories. Install SOW, then choose how to manage your packages:
-
Plain mode: run
sow create DIRto build indexes for the packages in a directory, andsow prune DIRto remove superseded RPM versions in place. -
Managed mode: create a workspace to group packages into Dists, limit versions, sign metadata, and publish updates.
-
Installation — Install a release archive, Linux package, or source build.
-
Quick Start — Build a flat repository and use it from a local client.
-
First Workspace — Create RPM and DEB Dists, add packages, and check the result.
-
Core Concepts — Learn how workspaces, repositories, Dists, and generations fit together.
Serve the generated files through a static HTTP server or object storage. See Installation for storage and signing requirements.
1 - Installation
SOW is one executable. It needs no daemon, database service, or language runtime. Release archives support Linux and macOS on amd64 and arm64. Linux also has RPM and DEB packages.
The Download page provides SOW 0.9.0 packages, archives, and checksums.
Download your chosen artifact and SHA256SUMS into a separate download directory.
Install an archive
For Linux amd64, verify the archive, extract it, and install the executable:
For macOS, select darwin_amd64 or darwin_arm64. Substitute that archive name and use shasum -a 256 -c - for the checksum command.
To install without root access:
Add the export PATH line to your shell profile to keep it in new sessions.
Install a Linux package
Verify the downloaded package against its entry in SHA256SUMS. Then run the command for your distribution:
For ARM64, use the RPM ending in .aarch64.rpm or the DEB ending in _arm64.deb. Packages install the executable at /usr/bin/sow.
Build from source
Install Go 1.27.4 or newer and Git. The build uses CGO_ENABLED=0 and needs no C compiler.
Verify the installation
version shows the product version, target operating system and architecture, and Go toolchain. help lists commands. Use sow help COMMAND for a command’s options.
Upgrade to 0.9.0
Workspaces on 0.5.0 through 0.8.0 already use database schema v13. You can keep your sow/v3 configuration and public URLs. Interrupted 0.7.1 local GC plans that contain an empty manifest array now resume directly under 0.9.0.
Review any publication target configured with max_cache_ttl: 0s before upgrading. Starting in SOW 0.9.0, new target GC grace records follow max_cache_ttl directly without a 30-day floor, so superseded objects with 0s TTL may become eligible at the next target GC. Previously recorded later NotBefore deadlines remain effective.
SOW 0.6.1 and older versions reject sow.yml files that use passfile; remove passfile keys before downgrading.
- Stop all workspace writers.
- Back up the complete workspace with a tool that preserves hard links, such as
rsync -aHortar. - Review configured targets for
max_cache_ttl: 0sand adjustmax_cache_ttlviasow publish TARGET --rebindif clients need a longer retention window. - Install SOW 0.9.0.
- Build and check each Repository in
sow.yml(orsow.yaml):
Replace REPOSITORY with its configured name. A current repository produces a no-op build.
An unchanged build keeps its Generation and metadata timestamps.
New builds record one publication time and reuse it during recovery.
Workspaces from 0.3 or 0.4
These workspaces need migration before the first build. After backing up the workspace and installing 0.9.0, run:
Repeat these commands for each Repository. Migration updates the database; the rebuild applies the current RPM verification and APT metadata rules.
Keep the backup for rollback to a version that uses an older schema.
See sow repo migrate and the 0.9.0 release notes.
Upgrade a Plain repository
Plain mode has no database to migrate. For an existing YUM repository, follow Migrate an Existing YUM Repository before changing its generator. The --metadata-timestamp default remains 0. Set the timestamp from the repository’s publication history so cached YUM clients accept the new index.
Storage and optional tools
The SOW user needs read access to input packages and write access to the repository. Keep Managed workspaces on a local POSIX filesystem with file locks, fsync, and atomic rename.
Package parsing and metadata generation run inside SOW. Optional signing needs these host tools:
| Signing method | Required tools |
|---|---|
| Metadata signing with an OpenPGP key file or key material | None |
| Metadata signing with a GPG key identifier | gpg and gpg-agent |
| RPM package signing | rpm with a working GPG signing setup |
Continue with Quick Start for Plain mode or First Workspace for Managed mode.
2 - Quick Start
Use Plain mode to build a repository from a directory of packages. It works without a workspace or configuration file. You need SOW, Python 3 for the preview, and at least one RPM or DEB file.
Prepare a directory
Create a writable directory. Replace the input paths below and run the copy command for each package format you have:
Keep packages at the directory top level; sow create does not scan subdirectories.
Generate metadata
With one RPM and one DEB, the output includes:
The directory now has indexes beside the original packages:
- sow-quickstart/
- example.rpm
- example.deb
- repodata/RPM index and metadata
- PackagesDEB flat index
- Packages.gz
SOW creates indexes for the formats present. Plain mode does not create APT Release, InRelease, or Release.gpg files. It leaves package names and paths unchanged.
Start a local server
Run this command in a separate terminal and leave it running:
If this host has no APT or DNF client, check the HTTP entry point for the format you added:
This server is reachable only from the same host. For other clients or a persistent service, follow Serve Repositories.
Configure a local client
On a Linux host running the preview server, create the source file for your package manager. These examples use unsigned metadata and disable client signature checks. For signed metadata, use a Managed workspace and the signing tutorial.
Save this as /etc/yum.repos.d/sow-quickstart.repo:
Refresh the index and install one of your packages:
Save this as /etc/apt/sources.list.d/sow-quickstart.list:
The final ./ selects a flat repository. Refresh the index and install one of your packages:
Replace PACKAGE_NAME with a package name from its metadata, not its filename. On macOS, use the HTTP checks above; run package installation on a compatible Linux client.
Update the repository
Add or remove package files, then regenerate the indexes:
Unchanged package files and options produce the same metadata. A repeat run reports noop=true.
In a flat directory containing RPMs, you can also run sow prune "$HOME/sow-quickstart" --dry-run to preview superseded RPM versions and sow prune "$HOME/sow-quickstart" to delete them and refresh repodata/ (leaving any DEB indexes untouched).
When replacing another YUM metadata generator, follow Migrate an Existing YUM Repository to preserve the timestamp that cached clients expect.
When the preview is complete, stop the server with Ctrl+C and remove its source file from your client. Keep the package directory if you want to reuse it.
Next
Use a Managed workspace for named Dists, architecture views, version limits, signed metadata, and publication targets. See sow create and sow prune for all Plain options.
3 - Your First Workspace
This example creates a Managed repository with two named package sets, called Dists:
el9 for RPMs and bookworm for DEBs. Use an empty, writable /srv/sow directory, or
substitute another path.
Initialize the workspace
init creates:
- /srv/sow/
- sow.ymlconfiguration; schema: sow/v3
- .sow/private state managed by SOW
Edit sow.yml when you need to change configuration. SOW manages the private .sow/
directory. You can repeat init without resetting existing packages or state.
Create a repository and two Dists
Each Dist has one package format. dist new creates empty indexes for x86_64 and
aarch64 by default. Both Dists share the Repository’s pool/ directory.
The public layout is now:
- /srv/sow/local/
- pool/
- dists/
- el9/
- x86_64/repodata/
- aarch64/repodata/
- bookworm/
- Release
- main/
- binary-amd64/Packages, Packages.gz, by-hash/
- binary-arm64/Packages, Packages.gz, by-hash/
- el9/
Add packages
Select the target Dist explicitly:
Replace the input paths with real package files. SOW reads package identity and architecture, stores each accepted file in local/pool/, updates membership, and builds the affected Dists. Later builds use the pool, so SOW no longer needs the original input files.
Inspect and verify
ls lists the packages in each Dist. status should report clean and
ready_to_copy=true. A successful check confirms that the files match the recorded build.
Serve the repository
Publish the complete /srv/sow/local directory so clients can reach both indexes and package files. Keep the workspace configuration and .sow/ outside the server root.
Follow Serve Repositories to publish with Nginx. The YUM and APT tutorials show client configuration, including the trust settings for unsigned repositories.
Batch later updates
When you need to add several batches, use --skip and build once at the end:
While membership changes await a build, sow status reports dirty and ready_to_copy=false.
Selection rules
The commands above find the workspace from the current directory and select its only
Repository. From another directory, use -C /srv/sow. With multiple Repositories, add
-r local. Use -d NAME to select a Dist; repeat it to select several.
See selection rules for discovery and defaults.
Next
4 - Core Concepts
Choose a mode
| Need | Plain | Managed |
|---|---|---|
| Build indexes from a package directory | sow create DIR |
Import packages with sow add |
| Keep configuration and package membership | Directory contents are the state | sow.yml and private SQLite databases |
| Organize packages | One flat directory; RPM and DEB can coexist | Named Dists; one format per Dist |
| Publish architecture views | No | Yes |
| Apply filters and version limits | sow prune DIR (RPM latest version per NAME + ARCH) and --pigsty cleanup |
Configurable per Dist |
| Sign RPM packages | Yes | Yes |
| Sign repository metadata | Sign separately | Configure keys in sow.yml |
| Track generations and publication | Manage these outside SOW | Built in |
Use Plain when the directory already contains the packages you want to publish. Use Managed when SOW should track membership and maintain the repository over time.
Workspace, Repository, and Dist
- Workspace/srv/sow
- sow.ymlconfiguration
- .sow/private state
- Repository//srv/sow/local
- pool/package files
- dists/
- Dist/a named RPM or DEB package set
- views/metadata for each architecture
- Dist/a named RPM or DEB package set
A workspace holds configuration and private state for one or more repositories.
A Repository owns a package pool, Dists, build history, and publication targets. Serve its complete pool/ and dists/ tree. Keep sow.yml and .sow/ outside the HTTP document root.
A Dist selects packages of one format. For example, el9 can contain RPMs and bookworm can contain DEBs. You choose the names; SOW does not check whether a package is compatible with the operating system named by its Dist.
An architecture view contains metadata for one architecture. SOW includes neutral RPM noarch and DEB all packages in each applicable view.
Store each package once
SOW identifies a package object by the SHA-256 of the complete package file. It reads the package name, version, and architecture from package metadata.
Within a Repository, each accepted package has one path under pool/. Multiple Dists can refer to that path. Separate repositories have separate pools.
RPM metadata uses relative paths back to the pool. APT Packages entries use paths relative to the Repository root. Keep the complete Repository tree together when you serve or copy it.
Some mirror tools, including default dnf reposync, reject the parent-relative RPM paths. Use sow export rpm-leaf to create a standalone RPM repository for those tools.
Desired membership and built generations
Desired membership is the package set selected for each Dist. A Generation identifies a completed build and its file manifest. Built Generation is the current completed build. Package files stay in the shared pool; each build does not create another copy.
add and rm normally update membership and build the affected Dists in one command. With --skip, they update membership only. Run sow build after a batch of skipped changes, or after changing build or signing configuration.
| Command | Use |
|---|---|
sow status |
Read the current state and ready_to_copy value |
sow check |
Check package files, indexes, signatures, and recorded state without changing them |
sow changes [BASE_GENERATION] |
List file changes from a recorded generation to the current build |
sow publish TARGET |
Check and publish the current build to a configured target |
Understand repository state
| State | Meaning | Next action |
|---|---|---|
clean |
Membership and configuration match the built output | Ready for check or publication |
dirty |
Membership or configuration needs a build | Run build, then check |
recovering |
An interrupted operation needs recovery | Follow the error and recovery steps |
error |
Stored state or files conflict | Inspect the reported error and operation log |
Use sow log to inspect failed or interrupted operations.