openpkg/rpmpopt

changeset 428
f880f219c566
parent 13
cb59d6afeb61
     1.1 --- a/openpkg/rpmpopt	Tue Jul 31 12:12:54 2012 +0200
     1.2 +++ b/openpkg/rpmpopt	Tue Jul 31 12:23:42 2012 +0200
     1.3 @@ -1,14 +1,13 @@
     1.4  ##
     1.5  ##  rpmpopt -- OpenPKG RPM POPT Configuration
     1.6 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     1.8 +##  Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
     1.9  ##
    1.10 -##  Permission to use, copy, modify, and distribute this software for
    1.11 -##  any purpose with or without fee is hereby granted, provided that
    1.12 -##  the above copyright notice and this permission notice appear in all
    1.13 -##  copies.
    1.14 +##  This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
    1.15 +##  All rights reserved. Licenses which grant limited permission to use,
    1.16 +##  copy, modify and distribute this software are available from the
    1.17 +##  OpenPKG GmbH.
    1.18  ##
    1.19 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.20 +##  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
    1.21  ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.22  ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.23  ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.24 @@ -21,11 +20,17 @@
    1.25  ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.26  ##  SUCH DAMAGE.
    1.27  ##
    1.28 +
    1.29 +##
    1.30  ##  The purpose of this configuration file is to extend and override
    1.31  ##  the "rpmpopt" directives in the default RPM POPT configuration with
    1.32  ##  OpenPKG specific extensions and adjustments.
    1.33  ##
    1.34  
    1.35 +#   extended short-hand option
    1.36 +rpm alias --force --replacepkgs --replacefiles --oldpackage --noparentdirs \
    1.37 +    --POPTdesc=$"force operation (short hand for --replacepkgs --replacefiles --oldpackage --noparentdirs on installation)"
    1.38 +
    1.39  #   backward compatibility for old RPM extensions
    1.40  rpm exec --stowaway  echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please."
    1.41  rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please."
    1.42 @@ -58,6 +63,8 @@
    1.43  #   RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}"
    1.44  rpm exec --db-build   rpmdb --build \
    1.45      --POPTdesc=$"RPM database administration: build new database (destructive operation; you have to know what you are doing)"
    1.46 +rpm exec --db-migrate rpmdb --migrate \
    1.47 +    --POPTdesc=$"RPM database administration: change database format (migration operation; you have to know what you are doing)"
    1.48  rpm exec --db-rebuild rpmdb --rebuild \
    1.49      --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)"
    1.50  rpm exec --db-cleanup rpmdb --cleanup \
    1.51 @@ -66,7 +73,7 @@
    1.52      --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)"
    1.53  
    1.54  #   RPM extension: "rpm --db-private ..."
    1.55 -rpm alias --db-private --define "_rpmdb_private yes" \
    1.56 +rpm alias --db-private --define "__dbi_private yes" \
    1.57      --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode"
    1.58  
    1.59  #   RPM extension: "rpm --track"
    1.60 @@ -77,8 +84,8 @@
    1.61  rpm alias --track-dump -bt --define '___track_dump yes' \
    1.62      --POPTdesc=$"dump the vendor source tracking script (%track)"
    1.63  
    1.64 -#   RPM extension: "rpm --test"
    1.65 -rpm alias --test -q --qf '%{TEST}\n' \
    1.66 +#   RPM extension: "rpm --runtime-test"
    1.67 +rpm alias --runtime-test -q --qf '%{TEST}\n' \
    1.68      --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \
    1.69      --POPTdesc=$"run package run-time test script (%test)"
    1.70  
    1.71 @@ -91,11 +98,39 @@
    1.72  #   RPM adjustment: "rpm --setugids ..."
    1.73  rpm alias --setugids -q --qf \
    1.74      '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
    1.75 -    --pipe "(echo 'run () { chown -- \"$1\" \"$3\"; chgrp -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \
    1.76 +    --pipe "(echo 'run () { chown -h -- \"$1\" \"$3\"; chgrp -h -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \
    1.77      --POPTdesc=$"set user/group ownership of files in a package"
    1.78  
    1.79 +#   RPM extension: "rpm -qp --environment"
    1.80 +rpm alias --environment --qf '%{Environment}\n' \
    1.81 +    --pipe "@l_prefix@/lib/openpkg/rpm --eval '%{__environment_to_xml}'" \
    1.82 +    --POPTdesc=$"query the recursively tracked build environment of a package as XML"
    1.83 +
    1.84 +#   RPM extension: "rpm --marker <marker>"
    1.85 +rpm alias --mark --define "__marker !#:+" \
    1.86 +    --POPTdesc=$"mark package with Marker: <marker>" \
    1.87 +    --POPTargs=$"<marker>"
    1.88 +
    1.89 +#   RPM adjustment: "rpm -bs" implies "--nodeps"
    1.90 +rpm alias -bs -bs --nodeps
    1.91 +
    1.92 +#   RPM exentsion: "rpm --no-build{dependency,environment}"
    1.93 +rpm alias --no-builddependency --undefine "__autogen_builddependency" \
    1.94 +    --POPTdesc=$"do not auto-generate BuildDependency tag"
    1.95 +rpm alias --no-buildenvironment --undefine "__autogen_buildenvironment" \
    1.96 +    --POPTdesc=$"do not auto-generate BuildEnvironment tag"
    1.97 +
    1.98 +#   RPM extension: "rpm --layout <layout>"
    1.99 +rpm alias --layout --define "openpkg_layout basedir=%(pwd) layout=!#:+" \
   1.100 +    --POPTdesc=$"choose a particular packaging environment layout (global, local, simple, structured, distributed)" \
   1.101 +    --POPTargs=$"<layout>"
   1.102 +
   1.103 +#   RPM extension: "rpm --local"
   1.104 +rpm alias --local --define "openpkg_layout basedir=%(pwd) layout=local" \
   1.105 +    --POPTdesc=$"choose the 'local' packaging environment layout based on current directory as the base directory"
   1.106 +
   1.107  #   RPM adjustment: improved and cleaned up "rpm -i/--info"
   1.108 -rpmq alias --info --qf '\
   1.109 +rpm alias --info --qf '\
   1.110  Name:     %-25{NAME} Source RPM:   %{SOURCERPM}\n\
   1.111  Version:  %-25{VERSION} Signature:    %|DSAHEADER?{dsa:%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{rsa:%{RSAHEADER:pgpsig}}:{%|SIGGPG?{gpg:%{SIGGPG:pgpsig}}:{%|SIGPGP?{pgp:%{SIGPGP:pgpsig}}:{%|SIGMD5?{md5:%{SIGMD5}}:{(none)}|}|}|}|}|\n\
   1.112  Release:  %-25{RELEASE} Build Host:   %{BUILDHOST}\n\
   1.113 @@ -109,6 +144,12 @@
   1.114  URL:      %{URL}\n\
   1.115  Description:\n%{DESCRIPTION}\n\
   1.116  %|PROVIDENAME?{Provides:\n\
   1.117 -[    %{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]}:{}|\
   1.118 +[    %{PROVIDENAME}%|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags}%{PROVIDEVERSION}}:{}|\n]}:{}|\
   1.119 +%|CONFLICTNAME?{Conflicts:\n\
   1.120 +[    %{CONFLICTNAME}%|CONFLICTFLAGS?{%{CONFLICTFLAGS:depflags}%{CONFLICTVERSION}}:{}|\n]}:{}|\
   1.121 +%|OBSOLETENAME?{Obsoletes:\n\
   1.122 +[    %{OBSOLETENAME}%|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags}%{OBSOLETEVERSION}}:{}|\n]}:{}|\
   1.123 +%|REQUIRENAME?{Requires:\n\
   1.124 +[    %{REQUIRENAME}%|REQUIREFLAGS?{%{REQUIREFLAGS:depflags}%{REQUIREVERSION}}:{}|\n]}:{}|\
   1.125  ' --POPTdesc=$"list descriptive information from package(s)"
   1.126  

mercurial