1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openpkg/makeproxy.8 Tue Jul 31 12:23:42 2012 +0200 1.3 @@ -0,0 +1,291 @@ 1.4 +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) 1.5 +.\" 1.6 +.\" Standard preamble: 1.7 +.\" ======================================================================== 1.8 +.de Sp \" Vertical space (when we can't use .PP) 1.9 +.if t .sp .5v 1.10 +.if n .sp 1.11 +.. 1.12 +.de Vb \" Begin verbatim text 1.13 +.ft CW 1.14 +.nf 1.15 +.ne \\$1 1.16 +.. 1.17 +.de Ve \" End verbatim text 1.18 +.ft R 1.19 +.fi 1.20 +.. 1.21 +.\" Set up some character translations and predefined strings. \*(-- will 1.22 +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left 1.23 +.\" double quote, and \*(R" will give a right double quote. \*(C+ will 1.24 +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and 1.25 +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, 1.26 +.\" nothing in troff, for use with C<>. 1.27 +.tr \(*W- 1.28 +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 1.29 +.ie n \{\ 1.30 +. ds -- \(*W- 1.31 +. ds PI pi 1.32 +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch 1.33 +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch 1.34 +. ds L" "" 1.35 +. ds R" "" 1.36 +. ds C` 1.37 +. ds C' 1.38 +'br\} 1.39 +.el\{\ 1.40 +. ds -- \|\(em\| 1.41 +. ds PI \(*p 1.42 +. ds L" `` 1.43 +. ds R" '' 1.44 +'br\} 1.45 +.\" 1.46 +.\" Escape single quotes in literal strings from groff's Unicode transform. 1.47 +.ie \n(.g .ds Aq \(aq 1.48 +.el .ds Aq ' 1.49 +.\" 1.50 +.\" If the F register is turned on, we'll generate index entries on stderr for 1.51 +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index 1.52 +.\" entries marked with X<> in POD. Of course, you'll have to process the 1.53 +.\" output yourself in some meaningful fashion. 1.54 +.ie \nF \{\ 1.55 +. de IX 1.56 +. tm Index:\\$1\t\\n%\t"\\$2" 1.57 +.. 1.58 +. nr % 0 1.59 +. rr F 1.60 +.\} 1.61 +.el \{\ 1.62 +. de IX 1.63 +.. 1.64 +.\} 1.65 +.\" 1.66 +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 1.67 +.\" Fear. Run. Save yourself. No user-serviceable parts. 1.68 +. \" fudge factors for nroff and troff 1.69 +.if n \{\ 1.70 +. ds #H 0 1.71 +. ds #V .8m 1.72 +. ds #F .3m 1.73 +. ds #[ \f1 1.74 +. ds #] \fP 1.75 +.\} 1.76 +.if t \{\ 1.77 +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) 1.78 +. ds #V .6m 1.79 +. ds #F 0 1.80 +. ds #[ \& 1.81 +. ds #] \& 1.82 +.\} 1.83 +. \" simple accents for nroff and troff 1.84 +.if n \{\ 1.85 +. ds ' \& 1.86 +. ds ` \& 1.87 +. ds ^ \& 1.88 +. ds , \& 1.89 +. ds ~ ~ 1.90 +. ds / 1.91 +.\} 1.92 +.if t \{\ 1.93 +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" 1.94 +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' 1.95 +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' 1.96 +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' 1.97 +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' 1.98 +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' 1.99 +.\} 1.100 +. \" troff and (daisy-wheel) nroff accents 1.101 +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' 1.102 +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' 1.103 +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] 1.104 +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' 1.105 +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' 1.106 +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] 1.107 +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] 1.108 +.ds ae a\h'-(\w'a'u*4/10)'e 1.109 +.ds Ae A\h'-(\w'A'u*4/10)'E 1.110 +. \" corrections for vroff 1.111 +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' 1.112 +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' 1.113 +. \" for low resolution devices (crt and lpr) 1.114 +.if \n(.H>23 .if \n(.V>19 \ 1.115 +\{\ 1.116 +. ds : e 1.117 +. ds 8 ss 1.118 +. ds o a 1.119 +. ds d- d\h'-1'\(ga 1.120 +. ds D- D\h'-1'\(hy 1.121 +. ds th \o'bp' 1.122 +. ds Th \o'LP' 1.123 +. ds ae ae 1.124 +. ds Ae AE 1.125 +.\} 1.126 +.rm #[ #] #H #V #F C 1.127 +.\" ======================================================================== 1.128 +.\" 1.129 +.IX Title "MAKEPROXY 8" 1.130 +.TH MAKEPROXY 8 "OpenPKG" "MAKEPROXY(8)" "OpenPKG" 1.131 +.\" For nroff, turn off justification. Always turn off hyphenation; it makes 1.132 +.\" way too many mistakes in technical documents. 1.133 +.if n .ad l 1.134 +.nh 1.135 +.SH "NAME" 1.136 +openpkg makeproxy \-\- Make Proxy OpenPKG RPM Package 1.137 +.SH "SYNOPSIS" 1.138 +.IX Header "SYNOPSIS" 1.139 +\&\fBopenpkg makeproxy\fR 1.140 +[\fB\-h\fR|\fB\-\-help\fR] 1.141 +[\fB\-V\fR|\fB\-\-version\fR] 1.142 +[\fB\-d\fR|\fB\-\-debug\fR] 1.143 +[\fB\-v\fR|\fB\-\-verbose\fR] 1.144 +[\fB\-m\fR|\fB\-\-master\fR \fImaster-prefix\fR] 1.145 +[\fB\-s\fR|\fB\-\-slave\fR \fIslave-prefix\fR] 1.146 +[\fB\-t\fR|\fB\-\-tmpdir\fR \fIdirectory\fR] 1.147 +[\fB\-o\fR|\fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR] 1.148 +[\fImaster-package-name\fR|\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR] 1.149 +.SH "DESCRIPTION" 1.150 +.IX Header "DESCRIPTION" 1.151 +\&\fBopenpkg makeproxy\fR creates a \fIproxy\fR binary \fBOpenPKG\fR \s-1RPM\s0 package 1.152 +for a \fIslave\fR \fBOpenPKG\fR instance by emulating a regular binary 1.153 +\&\fBOpenPKG\fR \s-1RPM\s0 package from a \fImaster\fR \fBOpenPKG\fR instance. 1.154 +.PP 1.155 +A proxy package contains (virtually) the same contents as the regular 1.156 +package, but in the form of a shadow tree. Such a shadow tree consists 1.157 +of the same physical directory structure but with all files replaced by 1.158 +symbolic links pointing to the regular files in the master \fBOpenPKG\fR 1.159 +instance. 1.160 +.PP 1.161 +A proxy package is useful if multiple closely related \fBOpenPKG\fR 1.162 +instances are installed on the same system. In this case lots of 1.163 +dependent (and this way required, although not explicitly wanted) 1.164 +packages have to be installed in \fIevery\fR \fBOpenPKG\fR instance. Think 1.165 +about packages like \fBopenssl\fR, \fBperl\fR, \fBgcc\fR, etc. This can be both 1.166 +very time-consuming and become a maintenance nightmare on upgrades. 1.167 +Instead, you can select a master \fBOpenPKG\fR instance, install those 1.168 +regular packages physically there only and install simple proxy packages 1.169 +for them in all other slave \fBOpenPKG\fR instances. 1.170 +.PP 1.171 +Keep in mind that this obviously works correctly for packages which 1.172 +do \fInot\fR have hard-coded dependencies to their \fBOpenPKG\fR instance 1.173 +(configuration files, etc). For other packages it might also work, 1.174 +but be at least be warned about side-effects! Additionally, make sure 1.175 +you always keep proxy packages in sync with the regular package by 1.176 +recreating the proxy packages after the regular packages have changed. 1.177 +.SH "SHADOW TREE" 1.178 +.IX Header "SHADOW TREE" 1.179 +The shadow tree of a proxy package \fBname\fR contain the following three 1.180 +types of paths: 1.181 +.IP "\fIslave-prefix\fR[/\fIdir\fR]" 4 1.182 +.IX Item "slave-prefix[/dir]" 1.183 +This is a physical directory for the slave \fBOpenPKG\fR instance, exactly 1.184 +as it exists in the regular package of the master \fBOpenPKG\fR instance. 1.185 +.ie n .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\*(C`/.prefix\-\*(C'\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4 1.186 +.el .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4 1.187 +.IX Item "slave-prefix[/dir]/file -> revdir/.prefix-foo[/dir]/file" 1.188 +This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR 1.189 +instance, indirectly pointing to the corresponding file of the regular 1.190 +package in the master \fBOpenPKG\fR instance. The \fIrevdir\fR is a reverse 1.191 +path corresponding to \fIdir\fR, i.e., for each sub-directory step in 1.192 +\&\fIdir\fR it contains a "\f(CW\*(C`../\*(C'\fR" parent directory step. 1.193 +.ie n .IP "\fIslave-prefix\fR\*(C`/.prefix\-\*(C'\fBfoo\fR \-> \fImaster-prefix\fR" 4 1.194 +.el .IP "\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR \-> \fImaster-prefix\fR" 4 1.195 +.IX Item "slave-prefix/.prefix-foo -> master-prefix" 1.196 +This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR 1.197 +instance, directly pointing to the prefix of the master \fBOpenPKG\fR 1.198 +instance. This allows one to redirect a whole package to 1.199 +a different \fBOpenPKG\fR instance by manually changing the 1.200 +\&\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR symbolic link. The idea is that this 1.201 +link even could be automatically controlled by a higher-level facility. 1.202 +.SH "OPTIONS" 1.203 +.IX Header "OPTIONS" 1.204 +The following command line options and arguments are supported: 1.205 +.IP "\fB\-h\fR, \fB\-\-help\fR" 4 1.206 +.IX Item "-h, --help" 1.207 +Print the usage message and immediately exit. 1.208 +.IP "\fB\-V\fR, \fB\-\-version\fR" 4 1.209 +.IX Item "-V, --version" 1.210 +Print program version. 1.211 +.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 1.212 +.IX Item "-v, --verbose" 1.213 +Enable printing of verbose messages on \fIstderr\fR summarizing the internal processing. 1.214 +.IP "\fB\-d\fR, \fB\-\-debug\fR" 4 1.215 +.IX Item "-d, --debug" 1.216 +Enable printing of debug messages on \fIstderr\fR showing the executed shell commands. 1.217 +.IP "\fB\-m\fR, \fB\-\-master\fR \fImaster-prefix\fR" 4 1.218 +.IX Item "-m, --master master-prefix" 1.219 +Set the filesystem path prefix of the \fImaster\fR \fBOpenPKG\fR instance. 1.220 +If not specified, the prefix is determined from the master package. 1.221 +.IP "\fB\-s\fR, \fB\-\-slave\fR \fIslave-prefix\fR" 4 1.222 +.IX Item "-s, --slave slave-prefix" 1.223 +Set the filesystem path prefix of the \fIslave\fR \fBOpenPKG\fR instance. 1.224 +If not specified, the prefix defaults to the prefix of 1.225 +the \fBOpenPKG\fR instance the \f(CW\*(C`openpkg makeproxy\*(C'\fR command is run from. 1.226 +.IP "\fB\-t\fR, \fB\-\-tmpdir\fR \fIdirectory\fR" 4 1.227 +.IX Item "-t, --tmpdir directory" 1.228 +Set a particular temporary directory. The default is \f(CW$TMPDIR\fR or 1.229 +\&\f(CW\*(C`/tmp\*(C'\fR (in that order). 1.230 +.ie n .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\*(C`\-\*(C'" 4 1.231 +.el .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4 1.232 +.IX Item "-o, --output directory|slave-package-file|-" 1.233 +Set the location where to write the output proxy \s-1RPM\s0 package for the 1.234 +slave \fBOpenPKG\fR instance. The argument "\f(CW\*(C`\-\*(C'\fR" indicates that the output 1.235 +proxy \s-1RPM\s0 package is written to \fIstdout\fR. The default is "\f(CW\*(C`.\*(C'\fR" (the 1.236 +current working directory). If the output location is a directory and 1.237 +the regular \s-1RPM\s0 package of the master \fBOpenPKG\fR instance is named 1.238 +"\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 1.239 +m\*(C'\fR\*(L", then the output proxy \s-1RPM\s0 package is named 1.240 +\&\*(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 1.241 +ag2\fR\f(CW\*(C`.rpm\*(C'\fR" in the output directory (\fItag1\fR and \fItag2\fR are the tags 1.242 +of the master and slave \fBOpenPKG\fR instances). 1.243 +.ie n .IP "\fImaster-package-file\fR|\*(C`\-\*(C'" 4 1.244 +.el .IP "\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4 1.245 +.IX Item "master-package-file|-" 1.246 +Set the location where to read the input regular \s-1RPM\s0 package. The 1.247 +special argument "\f(CW\*(C`\-\*(C'\fR" indicates that the input regular \s-1RPM\s0 package is 1.248 +read from \fIstdin\fR (the default). 1.249 +.SH "EXAMPLE" 1.250 +.IX Header "EXAMPLE" 1.251 +Assume you have three \fBOpenPKG\fR instances on a system: \f(CW\*(C`/usr/opkg\*(C'\fR 1.252 +(the master instance), \f(CW\*(C`/v/foo/sw\*(C'\fR (a project instance) and \f(CW\*(C`/v/bar/sw\*(C'\fR 1.253 +(another project instance). Now let us install the \fBOpenPKG\fR \fBbash\fR package in 1.254 +all three locations, but only once physically. 1.255 +.PP 1.256 +.Vb 5 1.257 +\& # build and install regular binary RPM package for /usr/opkg 1.258 +\& $ /usr/opkg/bin/openpkg rpm \-\-rebuild \e 1.259 +\& bash\-3.1.17\-20060622.src.rpm 1.260 +\& $ /usr/opkg/bin/openpkg rpm \-Uvh \e 1.261 +\& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm 1.262 +\& 1.263 +\& # build and install proxy RPM package for /v/foo/sw 1.264 +\& # (using the regular binary RPM package of /usr/opkg) 1.265 +\& $ /v/foo/sw/bin/openpkg makeproxy \-\-output=/v/foo/RPM/PKG/ \e 1.266 +\& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm 1.267 +\& $ /v/foo/sw/bin/openpkg rpm \-Uvh \e 1.268 +\& /v/foo/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm 1.269 +\& 1.270 +\& # build and install proxy RPM package for /v/bar/sw 1.271 +\& # (using the installed package of /usr/opkg) 1.272 +\& $ /v/bar/sw/bin/openpkg makeproxy \-\-output=/v/bar/RPM/PKG/ \e 1.273 +\& \-\-master=/usr/opkg bash 1.274 +\& $ /v/bar/sw/bin/openpkg rpm \-Uvh \e 1.275 +\& /v/bar/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm 1.276 +.Ve 1.277 +.SH "SEE ALSO" 1.278 +.IX Header "SEE ALSO" 1.279 +\&\fBOpenPKG\fR http://www.openpkg.org/, 1.280 +\&\fBopenpkg rpm\fR, \fIln\fR\|(1). 1.281 +.SH "HISTORY" 1.282 +.IX Header "HISTORY" 1.283 +\&\fBopenpkg makeproxy\fR was developed in February 2002 by Ralf S. 1.284 +Engelschall <rse@engelschall.com> for the \fBOpenPKG\fR 1.285 +project after an idea for virtual packages by Thomas Lotterer 1.286 +<thomas@lotterer.net>. The implementation was completely 1.287 +worked off in August 2006. 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