Handle config.guess and config.sub with DOS EOLs
[platform/upstream/rpm.git] / rpmpopt.in
index 0f564ca..f8ce35f 100644 (file)
 
 rpm    alias --scripts --qf '\
 %|PRETRANS?{pretrans scriptlet\
-%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\
-{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\
+%|PRETRANSPROG?{ (using[ %{PRETRANSPROG}])}|:\n%{PRETRANS}\n}:\
+{%|PRETRANSPROG?{pretrans program:[ %{PRETRANSPROG}]\n}|}|\
 \
 %|PREIN?{preinstall scriptlet\
-%|PREINPROG?{ (using %{PREINPROG})}|:\n%{PREIN}\n}:\
-{%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
+%|PREINPROG?{ (using[ %{PREINPROG}])}|:\n%{PREIN}\n}:\
+{%|PREINPROG?{preinstall program:[ %{PREINPROG}]\n}|}|\
 \
 %|POSTIN?{postinstall scriptlet\
-%|POSTINPROG?{ (using %{POSTINPROG})}|:\n%{POSTIN}\n}:\
-{%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
+%|POSTINPROG?{ (using[ %{POSTINPROG}])}|:\n%{POSTIN}\n}:\
+{%|POSTINPROG?{postinstall program:[ %{POSTINPROG}]\n}|}|\
 \
 %|PREUN?{preuninstall scriptlet\
-%|PREUNPROG?{ (using %{PREUNPROG})}|:\n%{PREUN}\n}:\
-{%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
+%|PREUNPROG?{ (using[ %{PREUNPROG}])}|:\n%{PREUN}\n}:\
+{%|PREUNPROG?{preuninstall program:[ %{PREUNPROG}]\n}|}|\
 \
 %|POSTUN?{postuninstall scriptlet\
-%|POSTUNPROG?{ (using %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
-{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
+%|POSTUNPROG?{ (using[ %{POSTUNPROG}])}|:\n%{POSTUN}\n}:\
+{%|POSTUNPROG?{postuninstall program:[ %{POSTUNPROG}]\n}|}|\
 \
 %|POSTTRANS?{posttrans scriptlet\
-%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\
-{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\
+%|POSTTRANSPROG?{ (using[ %{POSTTRANSPROG}])}|:\n%{POSTTRANS}\n}:\
+{%|POSTTRANSPROG?{posttrans program:[ %{POSTTRANSPROG}]\n}|}|\
 \
-%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
+%|VERIFYSCRIPT?{verify scriptlet\
+%|VERIFYSCRIPTPROG?{ (using[ %{VERIFYSCRIPTPROG}])}|:\n%{VERIFYSCRIPT}\n}:\
+{%|VERIFYSCRIPTPROG?{verify program:[ %{VERIFYSCRIPTPROG}]\n}|}|\
 ' \
        --POPTdesc=$"list install/erase scriptlets from package(s)"
 
-rpm    alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
+rpm    alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
                   --pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \
        --POPTdesc=$"set permissions of files in a package"
 
@@ -51,20 +53,34 @@ rpm alias --setugids -q --qf \
        --POPTdesc=$"set user/group ownership of files in a package"
 
 rpm    alias --conflicts       --qf \
-  "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" \
+  "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
        --POPTdesc=$"list capabilities this package conflicts with"
 rpm    alias --obsoletes       --qf \
-  "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" \
+  "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
        --POPTdesc=$"list other packages removed by installing this package"
 rpm    alias --provides        --qf \
-  "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]" \
+  "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
        --POPTdesc=$"list capabilities that this package provides"
+rpm    alias -P --provides
 
 rpm    alias --requires        --qf \
-  "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
+  "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
        --POPTdesc=$"list capabilities required by package(s)"
 rpm    alias -R --requires
 
+rpm    alias --recommends      --qf \
+  "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \
+       --POPTdesc=$"list capabilities recommended by package(s)"
+rpm    alias --suggests        --qf \
+  "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \
+       --POPTdesc=$"list capabilities suggested by package(s)"
+rpm    alias --supplements     --qf \
+  "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \
+       --POPTdesc=$"list capabilities supplemented by package(s)"
+rpm    alias --enhances        --qf \
+  "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \
+       --POPTdesc=$"list capabilities enhanced by package(s)"
+
 rpm    alias --info --qf '\
 Name        : %{NAME}\n\
 %|EPOCH?{Epoch       : %{EPOCH}\n}|\
@@ -91,6 +107,9 @@ Description :\n%{DESCRIPTION}\n' \
 rpm    alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
        --POPTdesc=$"list change logs for this package"
 
+rpm    alias --changes --qf '[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \
+       --POPTdesc=$"list changes for this package with full time stamps"
+
 rpm    alias --xml --qf '[%{*:xml}\n]' \
        --POPTdesc=$"list metadata in xml"
 
@@ -100,8 +119,16 @@ rpm        alias --triggerscripts --qf '\
 rpm    alias --triggers --triggerscripts \
        --POPTdesc=$"list trigger scriptlets from package(s)"
 
-rpm    alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
-       --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \
+rpm    alias --filetriggerscripts --qf '\
+[filetrigger%{FILETRIGGERTYPE} scriptlet (using %{FILETRIGGERSCRIPTPROG}) -- \
+%{FILETRIGGERCONDS}\n%{FILETRIGGERSCRIPTS}\n]\
+[transfiletrigger%{TRANSFILETRIGGERTYPE} scriptlet (using %{TRANSFILETRIGGERSCRIPTPROG}) -- \
+%{TRANSFILETRIGGERCONDS}\n%{TRANSFILETRIGGERSCRIPTS}\n]'
+rpm    alias --filetriggers --filetriggerscripts \
+       --POPTdesc=$"list filetrigger scriptlets from package(s)"
+
+rpm    alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
+       --pipe "LC_NUMERIC=C 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"
 
 rpm    alias --dupes   --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \
@@ -111,44 +138,27 @@ rpm       alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \
        --POPTdesc=$"list all files from each package"
 
 rpm    alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \
-       --POPTdesc=$"list file names with classes"
+       --POPTdesc=$"list file names with their classes"
 
 rpm    alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \
-       --POPTdesc=$"list file names with colors"
-
-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"
+       --POPTdesc=$"list file names with their colors"
 
 rpm    alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \
-       --POPTdesc=$"list file names with provides"
+       --POPTdesc=$"list file names with their provides"
 
 rpm    alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \
        --POPTdesc=$"list file names with requires"
 
 rpm    alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \
-       --POPTdesc=$"list file names with POSIX1.e capabilities"
+       --POPTdesc=$"list file names with their POSIX1.e capabilities"
 
 # colon separated i18n domains to use as PO catalogue lookaside for
 # retrieving header group/description/summary.
 rpm alias --i18ndomains --define '_i18ndomains !#:+'
 
-# Choose db interface:
-#      0       same as 1
-#      1       native db1 interface (e.g. linux glibc libdb1 routines).
-#      2       native db2 interface.
-#      3       native db3 interface.
-#      -1      db3 -> db2 -> db1 (as available).
-#
-# There are two macros so that --rebuilddb can convert db1 -> db3
-rpm alias --dbapi               --define '_dbapi !#:+'
-
-rpm alias --rebuilddbapi        --define '_dbapi_rebuild !#:+'
-rpm alias --rebuilddbpath       --define '_dbapath_rebuild !#:+'
+rpm alias --color --define '_color_output !#:+'
 
 #==============================================================================
-#      [--dbpath DIRECTORY"    "use database in DIRECTORY"
-rpm    alias --dbpath          --define '_dbpath !#:+'
 #      [--ftpport <port>]      "port number of ftp server (or proxy)"
 rpm    alias --ftpport         --define '_httpport !#:+'
 #      [--ftpproxy <host>]     "hostname or IP of ftp proxy"
@@ -157,23 +167,23 @@ rpm       alias --ftpproxy        --define '_httpproxy !#:+'
 rpm    alias --httpport        --define '_httpport !#:+'
 #      [--httpproxy <host>]    "hostname or IP of http proxy"
 rpm    alias --httpproxy       --define '_httpproxy !#:+'
+#      [--trace]               "trace macro expansion"
+rpm    alias --trace           --eval '%trace'
 
 # Minimally preserve commonly used switches from cli split-up
-rpm    exec --addsign          @BINDIR@/rpmsign --addsign
-rpm    exec --delsign          @BINDIR@/rpmsign --delsign
-rpm    exec --resign           @BINDIR@/rpmsign --resign
-rpm    exec --checksig         @BINDIR@/rpmkeys --checksig
-rpm    exec -K                 @BINDIR@/rpmkeys --checksig
-rpm    exec --import           @BINDIR@/rpmkeys --import
-rpm    exec --initdb           @BINDIR@/rpmdb --initdb
-rpm    exec --rebuilddb        @BINDIR@/rpmdb --rebuilddb
-rpm    exec --verifydb         @BINDIR@/rpmdb --verifydb
-rpm    exec --specfile         @BINDIR@/rpmspec -q
+rpm    exec --addsign          rpmsign --addsign
+rpm    exec --delsign          rpmsign --delsign
+rpm    exec --resign           rpmsign --resign
+#rpm   exec --signfiles        rpmsign --signfiles
+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
 
 #==============================================================================
-rpmbuild       alias --dbpath          --define '_dbpath !#:+' \
-       --POPTdesc=$"use database in DIRECTORY" \
-       --POPTargs=$"DIRECTORY"
 rpmbuild alias --ftpport               --define '_httpport !#:+'
 rpmbuild alias --ftpproxy      --define '_httpproxy !#:+'
 rpmbuild alias --httpport      --define '_httpport !#:+'
@@ -190,31 +200,35 @@ rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#
        --POPTargs=$"<policy>"
 # Minimally preserve rpmbuild's --sign functionality
 rpmbuild alias --sign \
-       --pipe "grep '.*: .*\.rpm$'|cut -d: -f2|xargs rpm --addsign" \
-       --POPTdesc=$"generate GPG signature"
+       --pipe 'rpm --addsign `grep ".*: .*\.rpm$"|cut -d: -f2` < "/dev/"`ps -p $$ -o tty | tail -n 1`' \
+       --POPTdesc=$"generate GPG signature (deprecated, use command rpmsign instead)"
+#      [--trace]               "trace macro expansion"
+rpmbuild alias --trace         --eval '%trace'
 
 rpmsign alias --key-id  --define '_gpg_name !#:+' \
        --POPTdesc=$"key id/name to sign with" \
-       --POPargs=$"<id>"
+       --POPTargs=$"<id>"
 rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \
        --POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \
        --POPTargs=$"<algorithm>"
 
 rpmspec        alias --conflicts       --qf \
-  "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" \
+  "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
        --POPTdesc=$"list capabilities this package conflicts with"
 rpmspec        alias --obsoletes       --qf \
-  "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" \
+  "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \
        --POPTdesc=$"list other packages removed by installing this package"
 rpmspec        alias --provides        --qf \
-  "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]" \
+  "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \
        --POPTdesc=$"list capabilities that this package provides"
 rpmspec        alias --requires        --qf \
-  "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" \
+  "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \
        --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"
+#      [--trace]               "trace macro expansion"
+rpmspec alias --trace          --eval '%trace'
 # \endverbatim
 #*/