openpkg/rpmpopt

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 13
cb59d6afeb61
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  rpmpopt -- OpenPKG RPM POPT Configuration
     3 ##  Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
     4 ##
     5 ##  This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
     6 ##  All rights reserved. Licenses which grant limited permission to use,
     7 ##  copy, modify and distribute this software are available from the
     8 ##  OpenPKG GmbH.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 ##
    25 ##  The purpose of this configuration file is to extend and override
    26 ##  the "rpmpopt" directives in the default RPM POPT configuration with
    27 ##  OpenPKG specific extensions and adjustments.
    28 ##
    30 #   extended short-hand option
    31 rpm alias --force --replacepkgs --replacefiles --oldpackage --noparentdirs \
    32     --POPTdesc=$"force operation (short hand for --replacepkgs --replacefiles --oldpackage --noparentdirs on installation)"
    34 #   backward compatibility for old RPM extensions
    35 rpm exec --stowaway  echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please."
    36 rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please."
    37 rpm exec --fetch     echo "install \"openpkg-tools\" and use \"openpkg fetch\" now please."
    39 #   RPM exentsion: "rpm -bs --[no]restriction"
    40 rpm alias --restriction   --define "restriction yes" \
    41     --POPTdesc=$"exclude %NoSource files in .src.rpm"
    42 rpm alias --norestriction --define "restriction no" \
    43     --POPTdesc=$"include %NoSource files in .src.rpm"
    45 #   RPM extension: "rpm --with[out] <name>"
    46 rpm alias --with --define "with_!#:+ yes" \
    47     --POPTdesc=$"set '%option with_<name> yes'" \
    48     --POPTargs=$"<name>"
    49 rpm alias --without --define "with_!#:+ no" \
    50     --POPTdesc=$"set '%option with_<name> no'" \
    51     --POPTargs=$"<name>"
    53 #   RPM extension: "rpm --option <name> <value>"
    54 rpm alias --option --define "!#:+ !#:+" \
    55     --POPTdesc=$"set '%option <name> <value>'" \
    56     --POPTargs=$"<name> <value>"
    58 #   RPM extension: "rpm --tag <string>"
    59 rpm alias --tag --define "l_tag_fmt !#:+" \
    60     --POPTdesc=$"set 'binary package filename tag'" \
    61     --POPTargs=$"<string>"
    63 #   RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}"
    64 rpm exec --db-build   rpmdb --build \
    65     --POPTdesc=$"RPM database administration: build new database (destructive operation; you have to know what you are doing)"
    66 rpm exec --db-migrate rpmdb --migrate \
    67     --POPTdesc=$"RPM database administration: change database format (migration operation; you have to know what you are doing)"
    68 rpm exec --db-rebuild rpmdb --rebuild \
    69     --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)"
    70 rpm exec --db-cleanup rpmdb --cleanup \
    71     --POPTdesc=$"RPM database administration: cleanup existing database (cleaning operation; reasonable after DB out-of-sync situations)"
    72 rpm exec --db-fixate  rpmdb --fixate \
    73     --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)"
    75 #   RPM extension: "rpm --db-private ..."
    76 rpm alias --db-private --define "__dbi_private yes" \
    77     --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode"
    79 #   RPM extension: "rpm --track"
    80 rpm alias --track -bt \
    81     --POPTdesc=$"run package vendor source tracking script (%track)"
    83 #   RPM extension: "rpm --track-dump"
    84 rpm alias --track-dump -bt --define '___track_dump yes' \
    85     --POPTdesc=$"dump the vendor source tracking script (%track)"
    87 #   RPM extension: "rpm --runtime-test"
    88 rpm alias --runtime-test -q --qf '%{TEST}\n' \
    89     --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \
    90     --POPTdesc=$"run package run-time test script (%test)"
    92 #   RPM adjustment: "rpm --setperms ..."
    93 rpm alias --setperms -q --qf \
    94     '[\[ -h %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
    95     --pipe "grep -v '(none)' | sed 's/chmod .../chmod /' | @l_prefix@/lib/openpkg/bash" \
    96     --POPTdesc=$"set permissions of files in a package"
    98 #   RPM adjustment: "rpm --setugids ..."
    99 rpm alias --setugids -q --qf \
   100     '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
   101     --pipe "(echo 'run () { chown -h -- \"$1\" \"$3\"; chgrp -h -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \
   102     --POPTdesc=$"set user/group ownership of files in a package"
   104 #   RPM extension: "rpm -qp --environment"
   105 rpm alias --environment --qf '%{Environment}\n' \
   106     --pipe "@l_prefix@/lib/openpkg/rpm --eval '%{__environment_to_xml}'" \
   107     --POPTdesc=$"query the recursively tracked build environment of a package as XML"
   109 #   RPM extension: "rpm --marker <marker>"
   110 rpm alias --mark --define "__marker !#:+" \
   111     --POPTdesc=$"mark package with Marker: <marker>" \
   112     --POPTargs=$"<marker>"
   114 #   RPM adjustment: "rpm -bs" implies "--nodeps"
   115 rpm alias -bs -bs --nodeps
   117 #   RPM exentsion: "rpm --no-build{dependency,environment}"
   118 rpm alias --no-builddependency --undefine "__autogen_builddependency" \
   119     --POPTdesc=$"do not auto-generate BuildDependency tag"
   120 rpm alias --no-buildenvironment --undefine "__autogen_buildenvironment" \
   121     --POPTdesc=$"do not auto-generate BuildEnvironment tag"
   123 #   RPM extension: "rpm --layout <layout>"
   124 rpm alias --layout --define "openpkg_layout basedir=%(pwd) layout=!#:+" \
   125     --POPTdesc=$"choose a particular packaging environment layout (global, local, simple, structured, distributed)" \
   126     --POPTargs=$"<layout>"
   128 #   RPM extension: "rpm --local"
   129 rpm alias --local --define "openpkg_layout basedir=%(pwd) layout=local" \
   130     --POPTdesc=$"choose the 'local' packaging environment layout based on current directory as the base directory"
   132 #   RPM adjustment: improved and cleaned up "rpm -i/--info"
   133 rpm alias --info --qf '\
   134 Name:     %-25{NAME} Source RPM:   %{SOURCERPM}\n\
   135 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\
   136 Release:  %-25{RELEASE} Build Host:   %{BUILDHOST}\n\
   137 Group:    %-25{GROUP} Build System: %{ARCH}-%{OS}\n\
   138 Class:    %-25{CLASS} Build Time:   %{BUILDTIME:date}\n\
   139 Distrib:  %-25{DISTRIBUTION} Install Time: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\
   140 License:  %-25{LICENSE} Install Size: %{SIZE} bytes\n\
   141 Packager: %-25{PACKAGER} Relocations:  %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\
   142 Vendor:   %{VENDOR}\n\
   143 Summary:  %{SUMMARY}\n\
   144 URL:      %{URL}\n\
   145 Description:\n%{DESCRIPTION}\n\
   146 %|PROVIDENAME?{Provides:\n\
   147 [    %{PROVIDENAME}%|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags}%{PROVIDEVERSION}}:{}|\n]}:{}|\
   148 %|CONFLICTNAME?{Conflicts:\n\
   149 [    %{CONFLICTNAME}%|CONFLICTFLAGS?{%{CONFLICTFLAGS:depflags}%{CONFLICTVERSION}}:{}|\n]}:{}|\
   150 %|OBSOLETENAME?{Obsoletes:\n\
   151 [    %{OBSOLETENAME}%|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags}%{OBSOLETEVERSION}}:{}|\n]}:{}|\
   152 %|REQUIRENAME?{Requires:\n\
   153 [    %{REQUIRENAME}%|REQUIREFLAGS?{%{REQUIREFLAGS:depflags}%{REQUIREVERSION}}:{}|\n]}:{}|\
   154 ' --POPTdesc=$"list descriptive information from package(s)"

mercurial