Debian Codegraph @

upstream/debian-trixie/man8/rpmspec.8

raw
1 .\" Automatically generated by Pandoc 3.1.11.1
2 .\"
3 .TH "RPMSPEC" "8" "29 October 2010" "" ""
4 .SH NAME
5 rpmspec \- RPM Spec Tool
6 .SH SYNOPSIS
7 .SS QUERYING SPEC FILES
8 \f[B]rpmspec\f[R] {\f[B]\-q|\-\-query\f[R]} [\f[B]select\-options\f[R]]
9 [\f[B]query\-options\f[R]] \f[I]SPEC_FILE ...\f[R]
10 .SS PARSING SPEC FILES TO STDOUT
11 \f[B]rpmspec\f[R] {\f[B]\-P|\-\-parse\f[R]} \f[I]SPEC_FILE ...\f[R]
12 .SS INVOKING MACRO SHELL
13 \f[B]rpmspec\f[R] {\f[B]\[en]shell\f[R]} [\f[I]SPEC_FILE ...\f[R]]
14 .SH DESCRIPTION
15 \f[B]rpmspec\f[R] is a tool for querying a spec file.
16 More specifically for querying hypothetical packages which would be
17 created from the given spec file.
18 So querying a spec file with \f[B]rpmspec\f[R] is similar to querying a
19 package built from that spec file.
20 But is is not identical.
21 With \f[B]rpmspec\f[R] you can\[aq]t query all fields which you can
22 query from a built package.
23 E. g.
24 you can\[aq]t query BUILDTIME with \f[B]rpmspec\f[R] for obvious
25 reasons.
26 You also cannot query other fields automatically generated during a
27 build of a package like auto generated dependencies.
28 .SS select\-options
29 [\f[B]\-\-rpms\f[R]] [\f[B]\-\-srpm\f[R]]
30 .SS query\-options
31 [\f[B]\-\-qf,\-\-queryformat\f[R] \f[I]QUERYFMT\f[R]]
32 [\f[B]\-\-target\f[R] \f[I]TARGET_PLATFORM\f[R]]
33 .SS QUERY OPTIONS
34 The general form of an rpm spec query command is
35 .PP
36 \f[B]rpm\f[R] {\f[B]\-q|\-\-query\f[R]} [\f[B]select\-options\f[R]]
37 [\f[B]query\-options\f[R]]
38 .PP
39 You may specify the format that the information should be printed in.
40 To do this, you use the
41 .PP
42 \f[B]\-\-qf|\-\-queryformat\f[R] \f[I]QUERYFMT\f[R]
43 .PP
44 option, followed by the \f[I]QUERYFMT\f[R] format string.
45 See \f[B]rpm\f[R](8) for details.
46 .SS SELECT OPTIONS
47 .TP
48 \f[B]\-\-rpms\f[R]
49 Operate on the all binary package headers generated from spec.
50 .TP
51 \f[B]\-\-builtrpms\f[R]
52 Operate only on the binary package headers of packages which would be
53 built from spec.
54 That means ignoring package headers of packages that won\[aq]t be built
55 from spec i.
56 e.
57 ignoring package headers of packages without file section.
58 .TP
59 \f[B]\-\-srpm\f[R]
60 Operate on the source package header(s) generated from spec.
61 .SH EXAMPLES
62 Get list of binary packages which would be generated from the rpm spec
63 file:
64 .RS
65 .IP
66 .EX
67 $ rpmspec \-q rpm.spec
68 rpm\-4.11.3\-3.fc20.x86_64
69 rpm\-libs\-4.11.3\-3.fc20.x86_64
70 rpm\-build\-libs\-4.11.3\-3.fc20.x86_64
71 ...
72 .EE
73 .RE
74 .PP
75 Get summary infos for single binary packages generated from the rpm spec
76 file:
77 .RS
78 .IP
79 .EX
80 $ rpmspec \-q \-\-qf \[dq]%{name}: %{summary}\[rs]n\[dq] rpm.spec
81 rpm: The RPM package management system
82 rpm\-libs: Libraries for manipulating RPM packages
83 rpm\-build\-libs: Libraries for building and signing RPM packages
84 ...
85 .EE
86 .RE
87 .PP
88 Get the source package which would be generated from the rpm spec file:
89 .RS
90 .IP
91 .EX
92 $ rpmspec \-q \-\-srpm rpm.spec
93 rpm\-4.11.3\-3.fc20.x86_64
94 .EE
95 .RE
96 .PP
97 Parse the rpm spec file to stdout:
98 .RS
99 .IP
100 .EX
101 $ rpmspec \-P rpm.spec
102 Summary: The RPM package management system
103 Name: rpm
104 Version: 4.14.0
105 ...
106 .EE
107 .RE
108 .PP
109 Run interactive macro shell for debugging macros:
110 .RS
111 .IP
112 .EX
113 $ rpmspec \-\-shell
114 > %define foo bar
115 > %foo
116 bar
117 > %(date)
118 Tue Apr 13 03:55:37 PM EEST 2021
119 > %getncpus
120 8
121 .EE
122 .RE
123 .PP
124 Run interactive macros shell in spec context:
125 .RS
126 .IP
127 .EX
128 $ rpmspec \-\-shell popt.spec
129 %name
130 popt
131 %version
132 1.18
133 .EE
134 .RE
135 .SH SEE ALSO
136 \f[B]popt\f[R](3), \f[B]rpm\f[R](8), \f[B]rpmdb\f[R](8),
137 \f[B]rpmkeys\f[R](8), \f[B]rpmsign\f[R](8), \f[B]rpm2cpio\f[R](8),
138 \f[B]rpmbuild\f[R](8)
139 .PP
140 \f[B]rpmspec \-\-help\f[R] \- as rpm supports customizing the options
141 via popt aliases it\[aq]s impossible to guarantee that what\[aq]s
142 described in the manual matches what\[aq]s available.
143 .PP
144 \f[B]http://www.rpm.org/ <URL:http://www.rpm.org/>\f[R]
145 .SH AUTHORS
146 .IP
147 .EX
148 Marc Ewing <marc\[at]redhat.com>
149 Jeff Johnson <jbj\[at]redhat.com>
150 Erik Troan <ewt\[at]redhat.com>
151 Panu Matilainen <pmatilai\[at]redhat.com>
152 .EE