OS Manuals

/usr/bin/rpmbuild

Redhat Package Management utilities (RPM)

From rpm 6.1.0-r2 (os), captured 2026-11-05 by running rpmbuild --help (exit 0). permalink

Usage: rpmbuild [OPTION...]

Build options with [ <specfile> | <tarball> | <source package> ]:
      -bp                        build through %prep (unpack sources and apply
                                 patches) from <specfile>
      -bf                        build through %conf (%prep, then %conf) from
                                 <specfile>
      -bc                        build through %build (%prep, %conf, then
                                 compile) from <specfile>
      -bd                        check build dependencies <specfile>
      -bi                        build through %install (%prep, %conf, %build,
                                 then install) from <specfile>
      -bk                        build through %check (%prep, %conf, %build,
                                 %install, then check) from <specfile>
      -bl                        verify %files section from <specfile>
      -ba                        build source and binary packages from
                                 <specfile>
      -bb                        build binary package only from <specfile>
      -bs                        build source package only from <specfile>
      -br                        build source package only from <specfile> -
                                 calculate dynamic build requires
      -rp                        build through %prep (unpack sources and apply
                                 patches) from <source package>
      -rf                        build through %conf (%prep, then %conf) from
                                 <source package>
      -rc                        build through %build (%prep, %conf, then
                                 compile) from <source package>
      -rd                        check build dependencies <source package>
      -ri                        build through %install (%prep, %conf, %build,
                                 then install) from <source package>
      -rk                        build through %check (%prep, %conf, %build,
                                 %install, then check) from <source package>
      -rl                        verify %files section from <source package>
      -ra                        build source and binary packages from <source
                                 package>
      -rb                        build binary package only from <source
                                 package>
      -rs                        build source package only from <source
                                 package>
      -rr                        build source package only from <source
                                 package> - calculate dynamic build requires
      -tp                        build through %prep (unpack sources and apply
                                 patches) from <tarball>
      -tf                        build through %conf (%prep, then %conf) from
                                 <tarball>
      -tc                        build through %build (%prep, %conf, then
                                 compile) from <tarball>
      -td                        check build dependencies <tarball>
      -ti                        build through %install (%prep, %conf, %build,
                                 then install) from <tarball>
      -tk                        build through %check (%prep, %conf, %build,
                                 %install, then check) from <tarball>
      -ta                        build source and binary packages from
                                 <tarball>
      -tb                        build binary package only from <tarball>
      -ts                        build source package only from <tarball>
      -tr                        build source package only from <tarball> -
                                 calculate dynamic build requires
      --rebuild                  build binary package from <source package>
      --recompile                build through %install (%prep, %build, then
                                 install) from <source package>
      --buildroot=DIRECTORY      override build root (DEPRECATED)
      --clean                    remove build tree when done
      --nobuild                  do not execute any stages of the build
      --nodeps                   do not verify build dependencies
      --noclean                  do not execute %clean stage of the build
      --noprep                   do not execute %prep stage of the build
      --nocheck                  do not execute %check stage of the build
      --rmsource                 remove sources when done
      --rmspec                   remove specfile when done
      --short-circuit            skip straight to specified stage (only for
                                 c,i)
      --target=CPU-VENDOR-OS     override target platform

Common options for all rpm modes and executables:
  -D, --define='MACRO EXPR'      define MACRO with value EXPR
      --undefine=MACRO           undefine MACRO
  -E, --eval='EXPR'              print macro expansion of EXPR
      --target=CPU-VENDOR-OS     Specify target platform
      --macros=<FILE:...>        read <FILE:...> instead of default file(s)
      --load=<FILE>              load a single macro file
      --noplugins                don't enable any plugins
      --nodigest                 don't verify package digest(s)
      --nosignature              don't verify package signature(s)
      --rcfile=<FILE:...>        read <FILE:...> instead of default file(s)
  -r, --root=ROOT                use ROOT as top level directory (default: "/")
      --dbpath=DIRECTORY         use database in DIRECTORY
      --querytags                display known query tags
      --showrc                   display final rpmrc and macro configuration
      --quiet                    provide less detailed output
  -v, --verbose                  provide more detailed output
      --version                  print the version of rpm being used

Options implemented via popt alias/exec:
      --with=<option>            enable configure <option> for build
      --without=<option>         disable configure <option> for build
      --scm=<scm>                shortcut for '--define="__scm <scm>"'
      --buildpolicy=<policy>     set buildroot <policy> (e.g. compress man
                                 pages)
      --trace                    trace macro expansion
      --nodebuginfo              do not generate debuginfo for this package
      --build-in-place           run build in current directory on checked out
                                 sources

