~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to rpmpopt.in

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#/*! \page config_rpmpopt Default configuration: /usr/lib/rpm/rpmpopt-@VERSION@
 
2
# \verbatim
 
3
#
 
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.
 
7
#
 
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 :-)
 
13
#
 
14
 
 
15
rpm     alias --scripts --qf '\
 
16
%|PREIN?{preinstall scriptlet\
 
17
%|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
 
18
{%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
 
19
\
 
20
%|POSTIN?{postinstall scriptlet\
 
21
%|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
 
22
{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
 
23
\
 
24
%|PREUN?{preuninstall scriptlet\
 
25
%|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
 
26
{%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
 
27
\
 
28
%|POSTUN?{postuninstall scriptlet\
 
29
%|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
 
30
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
 
31
\
 
32
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
 
33
' \
 
34
        --POPTdesc=$"list install/erase scriptlets from package(s)"
 
35
 
 
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"
 
39
 
 
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"
 
44
 
 
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"
 
54
 
 
55
rpm     alias --requires        --qf \
 
56
  "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
 
57
        --POPTdesc=$"list capabilities required by package(s)"
 
58
rpm     alias -R --requires
 
59
 
 
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)"
 
71
 
 
72
rpm     alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]' \
 
73
        --POPTdesc=$"list change logs for this package"
 
74
 
 
75
rpm     alias --triggerscripts --qf '\
 
76
[trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
 
77
%{TRIGGERSCRIPTS}\n]'
 
78
rpm     alias --triggers --triggerscripts \
 
79
        --POPTdesc=$"list trigger scriptlets from package(s)"
 
80
 
 
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"
 
84
 
 
85
rpm     alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
 
86
        --POPTdesc=$"list all files from each package"
 
87
 
 
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)"
 
90
 
 
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)"
 
93
 
 
94
# colon separated i18n domains to use as PO catalogue lookaside for
 
95
* retrieving header group/description/summary.
 
96
#
 
97
# For Red Hat, value should be "redhat-dist:redhat-powertools".
 
98
rpm alias --i18ndomains --define '_i18ndomains !#:+'
 
99
 
 
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>"
 
104
 
 
105
# Choose db interface:
 
106
#       0       same as 1
 
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).
 
111
#
 
112
# There are two macros so that --rebuilddb can convert db1 -> db3
 
113
rpm alias --dbapi                --define '_dbapi !#:+'
 
114
 
 
115
rpm alias --rebuilddbapi         --define '_dbapi_rebuild !#:+'
 
116
rpm alias --rebuilddbpath        --define '_dbapath_rebuild !#:+'
 
117
 
 
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 !#:+'
 
129
 
 
130
# set the time check to <secs>
 
131
rpm     alias --timecheck       --define '_timecheck !#:+'
 
132
 
 
133
#==============================================================================
 
134
# Popt glue to preserve legacy CLI behavior.
 
135
#
 
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
 
158
 
 
159
rpm     exec --initdb           rpmd --initdb
 
160
rpm     exec --rebuilddb        rpmd --rebuilddb
 
161
rpm     exec --verifydb         rpmd --verifydb
 
162
 
 
163
#rpm    exec -e                 rpme -e
 
164
#rpm    exec --erase            rpme --erase
 
165
#rpm    exec -U                 rpmu -U
 
166
#rpm    exec --upgrade          rpmu --upgrade
 
167
 
 
168
rpm     exec --addsign          rpmk --addsign
 
169
rpm     exec -K                 rpmk -K
 
170
rpm     exec --checksig         rpmk --checksig
 
171
rpm     exec --resign           rpmk --resign
 
172
 
 
173
rpm     exec -q                 rpmq -q
 
174
rpm     exec --query            rpmq --query
 
175
rpm     exec --querytags        rpmq --querytags
 
176
rpm     exec -V                 rpmv -V
 
177
rpm     exec -y                 rpmv -y
 
178
rpm     exec --verify           rpmv --verify
 
179
 
 
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" \
 
189
        --POPTargs=$"<dir>"
 
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" \
 
204
        --POPTargs=$"<dir>"
 
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" \
 
219
        --POPTargs=$"<dir>"
 
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" \
 
227
        --POPTargs=$"<dir>"
 
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" \
 
235
        --POPTargs=$"<dir>"
 
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" \
 
243
        --POPTargs=$"<dir>"
 
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" \
 
251
        --POPTargs=$"<dir>"
 
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" \
 
259
        --POPTargs=$"<dir>"
 
260
rpmq    alias --ftpport         --define '_ftpport !#:+'
 
261
rpmq    alias --ftpproxy        --define '_ftpproxy !#:+'
 
262
rpmq    alias --httpport        --define '_httpport !#:+'
 
263
rpmq    alias --httpproxy       --define '_httpproxy !#:+'
 
264
 
 
265
rpmq    alias --scripts --qf '\
 
266
%|PREIN?{preinstall scriptlet\
 
267
%|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
 
268
{%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
 
269
\
 
270
%|POSTIN?{postinstall scriptlet\
 
271
%|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
 
272
{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
 
273
\
 
274
%|PREUN?{preuninstall scriptlet\
 
275
%|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
 
276
{%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
 
277
\
 
278
%|POSTUN?{postuninstall scriptlet\
 
279
%|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
 
280
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
 
281
\
 
282
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
 
283
' \
 
284
        --POPTdesc=$"list install/erase scriptlets from package(s)"
 
285
 
 
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"
 
295
 
 
296
rpmq    alias --requires        --qf \
 
297
  "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
 
298
        --POPTdesc=$"list capabilities required by package(s)"
 
299
rpmq    alias -R --requires
 
300
 
 
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)"
 
312
 
 
313
rpmq    alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]' \
 
314
        --POPTdesc=$"list change logs for this package"
 
315
 
 
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)"
 
321
 
 
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"
 
325
 
 
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" \
 
331
        --POPTargs=$"<dir>"
 
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" \
 
339
        --POPTargs=$"<dir>"
 
340
rpmv    alias --ftpport         --define '_ftpport !#:+'
 
341
rpmv    alias --ftpproxy        --define '_ftpproxy !#:+'
 
342
rpmv    alias --httpport        --define '_httpport !#:+'
 
343
rpmv    alias --httpproxy       --define '_httpproxy !#:+'
 
344
 
 
345
# \endverbatim
 
346
#*/