- change popt exec alias in oreder to exec rpm children.
[platform/upstream/rpm.git] / rpmpopt.in
1 #
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.
5
6 rpm alias --scripts --qf '\
7 %|PREIN?{preinstall script\
8 %|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
9 {%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
10 \
11 %|POSTIN?{postinstall script\
12 %|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
13 {%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
14 \
15 %|PREUN?{preuninstall script\
16 %|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
17 {%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
18 \
19 %|POSTUN?{postuninstall script\
20 %|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
21 {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
22 \
23 %|VERIFYSCRIPT?{verify script:\n%{VERIFYSCRIPT}\n}|\
24 '
25
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"
28
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"
32
33
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]"
40
41 # XXX prereq output is part of requires for query
42 #rpm alias --prereq     --qf '[%{PREREQ}:depflags\n]'
43
44 rpm alias --requires    --qf \
45   "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]"
46 rpm alias -R --requires
47
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'
58
59 rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]'
60
61 rpm alias --triggerscripts --qf '\
62 [trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
63 %{TRIGGERSCRIPTS}\n]'
64 rpm alias --triggers --triggerscripts
65
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(\"%-35s %-s\n\", $1, substr($0,length($1)+2))}' "
68
69 rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
70 rpm exec --freshen freshen.sh
71 rpm alias -F --freshen
72
73 rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides
74 rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires
75
76 # colon separated i18n domains to use as PO catalogue lookaside for
77 * retrieving header group/description/summary.
78 #
79 # For Red Hat, value should be "redhat-dist:redhat-powertools".
80 rpm alias --i18ndomains --define '_i18ndomains !#:+'
81
82 # Build policies enabled from command line. Last policy applies.
83 rpm alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+'
84
85 # Choose db interface:
86 #       0       same as 1
87 #       1       native db1 interface (e.g. linux glibc libdb1 routines).
88 #       2       native db2 interface.
89 #       3       native db3 interface.
90 #       -1      db3 -> db2 -> db1 (as available).
91 #
92 # There are two macros so that --rebuilddb can convert db1 -> db3
93 rpm alias --dbapi                --define '_dbapi !#:+'
94
95 rpm alias --rebuilddbapi         --define '_dbapi_rebuild !#:+'
96 rpm alias --rebuilddbpath        --define '_dbapath_rebuild !#:+'
97
98 #==============================================================================
99 #       [--dbpath <dir>]        "use <dir> as the directory for the database"
100 rpm     alias --dbpath          --define '_dbpath !#:+'
101 #       [--ftpport <port>]      "port number of ftp server (or proxy)"
102 rpm     alias --ftpport         --define '_ftpport !#:+'
103 #       [--ftpproxy <host>]     "hostname or IP of ftp proxy"
104 rpm     alias --ftpproxy        --define '_ftpproxy !#:+'
105 #       [--httpport <port>]     "port number of http server (or proxy)"
106 rpm     alias --httpport        --define '_httpport !#:+'
107 #       [--httpproxy <host>]    "hostname or IP of http proxy"
108 rpm     alias --httpproxy       --define '_httpproxy !#:+'
109
110 # set the time check to <secs>
111 rpm     alias --timecheck       --define '_timecheck !#:+'
112
113 #==============================================================================
114 rpm     exec -b                 rpmb -b
115 rpm     exec --build            rpmb --build
116 rpm     exec --rebuild          rpmb --rebuild
117 rpm     exec --recompile        rpmb --recompile
118 rpm     exec -t                 rpmt -t
119 rpm     exec --tarbuild         rpmt --tarbuild
120
121 rpm     exec --initdb           rpmdb --initdb
122 rpm     exec --rebuilddb        rpmdb --rebuilddb
123
124 #rpm    exec -e                 rpme -e
125 #rpm    exec --erase            rpme --erase
126 #rpm    exec -U                 rpmu -U
127 #rpm    exec --upgrade          rpmu --upgrade
128
129 rpm     exec --addsign          rpmk --addsign
130 rpm     exec -K                 rpmk -K
131 rpm     exec --checksig         rpmk --checksig
132 rpm     exec --resign           rpmk --resign
133
134 rpm     exec -q                 rpmq -q
135 rpm     exec --query            rpmq --query
136 rpm     exec --querytags        rpmq --querytags
137 rpm     exec -V                 rpmv -V
138 rpm     exec -y                 rpmv -y
139 rpm     exec --verify           rpmv --verify
140
141 #==============================================================================
142 rpmb    alias --dbpath          --define '_dbpath !#:+'
143 rpmb    alias --ftpport         --define '_ftpport !#:+'
144 rpmb    alias --ftpproxy        --define '_ftpproxy !#:+'
145 rpmb    alias --httpport        --define '_httpport !#:+'
146 rpmb    alias --httpproxy       --define '_httpproxy !#:+'
147 rpmb    alias --timecheck       --define '_timecheck !#:+'
148 #==============================================================================
149 rpmdb   alias --dbpath          --define '_dbpath !#:+'
150 rpmdb   alias --ftpport         --define '_ftpport !#:+'
151 rpmdb   alias --ftpproxy        --define '_ftpproxy !#:+'
152 rpmdb   alias --httpport        --define '_httpport !#:+'
153 rpmdb   alias --httpproxy       --define '_httpproxy !#:+'
154 #==============================================================================
155 rpme    alias --dbpath          --define '_dbpath !#:+'
156 rpme    alias --ftpport         --define '_ftpport !#:+'
157 rpme    alias --ftpproxy        --define '_ftpproxy !#:+'
158 rpme    alias --httpport        --define '_httpport !#:+'
159 rpme    alias --httpproxy       --define '_httpproxy !#:+'
160 #==============================================================================
161 rpmi    alias --dbpath          --define '_dbpath !#:+'
162 rpmi    alias --ftpport         --define '_ftpport !#:+'
163 rpmi    alias --ftpproxy        --define '_ftpproxy !#:+'
164 rpmi    alias --httpport        --define '_httpport !#:+'
165 rpmi    alias --httpproxy       --define '_httpproxy !#:+'
166 #==============================================================================
167 rpmq    alias --dbpath          --define '_dbpath !#:+'
168 rpmq    alias --ftpport         --define '_ftpport !#:+'
169 rpmq    alias --ftpproxy        --define '_ftpproxy !#:+'
170 rpmq    alias --httpport        --define '_httpport !#:+'
171 rpmq    alias --httpproxy       --define '_httpproxy !#:+'
172 #==============================================================================
173 rpmt    alias --dbpath          --define '_dbpath !#:+'
174 rpmt    alias --ftpport         --define '_ftpport !#:+'
175 rpmt    alias --ftpproxy        --define '_ftpproxy !#:+'
176 rpmt    alias --httpport        --define '_httpport !#:+'
177 rpmt    alias --httpproxy       --define '_httpproxy !#:+'
178 rpmt    alias --timecheck       --define '_timecheck !#:+'
179 #==============================================================================
180 rpmu    alias --dbpath          --define '_dbpath !#:+'
181 rpmu    alias --ftpport         --define '_ftpport !#:+'
182 rpmu    alias --ftpproxy        --define '_ftpproxy !#:+'
183 rpmu    alias --httpport        --define '_httpport !#:+'
184 rpmu    alias --httpproxy       --define '_httpproxy !#:+'
185 #==============================================================================
186 rpmv    alias --dbpath          --define '_dbpath !#:+'
187 rpmv    alias --ftpport         --define '_ftpport !#:+'
188 rpmv    alias --ftpproxy        --define '_ftpproxy !#:+'
189 rpmv    alias --httpport        --define '_httpport !#:+'
190 rpmv    alias --httpproxy       --define '_httpproxy !#:+'