.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "RPMSPEC" "8" "29 October 2010" "" "" .hy .SH NAME .PP rpmspec - RPM Spec Tool .SH SYNOPSIS .SS QUERYING SPEC FILES: .PP \f[B]rpmspec\f[R] {\f[B]-q|--query\f[R]} [\f[B]select-options\f[R]] [\f[B]query-options\f[R]] \f[I]SPEC_FILE ...\f[R] .SS PARSING SPEC FILES TO STDOUT: .PP \f[B]rpmspec\f[R] {\f[B]-P|--parse\f[R]} \f[I]SPEC_FILE ...\f[R] .SS INVOKING MACRO SHELL: .PP \f[B]rpmspec\f[R] {\f[B]\[en]shell\f[R]} [\f[I]SPEC_FILE ...\f[R]] .SH DESCRIPTION .PP \f[B]rpmspec\f[R] is a tool for querying a spec file. More specifically for querying hypothetical packages which would be created from the given spec file. So querying a spec file with \f[B]rpmspec\f[R] is similar to querying a package built from that spec file. But is is not identical. With \f[B]rpmspec\f[R] you can\[aq]t query all fields which you can query from a built package. E. g. you can\[aq]t query BUILDTIME with \f[B]rpmspec\f[R] for obvious reasons. You also cannot query other fields automatically generated during a build of a package like auto generated dependencies. .SS select-options .PP [\f[B]--rpms\f[R]] [\f[B]--srpm\f[R]] .SS query-options .PP [\f[B]--qf,--queryformat \f[R]\f[I]QUERYFMT\f[R]] [\f[B]--target \f[R]\f[I]TARGET_PLATFORM\f[R]] .SS QUERY OPTIONS .PP The general form of an rpm spec query command is .PP \f[B]rpm\f[R] {\f[B]-q|--query\f[R]} [\f[B]select-options\f[R]] [\f[B]query-options\f[R]] .PP You may specify the format that the information should be printed in. To do this, you use the .PP \f[B]--qf|--queryformat\f[R] \f[I]QUERYFMT\f[R] .PP option, followed by the \f[I]QUERYFMT\f[R] format string. See \f[B]rpm(8)\f[R] for details. .SS SELECT OPTIONS .PP \f[B]--rpms\f[R] Operate on the all binary package headers generated from spec. \f[B]--builtrpms\f[R] Operate only on the binary package headers of packages which would be built from spec. That means ignoring package headers of packages that won\[aq]t be built from spec i. e. ignoring package headers of packages without file section. \f[B]--srpm\f[R] Operate on the source package header(s) generated from spec. .SH EXAMPLES .PP Get list of binary packages which would be generated from the rpm spec file: .RS .IP .nf \f[C] $ rpmspec -q rpm.spec rpm-4.11.3-3.fc20.x86_64 rpm-libs-4.11.3-3.fc20.x86_64 rpm-build-libs-4.11.3-3.fc20.x86_64 ... \f[R] .fi .RE .PP Get summary infos for single binary packages generated from the rpm spec file: .RS .IP .nf \f[C] $ rpmspec -q --qf \[dq]%{name}: %{summary}\[rs]n\[dq] rpm.spec rpm: The RPM package management system rpm-libs: Libraries for manipulating RPM packages rpm-build-libs: Libraries for building and signing RPM packages ... \f[R] .fi .RE .PP Get the source package which would be generated from the rpm spec file: .RS .IP .nf \f[C] $ rpmspec -q --srpm rpm.spec rpm-4.11.3-3.fc20.x86_64 \f[R] .fi .RE .PP Parse the rpm spec file to stdout: .RS .IP .nf \f[C] $ rpmspec -P rpm.spec Summary: The RPM package management system Name: rpm Version: 4.14.0 ... \f[R] .fi .RE .PP Run interactive macro shell for debugging macros: .RS .IP .nf \f[C] $ rpmspec --shell > %define foo bar > %foo bar > %(date) Tue Apr 13 03:55:37 PM EEST 2021 > %getncpus 8 \f[R] .fi .RE .PP Run interactive macros shell in spec context: .RS .IP .nf \f[C] $ rpmspec --shell popt.spec %name popt %version 1.18 \f[R] .fi .RE .SH SEE ALSO .PP \f[B]popt\f[R](3), \f[B]rpm\f[R](8), \f[B]rpmdb\f[R](8), \f[B]rpmkeys\f[R](8), \f[B]rpmsign\f[R](8), \f[B]rpm2cpio\f[R](8), \f[B]rpmbuild\f[R](8) .PP \f[B]rpmspec --help\f[R] - as rpm supports customizing the options via popt aliases it\[aq]s impossible to guarantee that what\[aq]s described in the manual matches what\[aq]s available. .PP \f[B]http://www.rpm.org/ \f[R] .SH AUTHORS .IP .nf \f[C] Marc Ewing Jeff Johnson Erik Troan Panu Matilainen \f[R] .fi