Skip to content

Add avocado feed index to write repodata for a directory of RPMs - #396

Merged
jetm merged 5 commits into
mainfrom
feed-ergo/feed-index
Nov 15, 2026
Merged

jetm merged 5 commits into
mainfrom
feed-ergo/feed-index

Conversation

@jetm

@jetm jetm commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

A path: feed needs repodata/ next to its RPMs, and the CLI had no way to make one. Running createrepo_c by hand stamps wall-clock times into repomd.xml, so re-indexing an unchanged directory still changes the file.

avocado feed index <dir> runs the host createrepo_c and pins every timestamp to the newest RPM mtime, so an unchanged directory indexes byte-identically. It keeps createrepo_c's warnings and fails on an unreadable RPM. A missing tool or a bad directory fails before anything is spawned. docs/feed-index.md explains how to enable the result through repos: and distro.feeds.

The last commit is a lockfile-only bump of quinn-udp to 0.5.16 (RUSTSEC-2026-0538), because the repo's pre-push audit hook refuses any push while main pins 0.5.14. It becomes a no-op on rebase once main carries the bump.

Tested with cargo test, clippy and fmt on Linux. The one failure on my host is overlay_copy_sets_attributes_only_on_paths_it_creates (GNU tar 1.35), which this PR does not touch.

jetm added 3 commits November 13, 2026 17:26
A `path:` feed in `repos:` needs a `repodata/` directory next to its
RPMs, and the CLI had no way to produce one. Users had to know to run
createrepo_c by hand with the right flags, and a plain run stamps
wall-clock times into repomd.xml, so re-indexing an unchanged directory
produced a different file each time and anything keyed on its hash saw
a change that was not there.

`avocado feed index <dir>` runs the host createrepo_c rather than
reimplementing repodata generation, which keeps the metadata format
owned by the tool dnf is tested against. It pins every timestamp to the
newest RPM mtime so an unchanged directory indexes byte-identically,
keeps createrepo_c's warnings so an unreadable RPM is named, and passes
--error-exit-val so older createrepo_c versions fail on such an RPM
too. The directory is checked before the tool is looked up, so a typo
fails without spawning anything, and a missing tool produces an error
that names the package to install. The directory goes through as one
argv element, with a ./ prefix when it starts with `-`, because
createrepo_c would otherwise read it as an option and `--` does not
stop that.

Signed-off-by: Javier Tia <javier@peridio.com>
Indexing a directory is only half of getting local RPMs into a build.
A `repos:` entry with `path:` is a definition and dnf ignores it unless
`distro.feeds` enables it, and a user who stops after `feed index` gets
a feed that is silently never read. The command's reproducible
timestamps also need explaining, because a reader would otherwise
assume a re-index always changes repomd.xml.

The page covers the command, why an unchanged directory indexes
identically, the two errors it can raise, and the config that turns the
directory into an enabled feed, including feed order and version
pinning, since priority alone does not stop dnf picking a newer version
from another feed. The CHANGELOG entry points at it.

Signed-off-by: Javier Tia <javier@peridio.com>
cargo audit reports a spin loop in quinn-udp 0.5.14 after a truncated
datagram, and the pre-push hook refuses every push of a branch built on
main while the lockfile still pins it.

A lockfile-only bump to 0.5.16, the patched release inside the same
semver range. It becomes a no-op on rebase once main carries the same
bump.

Signed-off-by: Javier Tia <javier@peridio.com>
Comment thread docs/feed-index.md Resolved
lee-reinhardt
lee-reinhardt previously approved these changes Nov 14, 2026
The page said dnf picks the highest version across enabled feeds. dnf
repository priority is applied first: a package in the higher-priority
feed is chosen from it even when another feed has a newer version.

State that priority takes precedence over version, and present the
version pin as the separate way to fix a package version.

Signed-off-by: Javier Tia <javier@peridio.com>
Both this branch and main added an entry at the top of the Unreleased
"Added" list, so the two hunks collided. Both entries describe
independent features, so the merge keeps both.

Signed-off-by: Javier Tia <javier@peridio.com>
@jetm
jetm merged commit 8df7353 into main Nov 15, 2026
11 checks passed
@jetm
jetm deleted the feed-ergo/feed-index branch November 15, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants