RPMINSPECT(1)
RPMINSPECT(1) β okay bestie, welcome to the Red Hat manual page for rpminspect, and we're about to make it make sense πβ¨
β¨ NAME β¨
rpminspect β compare package builds. That's the whole name, no cap.
πΈ SYNOPSIS πΈ
rpminspect -c FILE [ OPTIONS ] before_build [ after_build ]
π DESCRIPTION π
rpminspect is a tool that helps developers keep build policy compliance and consistency across releases. It's giving compliance queen π. It has two primary modes of operation. First up: what we call analysis mode. That one runs against a single RPM or Koji build (and bestie, a build is a source RPM plus all its built packages for multiple architectures). Analysis mode checks package consistency and compliance. You can configure various inspections through the configuration file, the profile in use, or a local rpminspect.yaml file. Then there's build comparison. That mode does every inspection analysis mode does, and also compares a before and after package or build. There's no explicit option to pick a mode; the mode is decided by how many inputs you give it. One input = analysis mode, two inputs = comparison mode. Periodt π
.
rpminspect started at Red Hat as an auditing tool, making sure builds complied with certain release rules and policies. Over time it grew to include other checks β like verifying debugging symbols are accurate and that various security policies were followed. Users are encouraged to contribute tests for new functionality, report bugs, and submit updates to the rules in the corresponding vendor data package(s). You're invited, bestie π.
The software comes as this command line program and an accompanying library. That's on purpose. Our findings over time have shown that simple tools with a flexible design are more easy to integrate in to continuous integration systems. The library lets you develop other frontends or integrate in to existing frontends. The thought is that most developers will interact with rpminspect through the command line, and most integrations of rpminspect will report results through some sort of existing frontend (e.g., GitHub Actions). Everything about an rpminspect run is configurable at runtime through command line options as well as a configuration file. The command line options override the configuration file, which overrides the compiled in defaults. So the order is: command line options > configuration file > compiled in defaults. Iconic π.
β¨ OPTIONS β¨
okay bestie, here's the whole menu π every flag, every default, nothing skipped, no cap:
-c FILE,--config=FILEβ the configuration file. This is the only required option, periodt. Usually a product vendor hands it to you as/usr/share/rpminspect/VENDOR.yaml, and wrapper scripts are super common so you don't have to type it out every single time (like,rpminspect-fedoraliterally just runs rpminspect with thefedora.yamlconfiguration file, iconic).-p NAME,--profile=NAMEβ optional configuration profile to use, and it's giving overlay. The main config loads first, then if you name a profile, rpminspect loads that config file too and anything in it overrides what came from the default configuration file. Think of the main config as the base look and profiles as the optional accessories β¨. In the data package, profiles should be namedPROFILENAME.yamland live in theprofiledirsubdirectory. Hand this option aPROFILENAMEand rpminspect goes hunting for it inprofiledir. You can also pass aPATHhere and it'll try to load the profile straight from that file. Vendors commonly ship a whole set of profiles alongside the main configuration file, obsessed.
The format of a profile config file is the exact same as the configuration file β just name it NAME.yaml and drop it in the profiledir for the right vendor. For example, the profile scl for Fedora should have a configuration file named /usr/share/rpminspect/profiles/fedora/scl.yaml.
-T LIST,--tests=LISTβ pass this and rpminspect assumes all inspections are off except the ones you name. Give it a comma-separated list of inspections to run (default:ALL). You can find the names of available inspections with the-loption. You can also literally write the nameALLto explicitly say "run everything". β οΈ NOTE: this option is mutually exclusive with the-Eoption β pick one, bestie, you can't have both.-E LIST,--exclude=LISTβ the reverse vibe: pass this and rpminspect assumes all inspections are enabled except the ones you name. Comma-separated list of inspections to skip (default: none). Names of available inspections? Same deal, check with-l. You can also writeALLto skip literally everything, though that makes the program do absolutely nothing π. β οΈ NOTE: this option is mutually exclusive with the-Toption.-a LIST,--arches=LISTβ comma-separated list of architectures to inspect packages on. By default rpminspect gathers every available architecture for the builds you specify, but maybe you only want a run on justx86_64or justaarch64β this is how you do that. If you do use it, make sure you include'src'to inspect source packages and'noarch'to include noarch packages, fr. The architectures you list get validated against the available architectures in the Koji hub, and any invalid ones will report an error.
For RPM packaging and rpminspect purposes, both 'noarch' and 'src' count as architectures. Keep that in mind when you use this option, okay?
-r STR,--release=STRβ a string identifying the product release for the build(s) you specified. Normally rpminspect figures this out by looking for a "dist tag" at the end of the NVR. For build comparisons, the determined product releases must match or rpminspect won't continue. Want to compare builds from different products? You'll need to specify a product release manually. Same if the builds you're comparing have no product release identifier at the end of the NVR at all.
rpminspect can be configured to favor the newest or oldest product release string when they don't match β lowkey handy when comparing builds across product releases.
-n,--no-rebaseβ disables rebased build detection. When comparing two builds or two packages, rpminspect peeks at the package names, version numbers, and release numbers. Names and versions match but releases differ? That's not considered a rebase, because the assumption is it's a maintenance-type build on an existing package. Non-rebase comparisons enforce stricter rules for certain inspections. Names match but versions differ? Now it's a rebased comparison, and rebased comparisons relax those strict rules to eliminate a ton of false positives in the output. If you want to always kill the rebase checking and enforce the strict rules, pass this option.-b TYPE,--build-type=TYPEβ sets the Koji build type toTYPE. By default rpminspect tries to auto-determine the build type of the inputs. Sometimes it's struggling and you wanna be explicit β this option is most useful when you're using locally provided Koji input subdirectories. Supported build types can be seen with the-loption.-o FILE,--output=FILEβ write the results to the named output file. Default is stdout, so without this everything just spills onto your terminal π«Ά.-F TYPE,--format=TYPEβ write the inspection results in theTYPEformat. Default format istext. Available formats can be seen with the-loption.-t TAG,--threshold=TAGβ result threshold that triggers a non-zero exit code. Default isVERIFY, which maps to a result code you'll see in the output. You can set it to any valid result code:OK,INFO,VERIFY, orBAD. The argument expects the result threshold as a string. Case does not matter, slay.-s TAG,--suppress=TAGβ results suppression threshold. By default all results are reported, but this option lets you suppress results below a reporting level. Same values as the-toption above. For example, to only showVERIFYand higher results, pass"-s VERIFY"at run time.-l,--listβ list available output formats and inspections π-w PATH,--workdir=PATHβ temporary working directory to use (default:/var/tmp/rpminspect). You can put a tilde (~) in thePATHand rpminspect will expand it. But heads up: thePATHyou specify with~must exist for the expansion to work.-f,--fetch-onlyβ only download files in specified builds, do not perform any inspections (implies-k). This one's a convenience for developers plus easier integration into different CI workflows. Note that this option does not change the working directory (-w) to the current working directory. If that's not the vibe, use-wto set it somewhere else. For example, to download to the current working directory you can pass"-w $(pwd)".
You may specify one or more builds when using the fetch only mode.
-k,--keepβ do not remove temporary working files before exit. Useful at times for debugging π-d,--debugβ enable debugging mode. This generates additional output on stdout and stderr.-D,--dump-configβ dump configuration settings in use in YAML format. The output is the combined settings after reading the configuration file, any profile specified, and any local configuration file. Super useful for debugging to make sure settings were read in correctly β¨-v,--verboseβ verbose inspection output. By default only warnings or failures are reported; this option also displays informational findings. Use this mode with-lto display long descriptions of output formats and inspections.-?,--helpβ display usage information.-V,--versionβ display version information.
πΈ USAGE πΈ
rpminspect requires very little to run, bestie. Assuming you meet the runtime requirements β either build the software from source or have it installed on your OS β you're ready to go π. The only required arguments are the -c option to specify the configuration file and at least one input. The input may be an RPM package (local or remote), a Koji build (either local or remote), or a Koji task ID.
Give it a single input and rpminspect runs in analysis mode. Give it two inputs and it performs all of the analysis checks plus comparison checks. Two for one, we love to see it π
Use the -l option to list available inspections (add -v to get detailed descriptions of the inspections). By default, all inspections will be run. You can restrict the program to a subset of inspections by listing their short names and separating them with commas (no spaces). Or you can list inspections to skip by listing the short name prefixed with a ! in the same comma-delimited list. Easy.
π οΈ RPMINSPECT BUILD INPUTS
Okay bestie, so rpminspect calls its inputs a 'build'. That's the word. Builds can be so many things and honestly the range is iconic:
- local RPM packages
- regular Koji builds specified using Koji syntax (that's the NVR β name, version, and release of a package, with hyphens separating each part)
- Koji module builds
- locally cached Koji builds (regular or module)
- Koji scratch builds (task ID number)
- locally cached Koji scratch builds
Any valid Koji build identifier works when you're specifying Koji builds β like the build ID number, or the package NVR. Any of them. The one exception is scratch builds: for those you must use the Koji task ID number. No substitutes, periodt. π
Want more on Koji build specification? Go read the Koji documentation, they got you.
If you hand it a directory tree containing the output of a properly structured Koji build, rpminspect can just use that directly. When is that the move? Say you're running rpminspect over and over against one specific previous build while you're trying to fix something in a new build compared against the old one. Obsessed, honestly. π«Ά
Local and remote RPM packages can be specified directly too, if all you want is rpminspect on a single RPM. You can pass one RPM package, or two if you want rpminspect to do the comparison inspections. And if you give it a URL to an RPM as an input? It will try and download that package. β¨
Examples, bestie:
CFG=/usr/share/rpminspect/vendor.yaml
rpminspect -c $CFG -T ALL -k zlib-1.2.7-1.fc29 zlib-1.2.7-2.fc29
rpminspect -c $CFG -T license,elfsyms perl-5.28.0-47.fc6 perl-5.28.1-1.fc6
rpminspect -c $CFG -T !manpage x3270-3.6ga5-6.fc31 x3270-3.6ga6-1.fc31
rpminspect -c $CFG -T ALL -a ppc64le zsh-5.7.1-3.fc31 zsh-5.7.1-4.fc31
rpminspect -c $CFG -E disttag -a ppc64le zsh-5.7.1-3.fc31 zsh-5.7.1-4.fc31
rpminspect -c $CFG -T ALL https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Everything/x86_64/os/Packages/l/less-590-3.fc36.x86_64.rpm
rpminspect -c $CFG -T ALL /home/developer/rpmbuild/RPMS/less-590-3.fc36.x86_64.rpm /home/developer/rpmbuild/RPMS/less-590-4.fc36.x86_64.rpm
rpminspect -c $CFG /home/developer/rpmbuild/SRPMS/less-590-4.fc36.src.rpm
The end result of running rpminspect is a report on standard output explaining what was found. And inside the findings you get descriptions of actions developers can take. It's not just "here's a problem" β it's "here's a problem and here's what to do." Main character energy tbh. π
Heads up: the vendor data packages for rpminspect usually include a wrapper script of the formrpminspect-VENDOR, where VENDOR is typicallyfedora,centos, orredhat. If a wrapper script like this exists in the vendor data package, you should use it to invoke rpminspect with that vendor's configuration file. And here's the cute part: if you use the wrapper script, you do not need the-coption to specify the configuration file. π
ποΈ CONSTRUCTING LOCAL BUILD INPUTS
So the most common use of rpminspect in continuous integration environments is to fetch and analyze builds directly from Koji. That is literally why rpminspect can speak to Koji directly and download files. π
But if you're running rpminspect locally, you can simulate inputs this way: construct a local directory that looks like a Koji build as rpminspect would download it. Slay.
Start by creating a subdirectory. It can be called anything, but the convention rpminspect follows is to name the subdirectory after the Koji build specification in NVR syntax. For example, less-590-3.fc36 would be the subdirectory name. πΈ
Next thing: create subdirectories in there for each architecture and the source RPM. And any noarch packages need to go in a noarch subdirectory. Don't forget her. π¦
Let's do a real one. Consider a source RPM that you rebuild locally β take zlib-1.2.12-5.fc37.src.rpm as the example. You rebuild this locally using either rpmbuild or mock, and it generates all of the subpackages from the source RPM. To construct a build input directory for rpminspect, you would:
- Create a directory named
zlib-build. - Within that directory, create two new subdirectories called
srcandx86_64(assuming you built on x86_64, bestie). - Put the source RPM in
zlib-build/src/. - Put all of the
x86_64binary RPMs inzlib-build/x86_64/.
You may now use zlib-build as an input for rpminspect and it will treat it the same way it treats Koji builds. Same energy, local edition. β¨
π¦ EXIT STATUS
0β rpminspect exits0if all inspections pass. Ate. π1β exits1if at least one inspection did not pass. π3β exits3if the specified profile is not found.2β exits2if any other program error occurred.
π BUGS
Please report bugs at https://github.com/rpminspect/rpminspect using the Issues tab. Don't be shy, they want to hear from you. π
π SEE ALSO
π AUTHOR
David Cantrell <dcantrell@redhat.com>
And that's the whole page, bestie!! π«Ά This was rpminspect from way back in February 2019, living in section RPMINSPECT(1) of your friendly neighbourhood manual. Go build something iconic with it. π
β¨π
π¦ where this page comes from
- epel 10: rpminspect 2.1-1.el10_2 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND Apache-2.0 AND MIT AND BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0
- epel 9: rpminspect 2.1-1.el9 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND Apache-2.0 AND MIT AND BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0
- fedora 43: rpminspect 2.1-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND Apache-2.0 AND MIT AND BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0
- fedora 44: rpminspect 2.1-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND Apache-2.0 AND MIT AND BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0
- π the page's license: GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms