fedora-review(1)
π fedora-review β bestie's guide to the fedora-review(1) manual π
okay so you opened the General Commands Manual and it's the page for fedora-review, and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
fedora-review β a Customized review template for Fedora packages. yes that's literally the whole vibe: it makes you a review template. slay.
πΈ SYNOPSIS πΈ
here's the shape of it, copy-paste-able, no cap:
fedora-review [options] -b <bug>
fedora-review [options] [--prebuilt] -n <package name>
fedora-review [options] [--prebuilt] -rn <srpm path>
fedora-review [options] -u <url>
π¦ DESCRIPTION π¦
So the whole point: it Makes reviews of rpm packages for Fedora easier by providing a customized review template, and it automates some trivial tasks for you. π
The tool runs a number of checks to test whether a package complies to the Fedora Packaging Guidelines β before creating the template. And through a bash API the checks can be extended, which is highkey the fun part.
Right now we have checks for C/C++, R, Java and Perl packages. periodt.
π USAGE π
Basic usage, the starter pack:
$ fedora-review -b <bug number>
$ fedora-review -u <url>
This will download the SPEC & SRPM files from the Bugzilla report, build them in mock, run a number of tests and generate a template. it's giving full pipeline π
heads up bestie: Not all bugzillas support the-boption. The-uoption is available for these. See the--urlusage notes below. π
$ fedora-review -n <package name>
This alternative usage expects <package name>.spec and source rpm in current directory. By adding the -p switch, fedora-review uses already built rpms in current directory instead of building using mock. lowkey the lazy-girl route and we respect it.
$ fedora-review --rpm-spec -n <srpm path>
This form accepts a single path to a source rpm. It uses the specfile bundled in the srpm package. so you don't gotta hunt for a spec file separately π
You will need to have mock installed and be member of the mock group for the build to work. Run as root:
# usermod -a -G mock [your user name]
After this, you need to logout and login again (or use newgrp(1)) β the changes in user's group list is not read until a new login. yes it's annoying. yes you still gotta do it. π
π MODE OPTIONS β one is required π
fr fr, pick exactly one of these. no mode = no review.
-b,--bug <bug nr>β Run against Fedora bugzilla at bugzilla.redhat.com, using the bugzilla bug number.--copr-build <build_descriptor>β Run against COPR build identified by its ID, frontend build uri, or backend build chroot uri. Checks for overall build success and looks up rawhide build results of the client machine arch. Implies--prebuilt. β¨-n,--name <name>β Runs the checks against the named spec and source rpm located in the current working directory. The files are expected to have the names<name>.specand<name>*.src.rpm. When used together with--rpm-spec/-r, name can also be a complete path to a source rpm. π-u url,--url <url>β Fetch data from given url, typically another bugzilla instance such as rpmfusion. Before using this, first try the more convenient--bug <bug nr> --other-bz <url>. The option tries to retrieve the URL:s by scanning the page. See URL Limitations for how the url must look to be found. π-d,--display-checksβ List all available checks, usable as arguments to--excludeand--single.-f,--display-flagsβ List all available flags, usable as arguments to--defineor-D.-g,--display-pluginsβ List all plugins which can be enabled/disabled using--plugins.-V,--versionβ Show version info. short and sweet π
π GENERAL OPTIONS π
-B,--no-colorsβ Disable use of ansi colors in console output. (not me being sad about this one π)-c,--cacheβ Do not redownload the files from bugzilla or upstream, use the local ones from previous run instead. recycling queen πΈ-D,--define <flag[=value]>β Define a flag e. g.,EPEL7. A flag can either just be activated usingflagor set to a value usingflag=value.--display-flagsshows available flags.-k,--checksum <md5|sha1|sha224|sha256|sha384|sha512>β Algorithm used for checksum.-L,--local-repo <rpm directory>β Directory with rpms to install together with reviewed package during build and install phases.-m,--mock-config <configuration>β Specify which mock config to use, one of the files in/etc/mock, with the.cfgsuffix stripped. Defaults to the root defined in/etc/mock/default.cfg.-o,--mock-options options...β Mock options for the build. Defaults to--no-cleanup-after --no-clean, you might want this along with other options you provide.--no-reportβ Do not generate the review template.--no-buildβ Do not rebuild or install the source rpm, instead use the last installed package available in mock. Implies--cache.--other_bzβ Url of alternative bugzilla, instead of using defaulthttps://bugzilla.redhat.com-p,--prebuiltβ When using-n <name>, use prebuilt rpms in current directory instead of building new ones in mock.-P,--pluginsβ Normally, the right plugin(s) to run are autodetected. Using--pluginsoverrides the decision to run a plugin or not. The argument is a comma-separated list of plugins, each possibly with a:offsuffix e. g.,
--plugins Java:off,C/C++
Use --display-plugins to see available plugins. Enabling plugins has no well-defined semantics: some tests might leave no trace in the report even though they are actually run. π (yeah. it just be like that.)
-r,--rpm-specβ Instead of using a spec file URL, use the spec file bundled in the srpm file.-s test,--single testβ Run a single test, as listed by--display-checks. Does not run dependencies, only the given test.-v,--verboseβ Provides a more detailed output of what's going on. the girlies love receipts π₯-x test1, test2, ... , --exclude test1, test2, ...β Comma-separated list of test(s) to exclude, as listed by--display-checks. A test which depends on an excluded test, will run.
π THE REVIEW DIRECTORY π
The review directory is created with a name corresponding to the command line options. The package name is always part of the name, sometimes also the bug number. Here's what lives inside (iykyk):
review.txtβ The review template.report.xmlβ Report with failed issues based on the firehose xml format. This is as yet experimental and not stable. Seehttps://github.com/fedora-static-analysis/firehose. πsrpm directoryβ Holds whats downloaded, normally a src.rpm and a spec file. When using--rpm-spec, here is no.specfile.srpm-unpacked directoryβ Holds the unpacked content of the src.rpm file.upstream directoryβ contains sources downloaded from theSource:url in the spec file.upstream-unpacked directoryβ Occasionally contains the unpacked sources, but is normally empty.dependenciesβ Used for dependencies specfiles whenEXARCHflag is set, otherwise empty.BUILD linkβ Points to the mock directory containing the sources used in the build. These sources have been created and modified by the%prepstuff in the spec file. The link is only valid direct after the run, it's overwritten next time mock executes. β³results directoryβ Contains the result from the build, logs and rpm packages.
π§ LOCAL SOURCES (GIT-BASED OR SIMILAR) π§
Normally, the Source0 (or others SourceX) in the specfile contains an URL to the upstream source. fedora-review uses this url to download the upstream source and then compare md5sum with source in rpm. standard behavior bestie π
However, in some cases the Source0: is just a filename e. g., when sources are generated from git, svn or similar tools. In these cases, fedora-review will look for a file matching the Source0 in current directory. If it exists, it's used as upstream source. This way, a reviewer can generate the source according the comments in the spec before running fedora-review and then have it checked. β¨ DIY era.
β USING KOJI SCRATCH BUILDS β
It's possible to use koji to build packages instead of mock when using fedora-review. The basic idea is to run a koji scratch build, download the built packages and invoke fedora-review on these. This workflow uses the --prebuilt option, and has some limitations on checks performed since fedora-review cannot access the build directories.
The workflow, step by step:
- Invoke koji, note the task number:
koji build --scratch my-package.src.rpm
- Download the results:
koji-download-scratch <task number>
- Invoke
fedora-reviewusing--prebuilt,--nameoptions and--rpm-spec:
fedora-review --rpm-spec --prebuilt --name my-package
π URL limitations π
fedora-review handles two types of URLs: the spec and srpm url found in e. g., the bugzilla page and the source url(s) found in the spec file.
For the srpm and spec file url:
- The parameters (i. e., the
?and everything beyond) is removed. - The rest must end with
/*.specor/*.src.rpm
For the source url, possible parameters are not removed. It must end with /filename, typically something like /package-2.0.1.tar.gz
π« EXAMPLES π«
Make a report template for Fedora bug 817271:
$ fedora-review -b 817271
fetches spec and srpm file from bugzilla.redhat.com and makes a report. To instead handle a bug at rpmfusion use something like
$ fedora-review --url \
https://bugzilla.rpmfusion.org/show_bug.cgi?id=2150 \
--mock-config fedora-16-i386-rpmfusion_free
Occasionally, fedora-review isn't able to pick up the links e. g., when the links does not end in .spec and/or .src.rpm. In these case you need to download files manually. Using --rpm-spec only the srpm is needed:
$ wget https://somewhere.com/bad-srpmlink -O my-package-1.2-1.fc16.src.rpm
$ fedora-review --rpm-spec -n my-package-1.2-1.fc16.src.rpm
You can use this command to run a review against a COPR build with a given ID (the ID 670893 is just an example one):
$ fedora-review --copr-build 670893
π FILES π
~/.cache/fedora-review.logβ Debug logging from last session./usr/share/fedora-review/pluginsβ System-wide python plugins directory./usr/share/fedora-review/scriptsβ System-wide scripts directory.~/.local/share/fedora-review/plugins/β User supplied directory for python plugins.~/.local/share/fedora-review/scripts/β User supplied directory with shell-based plugins.
...and that's part 1 bestie, don't go anywhere, there's more coming π
πΈ ENVIRONMENT πΈ
ok so these are the vibes you can set in your environment before running, and fedora-review will respect them, periodt π
REVIEW_LOGLEVELβ this is the loglevel used when you're not passing-v/--verbose. it takes alogging.*style value, like'DEBUG','Info', or'warning'. and bestie, settingREVIEW_LOGLEVELto'debug'is literally the same as handing over the-v/--verboseoption. same energy, different font π«ΆREVIEW_NO_MOCKGROUP_CHECKβ okay so normally fedora-review checks that you're a member of themockgroup before it proceeds, because that's required to run mock in most setups. but if that check isn't useful for you, you can suppress it with this variable. it's giving "i know what i'm doing" πXDG_DATA_HOMEβ fedora-review respectsXDG_DATA_HOME, which defaults to~/.local/share. like, for example, the personal data directory with plugins is by default~/.local/share/fedora-review/plugins, but it becomes$XDG_DATA_HOME/fedora-review/pluginsifXDG_DATA_HOMEis set. go peek at FILES for the receipts πXDG_CACHE_HOMEβ if you set this, it defines the directory where the logfilefedora-review.loggets written. defaults to~/.cache. so cute, so tidy β¨
π AUTHORS π
the origin story, no cap:
- Original author: Tim Lauridsen
<tim.lauridsen@gmail.com>
Developers, the whole squad:
- Pierre-Yves Chibon
<pingou@pingoured.fr> - Alec Leamas
<leamas.alec@maybe.gmail> - Stanislav Ochotnicky
<sochotnicky@redhat.com>
for a list of all contributors, see the AUTHORS file. every single one of them ate π₯
π SEE ALSO π
the extended universe, iykyk:
fedora-create-review(1)β automatically create RPM review request for Fedora. the plug πbugzilla(1)β CLI tool to create and modify bugzilla bug tickets.bugz(1)β another CLI tool to create and modify bugzilla bug tickets. yes there are two, we contain multitudes π¦https://forge.fedoraproject.org/packaging/FedoraReviewβ source, issue tracker, etc. the mothership πΈhttps://docs.fedoraproject.org/en-US/packaging-guidelines/β rules for Fedora packages. read them before you get read π
okay bestie that's the whole page π this was fedora-review(1), straight from the FedoraReview source and version, dated whenever this man page was generated β so if the date looks a lil vintage, that's just the docs being iconic in their own time zone π now go review a package, you absolute main character πβ¨
π¦ where this page comes from
- fedora 43: fedora-review 0.12.0-1.fc43 Β· GPL-2.0-or-later
- fedora 44: fedora-review 0.12.0-1.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms