Skip to main content

fedrq is a tool to query the Fedora and EPEL repositories

Project description

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

fedrq on sr.ht

fedrq on git.sr.ht

fedrq on lists.sr.ht

fedrq on todo.sr.ht

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 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

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 is in beta and its versioning scheme follows semver.

See NEWS.md.

Python API

The fedrq.config module and the fedrq.backend package are public API. Everything under fedrq.cli is internal. fedrq is a primarily a CLI tool and its API abstracts the specific dnf/libdnf5 functionality that it 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 our new docsite for rendered manpages, changelogs, and Python API documentation.

Contributing

Development, issue reporting, and project discussion happen on the mailing list (~gotmax23/fedrq@lists.sr.ht).

See CONTRIBUTING.md.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fedrq-0.14.0.tar.gz (112.2 kB view details)

Uploaded Source

Built Distribution

fedrq-0.14.0-py3-none-any.whl (80.8 kB view details)

Uploaded Python 3

File details

Details for the file fedrq-0.14.0.tar.gz.

File metadata

  • Download URL: fedrq-0.14.0.tar.gz
  • Upload date:
  • Size: 112.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for fedrq-0.14.0.tar.gz
Algorithm Hash digest
SHA256 ab05cddd22831c0642756f938d0fbde0da7ef116e0c89c378ce6838ab6453ca6
MD5 bb14eea513c0f0c6000baea6c68f9091
BLAKE2b-256 5376591bdfe228c2d6830b15880c1ac75567a59c7754de8af4c935a38d2c80c6

See more details on using hashes here.

File details

Details for the file fedrq-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: fedrq-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 80.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for fedrq-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dde5d3fbf42cf1b55ea43209ca9529d4021be135d12be2e02c9e1046526727e
MD5 27e23122e40bf61c008134ccfc698fa2
BLAKE2b-256 cf20b8530855296f5ac09a91eb585b556e90ae8d5e1d778799a2dcc6e0e168f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page