2 # This file *should not be modified*. Local customizations
3 # belong in /etc/popt, not here. This file will be replaced
4 # whenever a new version of RPM is installed.
6 rpm alias --scripts --qf '\
7 %|PREIN?{preinstall script\
8 %|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
9 {%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
11 %|POSTIN?{postinstall script\
12 %|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
13 {%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
15 %|PREUN?{preuninstall script\
16 %|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
17 {%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
19 %|POSTUN?{postuninstall script\
20 %|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
21 {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
23 %|VERIFYSCRIPT?{verify script:\n%{VERIFYSCRIPT}\n}|\
26 rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
27 --pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh"
29 rpm alias --setugids -q --qf \
30 '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
31 --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh"
34 rpm alias --conflicts --qf \
35 "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]"
36 rpm alias --obsoletes --qf \
37 "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]"
38 rpm alias --provides --qf \
39 "[%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]"
41 # XXX prereq output is part of requires for query
42 #rpm alias --prereq --qf '[%{PREREQ}:depflags\n]'
44 rpm alias --requires --qf \
45 "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]"
46 rpm alias -R --requires
48 rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\
49 Version : %-27{VERSION} Vendor: %{VENDOR}\n\
50 Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
51 Install date: %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed) }| Build Host: %{BUILDHOST}\n\
52 Group : %-27{GROUP} Source RPM: %{SOURCERPM}\n\
53 Size : %-27{SIZE}%|LICENSE?{ License: %{LICENSE}}|\n\
54 %|PACKAGER?{Packager : %{PACKAGER}\n}|\
55 %|URL?{URL : %{URL}\n}|\
56 Summary : %{SUMMARY}\n\
57 Description :\n%{DESCRIPTION}\n'
59 rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]'
61 rpm alias --triggerscripts --qf '\
62 [trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
64 rpm alias --triggers --triggerscripts
66 rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
67 --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' "
69 rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
71 rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides
72 rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires
74 # colon separated i18n domains to use as PO catalogue lookaside for
75 * retrieving header group/description/summary.
77 # For Red Hat, value should be "redhat-dist:redhat-powertools".
78 rpm alias --i18ndomains --define '_i18ndomains !#:+'
80 # Build policies enabled from command line. Last policy applies.
81 rpm alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+'
83 # Choose db interface:
85 # 1 native db1 interface (e.g. linux glibc libdb1 routines).
86 # 2 native db2 interface.
87 # 3 native db3 interface.
88 # -1 db3 -> db2 -> db1 (as available).
90 # There are two macros so that --rebuilddb can convert db1 -> db3
91 rpm alias --dbapi --define '_dbapi !#:+'
93 rpm alias --rebuilddbapi --define '_dbapi_rebuild !#:+'
94 rpm alias --rebuilddbpath --define '_dbapath_rebuild !#:+'
96 #==============================================================================
97 # [--dbpath <dir>] "use <dir> as the directory for the database"
98 rpm alias --dbpath --define '_dbpath !#:+'
99 # [--ftpport <port>] "port number of ftp server (or proxy)"
100 rpm alias --ftpport --define '_ftpport !#:+'
101 # [--ftpproxy <host>] "hostname or IP of ftp proxy"
102 rpm alias --ftpproxy --define '_ftpproxy !#:+'
103 # [--httpport <port>] "port number of http server (or proxy)"
104 rpm alias --httpport --define '_httpport !#:+'
105 # [--httpproxy <host>] "hostname or IP of http proxy"
106 rpm alias --httpproxy --define '_httpproxy !#:+'
108 # set the time check to <secs>
109 rpm alias --timecheck --define '_timecheck !#:+'
111 #==============================================================================
112 # Popt glue to preserve legacy CLI behavior.
114 # XXX popt exec parsing doesn't honor POPT_ARGFLAG_ONEDASH
115 rpm exec --bp rpmb -bp
116 rpm exec --bc rpmb -bc
117 rpm exec --bi rpmb -bi
118 rpm exec --bl rpmb -bl
119 rpm exec --ba rpmb -ba
120 rpm exec --bb rpmb -bb
121 rpm exec --bs rpmb -bs
122 rpm exec --tp rpmb -tp
123 rpm exec --tc rpmb -tc
124 rpm exec --ti rpmb -ti
125 rpm exec --tl rpmb -tl
126 rpm exec --ta rpmb -ta
127 rpm exec --tb rpmb -tb
128 rpm exec --ts rpmb -ts
129 rpm exec --rebuild rpmb --rebuild
130 rpm exec --recompile rpmb --recompile
131 rpm exec --clean rpmb --clean
132 rpm exec --rmsource rpmb --rmsource
133 rpm exec --rmspec rpmb --rmspec
134 rpm exec --target rpmb --target
135 rpm exec --short-circuit rpmb --short-circuit
137 rpm exec --initdb rpmdb --initdb
138 rpm exec --rebuilddb rpmdb --rebuilddb
141 #rpm exec --erase rpme --erase
143 #rpm exec --upgrade rpmu --upgrade
145 rpm exec --addsign rpmk --addsign
147 rpm exec --checksig rpmk --checksig
148 rpm exec --resign rpmk --resign
151 rpm exec --query rpmq --query
152 rpm exec --querytags rpmq --querytags
155 rpm exec --verify rpmv --verify
157 #==============================================================================
158 rpmb alias --dbpath --define '_dbpath !#:+'
159 rpmb alias --ftpport --define '_ftpport !#:+'
160 rpmb alias --ftpproxy --define '_ftpproxy !#:+'
161 rpmb alias --httpport --define '_httpport !#:+'
162 rpmb alias --httpproxy --define '_httpproxy !#:+'
163 rpmb alias --timecheck --define '_timecheck !#:+'
164 #==============================================================================
165 rpmdb alias --dbpath --define '_dbpath !#:+'
166 rpmdb alias --ftpport --define '_ftpport !#:+'
167 rpmdb alias --ftpproxy --define '_ftpproxy !#:+'
168 rpmdb alias --httpport --define '_httpport !#:+'
169 rpmdb alias --httpproxy --define '_httpproxy !#:+'
170 #==============================================================================
171 rpme alias --dbpath --define '_dbpath !#:+'
172 rpme alias --ftpport --define '_ftpport !#:+'
173 rpme alias --ftpproxy --define '_ftpproxy !#:+'
174 rpme alias --httpport --define '_httpport !#:+'
175 rpme alias --httpproxy --define '_httpproxy !#:+'
176 #==============================================================================
177 rpmi alias --dbpath --define '_dbpath !#:+'
178 rpmi alias --ftpport --define '_ftpport !#:+'
179 rpmi alias --ftpproxy --define '_ftpproxy !#:+'
180 rpmi alias --httpport --define '_httpport !#:+'
181 rpmi alias --httpproxy --define '_httpproxy !#:+'
182 #==============================================================================
183 rpmq alias --dbpath --define '_dbpath !#:+'
184 rpmq alias --ftpport --define '_ftpport !#:+'
185 rpmq alias --ftpproxy --define '_ftpproxy !#:+'
186 rpmq alias --httpport --define '_httpport !#:+'
187 rpmq alias --httpproxy --define '_httpproxy !#:+'
189 rpmq alias --scripts --qf '\
190 %|PREIN?{preinstall script\
191 %|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
192 {%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
194 %|POSTIN?{postinstall script\
195 %|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
196 {%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
198 %|PREUN?{preuninstall script\
199 %|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
200 {%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
202 %|POSTUN?{postuninstall script\
203 %|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
204 {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
206 %|VERIFYSCRIPT?{verify script:\n%{VERIFYSCRIPT}\n}|\
209 rpmq alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
210 --pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh"
212 rpmq alias --setugids -q --qf \
213 '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
214 --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh"
216 rpmq alias --conflicts --qf \
217 "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]"
218 rpmq alias --obsoletes --qf \
219 "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]"
220 rpmq alias --provides --qf \
221 "[%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]"
223 # XXX prereq output is part of requires for query
224 #rpmq alias --prereq --qf '[%{PREREQ}:depflags\n]'
226 rpmq alias --requires --qf \
227 "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]"
228 rpmq alias -R --requires
230 rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\
231 Version : %-27{VERSION} Vendor: %{VENDOR}\n\
232 Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
233 Install date: %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed) }| Build Host: %{BUILDHOST}\n\
234 Group : %-27{GROUP} Source RPM: %{SOURCERPM}\n\
235 Size : %-27{SIZE}%|LICENSE?{ License: %{LICENSE}}|\n\
236 %|PACKAGER?{Packager : %{PACKAGER}\n}|\
237 %|URL?{URL : %{URL}\n}|\
238 Summary : %{SUMMARY}\n\
239 Description :\n%{DESCRIPTION}\n'
241 rpmq alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]'
243 rpmq alias --triggerscripts --qf '\
244 [trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
245 %{TRIGGERSCRIPTS}\n]'
246 rpmq alias --triggers --triggerscripts
248 rpmq alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
249 --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' "
251 rpmq alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
252 #==============================================================================
253 rpmt alias --dbpath --define '_dbpath !#:+'
254 rpmt alias --ftpport --define '_ftpport !#:+'
255 rpmt alias --ftpproxy --define '_ftpproxy !#:+'
256 rpmt alias --httpport --define '_httpport !#:+'
257 rpmt alias --httpproxy --define '_httpproxy !#:+'
258 rpmt alias --timecheck --define '_timecheck !#:+'
259 #==============================================================================
260 rpmu alias --dbpath --define '_dbpath !#:+'
261 rpmu alias --ftpport --define '_ftpport !#:+'
262 rpmu alias --ftpproxy --define '_ftpproxy !#:+'
263 rpmu alias --httpport --define '_httpport !#:+'
264 rpmu alias --httpproxy --define '_httpproxy !#:+'
265 #==============================================================================
266 rpmv alias --dbpath --define '_dbpath !#:+'
267 rpmv alias --ftpport --define '_ftpport !#:+'
268 rpmv alias --ftpproxy --define '_ftpproxy !#:+'
269 rpmv alias --httpport --define '_httpport !#:+'
270 rpmv alias --httpproxy --define '_httpproxy !#:+'