1RPMSPEC(8)                  System Manager's Manual                 RPMSPEC(8)
2
3
4

NAME

6       rpmspec - RPM Spec Tool
7

SYNOPSIS

9   QUERYING SPEC FILES:
10       rpmspec {-q|--query} [select-options] [query-options] SPEC_FILE ...
11
12
13   PARSING SPEC FILES TO STDOUT:
14       rpmspec {-P|--parse} SPEC_FILE ...
15
16

DESCRIPTION

18       rpmspec  is  a  tool  for  querying  a spec file. More specifically for
19       querying hypothetical packages which would be created  from  the  given
20       spec  file. So querying a spec file with rpmspec is similar to querying
21       a package built from that spec file. But is is not identical. With rpm‐
22       spec  you can't query all fields which you can query from a built pack‐
23       age. E. g. you can't query BUILDTIME with rpmspec for obvious  reasons.
24       You  also  cannot  query  other fields automatically generated during a
25       build of a package like auto generated dependencies.
26
27
28   select-options
29        [--rpms]
30        [--srpm]
31
32
33   query-options
34        [--qf,--queryformat QUERYFMT]
35        [--target TARGET_PLATFORM]
36
37
38   QUERY OPTIONS
39       The general form of an rpm spec query command is
40
41       rpm {-q|--query} [select-options] [query-options]
42
43
44       You may specify the format that the information should be  printed  in.
45       To do this, you use the
46
47        --qf|--queryformat QUERYFMT
48
49       option,  followed  by  the  QUERYFMT  format  string.   See  rpm(8) for
50       details.
51
52   SELECT OPTIONS
53        --rpms Operate on the all binary package headers generated from spec.
54        --builtrpms Operate only on the binary  package  headers  of  packages
55       which  would be built from spec. That means ignoring package headers of
56       packages that won't be built from spec i. e. ignoring  package  headers
57       of packages without file section.
58        --srpm Operate on the source package header(s) generated from spec.
59
60

EXAMPLES

62       Get  list of binary packages which would be generated from the rpm spec
63       file:
64
65            $ rpmspec -q rpm.spec
66            rpm-4.11.3-3.fc20.x86_64
67            rpm-libs-4.11.3-3.fc20.x86_64
68            rpm-build-libs-4.11.3-3.fc20.x86_64
69            ...
70
71       Get summary infos for single binary packages generated from the rpm spec file:
72
73            $ rpmspec -q --qf "%{name}: %{summary}\n" rpm.spec
74            rpm: The RPM package management system
75            rpm-libs: Libraries for manipulating RPM packages
76            rpm-build-libs: Libraries for building and signing RPM packages
77            ...
78
79       Get the source package which would be generated from the rpm spec file:
80
81            $ rpmspec -q --srpm rpm.spec
82            rpm-4.11.3-3.fc20.x86_64
83
84       Parse the rpm spec file to stdout:
85
86            $ rpmspec -P rpm.spec
87            Summary: The RPM package management system
88            Name: rpm
89            Version: 4.14.0
90            ...
91

SEE ALSO

93       popt(3),
94       rpm(8),
95       rpmdb(8),
96       rpmkeys(8),
97       rpmsign(8),
98       rpm2cpio(8),
99       rpmbuild(8),
100
101       rpmspec --help - as rpm  supports  customizing  the  options  via  popt
102       aliases  it's impossible to guarantee that what's described in the man‐
103       ual matches what's available.
104
105
106       http://www.rpm.org/ <URL:http://www.rpm.org/>
107

AUTHORS

109       Marc Ewing <marc@redhat.com>
110       Jeff Johnson <jbj@redhat.com>
111       Erik Troan <ewt@redhat.com>
112       Panu Matilainen <pmatilai@redhat.com>
113
114
115
116Red Hat, Inc                    29 October 2010                     RPMSPEC(8)
Impressum