diff -r 71503088f51b -r f880f219c566 openpkg/makeproxy.8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/makeproxy.8 Tue Jul 31 12:23:42 2012 +0200 @@ -0,0 +1,291 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.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. \*(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- +.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\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" 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 "MAKEPROXY 8" +.TH MAKEPROXY 8 "OpenPKG" "MAKEPROXY(8)" "OpenPKG" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +openpkg makeproxy \-\- Make Proxy OpenPKG RPM Package +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBopenpkg makeproxy\fR +[\fB\-h\fR|\fB\-\-help\fR] +[\fB\-V\fR|\fB\-\-version\fR] +[\fB\-d\fR|\fB\-\-debug\fR] +[\fB\-v\fR|\fB\-\-verbose\fR] +[\fB\-m\fR|\fB\-\-master\fR \fImaster-prefix\fR] +[\fB\-s\fR|\fB\-\-slave\fR \fIslave-prefix\fR] +[\fB\-t\fR|\fB\-\-tmpdir\fR \fIdirectory\fR] +[\fB\-o\fR|\fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR] +[\fImaster-package-name\fR|\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBopenpkg makeproxy\fR creates a \fIproxy\fR binary \fBOpenPKG\fR \s-1RPM\s0 package +for a \fIslave\fR \fBOpenPKG\fR instance by emulating a regular binary +\&\fBOpenPKG\fR \s-1RPM\s0 package from a \fImaster\fR \fBOpenPKG\fR instance. +.PP +A proxy package contains (virtually) the same contents as the regular +package, but in the form of a shadow tree. Such a shadow tree consists +of the same physical directory structure but with all files replaced by +symbolic links pointing to the regular files in the master \fBOpenPKG\fR +instance. +.PP +A proxy package is useful if multiple closely related \fBOpenPKG\fR +instances are installed on the same system. In this case lots of +dependent (and this way required, although not explicitly wanted) +packages have to be installed in \fIevery\fR \fBOpenPKG\fR instance. Think +about packages like \fBopenssl\fR, \fBperl\fR, \fBgcc\fR, etc. This can be both +very time-consuming and become a maintenance nightmare on upgrades. +Instead, you can select a master \fBOpenPKG\fR instance, install those +regular packages physically there only and install simple proxy packages +for them in all other slave \fBOpenPKG\fR instances. +.PP +Keep in mind that this obviously works correctly for packages which +do \fInot\fR have hard-coded dependencies to their \fBOpenPKG\fR instance +(configuration files, etc). For other packages it might also work, +but be at least be warned about side-effects! Additionally, make sure +you always keep proxy packages in sync with the regular package by +recreating the proxy packages after the regular packages have changed. +.SH "SHADOW TREE" +.IX Header "SHADOW TREE" +The shadow tree of a proxy package \fBname\fR contain the following three +types of paths: +.IP "\fIslave-prefix\fR[/\fIdir\fR]" 4 +.IX Item "slave-prefix[/dir]" +This is a physical directory for the slave \fBOpenPKG\fR instance, exactly +as it exists in the regular package of the master \fBOpenPKG\fR instance. +.ie n .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\*(C`/.prefix\-\*(C'\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4 +.el .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4 +.IX Item "slave-prefix[/dir]/file -> revdir/.prefix-foo[/dir]/file" +This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR +instance, indirectly pointing to the corresponding file of the regular +package in the master \fBOpenPKG\fR instance. The \fIrevdir\fR is a reverse +path corresponding to \fIdir\fR, i.e., for each sub-directory step in +\&\fIdir\fR it contains a "\f(CW\*(C`../\*(C'\fR" parent directory step. +.ie n .IP "\fIslave-prefix\fR\*(C`/.prefix\-\*(C'\fBfoo\fR \-> \fImaster-prefix\fR" 4 +.el .IP "\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR \-> \fImaster-prefix\fR" 4 +.IX Item "slave-prefix/.prefix-foo -> master-prefix" +This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR +instance, directly pointing to the prefix of the master \fBOpenPKG\fR +instance. This allows one to redirect a whole package to +a different \fBOpenPKG\fR instance by manually changing the +\&\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR symbolic link. The idea is that this +link even could be automatically controlled by a higher-level facility. +.SH "OPTIONS" +.IX Header "OPTIONS" +The following command line options and arguments are supported: +.IP "\fB\-h\fR, \fB\-\-help\fR" 4 +.IX Item "-h, --help" +Print the usage message and immediately exit. +.IP "\fB\-V\fR, \fB\-\-version\fR" 4 +.IX Item "-V, --version" +Print program version. +.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 +.IX Item "-v, --verbose" +Enable printing of verbose messages on \fIstderr\fR summarizing the internal processing. +.IP "\fB\-d\fR, \fB\-\-debug\fR" 4 +.IX Item "-d, --debug" +Enable printing of debug messages on \fIstderr\fR showing the executed shell commands. +.IP "\fB\-m\fR, \fB\-\-master\fR \fImaster-prefix\fR" 4 +.IX Item "-m, --master master-prefix" +Set the filesystem path prefix of the \fImaster\fR \fBOpenPKG\fR instance. +If not specified, the prefix is determined from the master package. +.IP "\fB\-s\fR, \fB\-\-slave\fR \fIslave-prefix\fR" 4 +.IX Item "-s, --slave slave-prefix" +Set the filesystem path prefix of the \fIslave\fR \fBOpenPKG\fR instance. +If not specified, the prefix defaults to the prefix of +the \fBOpenPKG\fR instance the \f(CW\*(C`openpkg makeproxy\*(C'\fR command is run from. +.IP "\fB\-t\fR, \fB\-\-tmpdir\fR \fIdirectory\fR" 4 +.IX Item "-t, --tmpdir directory" +Set a particular temporary directory. The default is \f(CW$TMPDIR\fR or +\&\f(CW\*(C`/tmp\*(C'\fR (in that order). +.ie n .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\*(C`\-\*(C'" 4 +.el .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4 +.IX Item "-o, --output directory|slave-package-file|-" +Set the location where to write the output proxy \s-1RPM\s0 package for the +slave \fBOpenPKG\fR instance. The argument "\f(CW\*(C`\-\*(C'\fR" indicates that the output +proxy \s-1RPM\s0 package is written to \fIstdout\fR. The default is "\f(CW\*(C`.\*(C'\fR" (the +current working directory). If the output location is a directory and +the regular \s-1RPM\s0 package of the master \fBOpenPKG\fR instance is named +"\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.\*(C'\fR\fIarch\fR\f(CW\*(C`\-\*(C'\fR\fIos\fR\f(CW\*(C`\-\*(C'\fR\fItag1\fR\f(CW\*(C`.rp +m\*(C'\fR\*(L", then the output proxy \s-1RPM\s0 package is named +\&\*(R"\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`+PROXY\*(C'\fR\f(CW\*(C`.\*(C'\fR\fIarch\fR\f(CW\*(C`\-\*(C'\fR\fIos\fR\f(CW\*(C`\-\*(C'\fR\fIt +ag2\fR\f(CW\*(C`.rpm\*(C'\fR" in the output directory (\fItag1\fR and \fItag2\fR are the tags +of the master and slave \fBOpenPKG\fR instances). +.ie n .IP "\fImaster-package-file\fR|\*(C`\-\*(C'" 4 +.el .IP "\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4 +.IX Item "master-package-file|-" +Set the location where to read the input regular \s-1RPM\s0 package. The +special argument "\f(CW\*(C`\-\*(C'\fR" indicates that the input regular \s-1RPM\s0 package is +read from \fIstdin\fR (the default). +.SH "EXAMPLE" +.IX Header "EXAMPLE" +Assume you have three \fBOpenPKG\fR instances on a system: \f(CW\*(C`/usr/opkg\*(C'\fR +(the master instance), \f(CW\*(C`/v/foo/sw\*(C'\fR (a project instance) and \f(CW\*(C`/v/bar/sw\*(C'\fR +(another project instance). Now let us install the \fBOpenPKG\fR \fBbash\fR package in +all three locations, but only once physically. +.PP +.Vb 5 +\& # build and install regular binary RPM package for /usr/opkg +\& $ /usr/opkg/bin/openpkg rpm \-\-rebuild \e +\& bash\-3.1.17\-20060622.src.rpm +\& $ /usr/opkg/bin/openpkg rpm \-Uvh \e +\& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm +\& +\& # build and install proxy RPM package for /v/foo/sw +\& # (using the regular binary RPM package of /usr/opkg) +\& $ /v/foo/sw/bin/openpkg makeproxy \-\-output=/v/foo/RPM/PKG/ \e +\& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm +\& $ /v/foo/sw/bin/openpkg rpm \-Uvh \e +\& /v/foo/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm +\& +\& # build and install proxy RPM package for /v/bar/sw +\& # (using the installed package of /usr/opkg) +\& $ /v/bar/sw/bin/openpkg makeproxy \-\-output=/v/bar/RPM/PKG/ \e +\& \-\-master=/usr/opkg bash +\& $ /v/bar/sw/bin/openpkg rpm \-Uvh \e +\& /v/bar/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fBOpenPKG\fR http://www.openpkg.org/, +\&\fBopenpkg rpm\fR, \fIln\fR\|(1). +.SH "HISTORY" +.IX Header "HISTORY" +\&\fBopenpkg makeproxy\fR was developed in February 2002 by Ralf S. +Engelschall for the \fBOpenPKG\fR +project after an idea for virtual packages by Thomas Lotterer +. The implementation was completely +worked off in August 2006. +.SH "AUTHOR" +.IX Header "AUTHOR" +.Vb 3 +\& Ralf S. Engelschall +\& rse@engelschall.com +\& www.engelschall.com +.Ve