2005-01-10 01:48:19 +08:00
|
|
|
#/*! \page config_rpmpopt Default configuration: @RPMCONFIGDIR@/rpmpopt-@VERSION@
|
2001-04-10 20:36:45 +08:00
|
|
|
# \verbatim
|
1998-02-18 01:47:46 +08:00
|
|
|
#
|
|
|
|
# This file *should not be modified*. Local customizations
|
|
|
|
# belong in /etc/popt, not here. This file will be replaced
|
|
|
|
# whenever a new version of RPM is installed.
|
2001-07-11 22:23:01 +08:00
|
|
|
#
|
|
|
|
# Note: Not all popt aliases are documented. This is a decision on my
|
|
|
|
# part as to which are the more important aliases. Feel free to clip
|
|
|
|
# a copy of the alias/exec here and place in /etc/popt or ~/.popt with
|
|
|
|
# your own words added. It's easier than arguing about how many options
|
|
|
|
# fit on the head of an executable :-)
|
|
|
|
#
|
1998-02-18 01:47:46 +08:00
|
|
|
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --scripts --qf '\
|
2007-08-28 15:11:06 +08:00
|
|
|
%|PRETRANS?{pretrans scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|PRETRANSPROG?{ (using[ %{PRETRANSPROG}])}|:\n%{PRETRANS}\n}:\
|
|
|
|
{%|PRETRANSPROG?{pretrans program:[ %{PRETRANSPROG}]\n}|}|\
|
2007-08-28 15:11:06 +08:00
|
|
|
\
|
2001-07-08 03:15:17 +08:00
|
|
|
%|PREIN?{preinstall scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|PREINPROG?{ (using[ %{PREINPROG}])}|:\n%{PREIN}\n}:\
|
|
|
|
{%|PREINPROG?{preinstall program:[ %{PREINPROG}]\n}|}|\
|
1997-07-08 06:22:44 +08:00
|
|
|
\
|
2001-07-08 03:15:17 +08:00
|
|
|
%|POSTIN?{postinstall scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|POSTINPROG?{ (using[ %{POSTINPROG}])}|:\n%{POSTIN}\n}:\
|
|
|
|
{%|POSTINPROG?{postinstall program:[ %{POSTINPROG}]\n}|}|\
|
1997-07-08 06:22:44 +08:00
|
|
|
\
|
2001-07-08 03:15:17 +08:00
|
|
|
%|PREUN?{preuninstall scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|PREUNPROG?{ (using[ %{PREUNPROG}])}|:\n%{PREUN}\n}:\
|
|
|
|
{%|PREUNPROG?{preuninstall program:[ %{PREUNPROG}]\n}|}|\
|
1997-07-08 06:22:44 +08:00
|
|
|
\
|
2001-07-08 03:15:17 +08:00
|
|
|
%|POSTUN?{postuninstall scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|POSTUNPROG?{ (using[ %{POSTUNPROG}])}|:\n%{POSTUN}\n}:\
|
|
|
|
{%|POSTUNPROG?{postuninstall program:[ %{POSTUNPROG}]\n}|}|\
|
1997-07-08 06:22:44 +08:00
|
|
|
\
|
2007-08-28 15:11:06 +08:00
|
|
|
%|POSTTRANS?{posttrans scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|POSTTRANSPROG?{ (using[ %{POSTTRANSPROG}])}|:\n%{POSTTRANS}\n}:\
|
|
|
|
{%|POSTTRANSPROG?{posttrans program:[ %{POSTTRANSPROG}]\n}|}|\
|
2007-08-28 15:11:06 +08:00
|
|
|
\
|
2011-09-12 17:10:29 +08:00
|
|
|
%|VERIFYSCRIPT?{verify scriptlet\
|
2011-09-12 17:19:15 +08:00
|
|
|
%|VERIFYSCRIPTPROG?{ (using[ %{VERIFYSCRIPTPROG}])}|:\n%{VERIFYSCRIPT}\n}:\
|
|
|
|
{%|VERIFYSCRIPTPROG?{verify program:[ %{VERIFYSCRIPTPROG}]\n}|}|\
|
2001-07-08 03:15:17 +08:00
|
|
|
' \
|
|
|
|
--POPTdesc=$"list install/erase scriptlets from package(s)"
|
1997-01-31 03:57:47 +08:00
|
|
|
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
|
2007-05-16 21:19:18 +08:00
|
|
|
--pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \
|
2001-07-11 22:23:01 +08:00
|
|
|
--POPTdesc=$"set permissions of files in a package"
|
1997-01-31 03:57:47 +08:00
|
|
|
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --setugids -q --qf \
|
1998-02-09 01:30:10 +08:00
|
|
|
'[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
|
2007-05-16 21:19:18 +08:00
|
|
|
--pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep '^ch '|grep -v \(none\))|sh" \
|
2001-07-11 22:23:01 +08:00
|
|
|
--POPTdesc=$"set user/group ownership of files in a package"
|
1997-01-31 03:57:47 +08:00
|
|
|
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --conflicts --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
|
2001-07-08 03:15:17 +08:00
|
|
|
--POPTdesc=$"list capabilities this package conflicts with"
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --obsoletes --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
|
2001-07-08 03:15:17 +08:00
|
|
|
--POPTdesc=$"list other packages removed by installing this package"
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --provides --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
|
2001-07-08 03:15:17 +08:00
|
|
|
--POPTdesc=$"list capabilities that this package provides"
|
1999-07-14 05:37:57 +08:00
|
|
|
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --requires --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
|
2001-07-08 03:15:17 +08:00
|
|
|
--POPTdesc=$"list capabilities required by package(s)"
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias -R --requires
|
1997-02-18 04:20:04 +08:00
|
|
|
|
2010-03-25 04:12:27 +08:00
|
|
|
rpm alias --info --qf '\
|
|
|
|
Name : %{NAME}\n\
|
|
|
|
%|EPOCH?{Epoch : %{EPOCH}\n}|\
|
|
|
|
Version : %{VERSION}\n\
|
|
|
|
Release : %{RELEASE}\n\
|
|
|
|
Architecture: %{ARCH}\n\
|
|
|
|
Install Date: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\
|
|
|
|
Group : %{GROUP}\n\
|
|
|
|
Size : %{LONGSIZE}\n\
|
|
|
|
%|LICENSE?{License : %{LICENSE}}|\n\
|
2002-07-13 03:09:09 +08:00
|
|
|
Signature : %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|\n\
|
2010-03-25 04:12:27 +08:00
|
|
|
Source RPM : %{SOURCERPM}\n\
|
|
|
|
Build Date : %{BUILDTIME:date}\n\
|
|
|
|
Build Host : %{BUILDHOST}\n\
|
|
|
|
Relocations : %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
|
1997-07-23 00:29:09 +08:00
|
|
|
%|PACKAGER?{Packager : %{PACKAGER}\n}|\
|
2010-03-25 04:12:27 +08:00
|
|
|
%|VENDOR?{Vendor : %{VENDOR}\n}|\
|
1997-07-23 00:29:09 +08:00
|
|
|
%|URL?{URL : %{URL}\n}|\
|
2010-03-25 04:12:27 +08:00
|
|
|
%|BUGURL?{Bug URL : %{BUGURL}\n}|\
|
1997-07-08 06:22:44 +08:00
|
|
|
Summary : %{SUMMARY}\n\
|
2001-07-08 03:15:17 +08:00
|
|
|
Description :\n%{DESCRIPTION}\n' \
|
|
|
|
--POPTdesc=$"list descriptive information from package(s)"
|
1997-06-17 02:21:37 +08:00
|
|
|
|
2004-10-13 13:47:55 +08:00
|
|
|
rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
|
2001-07-08 03:15:17 +08:00
|
|
|
--POPTdesc=$"list change logs for this package"
|
1998-03-28 00:46:39 +08:00
|
|
|
|
2005-02-17 03:05:36 +08:00
|
|
|
rpm alias --xml --qf '[%{*:xml}\n]' \
|
|
|
|
--POPTdesc=$"list metadata in xml"
|
|
|
|
|
2000-06-01 01:39:01 +08:00
|
|
|
rpm alias --triggerscripts --qf '\
|
2003-01-25 05:01:50 +08:00
|
|
|
[trigger%{TRIGGERTYPE} scriptlet (using %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
|
1998-03-28 00:46:39 +08:00
|
|
|
%{TRIGGERSCRIPTS}\n]'
|
2001-07-08 03:15:17 +08:00
|
|
|
rpm alias --triggers --triggerscripts \
|
|
|
|
--POPTdesc=$"list trigger scriptlets from package(s)"
|
1998-06-05 01:03:29 +08:00
|
|
|
|
2012-01-12 15:52:34 +08:00
|
|
|
rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
|
2001-07-08 03:15:17 +08:00
|
|
|
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
|
|
|
|
--POPTdesc=$"list package(s) by install time, most recent first"
|
1998-07-01 02:50:47 +08:00
|
|
|
|
2007-06-05 14:45:58 +08:00
|
|
|
rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
|
|
|
|
--POPTdesc=$"list duplicated packages"
|
|
|
|
|
2001-07-08 03:15:17 +08:00
|
|
|
rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
|
|
|
|
--POPTdesc=$"list all files from each package"
|
1999-09-23 02:03:19 +08:00
|
|
|
|
2002-12-19 06:54:00 +08:00
|
|
|
rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
|
|
|
|
--POPTdesc=$"list file names with classes"
|
|
|
|
|
2002-12-31 09:23:03 +08:00
|
|
|
rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
|
2002-12-19 06:54:00 +08:00
|
|
|
--POPTdesc=$"list file names with colors"
|
|
|
|
|
2007-09-03 20:15:50 +08:00
|
|
|
rpm alias --fscontext --qf '[%{FILENAMES}\n]' \
|
|
|
|
--pipe "xargs ls --scontext | awk '{printf(\"%s %s\n\", $2, $1)}'" \
|
|
|
|
--POPTdesc=$"list file names with security context from file system"
|
2003-12-22 15:47:45 +08:00
|
|
|
|
2002-12-19 06:54:00 +08:00
|
|
|
rpm alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
|
|
|
|
--POPTdesc=$"list file names with provides"
|
|
|
|
|
|
|
|
rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
|
|
|
|
--POPTdesc=$"list file names with requires"
|
|
|
|
|
2008-10-29 18:09:27 +08:00
|
|
|
rpm alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
|
|
|
|
--POPTdesc=$"list file names with POSIX1.e capabilities"
|
|
|
|
|
2000-02-24 06:40:53 +08:00
|
|
|
# colon separated i18n domains to use as PO catalogue lookaside for
|
2007-09-19 21:51:32 +08:00
|
|
|
# retrieving header group/description/summary.
|
2000-02-24 06:40:53 +08:00
|
|
|
rpm alias --i18ndomains --define '_i18ndomains !#:+'
|
|
|
|
|
2000-05-25 01:53:35 +08:00
|
|
|
#==============================================================================
|
|
|
|
# [--ftpport <port>] "port number of ftp server (or proxy)"
|
2009-10-22 15:37:49 +08:00
|
|
|
rpm alias --ftpport --define '_httpport !#:+'
|
2000-05-25 01:53:35 +08:00
|
|
|
# [--ftpproxy <host>] "hostname or IP of ftp proxy"
|
2009-10-22 15:37:49 +08:00
|
|
|
rpm alias --ftpproxy --define '_httpproxy !#:+'
|
2000-05-25 01:53:35 +08:00
|
|
|
# [--httpport <port>] "port number of http server (or proxy)"
|
|
|
|
rpm alias --httpport --define '_httpport !#:+'
|
|
|
|
# [--httpproxy <host>] "hostname or IP of http proxy"
|
|
|
|
rpm alias --httpproxy --define '_httpproxy !#:+'
|
|
|
|
|
2010-09-03 21:57:50 +08:00
|
|
|
# Minimally preserve commonly used switches from cli split-up
|
2010-11-15 16:21:23 +08:00
|
|
|
rpm exec --addsign rpmsign --addsign
|
|
|
|
rpm exec --delsign rpmsign --delsign
|
|
|
|
rpm exec --resign rpmsign --resign
|
|
|
|
rpm exec --checksig rpmkeys --checksig
|
|
|
|
rpm exec -K rpmkeys --checksig
|
|
|
|
rpm exec --import rpmkeys --import
|
|
|
|
rpm exec --initdb rpmdb --initdb
|
|
|
|
rpm exec --rebuilddb rpmdb --rebuilddb
|
|
|
|
rpm exec --verifydb rpmdb --verifydb
|
|
|
|
rpm exec --specfile rpmspec -q
|
2010-09-03 20:01:47 +08:00
|
|
|
|
2000-05-25 01:53:35 +08:00
|
|
|
#==============================================================================
|
2009-10-22 15:37:49 +08:00
|
|
|
rpmbuild alias --ftpport --define '_httpport !#:+'
|
|
|
|
rpmbuild alias --ftpproxy --define '_httpproxy !#:+'
|
2001-07-11 22:23:01 +08:00
|
|
|
rpmbuild alias --httpport --define '_httpport !#:+'
|
|
|
|
rpmbuild alias --httpproxy --define '_httpproxy !#:+'
|
|
|
|
rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
|
|
|
|
--POPTdesc=$"enable configure <option> for build" \
|
|
|
|
--POPTargs=$"<option>"
|
|
|
|
rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \
|
|
|
|
--POPTdesc=$"disable configure <option> for build" \
|
|
|
|
--POPTargs=$"<option>"
|
2008-06-25 14:20:27 +08:00
|
|
|
# Build policies enabled from command line. Last policy applies.
|
2008-11-22 23:36:05 +08:00
|
|
|
rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \
|
2008-06-25 14:20:27 +08:00
|
|
|
--POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
|
|
|
|
--POPTargs=$"<policy>"
|
2010-08-20 22:50:51 +08:00
|
|
|
# Minimally preserve rpmbuild's --sign functionality
|
|
|
|
rpmbuild alias --sign \
|
|
|
|
--pipe "grep '.*: .*\.rpm$'|cut -d: -f2|xargs rpm --addsign" \
|
|
|
|
--POPTdesc=$"generate GPG signature"
|
2010-10-04 21:04:47 +08:00
|
|
|
|
|
|
|
rpmsign alias --key-id --define '_gpg_name !#:+' \
|
|
|
|
--POPTdesc=$"key id/name to sign with" \
|
2011-01-10 20:09:57 +08:00
|
|
|
--POPTargs=$"<id>"
|
2010-10-04 21:04:47 +08:00
|
|
|
rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \
|
|
|
|
--POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \
|
|
|
|
--POPTargs=$"<algorithm>"
|
2010-10-12 20:39:52 +08:00
|
|
|
|
|
|
|
rpmspec alias --conflicts --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
|
2010-10-12 20:39:52 +08:00
|
|
|
--POPTdesc=$"list capabilities this package conflicts with"
|
|
|
|
rpmspec alias --obsoletes --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
|
2010-10-12 20:39:52 +08:00
|
|
|
--POPTdesc=$"list other packages removed by installing this package"
|
|
|
|
rpmspec alias --provides --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
|
2010-10-12 20:39:52 +08:00
|
|
|
--POPTdesc=$"list capabilities that this package provides"
|
|
|
|
rpmspec alias --requires --qf \
|
2011-09-06 21:12:15 +08:00
|
|
|
"[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
|
2010-10-12 20:39:52 +08:00
|
|
|
--POPTdesc=$"list capabilities required by package(s)"
|
|
|
|
rpmspec alias --buildconflicts --srpm --conflicts \
|
|
|
|
--POPTdesc=$"list capabilities conflicting with build of this package"
|
|
|
|
rpmspec alias --buildrequires --srpm --requires \
|
|
|
|
--POPTdesc=$"list capabilities required to build this package"
|
2001-04-10 20:36:45 +08:00
|
|
|
# \endverbatim
|
|
|
|
#*/
|