Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 . ds -- \(*W-
28 . ds PI pi
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31 . ds L" ""
32 . ds R" ""
33 . ds C`
34 . ds C'
35 'br\}
36 .el\{\
37 . ds -- \|\(em\|
38 . ds PI \(*p
39 . ds L" ``
40 . ds R" ''
41 'br\}
42 .\"
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
44 .ie \n(.g .ds Aq \(aq
45 .el .ds Aq '
46 .\"
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
51 .ie \nF \{\
52 . de IX
53 . tm Index:\\$1\t\\n%\t"\\$2"
54 ..
55 . nr % 0
56 . rr F
57 .\}
58 .el \{\
59 . de IX
60 ..
61 .\}
62 .\"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
65 . \" fudge factors for nroff and troff
66 .if n \{\
67 . ds #H 0
68 . ds #V .8m
69 . ds #F .3m
70 . ds #[ \f1
71 . ds #] \fP
72 .\}
73 .if t \{\
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75 . ds #V .6m
76 . ds #F 0
77 . ds #[ \&
78 . ds #] \&
79 .\}
80 . \" simple accents for nroff and troff
81 .if n \{\
82 . ds ' \&
83 . ds ` \&
84 . ds ^ \&
85 . ds , \&
86 . ds ~ ~
87 . ds /
88 .\}
89 .if t \{\
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96 .\}
97 . \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 . \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 . \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
112 \{\
113 . ds : e
114 . ds 8 ss
115 . ds o a
116 . ds d- d\h'-1'\(ga
117 . ds D- D\h'-1'\(hy
118 . ds th \o'bp'
119 . ds Th \o'LP'
120 . ds ae ae
121 . ds Ae AE
122 .\}
123 .rm #[ #] #H #V #F C
124 .\" ========================================================================
125 .\"
126 .IX Title "MAKEPROXY 8"
127 .TH MAKEPROXY 8 "OpenPKG" "MAKEPROXY(8)" "OpenPKG"
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
130 .if n .ad l
131 .nh
132 .SH "NAME"
133 openpkg makeproxy \-\- Make Proxy OpenPKG RPM Package
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 \&\fBopenpkg makeproxy\fR
137 [\fB\-h\fR|\fB\-\-help\fR]
138 [\fB\-V\fR|\fB\-\-version\fR]
139 [\fB\-d\fR|\fB\-\-debug\fR]
140 [\fB\-v\fR|\fB\-\-verbose\fR]
141 [\fB\-m\fR|\fB\-\-master\fR \fImaster-prefix\fR]
142 [\fB\-s\fR|\fB\-\-slave\fR \fIslave-prefix\fR]
143 [\fB\-t\fR|\fB\-\-tmpdir\fR \fIdirectory\fR]
144 [\fB\-o\fR|\fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR]
145 [\fImaster-package-name\fR|\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR]
146 .SH "DESCRIPTION"
147 .IX Header "DESCRIPTION"
148 \&\fBopenpkg makeproxy\fR creates a \fIproxy\fR binary \fBOpenPKG\fR \s-1RPM\s0 package
149 for a \fIslave\fR \fBOpenPKG\fR instance by emulating a regular binary
150 \&\fBOpenPKG\fR \s-1RPM\s0 package from a \fImaster\fR \fBOpenPKG\fR instance.
151 .PP
152 A proxy package contains (virtually) the same contents as the regular
153 package, but in the form of a shadow tree. Such a shadow tree consists
154 of the same physical directory structure but with all files replaced by
155 symbolic links pointing to the regular files in the master \fBOpenPKG\fR
156 instance.
157 .PP
158 A proxy package is useful if multiple closely related \fBOpenPKG\fR
159 instances are installed on the same system. In this case lots of
160 dependent (and this way required, although not explicitly wanted)
161 packages have to be installed in \fIevery\fR \fBOpenPKG\fR instance. Think
162 about packages like \fBopenssl\fR, \fBperl\fR, \fBgcc\fR, etc. This can be both
163 very time-consuming and become a maintenance nightmare on upgrades.
164 Instead, you can select a master \fBOpenPKG\fR instance, install those
165 regular packages physically there only and install simple proxy packages
166 for them in all other slave \fBOpenPKG\fR instances.
167 .PP
168 Keep in mind that this obviously works correctly for packages which
169 do \fInot\fR have hard-coded dependencies to their \fBOpenPKG\fR instance
170 (configuration files, etc). For other packages it might also work,
171 but be at least be warned about side-effects! Additionally, make sure
172 you always keep proxy packages in sync with the regular package by
173 recreating the proxy packages after the regular packages have changed.
174 .SH "SHADOW TREE"
175 .IX Header "SHADOW TREE"
176 The shadow tree of a proxy package \fBname\fR contain the following three
177 types of paths:
178 .IP "\fIslave-prefix\fR[/\fIdir\fR]" 4
179 .IX Item "slave-prefix[/dir]"
180 This is a physical directory for the slave \fBOpenPKG\fR instance, exactly
181 as it exists in the regular package of the master \fBOpenPKG\fR instance.
182 .ie n .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\*(C`/.prefix\-\*(C'\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4
183 .el .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4
184 .IX Item "slave-prefix[/dir]/file -> revdir/.prefix-foo[/dir]/file"
185 This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR
186 instance, indirectly pointing to the corresponding file of the regular
187 package in the master \fBOpenPKG\fR instance. The \fIrevdir\fR is a reverse
188 path corresponding to \fIdir\fR, i.e., for each sub-directory step in
189 \&\fIdir\fR it contains a "\f(CW\*(C`../\*(C'\fR" parent directory step.
190 .ie n .IP "\fIslave-prefix\fR\*(C`/.prefix\-\*(C'\fBfoo\fR \-> \fImaster-prefix\fR" 4
191 .el .IP "\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR \-> \fImaster-prefix\fR" 4
192 .IX Item "slave-prefix/.prefix-foo -> master-prefix"
193 This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR
194 instance, directly pointing to the prefix of the master \fBOpenPKG\fR
195 instance. This allows one to redirect a whole package to
196 a different \fBOpenPKG\fR instance by manually changing the
197 \&\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR symbolic link. The idea is that this
198 link even could be automatically controlled by a higher-level facility.
199 .SH "OPTIONS"
200 .IX Header "OPTIONS"
201 The following command line options and arguments are supported:
202 .IP "\fB\-h\fR, \fB\-\-help\fR" 4
203 .IX Item "-h, --help"
204 Print the usage message and immediately exit.
205 .IP "\fB\-V\fR, \fB\-\-version\fR" 4
206 .IX Item "-V, --version"
207 Print program version.
208 .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4
209 .IX Item "-v, --verbose"
210 Enable printing of verbose messages on \fIstderr\fR summarizing the internal processing.
211 .IP "\fB\-d\fR, \fB\-\-debug\fR" 4
212 .IX Item "-d, --debug"
213 Enable printing of debug messages on \fIstderr\fR showing the executed shell commands.
214 .IP "\fB\-m\fR, \fB\-\-master\fR \fImaster-prefix\fR" 4
215 .IX Item "-m, --master master-prefix"
216 Set the filesystem path prefix of the \fImaster\fR \fBOpenPKG\fR instance.
217 If not specified, the prefix is determined from the master package.
218 .IP "\fB\-s\fR, \fB\-\-slave\fR \fIslave-prefix\fR" 4
219 .IX Item "-s, --slave slave-prefix"
220 Set the filesystem path prefix of the \fIslave\fR \fBOpenPKG\fR instance.
221 If not specified, the prefix defaults to the prefix of
222 the \fBOpenPKG\fR instance the \f(CW\*(C`openpkg makeproxy\*(C'\fR command is run from.
223 .IP "\fB\-t\fR, \fB\-\-tmpdir\fR \fIdirectory\fR" 4
224 .IX Item "-t, --tmpdir directory"
225 Set a particular temporary directory. The default is \f(CW$TMPDIR\fR or
226 \&\f(CW\*(C`/tmp\*(C'\fR (in that order).
227 .ie n .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\*(C`\-\*(C'" 4
228 .el .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4
229 .IX Item "-o, --output directory|slave-package-file|-"
230 Set the location where to write the output proxy \s-1RPM\s0 package for the
231 slave \fBOpenPKG\fR instance. The argument "\f(CW\*(C`\-\*(C'\fR" indicates that the output
232 proxy \s-1RPM\s0 package is written to \fIstdout\fR. The default is "\f(CW\*(C`.\*(C'\fR" (the
233 current working directory). If the output location is a directory and
234 the regular \s-1RPM\s0 package of the master \fBOpenPKG\fR instance is named
235 "\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
236 m\*(C'\fR\*(L", then the output proxy \s-1RPM\s0 package is named
237 \&\*(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
238 ag2\fR\f(CW\*(C`.rpm\*(C'\fR" in the output directory (\fItag1\fR and \fItag2\fR are the tags
239 of the master and slave \fBOpenPKG\fR instances).
240 .ie n .IP "\fImaster-package-file\fR|\*(C`\-\*(C'" 4
241 .el .IP "\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4
242 .IX Item "master-package-file|-"
243 Set the location where to read the input regular \s-1RPM\s0 package. The
244 special argument "\f(CW\*(C`\-\*(C'\fR" indicates that the input regular \s-1RPM\s0 package is
245 read from \fIstdin\fR (the default).
246 .SH "EXAMPLE"
247 .IX Header "EXAMPLE"
248 Assume you have three \fBOpenPKG\fR instances on a system: \f(CW\*(C`/usr/opkg\*(C'\fR
249 (the master instance), \f(CW\*(C`/v/foo/sw\*(C'\fR (a project instance) and \f(CW\*(C`/v/bar/sw\*(C'\fR
250 (another project instance). Now let us install the \fBOpenPKG\fR \fBbash\fR package in
251 all three locations, but only once physically.
252 .PP
253 .Vb 5
254 \& # build and install regular binary RPM package for /usr/opkg
255 \& $ /usr/opkg/bin/openpkg rpm \-\-rebuild \e
256 \& bash\-3.1.17\-20060622.src.rpm
257 \& $ /usr/opkg/bin/openpkg rpm \-Uvh \e
258 \& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm
259 \&
260 \& # build and install proxy RPM package for /v/foo/sw
261 \& # (using the regular binary RPM package of /usr/opkg)
262 \& $ /v/foo/sw/bin/openpkg makeproxy \-\-output=/v/foo/RPM/PKG/ \e
263 \& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm
264 \& $ /v/foo/sw/bin/openpkg rpm \-Uvh \e
265 \& /v/foo/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm
266 \&
267 \& # build and install proxy RPM package for /v/bar/sw
268 \& # (using the installed package of /usr/opkg)
269 \& $ /v/bar/sw/bin/openpkg makeproxy \-\-output=/v/bar/RPM/PKG/ \e
270 \& \-\-master=/usr/opkg bash
271 \& $ /v/bar/sw/bin/openpkg rpm \-Uvh \e
272 \& /v/bar/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm
273 .Ve
274 .SH "SEE ALSO"
275 .IX Header "SEE ALSO"
276 \&\fBOpenPKG\fR http://www.openpkg.org/,
277 \&\fBopenpkg rpm\fR, \fIln\fR\|(1).
278 .SH "HISTORY"
279 .IX Header "HISTORY"
280 \&\fBopenpkg makeproxy\fR was developed in February 2002 by Ralf S.
281 Engelschall <rse@engelschall.com> for the \fBOpenPKG\fR
282 project after an idea for virtual packages by Thomas Lotterer
283 <thomas@lotterer.net>. The implementation was completely
284 worked off in August 2006.
285 .SH "AUTHOR"
286 .IX Header "AUTHOR"
287 .Vb 3
288 \& Ralf S. Engelschall
289 \& rse@engelschall.com
290 \& www.engelschall.com
291 .Ve