rpm/doc/rpmspec.8

125 lines
3.2 KiB
Groff

.TH "RPMSPEC" "8" "29 October 2010" "Red Hat, Inc"
.SH NAME
rpmspec \- RPM Spec Tool
.SH SYNOPSIS
.SS "QUERYING SPEC FILES:"
.PP
\fBrpmspec\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR] \fB\fISPEC_FILE\fB\fR\fI ...\fR
.SS "PARSING SPEC FILES TO STDOUT:"
.PP
\fBrpmspec\fR {\fB-P|--parse\fR} \fB\fISPEC_FILE\fB\fR\fI ...\fR
.SH DESCRIPTION
.PP
\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.
.SS "select-options"
.PP
[\fB\--rpms\fB\fR]
[\fB\--srpm\fB\fR]
.SS "query-options"
.PP
[\fB--qf,--queryformat \fIQUERYFMT\fB\fR]
[\fB--target \fITARGET_PLATFORM\fB\fR]
.SS "QUERY OPTIONS"
.PP
The general form of an rpm spec query command is
.PP
\fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
.PP
You may specify the format that the information should be
printed in. To do this, you use the
\fB--qf|--queryformat\fR \fB\fIQUERYFMT\fB\fR
option, followed by the \fIQUERYFMT\fR format string.
See \fBrpm(8)\fR for details.
.PP
.SS "SELECT OPTIONS"
.PP
\fB--rpms\fR
Operate on the all binary package headers generated from spec.
\fB--builtrpms\fR
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.
\fB--srpm\fR
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:
.PP
.RS 4
.nf
$ 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
...
.RE
.PP
Get summary infos for single binary packages generated from the rpm spec file:
.PP
.RS 4
.nf
$ 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
...
.RE
.PP
Get the source package which would be generated from the rpm spec file:
.PP
.RS 4
.nf
$ rpmspec -q --srpm rpm.spec
rpm-4.11.3-3.fc20.x86_64
.RE
.PP
Parse the rpm spec file to stdout:
.PP
.RS 4
.nf
$ rpmspec -P rpm.spec
Summary: The RPM package management system
Name: rpm
Version: 4.14.0
...
.RE
.SH "SEE ALSO"
.nf
\fBpopt\fR(3),
\fBrpm\fR(8),
\fBrpmdb\fR(8),
\fBrpmkeys\fR(8),
\fBrpmsign\fR(8),
\fBrpm2cpio\fR(8),
\fBrpmbuild\fR(8),
.fi
\fBrpmspec --help\fR - 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.
\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
\fR
.SH "AUTHORS"
.nf
Marc Ewing <marc@redhat.com>
Jeff Johnson <jbj@redhat.com>
Erik Troan <ewt@redhat.com>
Panu Matilainen <pmatilai@redhat.com>
.fi