1
#/*! \page config_rpmpopt Default configuration: /usr/lib/rpm/rpmpopt-@VERSION@
4
# This file *should not be modified*. Local customizations
5
# belong in /etc/popt, not here. This file will be replaced
6
# whenever a new version of RPM is installed.
8
# Note: Not all popt aliases are documented. This is a decision on my
9
# part as to which are the more important aliases. Feel free to clip
10
# a copy of the alias/exec here and place in /etc/popt or ~/.popt with
11
# your own words added. It's easier than arguing about how many options
12
# fit on the head of an executable :-)
15
rpm alias --scripts --qf '\
16
%|PREIN?{preinstall scriptlet\
17
%|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
18
{%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
20
%|POSTIN?{postinstall scriptlet\
21
%|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
22
{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
24
%|PREUN?{preuninstall scriptlet\
25
%|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
26
{%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
28
%|POSTUN?{postuninstall scriptlet\
29
%|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
30
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
32
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
34
--POPTdesc=$"list install/erase scriptlets from package(s)"
36
rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
37
--pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh" \
38
--POPTdesc=$"set permissions of files in a package"
40
rpm alias --setugids -q --qf \
41
'[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
42
--pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" \
43
--POPTdesc=$"set user/group ownership of files in a package"
45
rpm alias --conflicts --qf \
46
"[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" \
47
--POPTdesc=$"list capabilities this package conflicts with"
48
rpm alias --obsoletes --qf \
49
"[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" \
50
--POPTdesc=$"list other packages removed by installing this package"
51
rpm alias --provides --qf \
52
"[%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]" \
53
--POPTdesc=$"list capabilities that this package provides"
55
rpm alias --requires --qf \
56
"[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
57
--POPTdesc=$"list capabilities required by package(s)"
58
rpm alias -R --requires
60
rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\
61
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
62
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
63
Install date: %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed) }| Build Host: %{BUILDHOST}\n\
64
Group : %-27{GROUP} Source RPM: %{SOURCERPM}\n\
65
Size : %-27{SIZE}%|LICENSE?{ License: %{LICENSE}}|\n\
66
%|PACKAGER?{Packager : %{PACKAGER}\n}|\
67
%|URL?{URL : %{URL}\n}|\
68
Summary : %{SUMMARY}\n\
69
Description :\n%{DESCRIPTION}\n' \
70
--POPTdesc=$"list descriptive information from package(s)"
72
rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]' \
73
--POPTdesc=$"list change logs for this package"
75
rpm alias --triggerscripts --qf '\
76
[trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
78
rpm alias --triggers --triggerscripts \
79
--POPTdesc=$"list trigger scriptlets from package(s)"
81
rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
82
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
83
--POPTdesc=$"list package(s) by install time, most recent first"
85
rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
86
--POPTdesc=$"list all files from each package"
88
rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides \
89
--POPTdesc=$"find package name that contains a provided capability (needs rpmdb-redhat package installed)"
91
rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires \
92
--POPTdesc=$"find package name that contains a required capability (needs rpmdb-redhat package installed)"
94
# colon separated i18n domains to use as PO catalogue lookaside for
95
* retrieving header group/description/summary.
97
# For Red Hat, value should be "redhat-dist:redhat-powertools".
98
rpm alias --i18ndomains --define '_i18ndomains !#:+'
100
# Build policies enabled from command line. Last policy applies.
101
rpm alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+' \
102
--POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
103
--POPTargs=$"<policy>"
105
# Choose db interface:
107
# 1 native db1 interface (e.g. linux glibc libdb1 routines).
108
# 2 native db2 interface.
109
# 3 native db3 interface.
110
# -1 db3 -> db2 -> db1 (as available).
112
# There are two macros so that --rebuilddb can convert db1 -> db3
113
rpm alias --dbapi --define '_dbapi !#:+'
115
rpm alias --rebuilddbapi --define '_dbapi_rebuild !#:+'
116
rpm alias --rebuilddbpath --define '_dbapath_rebuild !#:+'
118
#==============================================================================
119
# [--dbpath <dir>] "use <dir> as the directory for the database"
120
rpm alias --dbpath --define '_dbpath !#:+'
121
# [--ftpport <port>] "port number of ftp server (or proxy)"
122
rpm alias --ftpport --define '_ftpport !#:+'
123
# [--ftpproxy <host>] "hostname or IP of ftp proxy"
124
rpm alias --ftpproxy --define '_ftpproxy !#:+'
125
# [--httpport <port>] "port number of http server (or proxy)"
126
rpm alias --httpport --define '_httpport !#:+'
127
# [--httpproxy <host>] "hostname or IP of http proxy"
128
rpm alias --httpproxy --define '_httpproxy !#:+'
130
# set the time check to <secs>
131
rpm alias --timecheck --define '_timecheck !#:+'
133
#==============================================================================
134
# Popt glue to preserve legacy CLI behavior.
136
# XXX popt exec parsing doesn't honor POPT_ARGFLAG_ONEDASH
137
rpm exec --bp rpmb -bp
138
rpm exec --bc rpmb -bc
139
rpm exec --bi rpmb -bi
140
rpm exec --bl rpmb -bl
141
rpm exec --ba rpmb -ba
142
rpm exec --bb rpmb -bb
143
rpm exec --bs rpmb -bs
144
rpm exec --tp rpmb -tp
145
rpm exec --tc rpmb -tc
146
rpm exec --ti rpmb -ti
147
rpm exec --tl rpmb -tl
148
rpm exec --ta rpmb -ta
149
rpm exec --tb rpmb -tb
150
rpm exec --ts rpmb -ts
151
rpm exec --rebuild rpmb --rebuild
152
rpm exec --recompile rpmb --recompile
153
rpm exec --clean rpmb --clean
154
rpm exec --rmsource rpmb --rmsource
155
rpm exec --rmspec rpmb --rmspec
156
rpm exec --target rpmb --target
157
rpm exec --short-circuit rpmb --short-circuit
159
rpm exec --initdb rpmd --initdb
160
rpm exec --rebuilddb rpmd --rebuilddb
161
rpm exec --verifydb rpmd --verifydb
164
#rpm exec --erase rpme --erase
166
#rpm exec --upgrade rpmu --upgrade
168
rpm exec --addsign rpmk --addsign
170
rpm exec --checksig rpmk --checksig
171
rpm exec --resign rpmk --resign
174
rpm exec --query rpmq --query
175
rpm exec --querytags rpmq --querytags
178
rpm exec --verify rpmv --verify
180
rpm alias --with --define "_with_!#:+ --with-!#:+" \
181
--POPTdesc=$"enable configure <option> for build" \
182
--POPTargs=$"<option>"
183
rpm alias --without --define "_without_!#:+ --without-!#:+" \
184
--POPTdesc=$"disable configure <option> for build" \
185
--POPTargs=$"<option>"
186
#==============================================================================
187
rpmb alias --dbpath --define '_dbpath !#:+' \
188
--POPTdesc=$"use <dir> as the directory for the database" \
190
rpmb alias --ftpport --define '_ftpport !#:+'
191
rpmb alias --ftpproxy --define '_ftpproxy !#:+'
192
rpmb alias --httpport --define '_httpport !#:+'
193
rpmb alias --httpproxy --define '_httpproxy !#:+'
194
rpmb alias --timecheck --define '_timecheck !#:+'
195
rpmb alias --with --define "_with_!#:+ --with-!#:+" \
196
--POPTdesc=$"enable configure <option> for build" \
197
--POPTargs=$"<option>"
198
rpmb alias --without --define "_without_!#:+ --without-!#:+" \
199
--POPTdesc=$"disable configure <option> for build" \
200
--POPTargs=$"<option>"
201
#==============================================================================
202
rpmbuild alias --dbpath --define '_dbpath !#:+' \
203
--POPTdesc=$"use <dir> as the directory for the database" \
205
rpmbuild alias --ftpport --define '_ftpport !#:+'
206
rpmbuild alias --ftpproxy --define '_ftpproxy !#:+'
207
rpmbuild alias --httpport --define '_httpport !#:+'
208
rpmbuild alias --httpproxy --define '_httpproxy !#:+'
209
rpmbuild alias --timecheck --define '_timecheck !#:+'
210
rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
211
--POPTdesc=$"enable configure <option> for build" \
212
--POPTargs=$"<option>"
213
rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \
214
--POPTdesc=$"disable configure <option> for build" \
215
--POPTargs=$"<option>"
216
#==============================================================================
217
rpmd alias --dbpath --define '_dbpath !#:+' \
218
--POPTdesc=$"use <dir> as the directory for the database" \
220
rpmd alias --ftpport --define '_ftpport !#:+'
221
rpmd alias --ftpproxy --define '_ftpproxy !#:+'
222
rpmd alias --httpport --define '_httpport !#:+'
223
rpmd alias --httpproxy --define '_httpproxy !#:+'
224
#==============================================================================
225
rpmdb alias --dbpath --define '_dbpath !#:+' \
226
--POPTdesc=$"use <dir> as the directory for the database" \
228
rpmdb alias --ftpport --define '_ftpport !#:+'
229
rpmdb alias --ftpproxy --define '_ftpproxy !#:+'
230
rpmdb alias --httpport --define '_httpport !#:+'
231
rpmdb alias --httpproxy --define '_httpproxy !#:+'
232
#==============================================================================
233
rpme alias --dbpath --define '_dbpath !#:+' \
234
--POPTdesc=$"use <dir> as the directory for the database" \
236
rpme alias --ftpport --define '_ftpport !#:+'
237
rpme alias --ftpproxy --define '_ftpproxy !#:+'
238
rpme alias --httpport --define '_httpport !#:+'
239
rpme alias --httpproxy --define '_httpproxy !#:+'
240
#==============================================================================
241
rpmi alias --dbpath --define '_dbpath !#:+' \
242
--POPTdesc=$"use <dir> as the directory for the database" \
244
rpmi alias --ftpport --define '_ftpport !#:+'
245
rpmi alias --ftpproxy --define '_ftpproxy !#:+'
246
rpmi alias --httpport --define '_httpport !#:+'
247
rpmi alias --httpproxy --define '_httpproxy !#:+'
248
#==============================================================================
249
rpmk alias --dbpath --define '_dbpath !#:+' \
250
--POPTdesc=$"use <dir> as the directory for the database" \
252
rpmk alias --ftpport --define '_ftpport !#:+'
253
rpmk alias --ftpproxy --define '_ftpproxy !#:+'
254
rpmk alias --httpport --define '_httpport !#:+'
255
rpmk alias --httpproxy --define '_httpproxy !#:+'
256
#==============================================================================
257
rpmq alias --dbpath --define '_dbpath !#:+' \
258
--POPTdesc=$"use <dir> as the directory for the database" \
260
rpmq alias --ftpport --define '_ftpport !#:+'
261
rpmq alias --ftpproxy --define '_ftpproxy !#:+'
262
rpmq alias --httpport --define '_httpport !#:+'
263
rpmq alias --httpproxy --define '_httpproxy !#:+'
265
rpmq alias --scripts --qf '\
266
%|PREIN?{preinstall scriptlet\
267
%|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
268
{%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
270
%|POSTIN?{postinstall scriptlet\
271
%|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
272
{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
274
%|PREUN?{preuninstall scriptlet\
275
%|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
276
{%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
278
%|POSTUN?{postuninstall scriptlet\
279
%|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
280
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
282
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
284
--POPTdesc=$"list install/erase scriptlets from package(s)"
286
rpmq alias --conflicts --qf \
287
"[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" \
288
--POPTdesc=$"list capabilities this package conflicts with"
289
rpmq alias --obsoletes --qf \
290
"[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" \
291
--POPTdesc=$"list other packages removed by installing this package"
292
rpmq alias --provides --qf \
293
"[%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]" \
294
--POPTdesc=$"list capabilities that this package provides"
296
rpmq alias --requires --qf \
297
"[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
298
--POPTdesc=$"list capabilities required by package(s)"
299
rpmq alias -R --requires
301
rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\
302
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
303
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
304
Install date: %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed) }| Build Host: %{BUILDHOST}\n\
305
Group : %-27{GROUP} Source RPM: %{SOURCERPM}\n\
306
Size : %-27{SIZE}%|LICENSE?{ License: %{LICENSE}}|\n\
307
%|PACKAGER?{Packager : %{PACKAGER}\n}|\
308
%|URL?{URL : %{URL}\n}|\
309
Summary : %{SUMMARY}\n\
310
Description :\n%{DESCRIPTION}\n' \
311
--POPTdesc=$"list descriptive information from package(s)"
313
rpmq alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]' \
314
--POPTdesc=$"list change logs for this package"
316
rpmq alias --triggerscripts --qf '\
317
[trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
318
%{TRIGGERSCRIPTS}\n]'
319
rpmq alias --triggers --triggerscripts \
320
--POPTdesc=$"list trigger scriptlets from package(s)"
322
rpmq alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
323
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
324
--POPTdesc=$"list package(s) by install time, most recent first"
326
rpmq alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
327
--POPTdesc=$"list all files from each package"
328
#==============================================================================
329
rpmu alias --dbpath --define '_dbpath !#:+' \
330
--POPTdesc=$"use <dir> as the directory for the database" \
332
rpmu alias --ftpport --define '_ftpport !#:+'
333
rpmu alias --ftpproxy --define '_ftpproxy !#:+'
334
rpmu alias --httpport --define '_httpport !#:+'
335
rpmu alias --httpproxy --define '_httpproxy !#:+'
336
#==============================================================================
337
rpmv alias --dbpath --define '_dbpath !#:+' \
338
--POPTdesc=$"use <dir> as the directory for the database" \
340
rpmv alias --ftpport --define '_ftpport !#:+'
341
rpmv alias --ftpproxy --define '_ftpproxy !#:+'
342
rpmv alias --httpport --define '_httpport !#:+'
343
rpmv alias --httpproxy --define '_httpproxy !#:+'