openpkg/rpmpopt

changeset 505
0838649dd325
parent 13
cb59d6afeb61
equal deleted inserted replaced
0:31f75d8dc2a7 1:f7e30b7f8005
1 ## 1 ##
2 ## rpmpopt -- OpenPKG RPM POPT Configuration 2 ## rpmpopt -- OpenPKG RPM POPT Configuration
3 ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> 3 ## Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
4 ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
5 ## 4 ##
6 ## Permission to use, copy, modify, and distribute this software for 5 ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
7 ## any purpose with or without fee is hereby granted, provided that 6 ## All rights reserved. Licenses which grant limited permission to use,
8 ## the above copyright notice and this permission notice appear in all 7 ## copy, modify and distribute this software are available from the
9 ## copies. 8 ## OpenPKG GmbH.
10 ## 9 ##
11 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 10 ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
12 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
14 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
15 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
21 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
23 ## 22 ##
23
24 ##
24 ## The purpose of this configuration file is to extend and override 25 ## The purpose of this configuration file is to extend and override
25 ## the "rpmpopt" directives in the default RPM POPT configuration with 26 ## the "rpmpopt" directives in the default RPM POPT configuration with
26 ## OpenPKG specific extensions and adjustments. 27 ## OpenPKG specific extensions and adjustments.
27 ## 28 ##
29
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)"
28 33
29 # backward compatibility for old RPM extensions 34 # backward compatibility for old RPM extensions
30 rpm exec --stowaway echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please." 35 rpm exec --stowaway echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please."
31 rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please." 36 rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please."
32 rpm exec --fetch echo "install \"openpkg-tools\" and use \"openpkg fetch\" now please." 37 rpm exec --fetch echo "install \"openpkg-tools\" and use \"openpkg fetch\" now please."
56 --POPTargs=$"<string>" 61 --POPTargs=$"<string>"
57 62
58 # RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}" 63 # RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}"
59 rpm exec --db-build rpmdb --build \ 64 rpm exec --db-build rpmdb --build \
60 --POPTdesc=$"RPM database administration: build new database (destructive operation; you have to know what you are doing)" 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)"
61 rpm exec --db-rebuild rpmdb --rebuild \ 68 rpm exec --db-rebuild rpmdb --rebuild \
62 --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)" 69 --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)"
63 rpm exec --db-cleanup rpmdb --cleanup \ 70 rpm exec --db-cleanup rpmdb --cleanup \
64 --POPTdesc=$"RPM database administration: cleanup existing database (cleaning operation; reasonable after DB out-of-sync situations)" 71 --POPTdesc=$"RPM database administration: cleanup existing database (cleaning operation; reasonable after DB out-of-sync situations)"
65 rpm exec --db-fixate rpmdb --fixate \ 72 rpm exec --db-fixate rpmdb --fixate \
66 --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)" 73 --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)"
67 74
68 # RPM extension: "rpm --db-private ..." 75 # RPM extension: "rpm --db-private ..."
69 rpm alias --db-private --define "_rpmdb_private yes" \ 76 rpm alias --db-private --define "__dbi_private yes" \
70 --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode" 77 --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode"
71 78
72 # RPM extension: "rpm --track" 79 # RPM extension: "rpm --track"
73 rpm alias --track -bt \ 80 rpm alias --track -bt \
74 --POPTdesc=$"run package vendor source tracking script (%track)" 81 --POPTdesc=$"run package vendor source tracking script (%track)"
75 82
76 # RPM extension: "rpm --track-dump" 83 # RPM extension: "rpm --track-dump"
77 rpm alias --track-dump -bt --define '___track_dump yes' \ 84 rpm alias --track-dump -bt --define '___track_dump yes' \
78 --POPTdesc=$"dump the vendor source tracking script (%track)" 85 --POPTdesc=$"dump the vendor source tracking script (%track)"
79 86
80 # RPM extension: "rpm --test" 87 # RPM extension: "rpm --runtime-test"
81 rpm alias --test -q --qf '%{TEST}\n' \ 88 rpm alias --runtime-test -q --qf '%{TEST}\n' \
82 --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \ 89 --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \
83 --POPTdesc=$"run package run-time test script (%test)" 90 --POPTdesc=$"run package run-time test script (%test)"
84 91
85 # RPM adjustment: "rpm --setperms ..." 92 # RPM adjustment: "rpm --setperms ..."
86 rpm alias --setperms -q --qf \ 93 rpm alias --setperms -q --qf \
89 --POPTdesc=$"set permissions of files in a package" 96 --POPTdesc=$"set permissions of files in a package"
90 97
91 # RPM adjustment: "rpm --setugids ..." 98 # RPM adjustment: "rpm --setugids ..."
92 rpm alias --setugids -q --qf \ 99 rpm alias --setugids -q --qf \
93 '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \ 100 '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
94 --pipe "(echo 'run () { chown -- \"$1\" \"$3\"; chgrp -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \ 101 --pipe "(echo 'run () { chown -h -- \"$1\" \"$3\"; chgrp -h -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \
95 --POPTdesc=$"set user/group ownership of files in a package" 102 --POPTdesc=$"set user/group ownership of files in a package"
96 103
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"
108
109 # RPM extension: "rpm --marker <marker>"
110 rpm alias --mark --define "__marker !#:+" \
111 --POPTdesc=$"mark package with Marker: <marker>" \
112 --POPTargs=$"<marker>"
113
114 # RPM adjustment: "rpm -bs" implies "--nodeps"
115 rpm alias -bs -bs --nodeps
116
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"
122
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>"
127
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"
131
97 # RPM adjustment: improved and cleaned up "rpm -i/--info" 132 # RPM adjustment: improved and cleaned up "rpm -i/--info"
98 rpmq alias --info --qf '\ 133 rpm alias --info --qf '\
99 Name: %-25{NAME} Source RPM: %{SOURCERPM}\n\ 134 Name: %-25{NAME} Source RPM: %{SOURCERPM}\n\
100 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\ 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\
101 Release: %-25{RELEASE} Build Host: %{BUILDHOST}\n\ 136 Release: %-25{RELEASE} Build Host: %{BUILDHOST}\n\
102 Group: %-25{GROUP} Build System: %{ARCH}-%{OS}\n\ 137 Group: %-25{GROUP} Build System: %{ARCH}-%{OS}\n\
103 Class: %-25{CLASS} Build Time: %{BUILDTIME:date}\n\ 138 Class: %-25{CLASS} Build Time: %{BUILDTIME:date}\n\
107 Vendor: %{VENDOR}\n\ 142 Vendor: %{VENDOR}\n\
108 Summary: %{SUMMARY}\n\ 143 Summary: %{SUMMARY}\n\
109 URL: %{URL}\n\ 144 URL: %{URL}\n\
110 Description:\n%{DESCRIPTION}\n\ 145 Description:\n%{DESCRIPTION}\n\
111 %|PROVIDENAME?{Provides:\n\ 146 %|PROVIDENAME?{Provides:\n\
112 [ %{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\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]}:{}|\
113 ' --POPTdesc=$"list descriptive information from package(s)" 154 ' --POPTdesc=$"list descriptive information from package(s)"
114 155

mercurial