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:\n%{VERIFYSCRIPT}\n}|\
42 --POPTdesc=$"list install/erase scriptlets from package(s)"
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"
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"
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"
63 rpm alias --requires --qf \
64 "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
65 --POPTdesc=$"list capabilities required by package(s)"
66 rpm alias -R --requires
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{LONGSIZE}%|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)"
81 rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
82 --POPTdesc=$"list change logs for this package"
84 rpm alias --xml --qf '[%{*:xml}\n]' \
85 --POPTdesc=$"list metadata in xml"
87 rpm alias --triggerscripts --qf '\
88 [trigger%{TRIGGERTYPE} scriptlet (using %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
90 rpm alias --triggers --triggerscripts \
91 --POPTdesc=$"list trigger scriptlets from package(s)"
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"
97 rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
98 --POPTdesc=$"list duplicated packages"
100 rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
101 --POPTdesc=$"list all files from each package"
103 rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
104 --POPTdesc=$"list file names with classes"
106 rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
107 --POPTdesc=$"list file names with colors"
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"
113 rpm alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
114 --POPTdesc=$"list file names with provides"
116 rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
117 --POPTdesc=$"list file names with requires"
119 rpm alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
120 --POPTdesc=$"list file names with POSIX1.e capabilities"
122 # colon separated i18n domains to use as PO catalogue lookaside for
123 # retrieving header group/description/summary.
124 rpm alias --i18ndomains --define '_i18ndomains !#:+'
126 # Choose db interface:
128 # 1 native db1 interface (e.g. linux glibc libdb1 routines).
129 # 2 native db2 interface.
130 # 3 native db3 interface.
131 # -1 db3 -> db2 -> db1 (as available).
133 # There are two macros so that --rebuilddb can convert db1 -> db3
134 rpm alias --dbapi --define '_dbapi !#:+'
136 rpm alias --rebuilddbapi --define '_dbapi_rebuild !#:+'
137 rpm alias --rebuilddbpath --define '_dbapath_rebuild !#:+'
139 #==============================================================================
140 # [--dbpath DIRECTORY" "use database in DIRECTORY"
141 rpm alias --dbpath --define '_dbpath !#:+'
142 # [--ftpport <port>] "port number of ftp server (or proxy)"
143 rpm alias --ftpport --define '_ftpport !#:+'
144 # [--ftpproxy <host>] "hostname or IP of ftp proxy"
145 rpm alias --ftpproxy --define '_ftpproxy !#:+'
146 # [--httpport <port>] "port number of http server (or proxy)"
147 rpm alias --httpport --define '_httpport !#:+'
148 # [--httpproxy <host>] "hostname or IP of http proxy"
149 rpm alias --httpproxy --define '_httpproxy !#:+'
151 #==============================================================================
152 rpmbuild alias --dbpath --define '_dbpath !#:+' \
153 --POPTdesc=$"use database in DIRECTORY" \
154 --POPTargs=$"DIRECTORY"
155 rpmbuild alias --ftpport --define '_ftpport !#:+'
156 rpmbuild alias --ftpproxy --define '_ftpproxy !#:+'
157 rpmbuild alias --httpport --define '_httpport !#:+'
158 rpmbuild alias --httpproxy --define '_httpproxy !#:+'
159 rpmbuild alias --timecheck --define '_timecheck !#:+'
160 rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
161 --POPTdesc=$"enable configure <option> for build" \
162 --POPTargs=$"<option>"
163 rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \
164 --POPTdesc=$"disable configure <option> for build" \
165 --POPTargs=$"<option>"
166 # Build policies enabled from command line. Last policy applies.
167 rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \
168 --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
169 --POPTargs=$"<policy>"