Blame doc/rpmspec.8

2ff057
.TH "RPMSPEC" "8" "29 October 2010" "Red Hat, Inc"
2ff057
.SH NAME
2ff057
rpmspec \- RPM Spec Tool
2ff057
.SH SYNOPSIS
2ff057
.SS "QUERYING SPEC FILES:"
2ff057
.PP
2ff057
2ff057
\fBrpmspec\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR] \fB\fISPEC_FILE\fB\fR\fI ...\fR
2ff057
2ff057
.SS "PARSING SPEC FILES TO STDOUT:"
2ff057
.PP
2ff057
2ff057
\fBrpmspec\fR {\fB-P|--parse\fR} \fB\fISPEC_FILE\fB\fR\fI ...\fR
2ff057
2ff057
.SH DESCRIPTION
2ff057
.PP
2ff057
\fBrpmspec\fR 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 \fBrpmspec\fR is similar to querying a package built from that spec file. But is is not identical. With \fBrpmspec\fR you can't query all fields which you can query from a built package. E. g. you can't query BUILDTIME with \fBrpmspec\fR for obvious reasons. You also cannot query other fields automatically generated during a build of a package like auto generated dependencies.
2ff057
2ff057
.SS "select-options"
2ff057
.PP
2ff057
2ff057
 [\fB\--rpms\fB\fR]
2ff057
 [\fB\--srpm\fB\fR]
2ff057
2ff057
.SS "query-options"
2ff057
.PP
2ff057
2ff057
 [\fB--qf,--queryformat \fIQUERYFMT\fB\fR]
2ff057
 [\fB--target \fITARGET_PLATFORM\fB\fR]
2ff057
 
2ff057
.SS "QUERY OPTIONS"
2ff057
.PP
2ff057
The general form of an rpm spec query command is 
2ff057
.PP
2ff057
2ff057
\fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
2ff057
2ff057
.PP
2ff057
You may specify the format that the information should be
2ff057
printed in. To do this, you use the
2ff057
2ff057
 \fB--qf|--queryformat\fR \fB\fIQUERYFMT\fB\fR
2ff057
2ff057
option, followed by the \fIQUERYFMT\fR format string.
2ff057
See \fBrpm(8)\fR for details.
2ff057
.PP
2ff057
2ff057
.SS "SELECT OPTIONS"
2ff057
.PP
2ff057
 \fB--rpms\fR
2ff057
Operate on the all binary package headers generated from spec.
2ff057
 \fB--builtrpms\fR
2ff057
Operate only on the binary package headers of packages which would be built from spec. That means ignoring package headers of packages that won't be built from spec i. e. ignoring package headers of packages without file section.
2ff057
 \fB--srpm\fR
2ff057
Operate on the source package header(s) generated from spec.
2ff057
2ff057
.SH EXAMPLES
2ff057
.PP
2ff057
Get list of binary packages which would be generated from the rpm spec file:
2ff057
.PP
2ff057
.RS 4
2ff057
.nf
2ff057
 $ rpmspec -q rpm.spec
2ff057
 rpm-4.11.3-3.fc20.x86_64
2ff057
 rpm-libs-4.11.3-3.fc20.x86_64
2ff057
 rpm-build-libs-4.11.3-3.fc20.x86_64
2ff057
 ...
2ff057
.RE
2ff057
.PP
2ff057
Get summary infos for single binary packages generated from the rpm spec file:
2ff057
.PP
2ff057
.RS 4
2ff057
.nf
2ff057
 $ rpmspec -q --qf "%{name}: %{summary}\\n" rpm.spec
2ff057
 rpm: The RPM package management system
2ff057
 rpm-libs: Libraries for manipulating RPM packages
2ff057
 rpm-build-libs: Libraries for building and signing RPM packages
2ff057
 ...
2ff057
.RE
2ff057
.PP
2ff057
Get the source package which would be generated from the rpm spec file:
2ff057
.PP
2ff057
.RS 4
2ff057
.nf
2ff057
 $ rpmspec -q --srpm rpm.spec
2ff057
 rpm-4.11.3-3.fc20.x86_64
2ff057
.RE
2ff057
.PP
2ff057
Parse the rpm spec file to stdout:
2ff057
.PP
2ff057
.RS 4
2ff057
.nf
2ff057
 $ rpmspec -P rpm.spec
2ff057
 Summary: The RPM package management system
2ff057
 Name: rpm
2ff057
 Version: 4.14.0
2ff057
 ...
2ff057
.RE
2ff057
.SH "SEE ALSO"
2ff057
.nf
2ff057
\fBpopt\fR(3),
2ff057
\fBrpm\fR(8),
2ff057
\fBrpmdb\fR(8),
2ff057
\fBrpmkeys\fR(8),
2ff057
\fBrpmsign\fR(8),
2ff057
\fBrpm2cpio\fR(8),
2ff057
\fBrpmbuild\fR(8),
2ff057
.fi
2ff057
2ff057
\fBrpmspec --help\fR - as rpm supports customizing the options via popt aliases 
2ff057
it's impossible to guarantee that what's described in the manual matches 
2ff057
what's available.
2ff057
2ff057
2ff057
\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
2ff057
\fR
2ff057
.SH "AUTHORS"
2ff057
2ff057
.nf
2ff057
Marc Ewing <marc@redhat.com>
2ff057
Jeff Johnson <jbj@redhat.com>
2ff057
Erik Troan <ewt@redhat.com>
2ff057
Panu Matilainen <pmatilai@redhat.com>
2ff057
.fi