openpkg/rpmpopt

Thu, 04 Oct 2012 20:30:05 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 04 Oct 2012 20:30:05 +0200
changeset 715
c10fb90893b9
parent 13
cb59d6afeb61
permissions
-rw-r--r--

Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.

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

mercurial