fedrq - Man Page
Simplified repository querying
Synopsis
[fedrq | python -m fedrq] [query type] [options...] [package...]
[fedrq | python -m fedrq] [query type] [options...] [-i | --stdin ]
[fedrq | python -m fedrq] check-config [--dump] [--debug]
Description
fedrq is a tool to simplify querying the Fedora and EPEL repositories.
Subcommands
check-config | Verify fedrq configuration. Only has --debug and --dump to dump the config. --dump requires tomli-w. | |||
pkgs | Find the packages that match a list of package specs. Allows --whatprovides like functionality with --resolve-packages. | |||
subpkgs | Find the subpackages provided by a list of SRPMs. Doesn't have --src, because subpkgs aren't SRPMs. | |||
whatenhances | Find the packages that Enhance [package...] | |||
whatrecommends | Find the packages that Recommend [package...] | |||
whatrequires | Find the packages that Require [package...] | |||
wr | Alias for whatrequires | |||
whatrequires-src | Find the packages Require the subpackages of [package...]. [package...] must be source package(s). | |||
wrsrc | Alias for whatrequires-src | |||
whatsuggests | Find the packages that Suggest [package...] | |||
whatsupplements | Find the packages that Supplement [package...] |
Options
Global Options
- -h, --help
Show help message and quit. Can be used after a command to get more information it.
whatrequires, whatrecommends, whatsuggests
- -X, --exclude-subpackages
Filter out reverse dependencies that are built from the same source package as any of the input packages. See the whatrequires Examples.
subpkgs
-M, --match <pattern> (can be repeated to match against multiple patterns)
Only show subpackages whose name matches this string. Glob patterns are permitted. When specified multiple times, any match is included.
Formatters
Package attributes (nonexhaustive; see dnf repoquery --querytags):
Custom formatters:
- -F na: Show package name.arch
(example line: yt-dlp.noarch) - -F nv: Show package name-version
(example line: yt-dlp-2022.11.11) - -F nev: Show package name-epoch:version
(example line: bind-32:9.18.8) - -F source: Package queries can include source and binary RPMs. The source formatter combines and deduplicates all of the source names. For example, if python3-setuptools.noarch is in the result, it'll become python-setuptools. If python-setuptools.src is also in the result, it'll become python-setuptools, but python-setuptools won't be duplicated in the output.
- -F breakdown: Only supported by fedrq --whatrequires. Shows a breakdown of runtime and buildtime dependencies.
- -F json:[comma seperated list of Package attrs]: Return an array of objects containing the specified Package attributes. The JSON output is formatted with indent=2. The output can be piped to jq.
- -F line:[comma seperated list of Package attrs]: Return the specified package attributes on a single line.
- -F plainwithrepo: Show default format and repoid separated by space:
(example line: yt-dlp-2023.01.06-2.fc38.noarch rawhide) - -F nevrr: alias to plainwithrepo formatter.
Repo Classes
The following generic repo class macros are available for all releases:
- @file:[url or local path]
Load a .repo file from a local path or a url. Repositories with enabled=0 won't be loaded unless they are enabled explicitly with --enablerepo.
- @baseurl:[url]
Load a repository from url. gpgcheck will be disabled.
- @baseurl:[url],[gpgkey]
Load a repository from url and set its gpgkey to gpgkey
- @copr:[user/name] or @copr:[@group/name]
Load a Copr repository. The Copr instance defaults to https://copr.fedoraproject.org but may be configured in fedrq's configuration. copr_chroot_fmt must be specifced in the selected branch's release configuration for this repo class to work. This is configured for the builtin releases.
- @copr:[user/name@copr_baseurl] or @copr:[@group/name@copr_baseurl]
The @copr repo class also accepts a custom Copr instance. Append @ and a url.
@base or base or other group
The default repoistories for a release specified in a ReleaseConfig's defs.base. Any other repo group specified in a release's is accepted, with or without the @. See Special Repos for which repo groups are available for each release.
@repo:[key] or key (fallback)
Accepts any repoid available in the system configuration or a .repo file specific in the current ReleaseConfig's defpaths. If key is the name of a release's repo group (see above), that will be enabled instead.
Builtin Releases
Name | Matcher (--branch) | Release repo groups (--repo) | Special cases | |||
Fedora Rawhide | rawhide | @base, @buildroot | ||||
Fedora stable and branched | fXX | @base, @testing, @release, @updates, @testing-only | @release only contains fedora and fedora-source (i.e. no updates) | |||
EPEL | epelX | @base, @testing, @testing-only | does not include any EL distribution | |||
EPEL Next | epelX-next | @base, @testing, @testing-only, @next-base, @next-testing, @next-testing-only | @base, @testing, and @testing-only are supersets of the epelX equivalent. @next-base, @next-testing, and @next-testing-only only contain epel-next. | |||
CentOS Stream | cXs | @base, @epel, @no-crb, @compose-latest | @epel contains epel, epel-next, and crb. @no-crb contains base minus the crb repo. | |||
CentOS Stream 8 (legacy) | c8s | @base, @epel, @no-powertools, @compose-latest | @epel contains epel, epel-next, baseos, appstream, and powertools. @no-powertools contains @base minus the powertools repo. | |||
Almalinux | alX | @base, @epel, @no-crb | @base always includes crb. @epel contains @base along with the EPEL repository. @no-crb contains @base minus the crb repository. | |||
Almalinux 8 (Legacy) | al8 | @base, @epel, @no-powertools | @base always includes powertools. @epel contains @base along with the EPEL repository. @no-powertools contains @base minus the powertools repository. | |||
Amazon Linux | amazon2023 | @base |
Special Repos
- @base
Release repositories enabled by default in the distribution
(e.g. fedora, fedora-source, updates, updates-source for Fedora stable)- @testing
Superset of base with -testing repos enabled.
(e.g. fedora, fedora-source, updates, updates-source, updates-testing-source for Fedora stable)- @testing-only
Includes -testing repositories without base
(e.g. updates-testing, updates-testing-source for Fedora stable)- @buildroot (rawhide only)
Koji buildroot repositories Buildroot repositories are available for stable Fedora releases, but they don't have corresponding source repos. This causes problems for fedrq, so those definitions are not available.
Files
Configuration
PYTHON_SITELIB/fedrq/data/*.toml Builtin configuration files. These should not be modified directly but may be overridden or used as examples.
/etc/fedrq/*.toml System wide configuration files. Has precedence over builtin configuration files.
~/.config/fedrq/*.toml User configuration files. Highest precedence
See fedrq(5) for configuration file syntax.
Examples
pkgs
Find a package's runtime dependencies:
$ fedrq pkgs -S -F requires ansible /usr/bin/python3 /usr/bin/bash python(abi) = 3.11 (python3.11dist(ansible-core) >= 2.14.1 with python3.11dist(ansible-core) < 2.15)
Resolve a package's runtime dependencies:
$ fedrq pkgs -S -F requires ansible | fedrq pkgs -iSP ansible-core-2.14.1-1.fc38.noarch bash-5.2.9-3.fc38.x86_64 python3-3.11.1-1.fc38.x86_64
Find the package(s) that contain(s) a file on f35
$ fedrq pkgs -b f35 -P /usr/bin/ansible ansible-2.9.27-4.fc35.noarch ansible-core-2.12.10-1.fc35.noarch
Return a JSON object containing certain package attributes:
$ fedrq pkgs scdoc -F json:name,evr,arch,files,requires [ { "name": "scdoc", "evr": "1.11.2-3.fc37", "arch": "x86_64", "requires": [ "rtld(GNU_HASH)", "libc.so.6(GLIBC_2.34)(64bit)", "/usr/bin/pkg-config" ], "files": [ "/usr/bin/scdoc", "/usr/lib/.build-id", "/usr/lib/.build-id/c1", "/usr/lib/.build-id/c1/62fcbc2f7d9b41ce409071b05905bdbfa6ffe7", "/usr/share/doc/scdoc", "/usr/share/doc/scdoc/README.md", "/usr/share/licenses/scdoc", "/usr/share/licenses/scdoc/COPYING", "/usr/share/man/man1/scdoc.1.gz", "/usr/share/man/man5/scdoc.5.gz", "/usr/share/pkgconfig/scdoc.pc" ] }, { "name": "scdoc", "evr": "1.11.2-3.fc37", "arch": "src", "requires": [ "make", "gcc", "sed" ], "files": [ "/scdoc-1.11.2.tar.gz", "/scdoc.spec" ] } ]
Show packages' name, evr, arch, and reponame with each package on a single line:
$ fedrq pkgs ansible ansible-core -F line:name,evr,arch,reponame ansible : 7.2.0-1.fc38 : noarch : rawhide ansible : 7.2.0-1.fc38 : src : rawhide-source ansible-core : 2.14.2-1.fc38 : noarch : rawhide ansible-core : 2.14.2-1.fc38 : src : rawhide-source
Incorrect usage of the line filter:
$ fedrq pkgs ansible ansible-core -F line:name,evr,files ERROR: 'line' FormatterError: invalid argument 'files' See fedrq(1) for more information about formatters.
(files cannot fit on a single line)
Find the latest version of `fedrq` available in the gotmax23/fedrq-dev copr:
$ fedrq pkgs -F nevrr -b f36 -r @copr:gotmax23/fedrq-dev fedrq fedrq-0.4.1^25.20230318.76d7910-1.fc36.noarch copr:copr.fedorainfracloud.org:gotmax23:fedrq-dev fedrq-0.4.1^25.20230318.76d7910-1.fc36.src copr:copr.fedorainfracloud.org:gotmax23:fedrq-dev
whatrequires
Find the packages that require another package, at buildtime or runtime:
$ fedrq whatrequires yt-dlp audiotube-22.11-1.fc38.src audiotube-22.11-1.fc38.x86_64 celluloid-0.24-4.fc38.x86_64 gpodder-3.11.0-1.fc37.noarch media-downloader-2.7.0-2.fc38.x86_64 persepolis-3.2.0-11.fc37.noarch video-downloader-0.10.12-1.fc38.noarch yt-dlp-bash-completion-2022.11.11-1.fc38.noarch yt-dlp-fish-completion-2022.11.11-1.fc38.noarch yt-dlp-zsh-completion-2022.11.11-1.fc38.noarch
Find a package's reverse dependencies, excluding subpackages:
$ fedrq whatrequires -X yt-dlp audiotube-22.11-1.fc38.src audiotube-22.11-1.fc38.x86_64 celluloid-0.24-4.fc38.x86_64 gpodder-3.11.0-1.fc37.noarch media-downloader-2.7.0-2.fc38.x86_64 persepolis-3.2.0-11.fc37.noarch video-downloader-0.10.12-1.fc38.noarch
subpkgs
Find an epel9 SRPM's subpackages
$ fedrq subpkgs -b epel9 -F na epel-release epel-next-release.noarch epel-release.noarch
whatrequires-src / wrsrc (alias)
Find the components that would be directly affected by the removal of pcre:
$ fedrq whatrequires-src -X -F source pcre ClanLib Thunar adanaxisgpl aide [...] xgrep xmlcopyeditor yara zsh
Find the packages the need to be rebuilt when libindi's .so name is bumped:
$ fedrq whatrequires-src -X -F source libindi indi-3rdparty-drivers indi-3rdparty-libraries kstars phd2 stellarium
Author
fedrq is maintained by Maxwell G <maxwell@gtmx.me>. See https://fedrq.gtmx.me/ for more information about fedrq.
See Also
fedrq(5), dnf(1)