Build a YUM Repository
This tutorial creates a new Managed RPM repository. You need a writable directory, and one or more RPM files.
1. Create the workspace
The Dist name is an identifier chosen by you. SOW does not infer an operating-system
release from el9.
2. Set membership policy
Edit the generated sow.yml. This example keeps one version per package and architecture
and excludes debug packages:
Validate every manual edit before writing repository state:
exclude runs before limit. Neutral noarch packages are projected into every enabled
architecture view; they are not listed in architectures.
3. Add RPMs
add parses the package headers, stores each accepted package once in the canonical pool,
updates Desired membership, and materializes a new Generation. Excluded inputs are reported
per item and are not command failures.
The public tree has this shape:
The rpm-md location href entries reach package bytes in the root pool/ by relative
paths. Do not copy an architecture directory by itself: it is not a standalone repository.
4. Preview over HTTP
For a local preview:
Check the entry point from another shell:
Use a maintained HTTP server for persistent service. It must expose the whole pigsty/
tree so client-resolved package URLs under pigsty/pool/ remain reachable.
5. Configure dnf
Replace REPO_HOST with an address the client can reach:
Then refresh and query the repository:
This configuration is deliberately unsigned. Enable client verification only after following Sign Your Repository.
6. Publish or export
Before delivery, require a successful deep check:
Use sow publish for a configured filesystem or R2 target. A
whole-root copy is acceptable only into an offline staging location that is switched into
service atomically; do not run an unordered in-place sync against a live repository.
Some mirroring tools, including default dnf reposync, reject rpm-md package locations
that traverse to the root pool. Export a self-contained RPM leaf when such a consumer is
required:
The destination must be absent or empty. The export duplicates package bytes by default;
--hardlink is an explicit same-filesystem, trusted, read-only optimization.
Update the repository
add and rm change Desired membership. build is useful after policy or signing
configuration changes. check is the publication gate; status alone is not.
The automated client and platform scope is listed under Platforms & Integrations.