Help options:
  -?, --help                     Show this help message
      --usage                    Display brief usage message
Options (71)
OptionDescriptionSource
-bpbuild through %prep (unpack sources and apply patches) from <specfile>help
-bfbuild through %conf (%prep, then %conf) from <specfile>help
-bcbuild through %build (%prep, %conf, then compile) from <specfile>help
-bdcheck build dependencies <specfile>help
-bibuild through %install (%prep, %conf, %build, then install) from <specfile>help
-bkbuild through %check (%prep, %conf, %build, %install, then check) from <specfile>help
-blverify %files section from <specfile>help
-babuild source and binary packages from <specfile>help
-bbbuild binary package only from <specfile>help
-bsbuild source package only from <specfile>help
-brbuild source package only from <specfile> - calculate dynamic build requireshelp
-rpbuild through %prep (unpack sources and apply patches) from <source package>help
-rfbuild through %conf (%prep, then %conf) from <source package>help
-rcbuild through %build (%prep, %conf, then compile) from <source package>help
-rdcheck build dependencies <source package>help
-ribuild through %install (%prep, %conf, %build, then install) from <source package>help
-rkbuild through %check (%prep, %conf, %build, %install, then check) from <source package>help
-rlverify %files section from <source package>help
-rabuild source and binary packages from <source package>help
-rbbuild binary package only from <source package>help
-rsbuild source package only from <source package>help
-rrbuild source package only from <source package> - calculate dynamic build requireshelp
-tpbuild through %prep (unpack sources and apply patches) from <tarball>help
-tfbuild through %conf (%prep, then %conf) from <tarball>help
-tcbuild through %build (%prep, %conf, then compile) from <tarball>help
-tdcheck build dependencies <tarball>help
-tibuild through %install (%prep, %conf, %build, then install) from <tarball>help
-tkbuild through %check (%prep, %conf, %build, %install, then check) from <tarball>help
-tabuild source and binary packages from <tarball>help
-tbbuild binary package only from <tarball>help
-tsbuild source package only from <tarball>help
-trbuild source package only from <tarball> - calculate dynamic build requireshelp
--rebuildbuild binary package from <source package>help
--recompilebuild through %install (%prep, %build, then install) from <source package>help
--buildroot DIRECTORYoverride build root (DEPRECATED)help
--cleanRemove the build tree after the packages are made (default).help + man
--nobuilddo not execute any stages of the buildhelp + man
--nodepsDo not verify build dependencies.help + man
--nocleanDo not execute %clean build stage even if present in spec.help + man
--noprepDo not execute %prep build stage even if present in spec.help + man
--nocheckDo not execute %check build stage even if present in spec.help + man
--rmsourceRemove the sources after the build (may also be used standalone, e.g. rpmbuild --rmsource foo.spec).help + man
--rmspecRemove the spec file after the build (may also be used standalone, e.g. rpmbuild --rmspec foo.spec).help + man
--short-circuitSkip straight to specified stage (i.e., skip all stages leading up to the specified stage).help + man
--target CPU-VENDOR-OSoverride target platformhelp
-D, --define 'MACROdefine MACRO with value EXPRhelp
--undefine MACROundefine MACROhelp
-E, --eval 'EXPR'print macro expansion of EXPRhelp
--macros FILE:...read <FILE:...> instead of default file(s)help
--load FILEload a single macro filehelp
--nopluginsdon't enable any pluginshelp
--nodigestdon't verify package digest(s)help
--nosignaturedon't verify package signature(s)help
--rcfile FILE:...read <FILE:...> instead of default file(s)help
-r, --root ROOTuse ROOT as top level directory (default: "/")help
--dbpath DIRECTORYuse database in DIRECTORYhelp
--querytagsdisplay known query tagshelp
--showrcdisplay final rpmrc and macro configurationhelp
--quietprovide less detailed outputhelp
-v, --verboseprovide more detailed outputhelp
--versionprint the version of rpm being usedhelp
--with optionenable configure <option> for buildhelp + man
--without optiondisable configure <option> for buildhelp + man
--scm scmSelect the SCM to use with %autosetup, if one is not set in the spec file.help + man
--buildpolicy policyset buildroot <policy> (e.g. compress man pages)help
--tracetrace macro expansionhelp
--nodebuginfodo not generate debuginfo for this packagehelp + man
--build-in-placeBuild from locally checked out sources in the current working directory.help + man
-?, --helpShow this help messagehelp
--usageDisplay brief usage messagehelp
--rpmfcdebugPrint debug information on file classification and dependency generation. (in the manual page but not in --help)man
Exit status (1) from the manual page
11there are unmet DYNAMIC BUILD DEPENDENCIES

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.