Replace local repository metadata generation with SOW
@Vonng is already working on this.
Since Aug 9, 2026.
- Dominant language
- Shell
- Stars
- 5.7k
- Forks
- 384
- Avg merge
- 2h 36m
- Merged PRs (30d)
- 2
Description
Background
Pigsty currently has more than one implementation for building the flat local/offline package repository:
- the Ansible
repo/cacheroles usecreaterepo_cfor RPM metadata anddpkg-scanpackagesfromdpkg-devfor DEB metadata; pig repo createcarries another repository-generation path and legacy fallback logic.
This duplicates format-sensitive logic and makes the bootstrap, Ansible, and PIG paths easy to drift apart. SOW 0.2.0 is now packaged in the Pigsty INFRA repository for both RPM and DEB platforms, so it can become the single repository builder.
Proposal
Use SOW as the only implementation for creating Pigsty local repositories:
sow create --pigsty --timeout 10m -- /www/pigsty
The migration should:
- enable the
infraupstream module for repository builders before installing SOW; - install
sowduring bootstrap/repository preparation; - make the Ansible
repo_createandcache_createpaths invoke SOW and fail if repository creation or the completion marker fails; - make
pig repo createdelegate directly to SOW; - remove the runtime dependencies on
dpkg-dev,createrepo_c, andmodulemd-tools; - retain
dnf-utils/yum-utils, which are still needed for package downloading rather than metadata generation.
Compatibility decisions
SOW output must preserve the package-manager contract of the existing flat repository:
- RPM: valid
repodata/repomd.xmland referenced metadata, usable by DNF/YUM; - DEB: valid
PackagesandPackages.gz, usable by APT; - Pigsty: a
repo_completemarker created only after successful metadata generation.
Additional decisions:
- SOW writes SHA-256 entries to
repo_complete; current Pigsty consumers only test marker existence, so this is compatible. - Do not synthesize ModuleMD for the local repository. Pigsty already uses
module_hotfixes=1for the local RPM repository, so package visibility does not depend on generated module metadata. - EL7 compatibility is out of scope for this migration.
- Existing offline archives/local repositories built before SOW was bundled must be regenerated, or SOW must be installed before trying to rebuild them.
Prototype validation
The replacement path has been exercised on disposable Pigsty lab nodes:
- Rocky Linux 9: Ansible repository creation succeeds; DNF can access and use the generated local repository without
createrepo_c. - Rocky Linux 10: same validation, including current RPM metadata/compression handling.
- Debian 13: Ansible repository creation succeeds; APT can access and use the generated local repository without
dpkg-dev. - Ubuntu 22.04: same APT validation.
-
repo_createandcache_createcheck-mode guards pass. - PIG repository/ext unit tests and
go vetpass. - SOW plain/v2 CLI tests and real RPM/DEB smoke tests pass.
Completion checklist
- Merge Pigsty bootstrap, package-map, Ansible role, and documentation changes.
- Merge the PIG delegation and catalog changes.
- Rebuild and publish offline archives containing SOW.
- Verify one released offline archive end-to-end after publication.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.