1FEDRQ(1)                    General Commands Manual                   FEDRQ(1)
2
3
4

NAME

6       fedrq - Simplified repository querying
7

SYNOPSIS

9       [fedrq | python -m fedrq] [query type] [options...] [package...]
10
11       [fedrq | python -m fedrq] [query type] [options...] [-i | --stdin ]
12
13       [fedrq | python -m fedrq] check-config [--dump] [--debug]
14

DESCRIPTION

16       fedrq is a tool to simplify querying the Fedora and EPEL repositories.
17

SUBCOMMANDS

19       ┌─────────────────┬────────────────────────────┐
20       │check-config     │ Verify fedrq configura‐    │
21       │                 │ tion. Only has --debug and │
22       │                 │ --dump to dump the config. │
23       │                 │ --dump requires tomli-w.   │
24       ├─────────────────┼────────────────────────────┤
25       │pkgs             │ Find the packages that     │
26       │                 │ match a list of package    │
27       │                 │ specs. Allows --whatpro‐   
28       │                 │ vides like functionality   │
29       │                 │ with --resolve-packages.   │
30       ├─────────────────┼────────────────────────────┤
31       │subpkgs          │ Find the subpackages pro‐  │
32       │                 │ vided by a list of SRPMs.  │
33       │                 │ Doesn't have --src, be‐    │
34       │                 │ cause subpkgs aren't       │
35       │                 │ SRPMs.                     │
36       ├─────────────────┼────────────────────────────┤
37       │whatenhances     │ Find the packages that En‐ │
38       │                 │ hance [package...]         
39       ├─────────────────┼────────────────────────────┤
40       │whatrecommends   │ Find the packages that     │
41       │                 │ Recommend [package...]     
42       ├─────────────────┼────────────────────────────┤
43       │whatrequires     │ Find the packages that Re‐ │
44       │                 │ quire [package...]         
45       ├─────────────────┼────────────────────────────┤
46       │wr               │ Alias for whatrequires
47       ├─────────────────┼────────────────────────────┤
48       │whatrequires-src │ Find the packages Require  │
49       │                 │ the subpackages of [pack‐  
50       │                 │ age...]. [package...] must │
51       │                 │ be source package(s).      │
52       ├─────────────────┼────────────────────────────┤
53       │wrsrc            │ Alias for whatrequires-src
54       ├─────────────────┼────────────────────────────┤
55       │whatsuggests     │ Find the packages that     │
56       │                 │ Suggest [package...]       
57       ├─────────────────┼────────────────────────────┤
58       │whatsupplements  │ Find the packages that     │
59       │                 │ Supplement [package...]    
60       └─────────────────┴────────────────────────────┘
61

OPTIONS

