1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openpkg/rpmtool.8 Tue Jan 06 23:40:39 2009 +0100 1.3 @@ -0,0 +1,291 @@ 1.4 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 1.5 +.\" 1.6 +.\" Standard preamble: 1.7 +.\" ======================================================================== 1.8 +.de Sh \" Subsection heading 1.9 +.br 1.10 +.if t .Sp 1.11 +.ne 5 1.12 +.PP 1.13 +\fB\\$1\fR 1.14 +.PP 1.15 +.. 1.16 +.de Sp \" Vertical space (when we can't use .PP) 1.17 +.if t .sp .5v 1.18 +.if n .sp 1.19 +.. 1.20 +.de Vb \" Begin verbatim text 1.21 +.ft CW 1.22 +.nf 1.23 +.ne \\$1 1.24 +.. 1.25 +.de Ve \" End verbatim text 1.26 +.ft R 1.27 +.fi 1.28 +.. 1.29 +.\" Set up some character translations and predefined strings. \*(-- will 1.30 +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left 1.31 +.\" double quote, and \*(R" will give a right double quote. | will give a 1.32 +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to 1.33 +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' 1.34 +.\" expand to `' in nroff, nothing in troff, for use with C<>. 1.35 +.tr \(*W-|\(bv\*(Tr 1.36 +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 1.37 +.ie n \{\ 1.38 +. ds -- \(*W- 1.39 +. ds PI pi 1.40 +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch 1.41 +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch 1.42 +. ds L" "" 1.43 +. ds R" "" 1.44 +. ds C` 1.45 +. ds C' 1.46 +'br\} 1.47 +.el\{\ 1.48 +. ds -- \|\(em\| 1.49 +. ds PI \(*p 1.50 +. ds L" `` 1.51 +. ds R" '' 1.52 +'br\} 1.53 +.\" 1.54 +.\" If the F register is turned on, we'll generate index entries on stderr for 1.55 +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index 1.56 +.\" entries marked with X<> in POD. Of course, you'll have to process the 1.57 +.\" output yourself in some meaningful fashion. 1.58 +.if \nF \{\ 1.59 +. de IX 1.60 +. tm Index:\\$1\t\\n%\t"\\$2" 1.61 +.. 1.62 +. nr % 0 1.63 +. rr F 1.64 +.\} 1.65 +.\" 1.66 +.\" For nroff, turn off justification. Always turn off hyphenation; it makes 1.67 +.\" way too many mistakes in technical documents. 1.68 +.hy 0 1.69 +.if n .na 1.70 +.\" 1.71 +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 1.72 +.\" Fear. Run. Save yourself. No user-serviceable parts. 1.73 +. \" fudge factors for nroff and troff 1.74 +.if n \{\ 1.75 +. ds #H 0 1.76 +. ds #V .8m 1.77 +. ds #F .3m 1.78 +. ds #[ \f1 1.79 +. ds #] \fP 1.80 +.\} 1.81 +.if t \{\ 1.82 +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) 1.83 +. ds #V .6m 1.84 +. ds #F 0 1.85 +. ds #[ \& 1.86 +. ds #] \& 1.87 +.\} 1.88 +. \" simple accents for nroff and troff 1.89 +.if n \{\ 1.90 +. ds ' \& 1.91 +. ds ` \& 1.92 +. ds ^ \& 1.93 +. ds , \& 1.94 +. ds ~ ~ 1.95 +. ds / 1.96 +.\} 1.97 +.if t \{\ 1.98 +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" 1.99 +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' 1.100 +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' 1.101 +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' 1.102 +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' 1.103 +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' 1.104 +.\} 1.105 +. \" troff and (daisy-wheel) nroff accents 1.106 +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' 1.107 +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' 1.108 +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] 1.109 +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' 1.110 +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' 1.111 +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] 1.112 +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] 1.113 +.ds ae a\h'-(\w'a'u*4/10)'e 1.114 +.ds Ae A\h'-(\w'A'u*4/10)'E 1.115 +. \" corrections for vroff 1.116 +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' 1.117 +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' 1.118 +. \" for low resolution devices (crt and lpr) 1.119 +.if \n(.H>23 .if \n(.V>19 \ 1.120 +\{\ 1.121 +. ds : e 1.122 +. ds 8 ss 1.123 +. ds o a 1.124 +. ds d- d\h'-1'\(ga 1.125 +. ds D- D\h'-1'\(hy 1.126 +. ds th \o'bp' 1.127 +. ds Th \o'LP' 1.128 +. ds ae ae 1.129 +. ds Ae AE 1.130 +.\} 1.131 +.rm #[ #] #H #V #F C 1.132 +.\" ======================================================================== 1.133 +.\" 1.134 +.IX Title "RPMTOOL 8" 1.135 +.TH RPMTOOL 8 "OpenPKG" "RPMTOOL(8)" "OpenPKG" 1.136 +.SH "NAME" 1.137 +\&\fBrpmtool\fR \- RPM Auxiliary Tool 1.138 +.SH "SYNOPSIS" 1.139 +.IX Header "SYNOPSIS" 1.140 +\&\fBrpmtool\fR 1.141 +\&\fIcommand\fR 1.142 +[\fIcommand-options\fR] 1.143 +.SH "DESCRIPTION" 1.144 +.IX Header "DESCRIPTION" 1.145 +This is an auxiliary tool to the RedHat Package Manager (\s-1RPM\s0). It 1.146 +provides additional functionality for use in \s-1RPM\s0 \fIspec\fR files while 1.147 +building packages. The following \fIcommand\fRs are available: 1.148 +.IP "\fBplatform\fR" 4 1.149 +.IX Item "platform" 1.150 +This command outputs a unique platform id in the format 1.151 +\&\*(L"<architecture>\-<system><release>\*(R". For instance, the output on a 1.152 +FreeBSD platform can be \*(L"i386\-freebsd4.2\*(R", the output on a Linux 1.153 +platform can be \*(L"i686\-linux2.2.16\*(R", the output on a Solaris platform can 1.154 +be \*(L"sun4u\-sunos5.8\*(R", etc. 1.155 +.Sp 1.156 +Example: 1.157 +.Sp 1.158 +.Vb 5 1.159 +\& case `rpmtool platform`; in 1.160 +\& *-freebsd[34].* ) ... ;; 1.161 +\& *-sunos5.[678] ) ... ;; 1.162 +\& *-linux2.[24].* ) ... ;; 1.163 +\& esac 1.164 +.Ve 1.165 +.IP "\fBmflags\fR [\fB\-O\fR] \fItool\fR" 4 1.166 +.IX Item "mflags [-O] tool" 1.167 +This command outputs additional flags for \fImake\fR\|(1) for 1.168 +use with the program \fItool\fR. It provides only standard flags which 1.169 +always can be used. In conjunction with \fB\-O\fR (optimization), it also provides 1.170 +reasonable job control for use on multi-processor platforms (for instance it 1.171 +outputs \*(L"\-j4\*(R" on an \s-1SMP\s0 system with 2 CPUs if \s-1GNU\s0 make or \s-1BSD\s0 pmake is used). 1.172 +.Sp 1.173 +Example: 1.174 +.Sp 1.175 +.Vb 1 1.176 +\& make `rpmtool mflags -O make` 1.177 +.Ve 1.178 +.IP "\fBcflags\fR [\fB\-O\fR] \fItool\fR" 4 1.179 +.IX Item "cflags [-O] tool" 1.180 +This command outputs additional flags for \fIcc\fR\|(1) for use with the program 1.181 +\&\fItool\fR. It provides only standard flags which always can be used. 1.182 +conjunction with \fB\-O\fR it provides also optimization flags (for instance 1.183 +it outputs \*(L"\-O2 \-pipe\*(R" for \s-1GNU\s0 C/\*(C+ compiler). 1.184 +.Sp 1.185 +Example: 1.186 +.Sp 1.187 +.Vb 1 1.188 +\& CC="$CC" CFLAGS=`rpmtool cflags -O $CC` ./configure ... 1.189 +.Ve 1.190 +.ie n .IP "\fBcppflags\fR [\fB\-p\fR \fIprefix\fR] [[\*(C`+|\-\*(C'\fR\fIsubdir ...]" 4 1.191 +.el .IP "\fBcppflags\fR [\fB\-p\fR \fIprefix\fR] [[\f(CW\*(C`+|\-\*(C'\fR\fIsubdir\fR ...]" 4 1.192 +.IX Item "cppflags [-p prefix] [[+|-subdir ...]" 1.193 +This command output \fIcpp\fR\|(1) \f(CW\*(C`\-I\*(C'\fR options for the OpenPKG instance 1.194 +\&\fIprefix\fR. It optionally can prefix or suffix with one or more \fIsubdir\fR 1.195 +related options, too. If \fIsubdir\fR is prefixed with \f(CW\*(C`+\*(C'\fR (or not 1.196 +prefixed at all), the generated option is appended. If \fIsubdir\fR is 1.197 +prefixed with \f(CW\*(C`\-\*(C'\fR the generated option is prepended. 1.198 +.Sp 1.199 +Example: 1.200 +.Sp 1.201 +.Vb 1 1.202 +\& rpmtool cppflags -p /foo bar -baz +quux 1.203 +.Ve 1.204 +.ie n .IP "\fBldflags\fR [\fB\-p\fR \fIprefix\fR] [[\*(C`+|\-\*(C'\fR\fIsubdir ...]" 4 1.205 +.el .IP "\fBldflags\fR [\fB\-p\fR \fIprefix\fR] [[\f(CW\*(C`+|\-\*(C'\fR\fIsubdir\fR ...]" 4 1.206 +.IX Item "ldflags [-p prefix] [[+|-subdir ...]" 1.207 +This command output \fIld\fR\|(1) \f(CW\*(C`\-L\*(C'\fR options for the OpenPKG instance 1.208 +\&\fIprefix\fR. It optionally can prefix or suffix with one or more \fIsubdir\fR 1.209 +related options, too. If \fIsubdir\fR is prefixed with \f(CW\*(C`+\*(C'\fR (or not 1.210 +prefixed at all), the generated option is appended. If \fIsubdir\fR is 1.211 +prefixed with \f(CW\*(C`\-\*(C'\fR the generated option is prepended. 1.212 +.Sp 1.213 +Example: 1.214 +.Sp 1.215 +.Vb 1 1.216 +\& rpmtool ldflags -p /foo bar -baz +quux 1.217 +.Ve 1.218 +.IP "\fBfiles\fR [\fB\-v\fR] [\fB\-o\fR \fIoutfile\fR] [\fB\-r\fR \fIbuild-root\fR] [\fIentry\fR ...]" 4 1.219 +.IX Item "files [-v] [-o outfile] [-r build-root] [entry ...]" 1.220 +This is a dynamic variant of the \s-1RPM\s0 \f(CW%files\fR section, i.e., it 1.221 +dynamically creates the contents of the \f(CW%files\fR section for use with 1.222 +the \f(CW\*(C`%files \-f\*(C'\fR command. For this the file list entries are read from 1.223 +the command line (or from stdin if no arguments are given or a single 1.224 +argument \f(CW\*(C`\-\*(C'\fR is given) and written to stdout (if no \fB\-o\fR option is 1.225 +given or its \fIoutfile\fR argument is \f(CW\*(C`\-\*(C'\fR) or to \fIoutfile\fR. 1.226 +.Sp 1.227 +The trick of this approach is to be able to use additional features in 1.228 +the file list which \s-1RPM\s0 does not provide. The following features are 1.229 +provided: 1.230 +.RS 4 1.231 +.IP "\fBTrailing Tags\fR" 4 1.232 +.IX Item "Trailing Tags" 1.233 +\&\s-1RPM\s0 requires that all tags (like \f(CW\*(C`%attr(...)\*(C'\fR or \f(CW%dir\fR) preceed the 1.234 +path in a file list entry. This sometimes leads to ugly and unreadable 1.235 +file lists, because all paths cannot be left\-aligned. With \fIrpmtool\fR\|(8) 1.236 +tags in the input file list can be at leading and trailing positions. 1.237 +The output file list will nevertheless have all tags in leading 1.238 +positions for \s-1RPM\s0. 1.239 +.IP "\fBSyntactical Set Pattern\fR" 4 1.240 +.IX Item "Syntactical Set Pattern" 1.241 +\&\s-1RPM\s0 supports simple wildcard patterns like \f(CW\*(C`/path/*\*(C'\fR or \f(CW\*(C`/path/[a\-z]\*(C'\fR, 1.242 +etc. Sometimes it is convenient, to also have (in addition to character 1.243 +sets) string sets like \f(CW\*(C`/path/{foo,bar,quux}\*(C'\fR. \fIrpmtool\fR\|(8) provides this 1.244 +by syntactically (without checking the filesystem) expanding those 1.245 +string sets. 1.246 +.IP "\fBOverriding Entries\fR" 4 1.247 +.IX Item "Overriding Entries" 1.248 +This is the most important feature and the reason why \fIshtool\fR\|(1)'s 1.249 +\&\fBfiles\fR command was implemented. Although \s-1RPM\s0 allows one to specify a 1.250 +directory in a file list and then implicitly expands this recursively 1.251 +into its contents, it unfortunately does not allow one to later 1.252 +explcitly override particular entries (usually if an individual 1.253 +\&\f(CW\*(C`%attr(...)\*(C'\fR tag is required). \fIrpmtool\fR\|(8) now supports overriding 1.254 +entries, i.e., if a path occurs multiple times, only the last occurance 1.255 +is kept. 1.256 +.IP "\fBNegation Tag\fR" 4 1.257 +.IX Item "Negation Tag" 1.258 +This provides an additional tag \f(CW%not\fR which can be used to explicitly 1.259 +exclude a previously implicitly added entry. 1.260 +.RE 1.261 +.RS 4 1.262 +.Sp 1.263 +Example: 1.264 +.Sp 1.265 +.Vb 8 1.266 +\& %install 1.267 +\& : 1.268 +\& rpmtool files -o files -r$RPM_BUILD_ROOT \e 1.269 +\& '%defattr(-,foo,foo)' \e 1.270 +\& '%{prefix}' \e 1.271 +\& '%attr(1755,root,foo) %{prefix}/bin/bar' \e 1.272 +\& '%not %dir {%{prefix},%{prefix}/*,%{prefix}/man/*}' \e 1.273 +\& '%not %{prefix}/info/dir' 1.274 +.Ve 1.275 +.Sp 1.276 +.Vb 1 1.277 +\& %files -f files 1.278 +.Ve 1.279 +.RE 1.280 +.IP "\fBmsg\fR [\fB\-b\fR]" 4 1.281 +.IX Item "msg [-b]" 1.282 +This displays the contents of \fIstdin\fR as a boxed message. If option 1.283 +\&\fB\-b\fR is given it additionally beeps once before displaying the box. 1.284 +.SH "HISTORY" 1.285 +.IX Header "HISTORY" 1.286 +This tool was created in November 2000 for use in OpenPKG, the 1.287 +cross-platform RPM-based Unix software packaging facility. 1.288 +.SH "AUTHOR" 1.289 +.IX Header "AUTHOR" 1.290 +.Vb 3 1.291 +\& Ralf S. Engelschall 1.292 +\& rse@engelschall.com 1.293 +\& www.engelschall.com 1.294 +.Ve