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"
65 rpm alias --requires --qf \
66 "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
67 --POPTdesc=$"list capabilities required by package(s)"
68 rpm alias -R --requires
70 rpm alias --suggests --qf \
71 "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
72 --POPTdesc=$"list capabilities this package suggests"
74 rpm alias --recommends --qf \
75 "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
76 --POPTdesc=$"list capabilities this package recommends"
78 rpm alias --enhances --qf \
79 "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
80 --POPTdesc=$"list capabilities this package enhances"
82 rpm alias --supplements --qf \
83 "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
84 --POPTdesc=$"list capabilities this package supplements"
86 rpm alias --info --qf '\
88 %|EPOCH?{Epoch : %{EPOCH}\n}|\
89 Version : %{VERSION}\n\
90 Release : %{RELEASE}\n\
91 Architecture: %{ARCH}\n\
92 Install Date: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\
95 %|LICENSE?{License : %{LICENSE}}|\n\
96 Signature : %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|\n\
97 Source RPM : %{SOURCERPM}\n\
98 Build Date : %{BUILDTIME:date}\n\
99 Build Host : %{BUILDHOST}\n\
100 Relocations : %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
101 %|PACKAGER?{Packager : %{PACKAGER}\n}|\
102 %|VENDOR?{Vendor : %{VENDOR}\n}|\
103 %|URL?{URL : %{URL}\n}|\
104 %|VCS?{VCS : %{VCS}\n}|\
105 %|BUGURL?{Bug URL : %{BUGURL}\n}|\
106 Summary : %{SUMMARY}\n\
107 Description :\n%{DESCRIPTION}\n\
108 Distribution: %{DISTRIBUTION}\n' \
109 --POPTdesc=$"list descriptive information from package(s)"
111 rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
112 --POPTdesc=$"list change logs for this package"
114 rpm alias --xml --qf '[%{*:xml}\n]' \
115 --POPTdesc=$"list metadata in xml"
117 rpm alias --triggerscripts --qf '\
118 [trigger%{TRIGGERTYPE} scriptlet (using %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
119 %{TRIGGERSCRIPTS}\n]'
120 rpm alias --triggers --triggerscripts \
121 --POPTdesc=$"list trigger scriptlets from package(s)"
123 rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
124 --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
125 --POPTdesc=$"list package(s) by install time, most recent first"
127 rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
128 --POPTdesc=$"list duplicated packages"
130 rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
131 --POPTdesc=$"list all files from each package"
133 rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
134 --POPTdesc=$"list file names with classes"
136 rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
137 --POPTdesc=$"list file names with colors"
139 rpm alias --fscontext --qf '[%{FILENAMES}\n]' \
140 --pipe "xargs ls --scontext | awk '{printf(\"%s %s\n\", $2, $1)}'" \
141 --POPTdesc=$"list file names with security context from file system"
143 rpm alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
144 --POPTdesc=$"list file names with provides"
146 rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
147 --POPTdesc=$"list file names with requires"
149 rpm alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
150 --POPTdesc=$"list file names with POSIX1.e capabilities"
152 # colon separated i18n domains to use as PO catalogue lookaside for
153 # retrieving header group/description/summary.
154 rpm alias --i18ndomains --define '_i18ndomains !#:+'
156 #==============================================================================
157 # [--ftpport <port>] "port number of ftp server (or proxy)"
158 rpm alias --ftpport --define '_httpport !#:+'
159 # [--ftpproxy <host>] "hostname or IP of ftp proxy"
160 rpm alias --ftpproxy --define '_httpproxy !#:+'
161 # [--httpport <port>] "port number of http server (or proxy)"
162 rpm alias --httpport --define '_httpport !#:+'
163 # [--httpproxy <host>] "hostname or IP of http proxy"
164 rpm alias --httpproxy --define '_httpproxy !#:+'
166 # Minimally preserve commonly used switches from cli split-up
167 rpm exec --addsign rpmsign --addsign
168 rpm exec --delsign rpmsign --delsign
169 rpm exec --resign rpmsign --resign
170 rpm exec --checksig rpmkeys --checksig
171 rpm exec -K rpmkeys --checksig
172 rpm exec --import rpmkeys --import
173 rpm exec --initdb rpmdb --initdb
174 rpm exec --rebuilddb rpmdb --rebuilddb
175 rpm exec --verifydb rpmdb --verifydb
176 rpm exec --specfile rpmspec -q
178 #==============================================================================
179 rpmbuild alias --ftpport --define '_httpport !#:+'
180 rpmbuild alias --ftpproxy --define '_httpproxy !#:+'
181 rpmbuild alias --httpport --define '_httpport !#:+'
182 rpmbuild alias --httpproxy --define '_httpproxy !#:+'
183 rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
184 --POPTdesc=$"enable configure <option> for build" \
185 --POPTargs=$"<option>"
186 rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \
187 --POPTdesc=$"disable configure <option> for build" \
188 --POPTargs=$"<option>"
189 # Build policies enabled from command line. Last policy applies.
190 rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \
191 --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
192 --POPTargs=$"<policy>"
193 # Minimally preserve rpmbuild's --sign functionality
194 rpmbuild alias --sign \
195 --pipe "grep '.*: .*\.rpm$'|cut -d: -f2|xargs -r rpm --addsign" \
196 --POPTdesc=$"generate GPG signature"
198 rpmsign alias --key-id --define '_gpg_name !#:+' \
199 --POPTdesc=$"key id/name to sign with" \
201 rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \
202 --POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \
203 --POPTargs=$"<algorithm>"
205 rpmspec alias --conflicts --qf \
206 "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
207 --POPTdesc=$"list capabilities this package conflicts with"
208 rpmspec alias --obsoletes --qf \
209 "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
210 --POPTdesc=$"list other packages removed by installing this package"
211 rpmspec alias --provides --qf \
212 "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
213 --POPTdesc=$"list capabilities that this package provides"
214 rpmspec alias --requires --qf \
215 "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
216 --POPTdesc=$"list capabilities required by package(s)"
217 rpmspec alias --buildconflicts --srpm --conflicts \
218 --POPTdesc=$"list capabilities conflicting with build of this package"
219 rpmspec alias --buildrequires --srpm --requires \
220 --POPTdesc=$"list capabilities required to build this package"