63   GLOBAL OPTIONS
64       -h, --help
65           Show help message and quit. Can be used after a command to get more
66           information it.
67
68   SHARED OPTIONS
69       These options have the same meaning across multiple subcommands.
70
71       -i, --stdin
72           Read package names from stdin. Cannot be used when passing pos‐
73           tional [packages...].
74       -b, --branch <branch name> (default: rawhide)
75           Distribution release. This matches distgit branch names by conven‐
76           tion. See BUILTIN RELEASES for the releases available out of the
77           box. Extra configurations may be specified by the user. The chosen
78           release impacts what the releasever will be set to and which repos‐
79           itories will be enabled by default.
80       -r, --repo <repo class> (default: @base)
81           Enable <repo class> and disable all others for this operation.
82           <repo class> can be a standard repoid that's configured in
83           /etc/yum.repos.d in a ReleaseConfig's defpaths (see fedrq(5)). In
84           addition, release specifc repo groups and generic release class
85           macros (e.g. @copr) are accepted. When --repo isn't specified, the
86           repositories in a Release's @base repo group are selected. See REPO
87           CLASSES for more information.
88       -e, --enablerepo <repo class>
89           Enable certain repositories for this operation. All repositories in
90           the system configuration and any fedrq repo classes are accepted.
91           Can be specified multiple times. Accepts comma separated values.
92           See REPO CLASSES.
93       -l, --latest <integer|"all"> (default: 1)
94           How many package versions to show for a given name.arch. By de‐
95           fault, only the latest is included.
96
97           NOTE: dnf repoquery includes all by default.
98       -F, --formatter <str> (default: plain)
99           How the output should be formatted. This is similar to dnf repo‐
100           query --qf but more limited. All Package attributes from dnf repo‐
101           query --querytags are supported. Some custom formatters are also
102           available. See FORMATTERS for a list.
103       --debug
104           Enable debug logging. Useful for development or bug reporting.
105       -P, --resolve-packages
106           Resolve the correct Package when given a virtual Provide or file
107           path. For instance, /usr/bin/yt-dlp would resolve to yt-dlp.
108       -A, --arch <str>
109           Only include packages that match this arch. This does not apply
110           --forcearch.
111
112           NOTE: Unlike other tools, the -source repositories are always en‐
113           abled. You need to filter out src packages if you don't want them
114           in the output.
115       -s, --src
116           Equivalent to --arch=src.
117
118           NOTE: The semantics of this option are different than dnf repo‐
119           query's version. Our --arch does not affect the way the input is
120           handled. In dnf repoquery, --arch=src effectively disables querying
121           for source packages that depend on a virtual Provide of the input
122           packages, because arch filtering is applied when resolving the in‐
123           put packages' virtual Provides and files.
124       -S, --notsrc
125           Equivalent to --arch=notsrc. This is a pseudo arch that does not
126           exist in rpm. It includes noarch and the system architecture. It
127           does NOT include multilib.
128       --forcearch <str>
129           Query a foreign architecture's repositories
130       -B, --backend <dnf|libdnf5>
131           Which package manager backend to use. By default, fedrq uses dnf
132           and falls back to libdnf5. Set -B / --backend to make an explicit
133           choice. If you explicitly choose a backend whose dependencies are
134           not met on your system, fedrq will not fallback to another one.
135       -L, --filelists <always|auto|never> (default: auto)
136           Whether to load filelists. By default, filelists are only loaded
137           when using the files formatter (i.e. -F files or -F json:files).
138           This only applies when using the libdnf5 backend, which doesn't
139           load filelists by default to save memory and bandwidth. dnf4 always
140           loads filelists.
141
142   whatrequires, whatrecommends, whatsuggests
143       -X, --exclude-subpackages
144           Filter out reverse dependencies that are built from the same source
145           package as any of the input packages. See the whatrequires EXAM‐
146           PLES.
147
148   subpkgs
149       -M, --match <pattern> (can be repeated to match against multiple pat‐
150       terns)
151           Only show subpackages whose name matches this string. Glob patterns
152           are permitted. When specified multiple times, any match is in‐
153           cluded.
154

FORMATTERS

156       Package attributes (nonexhaustive; see dnf repoquery --querytags):
157-F name: Show package names
158           (example line: yt-dlp)
159-F arch: Show package arches only
160           (example line : noarch)
161-F repoid: Show package's repo.
162           (example line: updates-testing)
163
164
165       Custom formatters:
166-F na: Show package name.arch
167           (example line: yt-dlp.noarch)
168-F nv: Show package name-version
169           (example line: yt-dlp-2022.11.11)
170-F nev: Show package name-epoch:version
171           (example line: bind-32:9.18.8)
172-F source: Package queries can include source and binary RPMs. The
173           source formatter combines and deduplicates all of the source names.
174           For example, if python3-setuptools.noarch is in the result, it'll
175           become python-setuptools. If python-setuptools.src is also in the
176           result, it'll become python-setuptools, but python-setuptools won't
177           be duplicated in the output.
178-F breakdown: Only supported by fedrq --whatrequires. Shows a
179           breakdown of runtime and buildtime dependencies.
180-F json:[comma seperated list of Package attrs]: Return an array of
181           objects containing the specified Package attributes. The JSON out‐
182           put is formatted with indent=2. The output can be piped to jq.
183-F line:[comma seperated list of Package attrs]: Return the speci‐
184           fied package attributes on a single line.
185-F plainwithrepo: Show default format and repoid separated by
186           space:
187             (example line: yt-dlp-2023.01.06-2.fc38.noarch rawhide)
188-F nevrr: alias to plainwithrepo formatter.
189
190

