A tool for querying the Fedora and EPEL repositories
fedrq makes it easy to query any branch of Fedora or EPEL. It uses the dnf
Python bindings and does not shell out to
dnf repoquery. It allows querying
for reverse dependencies, packages that contain a certain Provide or file,
subpackages of an SRPM, and package metadata.
The tool doesn’t seek to replace every feature of
dnf repoquery. It provides a
more user friendly interface than
dnf repoquery for certain common tasks.
fedrq is also published to PyPI so you can
pip install fedrq.
When installing the package with pip, some additional system packages are needed.
The following additional system package is required for the dnf backend:
- python3-dnf (dnf is currently the default Fedora package manager, so this should already be installed)
The following additional system packages are required for the libdnf5 backend:
The following additional system packages are always required:
fedrq defaults to the dnf backend, but fedrq falls back to the libdnf5 backend
if the former’s dependencies aren’t installed.
Users can explicitly choose a backend with the
--backend CLI option
or globally in the fedrq config file.
Note that fedrq can only be installed for the system python interpreter.
fedrq cannot be installed in a venv unless it has
as it needs to find the aforementioned system bindings.
fedrq check-config --dump requires
The RPM package weakly depends on
fedrq now provides container images.
quay.io/gotmax23/fedrq:latestis built with
quay.io/gotmax23/fedrq:ubi9is built with the ubi9 image. It includes a builtin
rhel9repository configuration that can be used to query the actual RHEL repositories when run on a system registered with subscription-manager.
Both of these images use the latest fedrq RPM packages from the gotmax23/fedrq Copr repository.
This project is in beta and its versioning scheme follows semver.
fedrq.config module and the
fedrq.backend package are public API.
fedrq.cli is internal. fedrq is primarily a CLI tool and
its API only abstracts the specific dnf/libdnf5 functionality that the CLI uses. The
API’s main purpose is “repoquerying”, but you can use the fedrq functionality
you’d like and then access the underlying dnf Base object to preform other
tasks if needed.
See fedrq’s documentation site for rendered manpages, changelogs, and Python API documentation.
Thank you to the dnf maintainers. This tool is inspired by
dnf repoquery and
uses the dnf python bindings.
This project follows the REUSE specification. In general:
- Code is licensed under GPL-2.0-or-later. This is the same license as dnf.
- Configuration and repo files in fedrq/data/ are
- fedrq.spec is licensed under MIT to match Fedora
- The embedded repo defs in src/fedrq/data/repos from fedora-repos.rpm are MIT licensed. These are only used when the needed repo defs are not available in the system config (i.e., for querying the Fedora repos from a non Fedora system).
enum.StrEnumis copied from Cpython 3.11 for older Python versions. It’s ~30 lines of PSF-2.0 licensed code.