1 #/*! \page config_rpmpopt Default configuration: @RPMCONFIGDIR@/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 %|PRETRANS?{pretrans scriptlet\
17 %|PRETRANSPROG?{ (using[ %{PRETRANSPROG}])}|:\n%{PRETRANS}\n}:\
18 {%|PRETRANSPROG?{pretrans program:[ %{PRETRANSPROG}]\n}|}|\
20 %|PREIN?{preinstall scriptlet\
21 %|PREINPROG?{ (using[ %{PREINPROG}])}|:\n%{PREIN}\n}:\
22 {%|PREINPROG?{preinstall program:[ %{PREINPROG}]\n}|}|\
24 %|POSTIN?{postinstall scriptlet\
25 %|POSTINPROG?{ (using[ %{POSTINPROG}])}|:\n%{POSTIN}\n}:\
26 {%|POSTINPROG?{postinstall program:[ %{POSTINPROG}]\n}|}|\
28 %|PREUN?{preuninstall scriptlet\
29 %|PREUNPROG?{ (using[ %{PREUNPROG}])}|:\n%{PREUN}\n}:\
30 {%|PREUNPROG?{preuninstall program:[ %{PREUNPROG}]\n}|}|\
32 %|POSTUN?{postuninstall scriptlet\
33 %|POSTUNPROG?{ (using[ %{POSTUNPROG}])}|:\n%{POSTUN}\n}:\
34 {%|POSTUNPROG?{postuninstall program:[ %{POSTUNPROG}]\n}|}|\
36 %|POSTTRANS?{posttrans scriptlet\
37 %|POSTTRANSPROG?{ (using[ %{POSTTRANSPROG}])}|:\n%{POSTTRANS}\n}:\
38 {%|POSTTRANSPROG?{posttrans program:[ %{POSTTRANSPROG}]\n}|}|\
40 %|VERIFYSCRIPT?{verify scriptlet\
41 %|VERIFYSCRIPTPROG?{ (using[ %{VERIFYSCRIPTPROG}])}|:\n%{VERIFYSCRIPT}\n}:\
42 {%|VERIFYSCRIPTPROG?{verify program:[ %{VERIFYSCRIPTPROG}]\n}|}|\
44 --POPTdesc=$"list install/erase scriptlets from package(s)"
46 rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
47 --pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \
48 --POPTdesc=$"set permissions of files in a package"
50 rpm alias --setugids -q --qf \
51 '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
52 --pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep '^ch '|grep -v \(none\))|sh" \
53 --POPTdesc=$"set user/group ownership of files in a package"
55 rpm alias --conflicts --qf \
56 "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
57 --POPTdesc=$"list capabilities this package conflicts with"
58 rpm alias --obsoletes --qf \
59 "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
60 --POPTdesc=$"list other packages removed by installing this package"
61 rpm alias --provides --qf \
62 "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
63 --POPTdesc=$"list capabilities that this package provides"
64 rpm alias -P --provides
66 rpm alias --requires --qf \
67 "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
68 --POPTdesc=$"list capabilities required by package(s)"
69 rpm alias -R --requires
71 rpm alias --recommends --qf \
72 "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \
73 --POPTdesc=$"list capabilities recommended by package(s)"
74 rpm alias --suggests --qf \
75 "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \
76 --POPTdesc=$"list capabilities suggested by package(s)"
77 rpm alias --supplements --qf \
78 "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \
79 --POPTdesc=$"list capabilities supplemented by package(s)"
80 rpm alias --enhances --qf \
81 "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \
82 --POPTdesc=$"list capabilities enhanced by package(s)"
84 rpm alias --info --qf '\
86 %|EPOCH?{Epoch : %{EPOCH}\n}|\
87 Version : %{VERSION}\n\
88 Release : %{RELEASE}\n\
89 Architecture: %{ARCH}\n\
90 Install Date: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\
93 %|LICENSE?{License : %{LICENSE}}|\n\
94 Signature : %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|\n\
95 Source RPM : %{SOURCERPM}\n\
96 Build Date : %{BUILDTIME:date}\n\
97 Build Host : %{BUILDHOST}\n\
98 Relocations : %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
99 %|PACKAGER?{Packager : %{PACKAGER}\n}|\
100 %|VENDOR?{Vendor : %{VENDOR}\n}|\
101 %|URL?{URL : %{URL}\n}|\
102 %|BUGURL?{Bug URL : %{BUGURL}\n}|\
103 Summary : %{SUMMARY}\n\
104 Description :\n%{DESCRIPTION}\n' \
105 --POPTdesc=$"list descriptive information from package(s)"
107 rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
108 --POPTdesc=$"list change logs for this package"
110 rpm alias --changes --qf '[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
111 --POPTdesc=$"list changes for this package with full time stamps"
113 rpm alias --xml --qf '[%{*:xml}\n]' \
114 --POPTdesc=$"list metadata in xml"
116 rpm alias --triggerscripts --qf '\
117 [trigger%{TRIGGERTYPE} scriptlet (using %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
118 %{TRIGGERSCRIPTS}\n]'
119 rpm alias --triggers --triggerscripts \
120 --POPTdesc=$"list trigger scriptlets from package(s)"
122 rpm alias --filetriggerscripts --qf '\
123 [filetrigger%{FILETRIGGERTYPE} scriptlet (using %{FILETRIGGERSCRIPTPROG}) -- \
124 %{FILETRIGGERCONDS}\n%{FILETRIGGERSCRIPTS}\n]\
125 [transfiletrigger%{TRANSFILETRIGGERTYPE} scriptlet (using %{TRANSFILETRIGGERSCRIPTPROG}) -- \
126 %{TRANSFILETRIGGERCONDS}\n%{TRANSFILETRIGGERSCRIPTS}\n]'
127 rpm alias --filetriggers --filetriggerscripts \
128 --POPTdesc=$"list filetrigger scriptlets from package(s)"
130 rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
131 --pipe "LC_NUMERIC=C sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
132 --POPTdesc=$"list package(s) by install time, most recent first"
134 rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
135 --POPTdesc=$"list duplicated packages"
137 rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
138 --POPTdesc=$"list all files from each package"
140 rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
141 --POPTdesc=$"list file names with their classes"
143 rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
144 --POPTdesc=$"list file names with their colors"
146 rpm alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
147 --POPTdesc=$"list file names with their provides"
149 rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
150 --POPTdesc=$"list file names with requires"
152 rpm alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
153 --POPTdesc=$"list file names with their POSIX1.e capabilities"
155 # colon separated i18n domains to use as PO catalogue lookaside for
156 # retrieving header group/description/summary.
157 rpm alias --i18ndomains --define '_i18ndomains !#:+'
159 rpm alias --color --define '_color_output !#:+'
161 #==============================================================================
162 # [--ftpport <port>] "port number of ftp server (or proxy)"
163 rpm alias --ftpport --define '_httpport !#:+'
164 # [--ftpproxy <host>] "hostname or IP of ftp proxy"
165 rpm alias --ftpproxy --define '_httpproxy !#:+'
166 # [--httpport <port>] "port number of http server (or proxy)"
167 rpm alias --httpport --define '_httpport !#:+'
168 # [--httpproxy <host>] "hostname or IP of http proxy"
169 rpm alias --httpproxy --define '_httpproxy !#:+'
170 # [--trace] "trace macro expansion"
171 rpm alias --trace --eval '%trace'
173 # Minimally preserve commonly used switches from cli split-up
174 rpm exec --addsign rpmsign --addsign
175 rpm exec --delsign rpmsign --delsign
176 rpm exec --resign rpmsign --resign
177 #rpm exec --signfiles rpmsign --signfiles
178 rpm exec --checksig rpmkeys --checksig
179 rpm exec -K rpmkeys --checksig
180 rpm exec --import rpmkeys --import
181 rpm exec --initdb rpmdb --initdb
182 rpm exec --rebuilddb rpmdb --rebuilddb
183 rpm exec --verifydb rpmdb --verifydb
184 rpm exec --specfile rpmspec -q
186 #==============================================================================
187 rpmbuild alias --ftpport --define '_httpport !#:+'
188 rpmbuild alias --ftpproxy --define '_httpproxy !#:+'
189 rpmbuild alias --httpport --define '_httpport !#:+'
190 rpmbuild alias --httpproxy --define '_httpproxy !#:+'
191 rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
192 --POPTdesc=$"enable configure <option> for build" \
193 --POPTargs=$"<option>"
194 rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \
195 --POPTdesc=$"disable configure <option> for build" \
196 --POPTargs=$"<option>"
197 # Build policies enabled from command line. Last policy applies.
198 rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \
199 --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
200 --POPTargs=$"<policy>"
201 # Minimally preserve rpmbuild's --sign functionality
202 rpmbuild alias --sign \
203 --pipe 'rpm --addsign `grep ".*: .*\.rpm$"|cut -d: -f2` < "/dev/"`ps -p $$ -o tty | tail -n 1`' \
204 --POPTdesc=$"generate GPG signature (deprecated, use command rpmsign instead)"
205 # [--trace] "trace macro expansion"
206 rpmbuild alias --trace --eval '%trace'
208 rpmsign alias --key-id --define '_gpg_name !#:+' \
209 --POPTdesc=$"key id/name to sign with" \
211 rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \
212 --POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \
213 --POPTargs=$"<algorithm>"
215 rpmspec alias --conflicts --qf \
216 "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
217 --POPTdesc=$"list capabilities this package conflicts with"
218 rpmspec alias --obsoletes --qf \
219 "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
220 --POPTdesc=$"list other packages removed by installing this package"
221 rpmspec alias --provides --qf \
222 "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
223 --POPTdesc=$"list capabilities that this package provides"
224 rpmspec alias --requires --qf \
225 "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
226 --POPTdesc=$"list capabilities required by package(s)"
227 rpmspec alias --buildconflicts --srpm --conflicts \
228 --POPTdesc=$"list capabilities conflicting with build of this package"
229 rpmspec alias --buildrequires --srpm --requires \
230 --POPTdesc=$"list capabilities required to build this package"
231 # [--trace] "trace macro expansion"
232 rpmspec alias --trace --eval '%trace'