Browse Source

fixed typo

master
parent
commit
be15794d8f
  1. 287
      openpkg/rpmtool.8
  2. 2
      openpkg/rpmtool.pod

287
openpkg/rpmtool.8

@ -0,0 +1,287 @@
.\" Automatically generated by Pod::Man version 1.15
.\" Mon Jan 28 17:12:44 2002
.\"
.\" Standard preamble:
.\" ======================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
.\" index entries marked with X<> in POD. Of course, you'll have to process
.\" the output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it
.\" makes way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
.bd B 3
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ======================================================================
.\"
.IX Title "RPMTOOL 1"
.TH RPMTOOL 1 "perl v5.6.1" "2002-01-28" "User Contributed Perl Documentation"
.UC
.SH "NAME"
\&\fBrpmtool\fR \- \s-1RPM\s0 Auxiliary Tool
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBrpmtool\fR
\&\fIcommand\fR
[\fIcommand-options\fR]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This is an auxiliary tool to the RedHat Package Manager (\s-1RPM\s0). It
provides additional functionality for use in \s-1RPM\s0 \fIspec\fR files while
building packages. The following \fIcommand\fRs are available:
.Ip "\fBplatform\fR" 4
.IX Item "platform"
This command outputs a unique platform id in the format
\&\*(L"<architecture>\-<system><release>\*(R". For instance, the output on a
FreeBSD platform can be \*(L"i386\-freebsd4.2\*(R", the output on a Linux
platform can be \*(L"i686\-linux2.2.16\*(R", the output on a Solaris platform can
be \*(L"sun4u-sunos5.8\*(R", etc.
.Sp
Example:
.Sp
.Vb 5
\& case `rpmtool platform`; in
\& *-freebsd[34].* ) ... ;;
\& *-sunos5.[678] ) ... ;;
\& *-linux2.[24].* ) ... ;;
\& esac
.Ve
.Ip "\fBsubst\fR [\fB\-v\fR] [\fB\-t\fR] [\fB\-s\fR] \fIsed-op\fR [\fIsed-op\fR ...] \fB\--\fR \fIfile\fR [\fIfile\fR ...]" 4
.IX Item "subst [-v] [-t] [-s] sed-op [sed-op ...] -- file [file ...]"
This is a convinience command which provides a useful wrapper around
\&\fIsed\fR\|(1). It iterates over all \fIfile\fR arguments, creates \fIfile\fR\fB.orig\fR
from \fIfile\fR, applies the \fIsed-op\fR with \fIsed\fR\|(1) and writes the output
to \fIfile\fR. Use this command for easily substituting strings in a bunch
of files from within \s-1RPM\s0 \f(CW\*(C`%build\*(C'\fR or \f(CW\*(C`%install\*(C'\fR scripts. Option \fB\-v\fR
(verbose) it prints the actually patched files (useful in combination
with shell wildcard globbing), option \fB\-t\fR (trace) prints the actually
executed commands. And if option \fB\-s\fR (stealth mode) is used, the
timestamp preserved.
.Sp
Example:
.Sp
.Vb 5
\& %install
\& rpmtool subst \e
\& "s;^\e\e(prefix = \e\e).*;\e\e1 $RPM_BUILD_ROOT%{prefix};" \e
\& "s;install;shtool install;" -- \e
\& Makefile */Makefile
.Ve
.Ip "\fBflags\fR [\fB\-m\fR] [\fB\-c\fR] [\fB\-O\fR] \fItool\fR" 4
.IX Item "flags [-m] [-c] [-O] tool"
This command outputs additional flags for make (\fB\-m\fR) or compiler (\fB\-c\fR) for
use with the program \fItool\fR. For \fB\-m\fR it provides only standard flags which
always can be used. In conjunction with \fB\-O\fR (optimization), it also provides
reasonable job control for use on multi-processor platforms (for instance it
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).
For \fB\-c\fR it provides only standard flags which always can be used. In
conjunction with \fB\-O\fR it provides also optimization flags (for instance it
outputs \*(L"\-O2 \-pipe\*(R" for \s-1GNU\s0 C/\*(C+ compiler).
.Sp
Example:
.Sp
.Vb 1
\& CC="$CC" CFLAGS=`rpmtool -c -O $CC` ./configure ...
.Ve
.Ip "\fBfiles\fR [\fB\-v\fR] [\fB\-o\fR \fIoutfile\fR] [\fB\-r\fR \fIbuild-root\fR] [\fIentry\fR ...]" 4
.IX Item "files [-v] [-o outfile] [-r build-root] [entry ...]"
This is a dynamic variant of the \s-1RPM\s0 \f(CW\*(C`%files\*(C'\fR section, i.e., it
dynamically creates the contents of the \f(CW\*(C`%files\*(C'\fR section for use with
the \f(CW\*(C`%files \-f\*(C'\fR command. For this the file list entries are read from
the command line (or from stdin if no arguments are given or a single
argument \f(CW\*(C`\-\*(C'\fR is given) and written to stdout (if no \fB\-o\fR option is
given or its \fIoutfile\fR argument is \f(CW\*(C`\-\*(C'\fR) or to \fIoutfile\fR.
.Sp
The trick of this approach is to be able to use additional features in
the file list which \s-1RPM\s0 does not provide. The following features are
provided:
.RS 4
.Ip "\fBTrailing Tags\fR" 4
.IX Item "Trailing Tags"
\&\s-1RPM\s0 requires that all tags (like \f(CW\*(C`%attr(...)\*(C'\fR or \f(CW\*(C`%dir\*(C'\fR) preceed the
path in a file list entry. This sometimes leads to ugly and unreadable
file lists, because all paths cannot be left-aligned. With \fIrpmtool\fR\|(1)
tags in the input file list can be at leading and trailing positions.
The output file list will nevertheless have all tags in leading
positions for \s-1RPM\s0.
.Ip "\fBSyntactical Set Pattern\fR" 4
.IX Item "Syntactical Set Pattern"
\&\s-1RPM\s0 supports simple wildcard patterns like \f(CW\*(C`/path/*\*(C'\fR or \f(CW\*(C`/path/[a\-z]\*(C'\fR,
etc. Sometimes it is convienient, to also have (in addition to character
sets) string sets like \f(CW\*(C`/path/{foo,bar,quux}\*(C'\fR. \fIrpmtool\fR\|(1) provides this
by syntactically (without checking the filesystem) expanding those
string sets.
.Ip "\fBOverriding Entries\fR" 4
.IX Item "Overriding Entries"
This is the most important feature and the reason why \fIrpmtool\fR\|(1)'s
\&\fBsubst\fR command was implemented. Although \s-1RPM\s0 allows one to specify a
directory in a file list and then implicitly expands this recursively
into its contents, it unfortunately does not allow one to later
explcitly override particular entries (usually if an individual
\&\f(CW\*(C`%attr(...)\*(C'\fR tag is required). \fIrpmtool\fR\|(1) now supports overriding
entries, i.e., if a path occurs multiple times, only the last occurance
is kept.
.Ip "\fBNegation Tag\fR" 4
.IX Item "Negation Tag"
This provides an additional tag \f(CW\*(C`%not\*(C'\fR which can be used to explicitly
exclude a previously implicitly added entry.
.RE
.RS 4
.Sp
Example:
.Sp
.Vb 8
\& %install
\& :
\& rpmtool files -o files -r$RPM_BUILD_ROOT \e
\& '%defattr(-,foo,foo)' \e
\& '%{prefix}' \e
\& '%attr(1755,root,foo) %{prefix}/bin/bar' \e
\& '%not %dir {%{prefix},%{prefix}/*,%{prefix}/man/*}' \e
\& '%not %{prefix}/info/dir'
.Ve
.Vb 1
\& %files -f files
.Ve
.RE
.Ip "\fBuser\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-p\fR \fIpasswd\fR] [\fB\-n\fR \fIrealname\fR] [\fB\-d\fR \fIhomedir\fR] [\fB\-s\fR \fIshell\fR] [\fB\-u\fR \fImin-uid\fR] \fIusername\fR" 4
.IX Item "user [-a] [-r] [-p passwd] [-n realname] [-d homedir] [-s shell] [-u min-uid] username"
This adds (\fB\-a\fR) or removes (\fB\-r\fR) the user \fIusername\fR in the system database.
.Ip "\fBgroup\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-g\fR \fImin-gid\fR] \fIgroupname\fR [\fIusername\fR ...]" 4
.IX Item "group [-a] [-r] [-g min-gid] groupname [username ...]"
This adds (\fB\-a\fR) or removes (\fB\-r\fR) the group \fIgroupname\fR in the system database.
.SH "HISTORY"
.IX Header "HISTORY"
This tool was created in November 2000 for use with the Portable
RPM-based Unix Software Packages at Cable & Wireless Deutschland GmbH,
Munich.
.SH "AUTHOR"
.IX Header "AUTHOR"
.Vb 3
\& Ralf S. Engelschall
\& rse@engelschall.com
\& www.engelschall.com
.Ve

2
openpkg/rpmtool.pod

@ -74,7 +74,7 @@ timestamp preserved.
Example:
%install
rpm subst \
rpmtool subst \
"s;^\\(prefix = \\).*;\\1 $RPM_BUILD_ROOT%{prefix};" \
"s;install;shtool install;" -- \
Makefile */Makefile

Loading…
Cancel
Save