REPO CLASSES

192       The following generic repo class macros are available for all releases:
193
194       @file:[url or local path]
195           Load a .repo file from a local path or a url. Repositories with en‐
196           abled=0 won't be loaded unless they are enabled explicitly with
197           --enablerepo.
198       @baseurl:[url]
199           Load a repository from url. gpgcheck will be disabled.
200       @baseurl:[url],[gpgkey]
201           Load a repository from url and set its gpgkey to gpgkey
202       @copr:[user/name] or @copr:[@group/name]
203           Load a Copr repository. The Copr instance defaults to
204           https://copr.fedoraproject.org but may be configured in fedrq's
205           configuration. copr_chroot_fmt must be specifced in the selected
206           branch's release configuration for this repo class to work. This is
207           configured for the builtin releases.
208       @copr:[user/name@copr_baseurl] or @copr:[@group/name@copr_baseurl]
209           The @copr repo class also accepts a custom Copr instance. Append @
210           and a url.
211       @source-repos
212           Enable the corresponding -source repos of the currently enabled
213           repositories
214       @base or base or other group
215           The default repoistories for a release specified in a ReleaseCon‐
216           fig's defs.base. Any other repo group specified in a release's is
217           accepted, with or without the @. See SPECIAL REPOS for which repo
218           groups are available for each release.
219       @repo:[key] or key (fallback)
220           Accepts any repoid available in the system configuration or a .repo
221           file specific in the current ReleaseConfig's defpaths. If key is
222           the name of a release's repo group (see above), that will be en‐
223           abled instead.
224
225       The following generic repo class macros are available for Fedora re‐
226       leases:
227
228       @koji:[key]
229           Load the repositories for a koji.fedoraproject.org tag.
230                Example: @koji:f39-build-side-XXXX
231       @koji-src:[key]
232           Load the source repositories for a koji.fedoraproject.org tag. It
233           does not seem that Fedora Koji provides source repositories for
234           tags other than rawhide and eln-build. For rawhide, see the precon‐
235           figured @buildroot repository group.
236

BUILTIN RELEASES

