michael@13: ## michael@13: ## rpmpopt -- OpenPKG RPM POPT Configuration michael@13: ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. michael@13: ## Copyright (c) 2000-2007 Ralf S. Engelschall michael@13: ## michael@13: ## Permission to use, copy, modify, and distribute this software for michael@13: ## any purpose with or without fee is hereby granted, provided that michael@13: ## the above copyright notice and this permission notice appear in all michael@13: ## copies. michael@13: ## michael@13: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@13: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@13: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@13: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@13: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@13: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@13: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@13: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@13: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@13: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@13: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@13: ## SUCH DAMAGE. michael@13: ## michael@13: ## The purpose of this configuration file is to extend and override michael@13: ## the "rpmpopt" directives in the default RPM POPT configuration with michael@13: ## OpenPKG specific extensions and adjustments. michael@13: ## michael@13: michael@13: # backward compatibility for old RPM extensions michael@13: rpm exec --stowaway echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please." michael@13: rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please." michael@13: rpm exec --fetch echo "install \"openpkg-tools\" and use \"openpkg fetch\" now please." michael@13: michael@13: # RPM exentsion: "rpm -bs --[no]restriction" michael@13: rpm alias --restriction --define "restriction yes" \ michael@13: --POPTdesc=$"exclude %NoSource files in .src.rpm" michael@13: rpm alias --norestriction --define "restriction no" \ michael@13: --POPTdesc=$"include %NoSource files in .src.rpm" michael@13: michael@13: # RPM extension: "rpm --with[out] " michael@13: rpm alias --with --define "with_!#:+ yes" \ michael@13: --POPTdesc=$"set '%option with_ yes'" \ michael@13: --POPTargs=$"" michael@13: rpm alias --without --define "with_!#:+ no" \ michael@13: --POPTdesc=$"set '%option with_ no'" \ michael@13: --POPTargs=$"" michael@13: michael@13: # RPM extension: "rpm --option " michael@13: rpm alias --option --define "!#:+ !#:+" \ michael@13: --POPTdesc=$"set '%option '" \ michael@13: --POPTargs=$" " michael@13: michael@13: # RPM extension: "rpm --tag " michael@13: rpm alias --tag --define "l_tag_fmt !#:+" \ michael@13: --POPTdesc=$"set 'binary package filename tag'" \ michael@13: --POPTargs=$"" michael@13: michael@13: # RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}" michael@13: rpm exec --db-build rpmdb --build \ michael@13: --POPTdesc=$"RPM database administration: build new database (destructive operation; you have to know what you are doing)" michael@13: rpm exec --db-rebuild rpmdb --rebuild \ michael@13: --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)" michael@13: rpm exec --db-cleanup rpmdb --cleanup \ michael@13: --POPTdesc=$"RPM database administration: cleanup existing database (cleaning operation; reasonable after DB out-of-sync situations)" michael@13: rpm exec --db-fixate rpmdb --fixate \ michael@13: --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)" michael@13: michael@13: # RPM extension: "rpm --db-private ..." michael@13: rpm alias --db-private --define "_rpmdb_private yes" \ michael@13: --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode" michael@13: michael@13: # RPM extension: "rpm --track" michael@13: rpm alias --track -bt \ michael@13: --POPTdesc=$"run package vendor source tracking script (%track)" michael@13: michael@13: # RPM extension: "rpm --track-dump" michael@13: rpm alias --track-dump -bt --define '___track_dump yes' \ michael@13: --POPTdesc=$"dump the vendor source tracking script (%track)" michael@13: michael@13: # RPM extension: "rpm --test" michael@13: rpm alias --test -q --qf '%{TEST}\n' \ michael@13: --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \ michael@13: --POPTdesc=$"run package run-time test script (%test)" michael@13: michael@13: # RPM adjustment: "rpm --setperms ..." michael@13: rpm alias --setperms -q --qf \ michael@13: '[\[ -h %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \ michael@13: --pipe "grep -v '(none)' | sed 's/chmod .../chmod /' | @l_prefix@/lib/openpkg/bash" \ michael@13: --POPTdesc=$"set permissions of files in a package" michael@13: michael@13: # RPM adjustment: "rpm --setugids ..." michael@13: rpm alias --setugids -q --qf \ michael@13: '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \ michael@13: --pipe "(echo 'run () { chown -- \"$1\" \"$3\"; chgrp -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \ michael@13: --POPTdesc=$"set user/group ownership of files in a package" michael@13: michael@13: # RPM adjustment: improved and cleaned up "rpm -i/--info" michael@13: rpmq alias --info --qf '\ michael@13: Name: %-25{NAME} Source RPM: %{SOURCERPM}\n\ michael@13: 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: Release: %-25{RELEASE} Build Host: %{BUILDHOST}\n\ michael@13: Group: %-25{GROUP} Build System: %{ARCH}-%{OS}\n\ michael@13: Class: %-25{CLASS} Build Time: %{BUILDTIME:date}\n\ michael@13: Distrib: %-25{DISTRIBUTION} Install Time: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\ michael@13: License: %-25{LICENSE} Install Size: %{SIZE} bytes\n\ michael@13: Packager: %-25{PACKAGER} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\ michael@13: Vendor: %{VENDOR}\n\ michael@13: Summary: %{SUMMARY}\n\ michael@13: URL: %{URL}\n\ michael@13: Description:\n%{DESCRIPTION}\n\ michael@13: %|PROVIDENAME?{Provides:\n\ michael@13: [ %{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]}:{}|\ michael@13: ' --POPTdesc=$"list descriptive information from package(s)" michael@13: