sow export
sow export rpm-leaf writes one RPM Dist and architecture of a
standard repository to a directory of its own, with the
packages copied under it and metadata rewritten to local pool/... paths. Inside the repository, an
architecture view refers to packages in the shared pool through parent-relative paths, which some
tools refuse: default
dnf reposync, for example, will not write outside one repository directory. Use an export
whenever a tool needs a self-contained directory. To serve the repository itself, use
sow publish.
Synopsis
| Argument | Requirement |
|---|---|
DIST |
Name of a configured RPM Dist |
ARCH |
x86_64 or aarch64 |
DIR |
Absent or empty directory, not a symlink, whose parent already exists; it must not overlap the repository, the private .sow/ directory, or a filesystem target |
| Flag | Meaning | Default |
|---|---|---|
--hardlink |
Hard-link packages instead of copying them; same filesystem, read-only use only | copy |
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Select a repository | selection rules |
--passfile PATH |
Signing password file for the exported repomd.xml of a signed view (Password files) |
— |
--json |
Output JSON | false |
Output
The destination is a complete RPM repository that does not depend on the workspace:
/srv/export/el9-x86_64/
- .sow-export.jsonprovenance: Repository, Generation, Dist, architecture, signer
- manifest.tsvexport manifest
- pool/the packages this view lists, e.g. pool/c/<name>/<file>.rpm
repodata/metadata with local pool/... package paths
- <sha256>-primary.xml.gz
- <sha256>-filelists.xml.gz
- <sha256>-other.xml.gz
- repomd.xml
- repomd.xml.ascsigned views only
Because the export is independent, it does not protect the source packages from
sow gc.
Source requirements
The source repository must have a completed Generation, no unfinished operation, and no
membership changes waiting for a build (for example after add --skip); otherwise the export
exits 5. Edits to sow.yml that only await a build do not block it: sow status reports
dirty, and the export uses the last build. The requested view must be part of that Generation.
A Dist that later builds did not touch can still be exported without rebuilding it, because its unchanged view is carried into the current Generation. The export records the current Generation number, signs a signed view with that Generation’s recorded signing identity, and uses the Dist’s recorded build publication time for the metadata signature.
Copy versus hard link
Copying is the default and keeps the export fully separate. --hardlink saves the space and time
of the copy when the destination is on the same filesystem, but a hard-linked file is the pool file:
editing it changes the package in SOW’s pool. Use it only for read-only output.
Details
- If an export fails, fix the reported cause and retry into a new or empty directory; the failed destination may hold partial files.
- An unrelated filesystem target can be unmounted while you export; a destination that overlaps a configured target is still rejected.
- A destination path that goes through a symlinked parent directory is resolved to the real
directory; only
DIRitself must not be a symlink. - The exported
repomd.xmlalways uses data timestamp0, and there is no--metadata-timestampoption. If EL7 clients cached a positive timestamp under the same repository ID, this output cannot directly replace that repository, and changing the base URL alone does not help: see Existing EL7 caches.
Exit behavior
| Code | Trigger |
|---|---|
0 |
Standalone RPM repository exported |
1 |
Filesystem, copy, hard-link, or metadata-write failure |
2 |
Invalid syntax, malformed Dist or architecture, discovery error, or implicit repository ambiguity |
5 |
Source repository has unbuilt membership changes or an unfinished operation, or its Generation or state is inconsistent |
6 |
Explicit repository is not configured, Dist is not RPM, view or signer is unavailable, or DIR is unsafe, non-empty, overlapping, or missing its parent |
See also
- Platforms & Integrations — client and tool compatibility
- Repository Layout — source tree and export boundaries
sow publish— deliver the whole repository to configured targets