table of contents
| RPMSPEC(1) | General Commands Manual | RPMSPEC(1) |
NAME¶
rpmspec - RPM Spec Tool
SYNOPSIS¶
rpmspec {-q|--query} [options] [query-options] SPEC_FILE ...
rpmspec {-P|--parse} [options] SPEC_FILE ...
rpmspec --shell [options] [SPEC_FILE ...]
DESCRIPTION¶
rpmspec 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 rpmspec is similar to querying a package built from that spec file. But is is not identical. With rpmspec you can't query all fields which you can query from a built package. E. g. you can't query BUILDTIME with rpmspec for obvious reasons. You also cannot query other fields automatically generated during a build of a package like auto generated dependencies.
OPERATIONS¶
-q, --query
-P, --parse
--shell
ARGUMENTS¶
SPECFILE
OPTIONS¶
See rpm-common(8) for the options common to all operations.
QUERY OPTIONS¶
--qf QUERYFMT, --queryformat QUERYFMT
--rpms
--builtrpms
--srpm
ENVIRONMENT¶
See rpm-common(8).
EXIT STATUS¶
On success, 0 is returned, a non-zero failure code otherwise.
EXAMPLES¶
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 ...
rpmspec -q --qf "%{name}: %{summary}n" 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 ...
rpmspec -q --srpm rpm.spec
rpm-4.11.3-3.fc20.x86_64
rpmspec -P rpm.spec
Summary: The RPM package management system Name: rpm Version: 4.14.0 ...
rpmspec --shell
> %define foo bar > %foo bar > %(date) Tue Apr 13 03:55:37 PM EEST 2021 > %getncpus 8
rpmspec --shell popt.spec
%name popt %version 1.18
SEE ALSO¶
popt(3), rpm(8), rpmbuild(1), rpm-queryformat(7), rpm-macros(7)
rpmspec --help - as rpm supports customizing the options via popt aliases it's impossible to guarantee that what's described in the manual matches what's available.
| 2025-11-07 | RPM 6.0.0 |