sow dist
sow dist manages the distributions that clients use. Each Dist contains either RPM or DEB packages. Dists in one Repository share pool/ and have separate indexes under dists/.
Synopsis
Naming
Dist names follow the same rule as Repository names: [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 does not infer package format or policy from the name.
sow dist ls
Read-only flat listing of the selected Repository’s Dists.
DESIRED and BUILT are membership counts. When they diverge, DIRTY_REASONS says why:
| 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 also shows the package ecosystem names.
This excerpt contains the architectures field from one entry in result.dists; the DEB
view directories are binary-amd64 and binary-arm64:
sow dist new
Create 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 |
--json |
Output JSON | false |
--format is required and accepts only rpm or deb:
A new Dist inherits the Workspace architectures. Edit sow.yml to select a subset or set limit and exclude, then run sow config check and sow build.
If the name and format already exist, dist new reports the current state.
Using the same name with a different format is rejected:
Creation and recovery
dist new updates sow.yml and builds the new Dist. If it is interrupted, run sow build to recover the operation.
The new Dist has valid empty indexes. An RPM Dist gets empty repodata/ in each architecture view. A DEB Dist gets empty Packages and Packages.gz files, by-hash/SHA256/ entries, and a Release file. When signing is configured, it also gets InRelease and Release.gpg.
sow dist show
Read-only detail for one Dist.
| 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 also includes effective_config_sha256, the digest of the resolved Dist configuration.
Changing limit, exclude, or a signing key can make the current configuration differ
from the Built Generation. SOW then marks the Dist dirty until it is rebuilt.
sow dist rm
Removes a Dist’s Membership and derived indexes.
| 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 |
--json |
Output JSON | false |
Dist removal does not delete Pool bytes
SOW removes the Dist’s configuration, membership, and indexes. Package files remain in pool/:
Run sow gc to reclaim package files when no current or retained state needs them.
If a configured target has published this Dist, removal is rejected. See Removing a published view.
A Repository’s protected: true blocks Repository deletion only; normal Dist maintenance on a
protected Repository continues to work.
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:
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 |
See also
- sow repo — the layer above
- Pool & Architecture 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