msm: consistency for equally ranked keys
[platform/upstream/rpm.git] / rpmpopt.in
1 #/*! \page config_rpmpopt Default configuration: @RPMCONFIGDIR@/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 %|PRETRANS?{pretrans scriptlet\
17 %|PRETRANSPROG?{ (using[ %{PRETRANSPROG}])}|:\n%{PRETRANS}\n}:\
18 {%|PRETRANSPROG?{pretrans program:[ %{PRETRANSPROG}]\n}|}|\
19 \
20 %|PREIN?{preinstall scriptlet\
21 %|PREINPROG?{ (using[ %{PREINPROG}])}|:\n%{PREIN}\n}:\
22 {%|PREINPROG?{preinstall program:[ %{PREINPROG}]\n}|}|\
23 \
24 %|POSTIN?{postinstall scriptlet\
25 %|POSTINPROG?{ (using[ %{POSTINPROG}])}|:\n%{POSTIN}\n}:\
26 {%|POSTINPROG?{postinstall program:[ %{POSTINPROG}]\n}|}|\
27 \
28 %|PREUN?{preuninstall scriptlet\
29 %|PREUNPROG?{ (using[ %{PREUNPROG}])}|:\n%{PREUN}\n}:\
30 {%|PREUNPROG?{preuninstall program:[ %{PREUNPROG}]\n}|}|\
31 \
32 %|POSTUN?{postuninstall scriptlet\
33 %|POSTUNPROG?{ (using[ %{POSTUNPROG}])}|:\n%{POSTUN}\n}:\
34 {%|POSTUNPROG?{postuninstall program:[ %{POSTUNPROG}]\n}|}|\
35 \
36 %|POSTTRANS?{posttrans scriptlet\
37 %|POSTTRANSPROG?{ (using[ %{POSTTRANSPROG}])}|:\n%{POSTTRANS}\n}:\
38 {%|POSTTRANSPROG?{posttrans program:[ %{POSTTRANSPROG}]\n}|}|\
39 \
40 %|VERIFYSCRIPT?{verify scriptlet\
41 %|VERIFYSCRIPTPROG?{ (using[ %{VERIFYSCRIPTPROG}])}|:\n%{VERIFYSCRIPT}\n}:\
42 {%|VERIFYSCRIPTPROG?{verify program:[ %{VERIFYSCRIPTPROG}]\n}|}|\
43 ' \
44         --POPTdesc=$"list install/erase scriptlets from package(s)"
45
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"
49
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"
54
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
65 rpm     alias --requires        --qf \
66   "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
67         --POPTdesc=$"list capabilities required by package(s)"
68 rpm     alias -R --requires
69
70 rpm    alias --suggests        --qf \
71   "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
72         --POPTdesc=$"list capabilities this package suggests"
73
74 rpm    alias --recommends      --qf \
75   "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
76         --POPTdesc=$"list capabilities this package recommends"
77
78 rpm    alias --enhances        --qf \
79   "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
80         --POPTdesc=$"list capabilities this package enhances"
81
82 rpm    alias --supplements     --qf \
83   "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
84         --POPTdesc=$"list capabilities this package supplements"
85
86 rpm     alias --info --qf '\
87 Name        : %{NAME}\n\
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\
93 Group       : %{GROUP}\n\
94 Size        : %{LONGSIZE}\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)"
110
111 rpm     alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
112         --POPTdesc=$"list change logs for this package"
113
114 rpm     alias --xml --qf '[%{*:xml}\n]' \
115         --POPTdesc=$"list metadata in xml"
116
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)"
122
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"
126
127 rpm     alias --dupes   --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
128         --POPTdesc=$"list duplicated packages"
129
130 rpm     alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
131         --POPTdesc=$"list all files from each package"
132
133 rpm     alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
134         --POPTdesc=$"list file names with classes"
135
136 rpm     alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
137         --POPTdesc=$"list file names with colors"
138
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"
142
143 rpm     alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
144         --POPTdesc=$"list file names with provides"
145
146 rpm     alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
147         --POPTdesc=$"list file names with requires"
148
149 rpm     alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
150         --POPTdesc=$"list file names with POSIX1.e capabilities"
151
152 # colon separated i18n domains to use as PO catalogue lookaside for
153 # retrieving header group/description/summary.
154 rpm alias --i18ndomains --define '_i18ndomains !#:+'
155
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 !#:+'
165
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
177
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"
197
198 rpmsign alias --key-id  --define '_gpg_name !#:+' \
199         --POPTdesc=$"key id/name to sign with" \
200         --POPTargs=$"<id>"
201 rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \
202         --POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \
203         --POPTargs=$"<algorithm>"
204
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"
221 # \endverbatim
222 #*/