1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openpkg/rpmpopt Tue Jan 06 23:40:39 2009 +0100 1.3 @@ -0,0 +1,114 @@ 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 +## 1.9 +## Permission to use, copy, modify, and distribute this software for 1.10 +## any purpose with or without fee is hereby granted, provided that 1.11 +## the above copyright notice and this permission notice appear in all 1.12 +## copies. 1.13 +## 1.14 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.15 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.16 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.17 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.18 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.19 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.20 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.21 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.22 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.23 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.24 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.25 +## SUCH DAMAGE. 1.26 +## 1.27 +## The purpose of this configuration file is to extend and override 1.28 +## the "rpmpopt" directives in the default RPM POPT configuration with 1.29 +## OpenPKG specific extensions and adjustments. 1.30 +## 1.31 + 1.32 +# backward compatibility for old RPM extensions 1.33 +rpm exec --stowaway echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please." 1.34 +rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please." 1.35 +rpm exec --fetch echo "install \"openpkg-tools\" and use \"openpkg fetch\" now please." 1.36 + 1.37 +# RPM exentsion: "rpm -bs --[no]restriction" 1.38 +rpm alias --restriction --define "restriction yes" \ 1.39 + --POPTdesc=$"exclude %NoSource files in .src.rpm" 1.40 +rpm alias --norestriction --define "restriction no" \ 1.41 + --POPTdesc=$"include %NoSource files in .src.rpm" 1.42 + 1.43 +# RPM extension: "rpm --with[out] <name>" 1.44 +rpm alias --with --define "with_!#:+ yes" \ 1.45 + --POPTdesc=$"set '%option with_<name> yes'" \ 1.46 + --POPTargs=$"<name>" 1.47 +rpm alias --without --define "with_!#:+ no" \ 1.48 + --POPTdesc=$"set '%option with_<name> no'" \ 1.49 + --POPTargs=$"<name>" 1.50 + 1.51 +# RPM extension: "rpm --option <name> <value>" 1.52 +rpm alias --option --define "!#:+ !#:+" \ 1.53 + --POPTdesc=$"set '%option <name> <value>'" \ 1.54 + --POPTargs=$"<name> <value>" 1.55 + 1.56 +# RPM extension: "rpm --tag <string>" 1.57 +rpm alias --tag --define "l_tag_fmt !#:+" \ 1.58 + --POPTdesc=$"set 'binary package filename tag'" \ 1.59 + --POPTargs=$"<string>" 1.60 + 1.61 +# RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}" 1.62 +rpm exec --db-build rpmdb --build \ 1.63 + --POPTdesc=$"RPM database administration: build new database (destructive operation; you have to know what you are doing)" 1.64 +rpm exec --db-rebuild rpmdb --rebuild \ 1.65 + --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)" 1.66 +rpm exec --db-cleanup rpmdb --cleanup \ 1.67 + --POPTdesc=$"RPM database administration: cleanup existing database (cleaning operation; reasonable after DB out-of-sync situations)" 1.68 +rpm exec --db-fixate rpmdb --fixate \ 1.69 + --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)" 1.70 + 1.71 +# RPM extension: "rpm --db-private ..." 1.72 +rpm alias --db-private --define "_rpmdb_private yes" \ 1.73 + --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode" 1.74 + 1.75 +# RPM extension: "rpm --track" 1.76 +rpm alias --track -bt \ 1.77 + --POPTdesc=$"run package vendor source tracking script (%track)" 1.78 + 1.79 +# RPM extension: "rpm --track-dump" 1.80 +rpm alias --track-dump -bt --define '___track_dump yes' \ 1.81 + --POPTdesc=$"dump the vendor source tracking script (%track)" 1.82 + 1.83 +# RPM extension: "rpm --test" 1.84 +rpm alias --test -q --qf '%{TEST}\n' \ 1.85 + --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \ 1.86 + --POPTdesc=$"run package run-time test script (%test)" 1.87 + 1.88 +# RPM adjustment: "rpm --setperms ..." 1.89 +rpm alias --setperms -q --qf \ 1.90 + '[\[ -h %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \ 1.91 + --pipe "grep -v '(none)' | sed 's/chmod .../chmod /' | @l_prefix@/lib/openpkg/bash" \ 1.92 + --POPTdesc=$"set permissions of files in a package" 1.93 + 1.94 +# RPM adjustment: "rpm --setugids ..." 1.95 +rpm alias --setugids -q --qf \ 1.96 + '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \ 1.97 + --pipe "(echo 'run () { chown -- \"$1\" \"$3\"; chgrp -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \ 1.98 + --POPTdesc=$"set user/group ownership of files in a package" 1.99 + 1.100 +# RPM adjustment: improved and cleaned up "rpm -i/--info" 1.101 +rpmq alias --info --qf '\ 1.102 +Name: %-25{NAME} Source RPM: %{SOURCERPM}\n\ 1.103 +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.104 +Release: %-25{RELEASE} Build Host: %{BUILDHOST}\n\ 1.105 +Group: %-25{GROUP} Build System: %{ARCH}-%{OS}\n\ 1.106 +Class: %-25{CLASS} Build Time: %{BUILDTIME:date}\n\ 1.107 +Distrib: %-25{DISTRIBUTION} Install Time: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\ 1.108 +License: %-25{LICENSE} Install Size: %{SIZE} bytes\n\ 1.109 +Packager: %-25{PACKAGER} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\ 1.110 +Vendor: %{VENDOR}\n\ 1.111 +Summary: %{SUMMARY}\n\ 1.112 +URL: %{URL}\n\ 1.113 +Description:\n%{DESCRIPTION}\n\ 1.114 +%|PROVIDENAME?{Provides:\n\ 1.115 +[ %{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]}:{}|\ 1.116 +' --POPTdesc=$"list descriptive information from package(s)" 1.117 +