Add macro %isu_package to generate ISU Package
[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 rpm     alias -P --provides
65
66 rpm     alias --requires        --qf \
67   "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
68         --POPTdesc=$"list capabilities required by package(s)"
69 rpm     alias -R --requires
70
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)"
83
84 rpm     alias --info --qf '\
85 Name        : %{NAME}\n\
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\
91 Group       : %{GROUP}\n\
92 Size        : %{LONGSIZE}\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)"
106
107 rpm     alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
108         --POPTdesc=$"list change logs for this package"
109
110 rpm     alias --changes --qf '[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
111         --POPTdesc=$"list changes for this package with full time stamps"
112
113 rpm     alias --xml --qf '[%{*:xml}\n]' \
114         --POPTdesc=$"list metadata in xml"
115
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)"
121
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)"
129
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"
133
134 rpm     alias --dupes   --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
135         --POPTdesc=$"list duplicated packages"
136
137 rpm     alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
138         --POPTdesc=$"list all files from each package"
139
140 rpm     alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
141         --POPTdesc=$"list file names with their classes"
142
143 rpm     alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
144         --POPTdesc=$"list file names with their colors"
145
146 rpm     alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
147         --POPTdesc=$"list file names with their provides"
148
149 rpm     alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
150         --POPTdesc=$"list file names with requires"
151
152 rpm     alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
153         --POPTdesc=$"list file names with their POSIX1.e capabilities"
154
155 # colon separated i18n domains to use as PO catalogue lookaside for
156 # retrieving header group/description/summary.
157 rpm alias --i18ndomains --define '_i18ndomains !#:+'
158
159 rpm alias --color --define '_color_output !#:+'
160
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'
172
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
185
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'
207
208 rpmsign alias --key-id  --define '_gpg_name !#:+' \
209         --POPTdesc=$"key id/name to sign with" \
210         --POPTargs=$"<id>"
211 rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \
212         --POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \
213         --POPTargs=$"<algorithm>"
214
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'
233 # \endverbatim
234 #*/