Skip to content

Tutorials

Find the walkthrough for your situation: a new YUM or APT repository, a createrepo_c migration, signing, serving, or a multi-channel repository.

Each tutorial is a complete procedure. It starts from package files or an existing repository and ends with a client installing a package from the result. Pick the one that matches what you have and what you need. If SOW is not installed yet, start with Installation.

SOW builds two kinds of repository; Core concepts compares them. A simple repository is a directory of packages that sow create indexes in place. A standard repository lives in a workspace, where SOW maintains its package pool, Dists, recorded builds, and publication. The migration tutorial uses a simple repository; the others build standard repositories.

Which tutorial do I need

Your situation Tutorial
You have RPMs and want a repository that dnf hosts install from and that you keep updating Build a YUM repository
You have DEBs and want the same for apt hosts Build an APT repository
A createrepo_c script maintains your RPM repository, and SOW should take over without breaking clients that cached the old index Migrate an existing YUM repository
Clients must reject indexes or packages that you did not sign Sign your repository
A web server, object storage, or an offline network must receive the repository Serve and publish
You ship both formats for two architectures and need latest, stable, and monthly snapshot channels Build the pigsty-infra repository

If you are new to SOW

Follow this order. Each step assumes what the one before it taught, and the first two take a few minutes:

  1. Quick start: turn a directory of packages into a simple repository.
  2. Your first standard repository: a workspace, a shared package pool, and Dists.
  3. YUM or APT: membership policy, updates, and a real client.
  4. Signing, then serving: what you need before other hosts depend on the repository.
  5. pigsty-infra: a production-shaped repository with several channels.

The migration tutorial stands apart: it needs no workspace.

Follow the examples

Run commands in order. Replace uppercase placeholders and /path/to/ inputs with your own values. Examples under /srv need a directory your user can write to; a path under your home directory works as well.

A Dist is a named package set in a standard repository. Names such as el9, trixie, or rpm are labels you choose: a Dist name becomes the index directory under dists/ and, for APT, the Suites value clients configure. It does not change which operating systems the packages are built for.

The YUM and APT tutorials each start a new workspace. To keep both formats in one repository, create the second Dist in the existing pigsty repository instead of running sow init again, and merge its policy into sow.yml so both Dist definitions remain.

Each tutorial ends with a check that proves the result. For a command error or an interrupted operation, see Troubleshooting.

Build a YUM Repository

Build a standard YUM repository with a version policy, install from it with dnf, and keep it updated.

Migrate an Existing YUM Repository

Move a createrepo_c repository to SOW as a simple repository without breaking clients that cached the old index or verify its signature.

Build an APT Repository

Build a standard APT repository with by-hash indexes, install from it with apt, and keep it updated.

Sign Your Repository

Sign repository metadata and, optionally, RPM packages, then make dnf and apt reject anything you did not sign.

Serve and Publish Repositories

Publish a standard repository to a filesystem target in client-safe order, serve it with Nginx, and deliver updates or offline copies.

Build the pigsty-infra Repository

Turn an existing dual-architecture RPM and DEB package pool into an infra repository, then validate installs, roll updates, promote to Stable, and take monthly snapshots.

Table reader