Debian Codegraph @

upstream/debian-unstable/man1/rpmspec.1

raw
1 .\" Generated by scdoc 1.11.4
2 .\" Complete documentation for this program is not available as a GNU info page
3 .ie \n(.g .ds Aq \(aq
4 .el .ds Aq '
5 .nh
6 .ad l
7 .\" Begin generated content:
8 .TH "RPMSPEC" "1" "2026-04-10" "RPM 6.0.1"
9 .PP
10 .SH NAME
11 rpmspec - RPM Spec Tool
12 .PP
13 .SH SYNOPSIS
14 \fBrpmspec\fR {\fB-q\fR|\fB--query\fR} [options] [query-options] \fISPEC_FILE\fR .\&.\&.\&
15 .PP
16 \fBrpmspec\fR {\fB-P\fR|\fB--parse\fR} [options] \fISPEC_FILE\fR .\&.\&.\&
17 .PP
18 \fBrpmspec\fR \fB--shell\fR [options] [\fISPEC_FILE\fR .\&.\&.\&]
19 .PP
20 .SH DESCRIPTION
21 \fBrpmspec\fR is a tool for querying a spec file.\& More specifically for
22 querying hypothetical packages which would be created from the given
23 spec file.\& So querying a spec file with \fBrpmspec\fR is similar to
24 querying a package built from that spec file.\& But it is not identical.\&
25 With \fBrpmspec\fR you can'\&t query all fields which you can query from a
26 built package.\& E.\& g.\& you can'\&t query BUILDTIME with \fBrpmspec\fR for
27 obvious reasons.\& You also cannot query other fields automatically
28 generated during a build of a package like auto generated dependencies.\&
29 .PP
30 .SH OPERATIONS
31 \fB-q\fR,
32 \fB--query\fR
33 .RS 4
34 Query parsed spec header, similarly to querying packages.\&
35 .PP
36 .RE
37 \fB-P\fR,
38 \fB--parse\fR
39 .RS 4
40 Output parsed spec file to the standard output.\& That is,
41 conditionals are handled, macros parsed and so on.\&
42 .PP
43 .RE
44 \fB--shell\fR
45 .RS 4
46 Invoke an interactive shell for inspecting macros, optionally
47 after parsing a spec.\& Mainly useful for troubleshooting.\&
48 .PP
49 .RE
50 .SH ARGUMENTS
51 \fISPECFILE\fR
52 .RS 4
53 RPM spec file used for building packages with rpmbuild.\&
54 .PP
55 .RE
56 .SH OPTIONS
57 See \fBrpm-common\fR(8) for the options common to all operations.\&
58 .PP
59 .SH QUERY OPTIONS
60 \fB--qf\fR \fIQUERYFMT\fR,
61 \fB--queryformat\fR \fIQUERYFMT\fR
62 .RS 4
63 Specify output format for spec queries.\& See \fBrpm-queryformat\fR(7) for
64 details.\&
65 .PP
66 .RE
67 \fB--rpms\fR
68 .RS 4
69 Operate on the all binary package headers generated from spec.\&
70 .PP
71 .RE
72 \fB--builtrpms\fR
73 .RS 4
74 Operate only on the binary package headers of packages which would be
75 built from spec.\& That means ignoring package headers of packages that
76 won'\&t be built from spec i.\& e.\& ignoring package headers of packages
77 without file section.\&
78 .PP
79 .RE
80 \fB--srpm\fR
81 .RS 4
82 Operate on the source package header(s) generated from spec.\&
83 .PP
84 .RE
85 .SH ENVIRONMENT
86 See \fBrpm-common\fR(8).\&
87 .PP
88 .SH EXIT STATUS
89 On success, 0 is returned, a nonzero failure code otherwise.\&
90 .PP
91 .SH EXAMPLES
92 \fBrpmspec -q rpm.\&spec\fR
93 .RS 4
94 Get list of binary packages which would be generated from the rpm
95 spec file, eg:
96 .nf
97 .RS 4
98 rpm-4\&.11\&.3-3\&.fc20\&.x86_64
99 rpm-libs-4\&.11\&.3-3\&.fc20\&.x86_64
100 rpm-build-libs-4\&.11\&.3-3\&.fc20\&.x86_64
101 \&.\&.\&.
102 .fi
103 .RE
104 .PP
105 .RE
106 \fBrpmspec -q --qf "%{name}: %{summary}n" rpm.\&spec\fR
107 .RS 4
108 Get summary infos for single binary packages generated from the
109 rpm spec file, eg:
110 .nf
111 .RS 4
112 rpm: The RPM package management system
113 rpm-libs: Libraries for manipulating RPM packages
114 rpm-build-libs: Libraries for building and signing RPM packages
115 \&.\&.\&.
116 .fi
117 .RE
118 .PP
119 .RE
120 \fBrpmspec -q --srpm rpm.\&spec\fR
121 .RS 4
122 Get the source package which would be generated from the rpm spec
123 file, eg:
124 .nf
125 .RS 4
126 rpm-4\&.11\&.3-3\&.fc20\&.x86_64
127 .fi
128 .RE
129 .PP
130 .RE
131 \fBrpmspec -P rpm.\&spec\fR
132 .RS 4
133 Parse the rpm spec file to standard output, eg:
134 .nf
135 .RS 4
136 Summary: The RPM package management system
137 Name: rpm
138 Version: 4\&.14\&.0
139 \&.\&.\&.
140 .fi
141 .RE
142 .PP
143 .RE
144 \fBrpmspec --shell\fR
145 .RS 4
146 Run interactive macro shell for debugging macros, eg:
147 .nf
148 .RS 4
149 > %define foo bar
150 > %foo
151 bar
152 > %(date)
153 Tue Apr 13 03:55:37 PM EEST 2021
154 > %getncpus
155 8
156 .fi
157 .RE
158 .PP
159 .RE
160 \fBrpmspec --shell popt.\&spec\fR
161 .RS 4
162 Run interactive macros shell in spec context, eg:
163 .nf
164 .RS 4
165 %name
166 popt
167 %version
168 1\&.18
169 .fi
170 .RE
171 .PP
172 .RE
173 .SH SEE ALSO
174 \fBpopt\fR(3), \fBrpm\fR(8), \fBrpmbuild\fR(1), \fBrpm-queryformat\fR(7), \fBrpm-macros\fR(7)
175 .PP
176 \fBrpmspec --help\fR - as rpm supports customizing the options via popt
177 aliases it'\&s impossible to guarantee that what'\&s described in the
178 manual matches what'\&s available.\&
179 .PP
180 \fBhttp://www.\&rpm.\&org/\fR