blob: 85b7b66398437606a37d9a3dcf1275db663f4405 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
.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
|