fixing
[platform/upstream/rpm.git] / doc / rpmspec.8
1 .TH "RPMSPEC" "8" "29 October 2010" "Red Hat, Inc"
2 .SH NAME
3 rpmspec \- RPM Spec Tool
4 .SH SYNOPSIS
5 .SS "QUERYING SPEC FILES:"
6 .PP
7
8 \fBrpmspec\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR] \fB\fISPEC_FILE\fB\fR\fI ...\fR
9
10 .SS "PARSING SPEC FILES TO STDOUT:"
11 .PP
12
13 \fBrpmspec\fR {\fB-P|--parse\fR} \fB\fISPEC_FILE\fB\fR\fI ...\fR
14
15 .SH DESCRIPTION
16 .PP
17 \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.
18
19 .SS "select-options"
20 .PP
21
22  [\fB\--rpms\fB\fR]
23  [\fB\--srpm\fB\fR]
24
25 .SS "query-options"
26 .PP
27
28  [\fB--qf,--queryformat \fIQUERYFMT\fB\fR]
29  [\fB--target \fITARGET_PLATFORM\fB\fR]
30  
31 .SS "QUERY OPTIONS"
32 .PP
33 The general form of an rpm spec query command is 
34 .PP
35
36 \fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
37
38 .PP
39 You may specify the format that the information should be
40 printed in. To do this, you use the
41
42  \fB--qf|--queryformat\fR \fB\fIQUERYFMT\fB\fR
43
44 option, followed by the \fIQUERYFMT\fR format string.
45 See \fBrpm(8)\fR for details.
46 .PP
47
48 .SS "SELECT OPTIONS"
49 .PP
50  \fB--rpms\fR
51 Operate on the all binary package headers generated from spec.
52  \fB--builtrpms\fR
53 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.
54  \fB--srpm\fR
55 Operate on the source package header(s) generated from spec.
56
57 .SH EXAMPLES
58 .PP
59 Get list of binary packages which would be generated from the rpm spec file:
60 .PP
61 .RS 4
62 .nf
63  $ rpmspec -q rpm.spec
64  rpm-4.11.3-3.fc20.x86_64
65  rpm-libs-4.11.3-3.fc20.x86_64
66  rpm-build-libs-4.11.3-3.fc20.x86_64
67  ...
68 .RE
69 .PP
70 Get summary infos for single binary packages generated from the rpm spec file:
71 .PP
72 .RS 4
73 .nf
74  $ rpmspec -q --qf "%{name}: %{summary}\\n" rpm.spec
75  rpm: The RPM package management system
76  rpm-libs: Libraries for manipulating RPM packages
77  rpm-build-libs: Libraries for building and signing RPM packages
78  ...
79 .RE
80 .PP
81 Get the source package which would be generated from the rpm spec file:
82 .PP
83 .RS 4
84 .nf
85  $ rpmspec -q --srpm rpm.spec
86  rpm-4.11.3-3.fc20.x86_64
87 .RE
88 .PP
89 Parse the rpm spec file to stdout:
90 .PP
91 .RS 4
92 .nf
93  $ rpmspec -P rpm.spec
94  Summary: The RPM package management system
95  Name: rpm
96  Version: 4.14.0
97  ...
98 .RE
99 .SH "SEE ALSO"
100 .nf
101 \fBpopt\fR(3),
102 \fBrpm\fR(8),
103 \fBrpmdb\fR(8),
104 \fBrpmkeys\fR(8),
105 \fBrpmsign\fR(8),
106 \fBrpm2cpio\fR(8),
107 \fBrpmbuild\fR(8),
108 .fi
109
110 \fBrpmspec --help\fR - as rpm supports customizing the options via popt aliases 
111 it's impossible to guarantee that what's described in the manual matches 
112 what's available.
113
114
115 \fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
116 \fR
117 .SH "AUTHORS"
118
119 .nf
120 Marc Ewing <marc@redhat.com>
121 Jeff Johnson <jbj@redhat.com>
122 Erik Troan <ewt@redhat.com>
123 Panu Matilainen <pmatilai@redhat.com>
124 .fi