Quick Start
In about five minutes you will turn a directory of package files into a repository, serve
it over HTTP, and install a package from it with dnf or apt. The result is a
simple repository: no workspace, no configuration
file, no database. The directory is the repository.
You need:
- SOW, from Installation;
- at least one RPM or DEB file;
- Python 3, for a throwaway web server;
- a Linux host with
dnforaptfor the final install step (on macOS you can still build and check the repository).
Prepare a directory
Copy your packages into a new directory. Use whichever formats you have; one RPM or one DEB is enough.
Keep the files at the top level: sow create does not look into subdirectories.
Generate metadata
SOW reads every package, then writes the indexes for the formats it found. With one RPM and one DEB:
The indexes now sit next to your packages, which SOW leaves untouched:
sow-quickstart/
- example.rpm
- example.deb
- repodata/YUM/DNF metadata, read through repomd.xml
- Packagesflat APT index
- Packages.gz
This is a complete repository. For DEBs it is a flat APT repository: Packages only, without
the Release file that signed APT repositories need. Use a standard repository
when you want signed APT metadata.
Start a local server
Run this in a separate terminal and leave it running:
Check that the entry point for each format you added is reachable:
This server only listens on the local host. Serve and publish covers a real web server for other machines.
Configure a local client
On the Linux host running the server, add the repository to your package manager. The repository is unsigned, so these examples turn signature checks off; Sign your repository shows how to turn them on.
Replace PACKAGE_NAME with an uninstalled package from your test repository that matches the client architecture. The commands enable only that repository, so its dependencies must already be installed or available there.
Save this as /etc/yum.repos.d/sow-quickstart.repo:
Load the index and install one of your packages:
Save this as /etc/apt/sources.list.d/sow-quickstart.list:
The trailing ./ tells APT this is a flat repository. Load the index and install one of your packages:
A successful download and install verifies that the client can use the repository.
Update the repository
To change the repository, change the files and run sow create again:
The output depends only on the package files and options. If nothing changed, SOW reports
noop=true and leaves the metadata as it was, so the command is safe to run from cron or CI.
A directory you keep adding RPMs to will collect old versions. sow prune keeps the newest
version of each RPM name and architecture, rewrites repodata/, and only then deletes the
superseded files. Preview first:
DEB files and indexes are left alone.
When you’re done, stop the server with Ctrl+C and delete the source file you added to the client.
Replacing a repository that createrepo_c built and clients already use? Read
Migrate an existing YUM repository first: clients with
cached metadata need a metadata timestamp that never goes backwards.
Next
A simple repository is enough as long as the directory is the whole story. When you need several
distributions from one set of files, version limits, signed metadata, build history, or
publication to a remote target, continue with Your first standard repository.
All options for simple repositories are in sow create and sow prune.