Software Repository
Pigsty’s REPO role downloads required packages and creates a local YUM/APT repository under /www/pigsty that Nginx can serve. The current package candidate is SOW 0.3.0; the source uses SOW to generate metadata for both repository types instead of calling createrepo_c, modifyrepo_c, or dpkg-scanpackages separately.
Quick Start
Add packages to repo_packages or repo_extra_packages, then run:
If /www/pigsty/repo_complete already exists, the default repo_build skips the build. To force a rebuild, override it explicitly:
To rebuild metadata for packages already present without downloading new ones:
SOW Prerequisites
Both repo_create and cache_create require sow on the target node. A fresh online build automatically adds infra to the effective repo_modules list and installs SOW from the Pigsty INFRA upstream repository.
Offline bundles and local repositories created before this change may not contain SOW. Before rebuilding from old media, refresh the bundle/local repository or install the current SOW 0.3.0 candidate from the Pigsty INFRA repository. Do not assume that older environments can still fall back to createrepo_c.
On a fresh installation, if /www does not exist, the role creates /data/nginx and makes /www point to it. Existing directories and symlinks are preserved rather than forcibly replaced.
Build Flow
| Task | Purpose |
|---|---|
repo_check |
Check repo_complete to determine whether the local repository is complete |
repo_prepare |
Configure and use an existing repository |
repo_dir |
Create /www/pigsty and ACME directories |
repo_upstream |
Back up and add upstream YUM or APT definitions |
repo_url_pkg |
Download packages from direct URLs |
repo_cache |
Run yum makecache or apt update |
repo_boot_pkg |
Install sow and the RPM platform’s dnf-utils / yum-utils |
repo_pkg |
Download packages and dependencies |
repo_create |
Run SOW to clean and atomically publish repository metadata |
repo_use |
Write the local Pigsty repository definition on the current host |
repo_nginx |
Start a temporary Nginx when no service is already running |
The command executed by repo_create is:
--pigsty removes unneeded or conflict-prone packages and atomically publishes the result only after all metadata has been generated. A typical layout is:
Do not treat repo_complete as an empty sentinel; it contains SHA-256 checksums. Its presence means SOW completed publication of local repository metadata. It does not prove that remote mirrors, signed repositories, or offline bundles have been synchronized.
DNF Module Streams
Pigsty no longer fabricates modules.yaml / ModuleMD metadata for the aggregated local repository. System upstream repositories retain native DNF module filtering. Only an upstream repository that truly needs to replace an EL module stream should set meta explicitly:
The aggregated Pigsty local repository itself is configured with module_hotfixes=1 so local PostgreSQL packages are not hidden by system module streams. This is distinct from generating fake ModuleMD metadata.
Package Aliases
The default repo_packages uses these alias groups:
node-bootstrap includes Ansible, Python dependencies, SOW, and SSH tools. infra-package includes Nginx, etcd, HAProxy, Victoria exporters, Redis/Valkey, Silo, mcli, SOW, and Pig. Exact names vary by OS mapping; always use roles/node_id/vars/<os>.<arch>.yml as the authority.