238       ┌─────────────────┬───────────────┬──────────────────┬──────────────────┐
239       │      Name       │  Matcher      │ Release repo     │  Special cases   │
240       │                 │  (--branch)   │ groups (--repo)  │                  │
241       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
242       │Fedora Rawhide   │ rawhide       │ @base, @build‐   │                  │
243       │                 │               │ root             │                  │
244       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
245       │Fedora stable    │ fXX           │ @base, @testing, │ @release only    │
246       │and branched     │               │ @release, @up‐   │ contains fedora  │
247       │                 │               │ dates, @testing- │ and fedora-      │
248       │                 │               │ only             │ source (i.e. no  │
249       │                 │               │                  │ updates)         │
250       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
251       │EPEL             │ epelX         │ @base, @testing, │ does not include │
252       │                 │               │ @testing-only    │ any EL distribu‐ │
253       │                 │               │                  │ tion             │
254       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
255       │EPEL Next        │ epelX-next    │ @base, @testing, │ @base, @testing, │
256       │                 │               │ @testing-only,   │ and @testing-    
257       │                 │               │ @next-base,      │ only are super‐  │
258       │                 │               │ @next-testing,   │ sets of the      │
259       │                 │               │ @next-testing-   epelX equiva‐    │
260       │                 │               │ only             │ lent. @next-     
261       │                 │               │                  │ base, @next-     
262       │                 │               │                  │ testing, and     │
263       │                 │               │                  │ @next-testing-   
264       │                 │               │                  │ only only con‐   │
265       │                 │               │                  │ tain epel-next.  │
266       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
267       │CentOS 7         │ c7            │ @base            │                  │
268       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
269       │CentOS Stream    │ cXs           │ @base, @epel,    │ @epel contains   │
270       │                 │               │ @no-crb, @com‐   │ epel, epel-next, │
271       │                 │               │ pose-latest      │ and crb. @no-crb 
272       │                 │               │                  │ contains base    │
273       │                 │               │                  │ minus the crb    │
274       │                 │               │                  │ repo.            │
275       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
276       │CentOS Stream 8  │ c8s           │ @base, @epel,    │ @epel contains   │
277       │(legacy)         │               │ @no-powertools,  │ epel, epel-next, │
278       │                 │               │ @compose-latest  │ baseos, app‐     │
279       │                 │               │                  │ stream, and pow‐ │
280       │                 │               │                  │ ertools. @no-    
281       │                 │               │                  │ powertools con‐  │
282       │                 │               │                  │ tains @base mi‐  │
283       │                 │               │                  │ nus the power‐   │
284       │                 │               │                  │ tools repo.      │
285       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
286       │Almalinux        │ alX           │ @base, @epel,    │ @base always in‐ │
287       │                 │               │ @no-crb          │ cludes crb.      │
288       │                 │               │                  │ @epel contains   │
289       │                 │               │                  │ @base along with │
290       │                 │               │                  │ the EPEL reposi‐ │
291       │                 │               │                  │ tory. @no-crb    
292       │                 │               │                  │ contains @base   
293       │                 │               │                  │ minus the crb    │
294       │                 │               │                  │ repository.      │
295       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
296       │Almalinux 8      │ al8           │ @base, @epel,    │ @base always in‐ │
297       │(Legacy)         │               │ @no-powertools   │ cludes power‐    │
298       │                 │               │                  │ tools. @epel     
299       │                 │               │                  │ contains @base   
300       │                 │               │                  │ along with the   │
301       │                 │               │                  │ EPEL repository. │
302       │                 │               │                  │ @no-powertools   
303       │                 │               │                  │ contains @base   
304       │                 │               │                  │ minus the power‐ │
305       │                 │               │                  │ tools reposi‐    │
306       │                 │               │                  │ tory.            │
307       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
308       │UBI              │ ubiX          │ @base, @epel,    │                  │
309       │                 │               │ @no-crb          │                  │
310       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
311       │Oracle Linux 8   │ ol8 / ol9     │ @base, @epel,    │ @extra contains  │
312       │and 9            │               │ @no-crb, @extra  │ the dis‐         │
313       │                 │               │                  │ tro_builder and  │
314       │                 │               │                  │ UEK repos        │
315       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
316       │Rocky Linux 8    │ rl8           │ @base, @epel,    │                  │
317       │                 │               │ @no-powertools   │                  │
318       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
319       │Rocky Linux 9+;  │ rl9           │ @base, @epel,    │                  │
320       │local should al‐ │               │ @no-crb          │                  │
321       │ways be last in  │               │                  │                  │
322       │the above table  │               │                  │                  │
323       │                 │               │                  │                  │
324       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
325       │Amazon Linux     │ amazon2023    │ @base            │                  │
326       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
327       │Fedora ELN       │ eln           │ @base, no-crb    │                  │
328       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
329       │Default local    │ local         │ N/A              │ This uses the    │
330       │system reposito‐ │               │                  │ default reposi‐  │
331       │ries             │               │                  │ tories with en‐  
332       │                 │               │                  │ abled=1 in       │
333       │                 │               │                  │ /etc/yum.repos.d │
334       │                 │               │                  │ and and the sys‐ │
335       │                 │               │                  │ tem's relea‐     │
336       │                 │               │                  │ sever.           │
337       ├─────────────────┼───────────────┼──────────────────┼──────────────────┤
338       │Default local    │ local:[relea‐ │ N/A              │ This uses the    │
339       │system reposito‐ │ sever]        │                  │ default reposi‐  │
340       │ries with a dif‐ │               │                  │ tories with en‐  
341       │ferent relea‐    │               │                  │ abled=1 in       │
342       │sever            │               │                  │ /etc/yum.repos.d │
343       │                 │               │                  │ and and a custom │
344       │                 │               │                  │ releasever.      │
345       └─────────────────┴───────────────┴──────────────────┴──────────────────┘
346
347   SPECIAL REPOS
348       @base
349           Release repositories enabled by default in the distribution
350                (e.g. fedora, fedora-source, updates, updates-source for Fe‐
351           dora stable)
352       @testing
353           Superset of base with -testing repos enabled.
354                (e.g. fedora, fedora-source, updates, updates-source, updates-
355           testing-source for Fedora stable)
356       @testing-only
357           Includes -testing repositories without base
358                (e.g. updates-testing, updates-testing-source for Fedora sta‐
359           ble)
360
361       @buildroot (rawhide only)
362           Koji buildroot repositories Buildroot repositories are available
363           for stable Fedora releases, but they don't have corresponding
364           source repos. This causes problems for fedrq, so those definitions
365           are not available.
366

