Powerful tool for querying RPM repositories geared toward Fedora packagers https://fedrq.gtmx.me
  • Python 99.4%
  • Shell 0.3%
  • Dockerfile 0.2%
Find a file
Maxwell G 37864d0fb1
All checks were successful
builds.sr.ht/main Job completed
builds.sr.ht/epel9 Job completed
builds.sr.ht/mockbuild Job completed
builds.sr.ht/test Job completed
packaging: allow building with flit_core v4
2026-08-19 20:22:03 -05:00
.basedpyright lint: update basedpyright 2025-04-03 20:22:19 -05:00
.builds Prepare migration to Fedora Forge 2026-05-31 16:23:53 -05:00
.copr ci copr: install python3-rpm for fclogr 2025-02-16 01:56:39 -06:00
.data/share/licenses/fedrq Release 0.4.0 2023-02-21 13:05:39 -06:00
contrib contrib: update ftbfs_retirements example 2026-07-08 23:51:40 -05:00
doc Add --refresh CLI flag 2026-06-25 17:49:41 -05:00
LICENSES Abstract dnf and libdnf5 code into backends 2023-02-12 12:22:30 -06:00
requirements ci: update pinned deps 2026-08-16 18:20:25 -05:00
src/fedrq Post release version bump 2026-08-14 22:10:59 -05:00
tests tests: temporarily disable test for BaseMaker.load_changelogs(False) 2026-08-19 20:20:12 -05:00
typings lint: add initial basedpyright config 2024-09-22 14:37:13 -05:00
.dockerignore add development Containerfile 2023-07-26 01:35:01 +00:00
.gitignore dev gitignore: add .nox 2024-11-25 13:41:03 -06:00
Containerfile License Containerfiles under GPL-2.0-or-later 2024-02-27 22:45:36 +00:00
Containerfile.rhel License Containerfiles under GPL-2.0-or-later 2024-02-27 22:45:36 +00:00
Containerfile.rhel8 add experimental UBI 8--based Containerfile 2024-02-27 22:49:30 +00:00
CONTRIBUTING.md doc: additional post–Forge migration fixes 2026-06-06 01:29:35 -05:00
dam.yml ci: update dam mirror workflow 2026-06-06 01:18:15 -05:00
fedrq.rpmlintrc lint: ignore incorrect-fsf-address rpmlint for now 2025-02-16 01:47:00 -06:00
fedrq.spec Release 1.8.0 2026-08-14 22:09:09 -05:00
mkdocs.yml doc: additional post–Forge migration fixes 2026-06-06 01:29:35 -05:00
NEWS.md Release 1.8.0 2026-08-14 22:09:09 -05:00
NEWS.md.license add NEWS.md with concatenated git tag descs 2023-03-18 16:16:09 -05:00
noxfile.py Default to libdnf5 backend when available 2026-08-14 14:36:40 -05:00
pyproject.toml packaging: allow building with flit_core v4 2026-08-19 20:22:03 -05:00
README.md Enforce minimum libdnf5 version in specfile; docs 2026-07-12 19:11:18 -05:00
REUSE.toml lint: remove invalid copyright header from REUSE.toml 2025-03-31 15:22:58 -05:00
ruff.toml lint: ignore PLR0917 (too many posargs) in tests 2026-08-17 00:17:47 +00:00

fedrq

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.

builds.sr.ht status

copr build status (stable)

copr build status (dev)

docsite

Installation

fedrq has a Copr repository at gotmax23/fedrq that contains released versions. Development snapshots are available at gotmax23/fedrq-dev. The RPM specfile is located in the repository root.

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:

  • python3-libdnf5 (>= 5.2.0)

The following additional system packages are always required:

  • python3-rpm

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 --system-site-packages, as it needs to find the aforementioned system bindings.

fedrq check-config --dump requires tomli-w. The RPM package weakly depends on python3-tomli-w.

Container images

fedrq now provides container images.

  • quay.io/gotmax23/fedrq:latest is built with registry.fedoraproject.org/fedora:latest.
  • quay.io/gotmax23/fedrq:ubi9 is built with the ubi9 image. It includes a builtin rhel9 repository 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.

$ podman run --rm -v ~/.cache/fedrq:/fedrq-cache/fedrq:z quay.io/gotmax23/fedrq \
    pkgs fedrq -Fnevrr
fedrq-0.9.0-1.fc39.noarch rawhide
fedrq-0.9.0-1.fc39.src rawhide-source

Versioning

This project's versioning scheme follows semver.

See NEWS.

Python API

The fedrq.config module and the fedrq.backend package are public API. Everything under 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 the API Summary on the docsite for more information. See api-examples for some example code. As always, direct any feedback, questions, or issues to the mailing list (see Contributing).

Documentation

See fedrq's documentation site for rendered manpages, changelogs, and Python API documentation.

Contributing

See CONTRIBUTING.md.

Author

Maxwell G (@gotmax23)

Credits

Thank you to the dnf maintainers. This tool is inspired by dnf repoquery and uses the dnf python bindings.

License

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 UNLICENSEed
  • 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.StrEnum is copied from Cpython 3.11 for older Python versions. It's ~30 lines of PSF-2.0 licensed code.
SPDX-License-Identifier: GPL-2.0-or-later AND Unlicense AND MIT AND PSF-2.0