--buildpolicy is rpmbuild, not rpm, alias
[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:\n%{VERIFYSCRIPT}\n}|\
41 ' \
42         --POPTdesc=$"list install/erase scriptlets from package(s)"
43
44 rpm     alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
45                    --pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \
46         --POPTdesc=$"set permissions of files in a package"
47
48 rpm     alias --setugids -q --qf \
49         '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
50         --pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep '^ch '|grep -v \(none\))|sh" \
51         --POPTdesc=$"set user/group ownership of files in a package"
52
53 rpm     alias --conflicts       --qf \
54   "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" \
55         --POPTdesc=$"list capabilities this package conflicts with"
56 rpm     alias --obsoletes       --qf \
57   "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" \
58         --POPTdesc=$"list other packages removed by installing this package"
59 rpm     alias --provides        --qf \
60   "[%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]" \
61         --POPTdesc=$"list capabilities that this package provides"
62
63 rpm     alias --requires        --qf \
64   "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
65         --POPTdesc=$"list capabilities required by package(s)"
66 rpm     alias -R --requires
67
68 rpm     alias --info --qf 'Name        : %-27{NAME}  Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
69 Version     : %-27{VERSION}       Vendor: %{VENDOR}\n\
70 Release     : %-27{RELEASE}   Build Date: %{BUILDTIME:date}\n\
71 Install Date: %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed)         }|      Build Host: %{BUILDHOST}\n\
72 Group       : %-27{GROUP}   Source RPM: %{SOURCERPM}\n\
73 Size        : %-27{SIZE}%|LICENSE?{      License: %{LICENSE}}|\n\
74 Signature   : %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|\n\
75 %|PACKAGER?{Packager    : %{PACKAGER}\n}|\
76 %|URL?{URL         : %{URL}\n}|\
77 Summary     : %{SUMMARY}\n\
78 Description :\n%{DESCRIPTION}\n' \
79         --POPTdesc=$"list descriptive information from package(s)"
80
81 rpm     alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
82         --POPTdesc=$"list change logs for this package"
83
84 rpm     alias --xml --qf '[%{*:xml}\n]' \
85         --POPTdesc=$"list metadata in xml"
86
87 rpm     alias --triggerscripts --qf '\
88 [trigger%{TRIGGERTYPE} scriptlet (using %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
89 %{TRIGGERSCRIPTS}\n]'
90 rpm     alias --triggers --triggerscripts \
91         --POPTdesc=$"list trigger scriptlets from package(s)"
92
93 rpm     alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
94         --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
95         --POPTdesc=$"list package(s) by install time, most recent first"
96
97 rpm     alias --dupes   --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
98         --POPTdesc=$"list duplicated packages"
99
100 rpm     alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
101         --POPTdesc=$"list all files from each package"
102
103 rpm     alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
104         --POPTdesc=$"list file names with classes"
105
106 rpm     alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
107         --POPTdesc=$"list file names with colors"
108
109 rpm     alias --fscontext --qf '[%{FILENAMES}\n]' \
110         --pipe "xargs ls --scontext | awk '{printf(\"%s %s\n\", $2, $1)}'" \
111         --POPTdesc=$"list file names with security context from file system"
112
113 rpm     alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
114         --POPTdesc=$"list file names with provides"
115
116 rpm     alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
117         --POPTdesc=$"list file names with requires"
118
119 # colon separated i18n domains to use as PO catalogue lookaside for
120 # retrieving header group/description/summary.
121 rpm alias --i18ndomains --define '_i18ndomains !#:+'
122
123 # Choose db interface:
124 #       0       same as 1
125 #       1       native db1 interface (e.g. linux glibc libdb1 routines).
126 #       2       native db2 interface.
127 #       3       native db3 interface.
128 #       -1      db3 -> db2 -> db1 (as available).
129 #
130 # There are two macros so that --rebuilddb can convert db1 -> db3
131 rpm alias --dbapi                --define '_dbapi !#:+'
132
133 rpm alias --rebuilddbapi         --define '_dbapi_rebuild !#:+'
134 rpm alias --rebuilddbpath        --define '_dbapath_rebuild !#:+'
135
136 #==============================================================================
137 #       [--dbpath DIRECTORY"    "use database in DIRECTORY"
138 rpm     alias --dbpath          --define '_dbpath !#:+'
139 #       [--ftpport <port>]      "port number of ftp server (or proxy)"
140 rpm     alias --ftpport         --define '_ftpport !#:+'
141 #       [--ftpproxy <host>]     "hostname or IP of ftp proxy"
142 rpm     alias --ftpproxy        --define '_ftpproxy !#:+'
143 #       [--httpport <port>]     "port number of http server (or proxy)"
144 rpm     alias --httpport        --define '_httpport !#:+'
145 #       [--httpproxy <host>]    "hostname or IP of http proxy"
146 rpm     alias --httpproxy       --define '_httpproxy !#:+'
147
148 #==============================================================================
149 rpmbuild        alias --dbpath          --define '_dbpath !#:+' \
150         --POPTdesc=$"use database in DIRECTORY" \
151         --POPTargs=$"DIRECTORY"
152 rpmbuild alias --ftpport                --define '_ftpport !#:+'
153 rpmbuild alias --ftpproxy       --define '_ftpproxy !#:+'
154 rpmbuild alias --httpport       --define '_httpport !#:+'
155 rpmbuild alias --httpproxy      --define '_httpproxy !#:+'
156 rpmbuild alias --timecheck      --define '_timecheck !#:+'
157 rpmbuild alias --with           --define "_with_!#:+     --with-!#:+" \
158         --POPTdesc=$"enable configure <option> for build" \
159         --POPTargs=$"<option>"
160 rpmbuild alias --without        --define "_without_!#:+  --without-!#:+" \
161         --POPTdesc=$"disable configure <option> for build" \
162         --POPTargs=$"<option>"
163 # Build policies enabled from command line. Last policy applies.
164 rpmbuild alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+' \
165         --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
166         --POPTargs=$"<policy>"
167
168 # \endverbatim
169 #*/