FILES

368   CONFIGURATION
369       PYTHON_SITELIB/fedrq/data/*.toml Builtin configuration files. These
370       should not be modified directly but may be overridden or used as exam‐
371       ples.
372
373       /etc/fedrq/*.toml System wide configuration files. Has precedence over
374       builtin configuration files.
375
376       ~/.config/fedrq/*.toml User configuration files. Highest precedence
377
378       See fedrq(5) for configuration file syntax.
379

EXAMPLES

381   pkgs
382       Find a package's runtime dependencies:
383           $ fedrq pkgs -S -F requires ansible
384           /usr/bin/python3
385           /usr/bin/bash
386           python(abi) = 3.11
387           (python3.11dist(ansible-core) >= 2.14.1 with python3.11dist(ansible-core) < 2.15)
388
389       Resolve a package's runtime dependencies:
390           $ fedrq pkgs -S -F requires ansible | fedrq pkgs -iSP
391           ansible-core-2.14.1-1.fc38.noarch
392           bash-5.2.9-3.fc38.x86_64
393           python3-3.11.1-1.fc38.x86_64
394
395       Find the package(s) that contain(s) a file on f35
396           $ fedrq pkgs -b f35 -P /usr/bin/ansible
397           ansible-2.9.27-4.fc35.noarch
398           ansible-core-2.12.10-1.fc35.noarch
399
400       Return a JSON object containing certain package attributes:
401           $ fedrq pkgs scdoc -F json:name,evr,arch,files,requires
402           [
403             {
404               "name": "scdoc",
405               "evr": "1.11.2-3.fc37",
406               "arch": "x86_64",
407               "requires": [
408                 "rtld(GNU_HASH)",
409                 "libc.so.6(GLIBC_2.34)(64bit)",
410                 "/usr/bin/pkg-config"
411               ],
412               "files": [
413                 "/usr/bin/scdoc",
414                 "/usr/lib/.build-id",
415                 "/usr/lib/.build-id/c1",
416                 "/usr/lib/.build-id/c1/62fcbc2f7d9b41ce409071b05905bdbfa6ffe7",
417                 "/usr/share/doc/scdoc",
418                 "/usr/share/doc/scdoc/README.md",
419                 "/usr/share/licenses/scdoc",
420                 "/usr/share/licenses/scdoc/COPYING",
421                 "/usr/share/man/man1/scdoc.1.gz",
422                 "/usr/share/man/man5/scdoc.5.gz",
423                 "/usr/share/pkgconfig/scdoc.pc"
424               ]
425             },
426             {
427               "name": "scdoc",
428               "evr": "1.11.2-3.fc37",
429               "arch": "src",
430               "requires": [
431                 "make",
432                 "gcc",
433                 "sed"
434               ],
435               "files": [
436                 "/scdoc-1.11.2.tar.gz",
437                 "/scdoc.spec"
438               ]
439             }
440           ]
441
442       Show packages' name, evr, arch, and reponame with each package on a
443       single line:
444           $ fedrq pkgs ansible ansible-core -F line:name,evr,arch,reponame
445           ansible : 7.2.0-1.fc38 : noarch : rawhide
446           ansible : 7.2.0-1.fc38 : src : rawhide-source
447           ansible-core : 2.14.2-1.fc38 : noarch : rawhide
448           ansible-core : 2.14.2-1.fc38 : src : rawhide-source
449
450       Incorrect usage of the line filter:
451
452           $ fedrq pkgs ansible ansible-core -F line:name,evr,files
453           ERROR: 'line' FormatterError: invalid argument 'files'
454           See fedrq(1) for more information about formatters.
455
456       (files cannot fit on a single line)
457
458       Find the latest version of `fedrq` available in the gotmax23/fedrq-dev
459       copr:
460           $ fedrq pkgs -F nevrr -b f36 -r @copr:gotmax23/fedrq-dev fedrq
461           fedrq-0.4.1^25.20230318.76d7910-1.fc36.noarch copr:copr.fedorainfracloud.org:gotmax23:fedrq-dev
462           fedrq-0.4.1^25.20230318.76d7910-1.fc36.src copr:copr.fedorainfracloud.org:gotmax23:fedrq-dev
463
464   whatrequires
465       Find the packages that require another package, at buildtime or run‐
466       time:
467           $ fedrq whatrequires yt-dlp
468           audiotube-22.11-1.fc38.src
469           audiotube-22.11-1.fc38.x86_64
470           celluloid-0.24-4.fc38.x86_64
471           gpodder-3.11.0-1.fc37.noarch
472           media-downloader-2.7.0-2.fc38.x86_64
473           persepolis-3.2.0-11.fc37.noarch
474           video-downloader-0.10.12-1.fc38.noarch
475           yt-dlp-bash-completion-2022.11.11-1.fc38.noarch
476           yt-dlp-fish-completion-2022.11.11-1.fc38.noarch
477           yt-dlp-zsh-completion-2022.11.11-1.fc38.noarch
478
479       Find a package's reverse dependencies, excluding subpackages:
480           $ fedrq whatrequires -X yt-dlp
481           audiotube-22.11-1.fc38.src
482           audiotube-22.11-1.fc38.x86_64
483           celluloid-0.24-4.fc38.x86_64
484           gpodder-3.11.0-1.fc37.noarch
485           media-downloader-2.7.0-2.fc38.x86_64
486           persepolis-3.2.0-11.fc37.noarch
487           video-downloader-0.10.12-1.fc38.noarch
488
489   subpkgs
490       Find an epel9 SRPM's subpackages
491           $ fedrq subpkgs -b epel9 -F na epel-release
492           epel-next-release.noarch
493           epel-release.noarch
494
495   whatrequires-src / wrsrc (alias)
496       Find the components that would be directly affected by the removal of
497       pcre:
498           $ fedrq whatrequires-src -X -F source pcre
499           ClanLib
500           Thunar
501           adanaxisgpl
502           aide
503           [...]
504           xgrep
505           xmlcopyeditor
506           yara
507           zsh
508
509       Find the packages the need to be rebuilt when libindi's .so name is
510       bumped:
511           $ fedrq whatrequires-src -X -F source libindi
512           indi-3rdparty-drivers
513           indi-3rdparty-libraries
514           kstars
515           phd2
516           stellarium
517

AUTHOR

519       fedrq is maintained by Maxwell G <maxwell@gtmx.me>. See https://fe
520       drq.gtmx.me/ for more information about fedrq.
521

SEE ALSO

523       fedrq(5), dnf(1)
524
525
526
527                                  2023-08-31                          FEDRQ(1)
Impressum