sow dist
A Dist is the package set that clients see as one distribution, such as el9 or trixie. It is
either RPM or DEB, has its own architecture views, policy (limit, exclude), and indexes under
dists/, and shares the pool/ of its standard repository with the
other Dists. sow dist creates, lists,
inspects, and removes Dists. To change a Dist’s architectures or policy, edit sow.yml, then run
sow config check and sow build.
Synopsis
dist new and dist rm accept --passfile for signing checks,
signing, or recovery of an interrupted operation. dist ls and dist show do not read password files.
Examples
Create an RPM Dist and a DEB Dist in one repository:
Create a beta Dist, set its package-retention policy in sow.yml, then rebuild it:
List Dists that need a build:
Naming
Dist names follow the repository rule: [a-z0-9][a-z0-9._-]*, excluding ., .., .sow, pool,
and dists. Choose names that identify your distributions or channels, such as el9, trixie, or
el9-beta; SOW infers neither format nor policy from the name.
sow dist ls
Lists the selected repository’s Dists. Read-only.
DESIRED and BUILT count memberships. When the desired state has moved ahead of the last build,
DIRTY_REASONS says why:
Pending repository maintenance can also make a Dist dirty while the counts match, so read
dirty_reasons and sow status before treating a Dist as ready to deliver.
| Flag | Description | Default |
|---|---|---|
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Select a repository | selection rules |
--json |
Output JSON | false |
The table shows architecture families; JSON adds each package ecosystem’s own name. This
architectures field from one entry in result.dists belongs to a DEB Dist, whose view
directories are binary-amd64 and binary-arm64:
sow dist new
Creates a Dist with --format rpm or --format deb:
| Flag | Description | Default |
|---|---|---|
--format FORMAT |
Required; rpm or deb |
— |
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Select a repository | selection rules |
-T, --timeout DUR |
Maximum lock wait; 0 waits indefinitely |
0 |
-N, --no-wait |
Fail immediately when the lock is held | false |
--passfile PATH |
Password file for this invocation | per-key config, then SOW_GPG_PASSFILE |
--json |
Output JSON | false |
A new Dist inherits the workspace architectures. To use a subset, or to set limit and
exclude, edit sow.yml, then run sow config check and sow build.
Running dist new again with the same name and format prints the current state. The same name
with a different format is rejected:
--format is required and accepts only rpm or deb:
Creation and recovery
dist new updates sow.yml and builds the new Dist in one operation, so the Dist has valid empty
indexes from the start: an empty repodata/ in each RPM architecture view, or empty Packages and
Packages.gz, by-hash/SHA256/ entries, and a Release file for DEB, plus InRelease and
Release.gpg when signing is configured. If the command is interrupted, run sow build to
recover the operation.
sow dist show
Shows one Dist in detail. Read-only.
| Flag | Description | Default |
|---|---|---|
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Select a repository | selection rules |
--json |
Output JSON | false |
JSON adds effective_config_sha256, a digest of the resolved Dist configuration. Changing
limit, exclude, or a signing key changes the digest, and SOW marks the Dist dirty until you
rebuild it.
sow dist rm
Removes a Dist’s configuration, membership, and indexes. A Dist that still has members needs -f:
| Flag | Description | Default |
|---|---|---|
-f, --force |
Remove membership and indexes but retain pool packages | false |
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Select a repository | selection rules |
-T, --timeout DUR |
Maximum lock wait; 0 waits indefinitely |
0 |
-N, --no-wait |
Fail immediately when the lock is held | false |
--passfile PATH |
Password file for this invocation | per-key config, then SOW_GPG_PASSFILE |
--json |
Output JSON | false |
If a configured target has published this Dist, the removal is rejected; see
Removing a published view. A repository’s
protected: true blocks only repository deletion, so dist rm works on protected repositories.
Dist removal does not delete Pool bytes
Other Dists and retained Generations may still use the same package files, so dist rm leaves
pool/ alone:
Run sow gc to reclaim package files once no current or retained state needs them.
Exit codes
| Code | Trigger |
|---|---|
0 |
Listed, created, shown or removed; or dist new reported an existing Dist |
1 |
Runtime I/O or renderer error creating the empty indexes |
2 |
Usage error — missing or invalid --format, workspace not found, ambiguous repository |
4 |
Workspace or repository lock held and --no-wait given or --timeout expired |
5 |
Integrity or recovery error in the operation journal |
6 |
Invalid name, unknown Dist, format conflict with an existing name, non-empty without -f, or a Dist that a configured target has published |
See also
- sow repo — the layer above
- Pool & Metadata Views — how one Dist becomes several client-visible views
- Membership Policy — configuring
limitandexclude - sow build — rebuild after a policy edit
- Repository Layout — the RPM and DEB
dists/structures